|
@@ -864,25 +864,113 @@ namespace PTMedicalInsurance.Forms
|
|
|
}
|
|
|
}
|
|
|
JObject joRtn = cBus.DownDirecotry(trade, version);
|
|
|
- if (JsonHelper.parseCenterRtnValue(joRtn, out errorMessage) == 0)
|
|
|
+ if (trade.GetCode() == "1362")
|
|
|
{
|
|
|
- //解析
|
|
|
- DataImoport DI = new DataImoport();
|
|
|
- JObject joImportRtn = DI.importMedDataToIris(trade,joRtn,uiProcessBar);
|
|
|
- if (JsonHelper.parseIrisRtnValue(joImportRtn, out errorMessage) == 0)
|
|
|
+ if (JsonHelper.parseCenterRtnValue(joRtn, out errorMessage) == 0)
|
|
|
{
|
|
|
- //递归调用
|
|
|
- if (rbAutoDown.Checked)
|
|
|
+
|
|
|
+
|
|
|
+ //解析
|
|
|
+ InICPCYBML(joRtn, uiProcessBar);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (JsonHelper.parseCenterRtnValue(joRtn, out errorMessage) == 0)
|
|
|
+ {
|
|
|
+ //解析
|
|
|
+
|
|
|
+ DataImoport DI = new DataImoport();
|
|
|
+ JObject joImportRtn = DI.importMedDataToIris(trade, joRtn, uiProcessBar);
|
|
|
+
|
|
|
+
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joImportRtn, out errorMessage) == 0)
|
|
|
{
|
|
|
- downloadMedData(trade, version, uiProcessBar);
|
|
|
+ //递归调用
|
|
|
+ if (rbAutoDown.Checked)
|
|
|
+ {
|
|
|
+ downloadMedData(trade, version, uiProcessBar);
|
|
|
+ }
|
|
|
}
|
|
|
+ return 0;
|
|
|
}
|
|
|
- return 0;
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
MessageBox.Show(errorMessage);
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
+ private int InICPCYBML(JObject jo, Sunny.UI.UIProcessBar uiProcessBar)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ JArray joRtn = JArray.Parse(jo["output"]["result"].ToString());
|
|
|
+ if (joRtn.Count < 2)
|
|
|
+ {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ dynamic joPamam = new JObject();//更新HIS医保目录入参
|
|
|
+ joPamam.Add("Code", "");
|
|
|
+ joPamam.Add("Name", "");
|
|
|
+ joPamam.Add("HisType", "14");
|
|
|
+ joPamam.Add("ChargeItemLevel", "");
|
|
|
+ joPamam.Add("HisTypeName", "ICPC-3检查和治疗");
|
|
|
+ joPamam.Add("LocateCode", "");
|
|
|
+ joPamam.Add("CategoryCode", "");
|
|
|
+ joPamam.Add("StartDate", "");
|
|
|
+ joPamam.Add("ValidFlag", "");
|
|
|
+ joPamam.Add("VersionNO", "");
|
|
|
+ joPamam.Add("VersionName", "");
|
|
|
+ joPamam.Add("LimitRange", "");
|
|
|
+ joPamam.Add("NationalCode", "");
|
|
|
+ joPamam.Add("UpdateTime", "");
|
|
|
+ joPamam.Add("rid", "");
|
|
|
+ uiProcessBar1.Maximum = joRtn.Count;
|
|
|
+ uiProcessBar1.Value = 0;
|
|
|
+ for (int i = 0; i < joRtn.Count; i++)
|
|
|
+ {
|
|
|
+ if (joRtn[i]["chrgitm_attr"].ToString() == "1")//药品
|
|
|
+ {
|
|
|
+ joPamam.Code = joRtn[i]["chrgitm_nat_code"].ToString();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrEmpty(joRtn[i]["chrgitm_prov_code"].ToString()))
|
|
|
+ {
|
|
|
+ joPamam.Code = joRtn[i]["chrgitm_nat_code"].ToString() + "-" + joRtn[i]["chrgitm_prov_code"].ToString();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joPamam.Code = joRtn[i]["chrgitm_nat_code"].ToString();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ joPamam.Name = joRtn[i]["chrgitm_name"].ToString();
|
|
|
+ joPamam.LocateCode = joRtn[i]["icpc_code"].ToString();
|
|
|
+
|
|
|
+ joPamam.CategoryCode = joRtn[i]["chrgitm_attr"].ToString();
|
|
|
+ joPamam.StartDate = joRtn[i]["efft_time"].ToString();
|
|
|
+ joPamam.ValidFlag = joRtn[i]["vali_flag"].ToString();
|
|
|
+
|
|
|
+ joPamam.VersionNO = joRtn[i]["ver"].ToString();
|
|
|
+ joPamam.VersionName = joRtn[i]["ver"].ToString();
|
|
|
+ joPamam.LimitRange = joRtn[i]["poolarea_no"].ToString();
|
|
|
+
|
|
|
+ joPamam.NationalCode = joRtn[i]["chrgitm_nat_code"].ToString();
|
|
|
+ joPamam.UpdateTime = joRtn[i]["updt_time"].ToString();
|
|
|
+ joPamam.rid = joRtn[i]["rid"].ToString();
|
|
|
+ JObject joRtn1 = mIS.UpdateDirectoryBySelf(joPamam);
|
|
|
+ uiProcessBar1.Value = i;
|
|
|
+
|
|
|
+ }
|
|
|
+ MessageBox.Show("更新完成!");
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ }
|
|
|
private void btnQuery_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
#region 校验查询条件
|