Esempio n. 1
0
 /// <summary>
 /// 新建或修改病史调用
 /// </summary>
 /// <param name="strZyh">住院号</param>
 /// <param name="brid">病人ID</param>
 /// <param name="strBrxm">病人姓名</param>
 /// <param name="strMedRecId"></param>
 /// <param name="strBsfl"></param>
 /// <param name="progressTempalteName"></param>
 /// <param name="nsOffXml"></param>
 public void SendHuiMei_UpdateBs(string strZyh, string brid, string strBrxm, string strMedRecId, string strBsfl, string progressTempalteName, string nsOffXml)
 {
     try
     {
         WS_HMEntity _hmWS = new WS_HMEntity();
         //病人基本信息
         _hmWS.userGuid         = strZyh;
         _hmWS.serialNumber     = brid;
         _hmWS.patientName      = strBrxm;
         _hmWS.progressNoteList = new List <ProgressNote>();
         ProgressNote pn = new ProgressNote();
         pn.progressGuid         = strMedRecId;
         pn.progressType         = GetProgressType(strBsfl);
         pn.progressTempalteName = progressTempalteName;
         pn.msgType         = 1; //0: text,通过progressMessage传递文本内容 1:xml,通过progressMessage传递xml内容 2:map,通过messageList传递病程信息的键值对
         pn.progressMessage = nsOffXml;
         _hmWS.progressNoteList.Add(pn);
         Common_HMEntity      _common_HMEntity = InitPatitenBaseInfo(brid, strZyh);
         JavaScriptSerializer ja = new JavaScriptSerializer();
         ja.MaxJsonLength = Int32.MaxValue;
         JObject obj  = JObject.Parse(ja.Serialize(_hmWS));
         JObject obj1 = JObject.Parse(ja.Serialize(_common_HMEntity));
         obj.Merge(obj1);
         myMayson.Send(obj.ToString());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 删除病史调用
        /// </summary>
        /// <param name="strZyh"></param>
        /// <param name="brid"></param>
        /// <param name="strBrxm"></param>
        /// <param name="strMedRecId"></param>
        /// <param name="strBsfl"></param>
        /// <param name="strYsgh"></param>
        public void SendHuiMei_DeleteBs(string strZyh, string brid, string strBrxm, string strMedRecId, string strBsfl, string strYsgh)
        {
            try
            {
                WS_HMEntity _hmWS = new WS_HMEntity();
                //病人基本信息
                _hmWS.userGuid     = strZyh;
                _hmWS.serialNumber = brid;
                _hmWS.patientName  = strBrxm;

                _hmWS.deleteProgressNoteList = new List <deleteProgressNote>();
                deleteProgressNote pn = new deleteProgressNote();
                pn.progressGuid = strMedRecId;
                pn.progressType = GetProgressType(strBsfl);
                pn.doctorGuid   = strYsgh;
                pn.recordTime   = DateTime.Now.ToString();
                _hmWS.deleteProgressNoteList.Add(pn);
                Common_HMEntity      _common_HMEntity = InitPatitenBaseInfo(brid, strZyh);
                JavaScriptSerializer ja = new JavaScriptSerializer();
                ja.MaxJsonLength = Int32.MaxValue;
                JObject obj  = JObject.Parse(ja.Serialize(_hmWS));
                JObject obj1 = JObject.Parse(ja.Serialize(_common_HMEntity));
                obj.Merge(obj1);
                myMayson.Send(obj.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// 开遗嘱时调用
 /// </summary>
 /// <param name="brid">病人id</param>
 /// <param name="zyh">住院号</param>
 /// <param name="yzyp_hmEntity">医嘱参数</param>
 public void SendYpSendJson(string brid, string zyh, YZYP_HMEntity yzyp_hmEntity)
 {
     try
     {
         Common_HMEntity      _common_HMEntity = InitPatitenBaseInfo(brid, zyh);
         JavaScriptSerializer ja = new JavaScriptSerializer();
         ja.MaxJsonLength = Int32.MaxValue;
         JObject obj  = JObject.Parse(ja.Serialize(yzyp_hmEntity));
         JObject obj1 = JObject.Parse(ja.Serialize(_common_HMEntity));
         obj.Merge(obj1);
         string dataToSend = obj.ToString();
         myMayson.Send(dataToSend);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 参数病人数据和诊断
        /// </summary>
        /// <param name="brid"></param>
        /// <param name="zyh"></param>
        private Common_HMEntity InitPatitenBaseInfo(string brid, string zyh)
        {
            ClsBrInfoBLL hmbll     = new ClsBrInfoBLL();
            ClsBrInfo    clsBrInfo = hmbll.GetBrInfo(int.Parse(brid), zyh)[0];
            DataTable    dt1       = hmbll.GetHmDiagnose(Convert.ToInt32(brid));
            //病人基本信息
            Common_HMEntity _common_HMEntity = new Common_HMEntity();
            string          strZyh           = clsBrInfo.ZYID;

            _common_HMEntity.userGuid            = clsBrInfo.ZYID;
            _common_HMEntity.serialNumber        = brid;
            _common_HMEntity.patientName         = clsBrInfo.XM;
            _common_HMEntity.doctorGuid          = Convert.ToString(clsBrInfo.ZYYS);
            _common_HMEntity.doctorName          = clsBrInfo.YSXM;
            _common_HMEntity.enableQCRemind      = 1;
            _common_HMEntity.admissionTime       = clsBrInfo.RYSJ;
            _common_HMEntity.inpatientDepartment = clsBrInfo.KSMC;
            _common_HMEntity.patientInfo         = new PatientInfo();
            _common_HMEntity.patientInfo.age     = double.Parse(clsBrInfo.NL);
            string ageType = GetAge(clsBrInfo.CSRQ, DateTime.Now);

            _common_HMEntity.patientInfo.ageType = ageType;
            if (clsBrInfo.XBMC == "男")
            {
                _common_HMEntity.patientInfo.gender = 1;
            }
            else if (clsBrInfo.XBMC == "女")
            {
                _common_HMEntity.patientInfo.gender = 0;
            }
            else
            {
                _common_HMEntity.patientInfo.gender = 2;
            }
            if (clsBrInfo.HYZK == "已婚")
            {
                _common_HMEntity.patientInfo.maritalStatus = 1;
            }
            else if (clsBrInfo.HYZK == "未婚")
            {
                _common_HMEntity.patientInfo.maritalStatus = 0;
            }
            else
            {
                _common_HMEntity.patientInfo.maritalStatus = 2;
            }
            //ClsHuiMei._common_HMEntity.patientInfo.pregnancyStatus = int.Parse(clsBrInfo.Rows[0][""].ToString());
            //已经明确诊断
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                _common_HMEntity.definiteDiagnosis = new List <DefiniteDiagnosis>();
                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    DefiniteDiagnosis dd = new DefiniteDiagnosis();
                    dd.diseaseType    = int.Parse(dt1.Rows[i]["DiagnoseType"].ToString());
                    dd.id             = dt1.Rows[i]["ICDCode"].ToString();
                    dd.name           = dt1.Rows[i]["ICDTitle"].ToString();
                    dd.narecordTimeme = dt1.Rows[i]["DiagnoseDate"].ToString();
                    _common_HMEntity.definiteDiagnosis.Add(dd);
                }
            }
            return(_common_HMEntity);
        }