/// <summary> /// 取消入院 /// </summary> /// <returns></returns> public string SingleHospitalizationCancel(string param, HisBaseParam baseParam) { var resultData = new ApiJsonResultDatas { Code = true }; var data = new SingleHospitalizationCancelDto(); try { var paramIni = JsonConvert.DeserializeObject <SingleHospitalizationCancelParam>(param); var xmlStr = XmlHelp.SaveXml(param); if (xmlStr) { int result = WorkersMedicalInsurance.CallService_cxjb("TPYP203"); if (result == 1) { data = XmlHelp.DeSerializerModel(new SingleHospitalizationCancelDto()); if (data.PO_FHZ == "1") { resultData.Data = JsonConvert.SerializeObject(data); } else { throw new Exception(data.PO_MSG); } Logs.LogWrite(new LogParam() { Msg = data.PO_MSG, OperatorCode = "", Params = Logs.ToJson(param), ResultData = Logs.ToJson(data) }); } } } catch (Exception e) { resultData.Code = false; resultData.Message = e.Message; Logs.LogWrite(new LogParam() { Msg = e.Message, OperatorCode = "", Params = Logs.ToJson(param), ResultData = Logs.ToJson(data) }); } return(JsonConvert.SerializeObject(resultData)); }
/// <summary> /// 项目下载 /// </summary> public string ProjectDownload(string param) { var resultData = new ApiJsonResultDatas { Code = true }; var data = new IniDto(); try { // var paramIni = JsonConvert.DeserializeObject<ProjectDownloadParam>(param); var xmlStr = XmlHelp.SaveXml(param); if (xmlStr) { int result = WorkersMedicalInsurance.CallService_cxjb("CXJB019"); if (result == 1) { data = XmlHelp.DeSerializerModels(new ProjectDownloadDto()); if (data.PO_FHZ == "1") { resultData.Data = JsonConvert.SerializeObject(data); } else { throw new Exception(data.PO_MSG); } } } } catch (Exception e) { resultData.Code = false; resultData.Message = e.Message; Logs.LogWrite(new LogParam() { Msg = e.Message, OperatorCode = "", Params = Logs.ToJson(param), ResultData = Logs.ToJson(data) }); } return(JsonConvert.SerializeObject(resultData)); }
/// <summary> /// 特殊疾病查询 /// </summary> public string IdentificationSpecialQuery(string param) { var resultData = new ApiJsonResultDatas { Code = true }; try { // var paramIni = JsonConvert.DeserializeObject<IdentificationSpecialDiseasesQueryParam>(param); var xmlStr = XmlHelp.SaveXml(param); if (xmlStr) { int result = WorkersMedicalInsurance.CallService_cxjb("MTBX003"); if (result == 1) { var dataValid = XmlHelp.ValidXml("PO_RDXX"); //if (dataValid.PO_FHZ == "1") //{ // var data = XmlHelp.IdentificationSpecialQueryDeSerializerModels( // new IdentificationSpecialQueryDto()); // resultData.Data = JsonConvert.SerializeObject(data); //} //else //{ // throw new Exception(dataValid.PO_MSG); //} } } } catch (Exception e) { resultData.Code = false; resultData.Message = e.Message; Logs.LogWrite(new LogParam() { Msg = e.Message, OperatorCode = "", Params = Logs.ToJson(param), }); } return(JsonConvert.SerializeObject(resultData)); }
/// <summary> /// 处方明细查询 /// </summary> public string SinglePrescriptionDetailQuery(string param, HisBaseParam baseParam) { var resultData = new ApiJsonResultDatas { Code = true }; try { var paramIni = JsonConvert.DeserializeObject <SinglePrescriptionDetailQueryParam>(param); var xmlStr = XmlHelp.SaveXml(param); if (xmlStr) { int result = WorkersMedicalInsurance.CallService_cxjb("TPYP009"); if (result == 1) { var dataValid = XmlHelp.ValidXml("PI_CFMX"); if (dataValid.PO_FHZ == "1") { if (dataValid.IsRows) { var data = XmlHelp.DeSerializerModel( new PrescriptionDetailQueryRowList()); resultData.Data = JsonConvert.SerializeObject(data); Logs.LogWrite(new LogParam() { OperatorCode = "", Params = Logs.ToJson(param), ResultData = Logs.ToJson(data) }); } else { var data = XmlHelp.DeSerializerModel( new SinglePrescriptionDetailQueryDto()); resultData.Data = JsonConvert.SerializeObject(data); Logs.LogWrite(new LogParam() { OperatorCode = "", Params = Logs.ToJson(param), ResultData = Logs.ToJson(data) }); } } else { throw new Exception(dataValid.PO_MSG); } } } } catch (Exception e) { resultData.Code = false; resultData.Message = e.Message; Logs.LogWrite(new LogParam() { Msg = e.Message, OperatorCode = "", Params = Logs.ToJson(param), }); } return(JsonConvert.SerializeObject(resultData)); }