/// <summary> /// IADL表 /// </summary> /// <param name="doc"></param> private void IADLOperation(WordDocument doc) { int feeNo = 7; IOrganizationManageService organizationManageService = IOCContainer.Instance.Resolve <IOrganizationManageService>(); var org = organizationManageService.GetOrg(SecurityHelper.CurrentPrincipal.OrgId); doc.ReplaceText("Org", org.Data.OrgName); IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var questionList = reportManageService.GetQuestionList(feeNo, 7); if (questionList.Count == 0) { InitData(typeof(Question), doc); InitValue(81, 88, doc); return; } List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); foreach (var question in questionList) { var dict = new Dictionary <string, string>(); BindData(question, doc, dict); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 81; i <= 88; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } list.Add(dict); } doc.FillTable(0, list); }
protected override void Operation(WordDocument doc) { long feeNo = ParamId; doc.ReplaceText("Org", GetOrgName(SecurityHelper.CurrentPrincipal.OrgId)); IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var questionList = reportManageService.GetQuestionList(feeNo, 4); if (questionList.Count == 0) { InitData(typeof(Question), doc); InitValue(31, 40, doc); return; } List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); foreach (var question in questionList) { var dict = new Dictionary <string, string>(); BindData(question, doc, dict); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 31; i <= 40; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } list.Add(dict); } doc.FillTable(0, list); }
/// <summary> /// 柯氏评估 /// </summary> /// <param name="doc"></param> private void ColeScaleOperation(WordDocument doc) { int recordId = 10; IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var question = reportManageService.GetQuestion(recordId); if (question == null) { InitData(typeof(Question), doc); doc.ReplaceText("Value89", ""); return; } BindData(question, doc); var answers = reportManageService.GetAnswers(question.Id).ToList(); var answer = answers.Find(o => o.Id == 89); doc.ReplaceText("Value89", answer != null ? answer.Value : "未填"); }
/// <summary> /// P10跌倒危险因子评估 /// </summary> /// <param name="doc"></param> private void P10Operation(WordDocument doc) { int recordId = 9; IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var question = reportManageService.GetQuestion(recordId); if (question == null) { return; } BindData(question, doc); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 129; i <= 139; i++) { var answer = answers.Find(o => o.Id == i); doc.ReplaceText("Value" + i, answer != null ? answer.Value : "未填"); } }
protected override void Operation(WordDocument doc) { int recordId = (int)ParamId; IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var question = reportManageService.GetQuestion(recordId); if (question == null) { InitData(typeof(Question), doc); InitValue(41, 70, doc); return; } BindData(question, doc); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 41; i <= 70; i++) { var answer = answers.Find(o => o.Id == i); doc.ReplaceText("Value" + i, answer != null ? answer.Value : "未填"); } }
/// <summary> /// P12忧郁量表 /// </summary> /// <param name="doc"></param> private void P12Operation(WordDocument doc) { int feeNo = 11; IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var questionList = reportManageService.GetQuestionList(feeNo, 1); List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); foreach (var question in questionList) { var dict = new Dictionary <string, string>(); this.BindData(question, doc, dict); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 1; i <= 15; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } list.Add(dict); } doc.FillTable(0, list); }
protected override void Operation(WordDocument doc) { int recordId = (int)ParamId; doc.ReplaceText("Org", GetOrgName(SecurityHelper.CurrentPrincipal.OrgId)); IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var question = reportManageService.GetQuestion(recordId); if (question == null) { InitData(typeof(Question), doc); InitValue(106, 116, doc); return; } BindData(question, doc); var answers = reportManageService.GetAnswers(question.Id).ToList(); for (var i = 106; i <= 116; i++) { var answer = answers.Find(o => o.Id == i); doc.ReplaceText("Value" + i, answer != null ? answer.Value : "未填"); } }
protected void Operation(WordDocument doc, ReportRequest request) { long id = request.id; var codeType = request.type; doc.ReplaceText("Org", GetOrgName(SecurityHelper.CurrentPrincipal.OrgId)); IReportManageService reportManageService = IOCContainer.Instance.Resolve <IReportManageService>(); var question = reportManageService.GetQuestion(id); if (question.Id == 0) { InitData(typeof(Question), doc); switch (codeType) { case "ADLReport": InitValue(31, 40, doc); break; case "MMSEReport": InitValue(41, 47, doc); break; case "SPMSQReport": InitValue(48, 57, doc); break; case "IADLReport": InitValue(58, 65, doc); break; case "ColeScaleReport": InitValue(66, 66, doc); break; case "PrsSoreReport": InitValue(100, 105, doc); break; } return; } List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); var dict = new Dictionary <string, string>(); BindData(question, doc, dict); var answers = reportManageService.GetAnswers(question.Id).ToList(); switch (codeType) { case "ADLReport": for (var i = 31; i <= 40; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } break; case "MMSEReport": for (var i = 41; i <= 51; i++) { var answer = answers.Find(o => o.Id == i); doc.ReplaceText("Value" + i, answer != null ? answer.Value : "未填"); } break; case "SPMSQReport": for (var i = 52; i <= 61; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } break; case "IADLReport": for (var i = 62; i <= 69; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } break; case "ColeScaleReport": for (var i = 70; i <= 70; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } break; case "PrsSoreReport": for (var i = 104; i <= 109; i++) { var answer = answers.Find(o => o.Id == i); dict.Add("Value" + i, answer != null ? answer.Value : "未填"); } break; } list.Add(dict); doc.FillTable(0, list, doc, codeType); }