|
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|
|
using System.Text;
|
|
|
using ZLPlugin_MR.Domain.Units;
|
|
|
using ZLPlugin_MR.Model;
|
|
|
+using static System.Windows.Forms.AxHost;
|
|
|
|
|
|
namespace ZLPlugin_MR.ServerImpl
|
|
|
{
|
|
@@ -27,7 +28,7 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
and x.类别 = 'C'
|
|
|
And x.Id = {0}";
|
|
|
sql = string.Format(sql, zlid);
|
|
|
- //Log.Info("sql1:" + sql);
|
|
|
+ Log.Info("sql1:" + sql);
|
|
|
Recordset rd = new Recordset();
|
|
|
Tools.QueryTable(sql, out rd);
|
|
|
if (!rd.EOF)
|
|
@@ -113,6 +114,7 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
Codes codes = new Codes();
|
|
|
codes.id = list[i].相关ID;
|
|
|
codes.type = type;
|
|
|
+ codes.code = type;
|
|
|
codes.yzid = list[i].ID;
|
|
|
codes.zlxmid = list[i].诊疗项目ID;
|
|
|
codes.zxksid = list[i].执行科室ID;
|
|
@@ -120,6 +122,7 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
codes.method = list[i].检查方法;
|
|
|
listPacs.Add(codes);
|
|
|
codeNo += type + "#";
|
|
|
+ Log.Info("codeNo " + codeNo);
|
|
|
billProjectNames += list[i].医嘱内容 + "_" + list[i].标本部位 + "_" + list[i].检查方法 + "、";
|
|
|
}
|
|
|
}
|
|
@@ -150,8 +153,8 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
d.名称 ""jzDeptName"",
|
|
|
a.住院号 ""businessNumber"",
|
|
|
'{2}' ""standardItemId"",
|
|
|
- '' ""reportStartTime"",
|
|
|
- '' ""reportEndTime"",
|
|
|
+ TO_CHAR(SYSDATE-30, 'YYYY-MM-DD HH24:MI:SS') ""reportStartTime"",
|
|
|
+ TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""reportEndTime"",
|
|
|
'{3}' ""hrType"",
|
|
|
TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""applyTime"",
|
|
|
'{4}' ""hisApplyCode"",
|
|
@@ -312,8 +315,8 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
d.名称 ""jzDeptName"",
|
|
|
a.门诊号 ""businessNumber"",
|
|
|
'{1}' ""standardItemId"",
|
|
|
- '' ""reportStartTime"",
|
|
|
- '' ""reportEndTime"",
|
|
|
+ TO_CHAR(SYSDATE-30, 'YYYY-MM-DD HH24:MI:SS') ""reportStartTime"",
|
|
|
+ TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""reportEndTime"",
|
|
|
'{2}' ""hrType"",
|
|
|
TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""applyTime"",
|
|
|
'{3}' ""hisApplyCode"",
|
|
@@ -462,6 +465,81 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static void SaveDataNew2(Results result, long lngPatientID, long lngClinicID, string no, List<Codes> listlis, List<Codes> listpacs, out List<long> lis_ids, out List<long> pacs_ids)
|
|
|
+ {
|
|
|
+
|
|
|
+ lis_ids = new List<long>();
|
|
|
+ pacs_ids = new List<long>();
|
|
|
+ var lis = result.ResultText[0].LIS;
|
|
|
+ var pacs = result.ResultText[0].PACS;
|
|
|
+
|
|
|
+ if (lis != null)
|
|
|
+ {
|
|
|
+ Log.Info("lis.Count=" + lis.Count);
|
|
|
+ foreach (var items in listlis)
|
|
|
+ {
|
|
|
+ Log.Info("items.id="+ items.id);
|
|
|
+ bool state = true;
|
|
|
+ for (int i = 0; i < lis.Count; i++)
|
|
|
+ {
|
|
|
+ Log.Info("state=" + state);
|
|
|
+ if (!state)
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ bool flag = true;
|
|
|
+ for (int j = 0; j < lis[i].ItemList.Count; j++)
|
|
|
+ {
|
|
|
+ Log.Info("flag=" + flag);
|
|
|
+ //这里判断指标不能循环多次
|
|
|
+ if (!flag)
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (items.code.Contains(lis[i].ItemList[j].StandardItemId))
|
|
|
+ {
|
|
|
+ string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ string xgid = items.id;
|
|
|
+ int res = InsertLis(lis[i], lngPatientID, lngClinicID, date, no, xgid);
|
|
|
+ if (res > 0)
|
|
|
+ {
|
|
|
+ lis_ids.Add(long.Parse(xgid));
|
|
|
+ for (int k = 0; k < lis[i].ItemList.Count; k++)
|
|
|
+ {
|
|
|
+ InsertLisItem(lis[i].ItemList[k], lis[i].LisCheckReportId, lngPatientID, lngClinicID, date);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ flag = false;
|
|
|
+ state = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (pacs != null)
|
|
|
+ {
|
|
|
+ Log.Info("pacs.Count=" + pacs.Count);
|
|
|
+ foreach (var items in listpacs)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < pacs.Count; i++)
|
|
|
+ {
|
|
|
+ long id = long.Parse(items.id);
|
|
|
+ if (pacs[i].StandardItemId.Contains(items.code))
|
|
|
+ {
|
|
|
+ int res = InsertPacs(pacs[i], lngPatientID, lngClinicID, no, id);
|
|
|
+ if (res > 0)
|
|
|
+ {
|
|
|
+ pacs_ids.Add(id);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 保存互认数据 原来只支持一单
|
|
|
/// </summary>
|
|
@@ -480,20 +558,37 @@ namespace ZLPlugin_MR.ServerImpl
|
|
|
pacs_ids = new List<long>();
|
|
|
var lis = result.ResultText[0].LIS;
|
|
|
var pacs = result.ResultText[0].PACS;
|
|
|
+
|
|
|
if (lis != null)
|
|
|
{
|
|
|
for (int i = 0; i < lis.Count; i++)
|
|
|
{
|
|
|
- //insert 互认_lis
|
|
|
- string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
- string xgid = listlis[i].id;
|
|
|
- int res = InsertLis(lis[i], lngPatientID, lngClinicID, date, no, xgid);
|
|
|
- if (res > 0)
|
|
|
+ bool state = true;
|
|
|
+ for (int j = 0; j < lis[i].ItemList.Count; j++)
|
|
|
{
|
|
|
- lis_ids.Add(long.Parse(xgid));
|
|
|
- for (int k = 0; k < lis[i].ItemList.Count; k++)
|
|
|
+ if (!state)
|
|
|
{
|
|
|
- InsertLisItem(lis[i].ItemList[k], lis[i].LisCheckReportId, lngPatientID, lngClinicID, date);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ foreach (var items in listlis)
|
|
|
+ {
|
|
|
+ if (items.code.Contains(lis[i].ItemList[j].StandardItemId))
|
|
|
+ {
|
|
|
+ //insert 互认_lis
|
|
|
+ string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ string xgid = items.id;
|
|
|
+ int res = InsertLis(lis[i], lngPatientID, lngClinicID, date, no, xgid);
|
|
|
+ if (res > 0)
|
|
|
+ {
|
|
|
+ lis_ids.Add(long.Parse(xgid));
|
|
|
+ for (int k = 0; k < lis[i].ItemList.Count; k++)
|
|
|
+ {
|
|
|
+ InsertLisItem(lis[i].ItemList[k], lis[i].LisCheckReportId, lngPatientID, lngClinicID, date);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ state = false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|