Bladeren bron

整合 一张纸合单问题问题

zackhua 6 maanden geleden
bovenliggende
commit
a18721e804

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+.vs/ZLPlugin_MR/FileContentIndex/acf5bc9c-5397-474b-9de6-c049a7123094.vsidx
+.vs/ZLPlugin_MR/FileContentIndex/0c9e7532-89fe-445b-b413-6ba54e254aa1.vsidx
+.vs/

BIN
.vs/ZLPlugin_MR/v17/.suo


+ 109 - 0
.vs/ZLPlugin_MR/v17/DocumentLayout.json

@@ -0,0 +1,109 @@
+{
+  "Version": 1,
+  "WorkspaceRootPath": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\",
+  "Documents": [
+    {
+      "AbsoluteMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\lispacs_mr_bll.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|solutionrelative:lispacs_mr_bll.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|d:\\codespace\\visualstudiospace\\zlsoft\\zlplugin_mr\\clsplugin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|solutionrelative:clsplugin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{00000000-0000-0000-0000-000000000000}|\u003CSolution\u003E|ZLPlugin_MR||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|d:\\codespace\\visualstudiospace\\zlsoft\\zlplugin_mr\\tools.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|solutionrelative:tools.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\model\\codes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|solutionrelative:model\\codes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{CDD33FE4-B1D8-41D6-8D10-20D66B065E49}|ZLPlugin_MR.csproj|d:\\codespace\\visualstudiospace\\zlsoft\\zlplugin_mr\\||{B270807C-D8C6-49EB-8EBE-8E8D566637A1}|5e9a8ac2-4f34-4521-858f-4c248ba31532"
+    }
+  ],
+  "DocumentGroupContainers": [
+    {
+      "Orientation": 0,
+      "VerticalTabListWidth": 256,
+      "DocumentGroups": [
+        {
+          "DockedWidth": 200,
+          "SelectedChildIndex": 4,
+          "Children": [
+            {
+              "$type": "Bookmark",
+              "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 2,
+              "Title": "ZLPlugin_MR",
+              "DocumentMoniker": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\ZLPlugin_MR.csproj",
+              "RelativeDocumentMoniker": "ZLPlugin_MR.csproj",
+              "ToolTip": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\ZLPlugin_MR.csproj",
+              "RelativeToolTip": "ZLPlugin_MR.csproj",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|",
+              "WhenOpened": "2024-11-11T09:12:08.356Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 3,
+              "Title": "Tools.cs",
+              "DocumentMoniker": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\Tools.cs",
+              "RelativeDocumentMoniker": "Tools.cs",
+              "ToolTip": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\Tools.cs",
+              "RelativeToolTip": "Tools.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAADwvxcAAAAJAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-11-11T08:25:05.86Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 4,
+              "Title": "Codes.cs",
+              "DocumentMoniker": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\Model\\Codes.cs",
+              "RelativeDocumentMoniker": "Model\\Codes.cs",
+              "ToolTip": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\Model\\Codes.cs",
+              "RelativeToolTip": "Model\\Codes.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAAwAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-10-15T02:57:30.235Z"
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 0,
+              "Title": "LisPacs_MR_Bll.cs",
+              "DocumentMoniker": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\LisPacs_MR_Bll.cs",
+              "RelativeDocumentMoniker": "LisPacs_MR_Bll.cs",
+              "ToolTip": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\LisPacs_MR_Bll.cs",
+              "RelativeToolTip": "LisPacs_MR_Bll.cs",
+              "ViewState": "AQIAAKUAAAAAAAAAAAAkwLkAAAAjAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-08-29T09:15:41.785Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 1,
+              "Title": "clsPlugin.cs",
+              "DocumentMoniker": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\clsPlugin.cs",
+              "RelativeDocumentMoniker": "clsPlugin.cs",
+              "ToolTip": "D:\\CodeSpace\\VisualStudioSpace\\zlsoft\\ZLPlugin_MR\\clsPlugin.cs",
+              "RelativeToolTip": "clsPlugin.cs",
+              "ViewState": "AQIAAHgBAAAAAAAAAAAowJEBAABGAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-08-14T06:40:25.604Z",
+              "EditorCaption": ""
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 8 - 5
LisPacs_MR_Bll.cs

@@ -75,11 +75,13 @@ namespace ZLPlugin_MR.ServerImpl
             listPacs = new List<Codes>();
             for (var i = 0; i < list.Count; i++)
             {
+                Log.Info("list.Count " + i);
                 if (list[i].诊疗类别 == "C" && list[i].相关ID != "0.0")
                 {
                     string code = "";
                     int total = 0;
                     IsLisProject(list[i].诊疗项目ID, out code, out total);
+                    Log.Info("IsLisProject " + total);
                     if (total > 0)
                     {
                         Codes codes = new Codes();
@@ -91,6 +93,7 @@ namespace ZLPlugin_MR.ServerImpl
                         //lis += list[i].诊疗项目ID + ",";
                         //lis_id += list[i].ID + ",";
                         codeNo += code + "#";
+                        Log.Info("codeNo " + codeNo);
                         billProjectNames += list[i].医嘱内容 + "、";
                     }
 
@@ -117,7 +120,7 @@ namespace ZLPlugin_MR.ServerImpl
                         codes.method = list[i].检查方法;
                         listPacs.Add(codes);
                         codeNo += type + "#";
-                        billProjectNames += list[i].医嘱内容 + "、";
+                        billProjectNames += list[i].医嘱内容 + "_" + list[i].标本部位 + "_" + list[i].检查方法 + "、";
                     }
                 }
             }
@@ -177,11 +180,11 @@ namespace ZLPlugin_MR.ServerImpl
         /// <param name="type"></param>
         /// <param name="operatorName"></param>
         /// <returns></returns>
-        public static int InsertHuRenBillProject(string computerName, long lngPatientID, string billName, long lngSendID, string ip, string no, string yzXgID, string type, string operatorName)
+        public static int InsertHuRenBillProject(string computerName, long lngPatientID, string billName, long lngSendID, string ip, string no, string yzXgID, string type, string operatorName, string patientSource)
         {
-            string sql = @"Insert Into 互认开单项目(计算机名,患者id,开单项目,开单时间,发送号,计算机IP,单据号,相关id,类别,开单人) 
-                            Values('{0}','{1}','{2}',to_date('{3}','yyyy-mm-dd hh24:mi:ss'),{4},'{5}','{6}','{7}','{8}','{9}')";
-            sql = string.Format(sql, computerName, lngPatientID, billName, DateTime.Now, lngSendID, ip, no, yzXgID, type, operatorName);
+            string sql = @"Insert Into 互认开单项目(计算机名,患者id,开单项目,开单时间,发送号,计算机IP,单据号,相关id,类别,开单人,病人来源) 
+                            Values('{0}','{1}','{2}',to_date('{3}','yyyy-mm-dd hh24:mi:ss'),{4},'{5}','{6}','{7}','{8}','{9}','{10}')";
+            sql = string.Format(sql, computerName, lngPatientID, billName, DateTime.Now, lngSendID, ip, no, yzXgID, type, operatorName, patientSource);
             Log.Info("InsertLis:" + sql);
             int res = Tools.ExecuteSql(sql);
             return res;

+ 13 - 0
Tools.cs

@@ -2,6 +2,7 @@
 using System;
 using System.Net;
 using System.Net.Sockets;
+using System.Security.Cryptography;
 using System.Windows.Forms;
 using ZLPlugin_MR.Model;
 
@@ -10,6 +11,18 @@ namespace ZLPlugin_MR.Domain.Units
     public class Tools
     {
 
+        //生成 uuid
+        public static string Generate16CharUUID()
+        {
+            byte[] buffer = new byte[8];
+            using (RandomNumberGenerator rng = RandomNumberGenerator.Create())
+            {
+                rng.GetBytes(buffer);
+            }
+            long longValue = BitConverter.ToInt64(buffer, 0);
+            return longValue.ToString("X").Substring(0, 16);
+        }
+
         public static string GetHostIp()
         {
             string hostName = Dns.GetHostName();

BIN
bin/Release/ZLPlugin_MR - 副本.dll


BIN
bin/Release/ZLPlugin_MR.dll


BIN
bin/Release/ZLPlugin_MR.pdb


+ 18 - 8
clsPlugin.cs

@@ -106,6 +106,10 @@ namespace ZLPlugin_MR
                     return true;
                 }
                 List<YZData> ss_list = LisPacs_MR_Bll.GetYZList(lngSendID);
+                string hisApplyId = Tools.Generate16CharUUID();
+
+                string patientSource = "1"; //病人来源
+
                 string code = "";
                 string billProjectNames = "";  //开单项目名称
                 List<Codes> listlis;
@@ -150,7 +154,7 @@ namespace ZLPlugin_MR
                         totalPrice += LisPacs_MR_Bll.GetTotalPriceForPacsByZLXM(listpacs[ii].zlxmid, listpacs[ii].zxksid, listpacs[ii].part, listpacs[ii].method, 2);
                     }
                 }
-                Recordset rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), code);
+                Recordset rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), hisApplyId);
                 string json = Tools.RecordsetToJson(rd);
                 Log.Info(json);
                 SocketClient clientSend = new SocketClient("127.0.0.1", 6061);
@@ -195,7 +199,7 @@ namespace ZLPlugin_MR
                        // SocketClient.Message = null;
                         SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, 1);
                         //保存开单项目
-                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), code, hrType.ToString(), Infos.UserInfo.用户名);
+                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名,patientSource);
                         Log.Info("开单状态=" + ii);
                         clientSend.Close();
                         return true;
@@ -209,7 +213,7 @@ namespace ZLPlugin_MR
                     else
                     {
                         MessageBox.Show(rex.ResultText.ToString(), "中联软件", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
-                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), code, hrType.ToString(), Infos.UserInfo.用户名);
+                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名, patientSource);
                         Log.Info("开单状态=" + ii);
                         clientSend.Close();
                         return true;//此病人不存在互认信息
@@ -242,6 +246,7 @@ namespace ZLPlugin_MR
             Log.Info("AdviceSave  lngModual==" + lngModual);
             Log.Info("AdviceSave   lngSys == " + lngSys);
             rsAdvice.Filter = "";
+            SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
             try
             {
                 int res = 1;
@@ -268,6 +273,9 @@ namespace ZLPlugin_MR
                     return true;
                 }
                 List<YZData> ss_list = JSON.JsonToObject<List<YZData>>(Tools.FormatStr(str), Encoding.UTF8);
+                string hisApplyId = Tools.Generate16CharUUID();
+                string patientSource = ""; //病人来源
+
                 string code = "";
                 string billProjectNames = "";  //开单项目名称
                 List<Codes> listlis;
@@ -316,7 +324,8 @@ namespace ZLPlugin_MR
                         }
                     }
                     //totalPrice = LisPacs_MR_Bll.GetZYTotalPrice(zlxmid);
-                    rd = LisPacs_MR_Bll.GetZYPostJson(lngPatientID, lngClinicID, code, hrType, totalPrice.ToString(), code);
+                     patientSource = "2"; 
+                    rd = LisPacs_MR_Bll.GetZYPostJson(lngPatientID, lngClinicID, code, hrType, totalPrice.ToString(), hisApplyId);
                 }
                 else
                 {
@@ -343,9 +352,10 @@ namespace ZLPlugin_MR
                             totalPrice += LisPacs_MR_Bll.GetTotalPriceForPacsByZLXM(listpacs[ii].zlxmid, listpacs[ii].zxksid, listpacs[ii].part, listpacs[ii].method, 1);
                         }
                     }
-                    rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(),code);
+                    patientSource = "1";
+                    rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), hisApplyId);
                 }
-                SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
+               // SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
                 //Results result = new Results();
                 string json = Tools.RecordsetToJson(rd);
                 Log.Info(json);
@@ -389,7 +399,7 @@ namespace ZLPlugin_MR
                         //SocketClient.Message = null;
                         SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, -1);
                         //保存开单项目
-                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), code, hrType.ToString(), Infos.UserInfo.用户名);
+                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名, patientSource);
                         Log.Info("开单状态=" + ii);
                         socketClient.Close();
                         return true;
@@ -403,7 +413,7 @@ namespace ZLPlugin_MR
                     else
                     {
                         MessageBox.Show(rex.ResultText.ToString(), "中联软件", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
-                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), code, hrType.ToString(), Infos.UserInfo.用户名);
+                        int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名, patientSource);
                         Log.Info("开单状态=" + ii);
                         socketClient.Close();
                         return true;//此病人不存在互认信息

BIN
obj/Debug/.AssemblyReference.cache


BIN
obj/Release/Interop.ADODB.dll


+ 1 - 1
obj/Release/ZLPlugin_MR.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-77343d50461e68ce174827a7fab0ce5fc5e7084d7d73ebec425d5e30dc632fad
+8319d8878f10d5b79fa9953b1d90c3298475d118602385ef810ecbafc76b8354

BIN
obj/Release/ZLPlugin_MR.dll


BIN
obj/Release/ZLPlugin_MR.pdb