/// <summary> /// 住院病人入院登记 /// </summary> /// <param name="ps">病人信息</param> /// <returns></returns> public static PatientSignInfo InpatientRegister(PatientSign ps) { string strParameter = Newtonsoft.Json.JavaScriptConvert.SerializeObject(ps); Message recieveMsg = new Message(); recieveMsg.DES = false; recieveMsg.GZipCompress = false; recieveMsg.dataContent = strParameter; Message retMsg = new Message(); try { retMsg = ncmsInterface.patientSign(recieveMsg); if (retMsg.DES) { retMsg.dataContent = NccmFunction.decrypt(retMsg.dataContent, sKey); } if (retMsg.GZipCompress) { retMsg.dataContent = NccmFunction.gZipDeCompress(retMsg.dataContent); } Type type = typeof(PatientSignInfo); PatientSignInfo result = (PatientSignInfo)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(retMsg.dataContent, type); return(result); } catch (Exception err) { throw new Exception(retMsg.errMsg); } }
/// <summary> /// 农合入院 /// </summary> /// <param name="hashtable"></param> /// <returns></returns> public bool Register(System.Collections.Hashtable hashtable) { PatientSignInfo retMsg = null; PatientSign ps = new PatientSign(); ZyPatBaseData zyPs = new ZyPatBaseData(); JoinArea joinArea = new JoinArea(); joinArea.code = JOIN_AREA_CODE; joinArea.name = JOIN_AREA_NAME; zyPs.hisID = zyPatlist.Nccm_NO;//zyPatlist.CureNo + zyPatlist.PatListID.ToString(); zyPs.medorg_code = MED_ORG_CODE; zyPs.area_id = JOIN_AREA_CODE; zyPs.inpat_no = zyPatlist.CureNo.ToString(); zyPs.person_code = zyPatlist.patientInfo.PatCode; zyPs.name = zyPatlist.patientInfo.PatName; zyPs.sex = zyPatlist.patientInfo.PatSex == "男" ? "1" : "2"; zyPs.idCard = zyPatlist.patientInfo.PatNumber;//? zyPs.family_code = zyPatlist.patientInfo.FamilyCode; zyPs.medcard_id = zyPatlist.patientInfo.MediCard; zyPs.medorg_level = "2"; zyPs.visit_type = "2"; zyPs.adm_date = zyPatlist.CureDate.ToString("yyyy-MM-dd"); zyPs.adm_state = "1"; //?zyPatlist.CureState? zyPs.comp_classs = "2"; //? ps.joinArea = joinArea; ps.zyPat = zyPs; ps.uploadorg = MED_ORG_CODE; retMsg = NccmInterfaces.InpatientRegister(ps); if (retMsg.resultId) { return(retMsg.resultId); } else { throw new Exception("农合接口调用失败:" + retMsg.resultString); } }