|
@@ -452,33 +452,128 @@ namespace PTMedicalInsurance.Business
|
|
|
JArray jaIdInfo = JArray.Parse(JsonHelper.getDestValue(joConvertCodeRtn, "idetinfo"));
|
|
|
JObject jaBaseInfo = JObject.Parse(JsonHelper.getDestValue(joConvertCodeRtn, "baseinfo"));
|
|
|
joOutput["baseinfo"] = jaBaseInfo;
|
|
|
-
|
|
|
- JObject joSelectedInsuInfo = (JObject)jaInsuInfo[0];
|
|
|
- joSelectedInsuInfo.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
|
|
|
- joSelectedInsuInfo.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
|
|
|
- if (joOutparam["selectedInsuInfo"] != null)
|
|
|
- {
|
|
|
- joOutparam["selectedInsuInfo"] = joSelectedInsuInfo;
|
|
|
- }
|
|
|
- else
|
|
|
+ string jaSelectedInsuInfo = JsonHelper.getDestValue(joOutparam, "selectedInsuInfo");
|
|
|
+ if (string.IsNullOrEmpty(jaSelectedInsuInfo))
|
|
|
{
|
|
|
- joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
|
|
|
+ JObject joSelectedInsuInfo = (JObject)jaInsuInfo[0];
|
|
|
+ joSelectedInsuInfo.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
|
|
|
+ joSelectedInsuInfo.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
|
|
|
+ if (joOutparam["selectedInsuInfo"] != null)
|
|
|
+ {
|
|
|
+ joOutparam["selectedInsuInfo"] = joSelectedInsuInfo;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (joOutparam["selectedIdInfo"] != null)
|
|
|
+ {
|
|
|
+ joOutparam["selectedIdInfo"] = joSelectedInsuInfo;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedIdInfo", joSelectedInsuInfo));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (joOutparam["selectedIdInfo"] != null)
|
|
|
+ outparam = joOutparam.ToString();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 展示患者信息界面,转换相关编码为中文,并获取操作员选中的信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="patInfo"></param>
|
|
|
+ /// <param name="outparam"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public int showPatInfo(String patInfo, out string outparam)
|
|
|
+ {
|
|
|
+ outparam = "";
|
|
|
+ //展示信息界面
|
|
|
+ JObject joOutparam = JObject.Parse(patInfo);
|
|
|
+ JObject joOutput = JObject.Parse(JsonHelper.getDestValue(joOutparam, "output"));
|
|
|
+
|
|
|
+ // 日期处理
|
|
|
+ JObject joBaseInfo = JObject.Parse(JsonHelper.getDestValue(joOutput, "baseinfo"));
|
|
|
+ JArray joInsuInfo = JArray.Parse(JsonHelper.getDestValue(joOutput, "insuinfo"));
|
|
|
+ joOutput["baseinfo"] = joBaseInfo;
|
|
|
+ joOutput["insuinfo"] = joInsuInfo;
|
|
|
+ joOutparam["output"] = joOutput;
|
|
|
+
|
|
|
+ //编码转换
|
|
|
+ JArray jaConvertCode = new JArray();
|
|
|
+ JObject joConvertCodeParam = new JObject();
|
|
|
+ joConvertCodeParam.Add("hospitalDr", Global.inf.hospitalDr);
|
|
|
+ joConvertCodeParam.Add("interfaceDr", Global.inf.interfaceDr);
|
|
|
+ joConvertCodeParam.Add("output", joOutput);
|
|
|
+ jaConvertCode.Add(joConvertCodeParam);
|
|
|
+ JObject joConvertCode = new JObject();
|
|
|
+ joConvertCode.Add("code", "09010054");
|
|
|
+ joConvertCode.Add("params", jaConvertCode);
|
|
|
+ InvokeHelper invoker = new InvokeHelper();
|
|
|
+ JObject joConvertCodeRtn = invoker.invokeInsuService(joConvertCode.ToString(), "患者信息编码转换");
|
|
|
+ PatientInsuInfo frmPatientInfo = new PatientInsuInfo(joConvertCodeRtn);
|
|
|
+ //相关信息转换到登记面板
|
|
|
+ try
|
|
|
{
|
|
|
- joOutparam["selectedIdInfo"] = joSelectedInsuInfo;
|
|
|
+ if (frmPatientInfo.ShowDialog() == DialogResult.OK)
|
|
|
+ {
|
|
|
+ //原来用的是转换后的
|
|
|
+ //frmPatientInfo.joSelectedInsuInfo.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
|
|
|
+ //frmPatientInfo.joSelectedInsuInfo.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
|
|
|
+ //joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", frmPatientInfo.joSelectedInsuInfo));
|
|
|
+
|
|
|
+ //现在用转换之前的
|
|
|
+ JArray jaInsuInfo = JArray.Parse(JsonHelper.getDestValue(joOutput, "insuinfo"));
|
|
|
+ JArray jaIdInfo = JArray.Parse(JsonHelper.getDestValue(joOutput, "idetinfo"));
|
|
|
+ JObject joSelectedInsuInfo = (JObject)jaInsuInfo[frmPatientInfo.insuInfoIndex];
|
|
|
+ JObject joSelectedIdInfo;
|
|
|
+ if (jaIdInfo.Count != 0)
|
|
|
+ {
|
|
|
+ joSelectedIdInfo = (JObject)jaIdInfo[frmPatientInfo.idInfoIndex];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joSelectedIdInfo = new JObject();
|
|
|
+ }
|
|
|
+ joSelectedInsuInfo.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
|
|
|
+ joSelectedInsuInfo.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
|
|
|
+ if (joOutparam["selectedInsuInfo"] != null)
|
|
|
+ {
|
|
|
+ joOutparam["selectedInsuInfo"] = joSelectedInsuInfo;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (joOutparam["selectedIdInfo"] != null)
|
|
|
+ {
|
|
|
+ joOutparam["selectedIdInfo"] = joSelectedInsuInfo;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedIdInfo", joSelectedInsuInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ outparam = joOutparam.ToString();
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ outparam = JsonHelper.setExceptionJson(-1, "门诊读卡", "收款员取消读卡").ToString();
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+ catch (Exception e)
|
|
|
{
|
|
|
- joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedIdInfo", joSelectedInsuInfo));
|
|
|
+ outparam = JsonHelper.setExceptionJson(-1, "患者参保信息展示", e.Message).ToString();
|
|
|
+ return -1;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- outparam = joOutparam.ToString();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 患者读卡并获取中心信息(1101)后设置PAT结构体
|
|
|
/// </summary>
|