/// <summary> /// 给用户打标签 /// </summary> /// <param name="mFItemId">标签Id</param> /// <param name="remark">备注</param> public void UpdatePatientAllRecords(int mFItemId, string remark) { //访客模式下去除医生id及姓名 int doctorId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.DoctorId; string doctorName = Properties.Settings.Default.SetIsCustomer ? string.Empty : Properties.Settings.Default.DoctorName; List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord> { new M_MemberFeaturesRecord { CreateID = doctorId, //CreateTime = DateTime.Now, MFItemID = mFItemId, PatientID = LoginInfo.GetInstance().UserId } }; M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt(); recordLogExt.DoctorID = 0; //doctorId; recordLogExt.DoctorName = string.Empty; //doctorName; recordLogExt.DrID = 0; //doctorId; recordLogExt.DrName = string.Empty; //doctorName; recordLogExt.OpID = doctorId; recordLogExt.OpName = doctorName; int cARecordId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.CARecordID; screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, remark); }
/// <summary> /// 更新当前会员所有特性记录列表 /// </summary> /// <param name="patientId">会员Id</param> /// <param name="records">会员特性记录集合</param> /// <param name="recordLog">会员特性记录日志对象</param> /// <param name="CARecordID">活动记录Id</param> /// <param name="remark">备注</param> public void UpdateMemberAllRecords(int patientId, List <M_MemberFeaturesRecord> records, M_MemberFeaturesRecordLogExt recordLog = null, int?CARecordID = null, string remark = null) { M_MemberAllRecord mMemberAllRecord = new M_MemberAllRecord { PatientId = patientId, MemberFeaturesRecordList = records, MemberFeaturesRecordLogExt = recordLog, CARecordID = CARecordID != null?Convert.ToInt32(CARecordID) : 0, Remark = remark }; var httpClient = new OAuthHttpClient(OAuthToken); var uri = new Uri(string.Format("{0}/ATM/UpdateMemberAllRecords", "http://rempapi.e24health.com/Screen")); var data = JsonConvert.SerializeObject(mMemberAllRecord); var content = new StringContent(data, Encoding.UTF8, "application/json"); var response = httpClient.PostAsync(uri, content).Result; var result = response.StatusCode == HttpStatusCode.OK ? response.Content.ReadAsStringAsync().Result : response.ToString(); }
}// end private void ResultForm_Load(object sender, EventArgs e) private void ShowResult(int score) { if (score <= 15) { lblResult.Text += @"恭喜您,暂无明显足部功能障碍,请注意日常足部保健。本次得分:" + score; strResultPrint += @"恭喜您,暂无明显足部功能障碍,请注 意日常足部保健。"; _score = "本次筛查得分:" + score; } if (score > 15 && score <= 30) { lblResult.Text += @"建议您关注足部健康,注意选用合适的鞋,加强足部肌群的锻炼。"; lblResult.Text += @"本次得分:" + score; strResultPrint += @"建议您关注足部健康,注意选用合适的 鞋,加强足部肌群的锻炼。"; _score = "本次筛查得分:" + score; if (!LoginInfo.GetInstance().Name.Equals("")) { //给用户打标签 List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord> { new M_MemberFeaturesRecord() { CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1732, PatientID = LoginInfo.GetInstance().UserId } }; M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt(); recordLogExt.DoctorID = Properties.Settings.Default.DoctorId; recordLogExt.DoctorName = Properties.Settings.Default.DoctorName; recordLogExt.DrID = Properties.Settings.Default.DoctorId; recordLogExt.DrName = Properties.Settings.Default.DoctorName; recordLogExt.OpID = Properties.Settings.Default.DoctorId; recordLogExt.OpName = Properties.Settings.Default.DoctorName; int cARecordId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.CARecordID; screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "足部筛查"); } } if (score > 30) { lblResult.Text += @"建议尽快进行足部专科检查,选择合适的治疗手段"; lblResult.Text += @"(物理治疗、配置矫形鞋垫、矫形鞋或手术治疗)尽早干预,防止病变继续加重。本次得分:" + score; strResultPrint += @"建议尽快进行足部专科检查,选择合适 的治疗手段(物理治疗、配置矫形鞋垫、 矫形鞋或手术治疗)尽早干预,防止病 变继续加重。"; _score = "本次筛查得分:" + score; if (!LoginInfo.GetInstance().Name.Equals("")) { //给用户打标签 List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord> { new M_MemberFeaturesRecord() { CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1733, PatientID = LoginInfo.GetInstance().UserId } }; M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt(); recordLogExt.DoctorID = Properties.Settings.Default.DoctorId; recordLogExt.DoctorName = Properties.Settings.Default.DoctorName; recordLogExt.DrID = Properties.Settings.Default.DoctorId; recordLogExt.DrName = Properties.Settings.Default.DoctorName; recordLogExt.OpID = Properties.Settings.Default.DoctorId; recordLogExt.OpName = Properties.Settings.Default.DoctorName; int cARecordId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.CARecordID; screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "足部筛查"); } } }
private void Result_Load(object sender, EventArgs e) { M_QuestionnaireUserDetail questionnaire = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuJiZhu); //问卷答题时间 answerTime = questionnaire.AnswerTime; if (questionnaire == null) { return; } IList <M_QuestionnaireResultDetail> questions = questionnaire.Questions; //将登录人与活动关联 if (!LoginInfo.GetInstance().Name.Equals("")) { new CottageActivityManager().AddPToCActivity(); } int score = 0; #region 计算每题得分 if (questions != null && questions.Count > 0) { for (int i = 0; i < questions.Count; i++) { M_QuestionnaireResultDetail result = questions[i]; string answer = result.QuestionResult; if (!string.IsNullOrEmpty(answer) && answer.Contains("A")) { score += 10; } } // end for } // end if (questions != null && questions.Count > 0) if (score <= 10) { lblResult.Text = @"基本正常。"; } if (score > 10 && score <= 20) { lblResult.Text = @"疑似脊柱侧弯。"; if (!LoginInfo.GetInstance().Name.Equals("")) { //给用户打标签 List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord>() { new M_MemberFeaturesRecord() { CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1725, PatientID = LoginInfo.GetInstance().UserId } }; M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt(); recordLogExt.DoctorID = Properties.Settings.Default.DoctorId; recordLogExt.DoctorName = Properties.Settings.Default.DoctorName; recordLogExt.DrID = Properties.Settings.Default.DoctorId; recordLogExt.DrName = Properties.Settings.Default.DoctorName; recordLogExt.OpID = Properties.Settings.Default.DoctorId; recordLogExt.OpName = Properties.Settings.Default.DoctorName; int cARecordId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.CARecordID; screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "脊柱筛查"); } } if (score > 20) { lblResult.Text = @"确定您有脊柱侧弯,请前往医院就诊。"; if (!LoginInfo.GetInstance().Name.Equals("")) { //给用户打标签 List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord>() { new M_MemberFeaturesRecord() { CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1726, PatientID = LoginInfo.GetInstance().UserId } }; M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt(); recordLogExt.DoctorID = Properties.Settings.Default.DoctorId; recordLogExt.DoctorName = Properties.Settings.Default.DoctorName; recordLogExt.DrID = Properties.Settings.Default.DoctorId; recordLogExt.DrName = Properties.Settings.Default.DoctorName; recordLogExt.OpID = Properties.Settings.Default.DoctorId; recordLogExt.OpName = Properties.Settings.Default.DoctorName; int cARecordId = Properties.Settings.Default.SetIsCustomer ? 0 : Properties.Settings.Default.CARecordID; screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "脊柱筛查"); } } lblResult.Text += @"本次得分:" + score; //更新本次问卷得分 M_QuestionnaireUserDetail userDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuJiZhu); if (userDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name)) { int result = screenWebapiClient.UpdateQuestionUserScoreStatus(userDetail.QuestionnaireRecodId, score, 1); } #endregion ; //将游客的结果保存为xml if (LoginInfo.GetInstance().Name.Equals("")) { string number = Properties.Settings.Default.ScreenNumber.ToString(); switch (number.Length) { case 1: number = "000" + number; break; case 2: number = "00" + number; break; case 3: number = "0" + number; break; } SaveXml saveXml = new SaveXml(); saveXml.AddXmlElement(number, questions); lblVisitor.Text += number; lblVisitor.Visible = true; } }