Browse Source

中医诊断

lihong 1 month ago
parent
commit
fd3e59ba28

+ 1 - 1
src/main/java/cn/hnthyy/thmz/Utils/ExcelUtil.java

@@ -631,7 +631,7 @@ public class ExcelUtil {
                         zdUnitCode.getClassValue(),
                         zdUnitCode.getPyCode(),
                         zdUnitCode.getWbCode(),
-                        zdUnitCode.getYnCode() == null ? "" : zdUnitCode.getYnCode().toString(),
+                        zdUnitCode.getYnCode() == null ? "" : zdUnitCode.getYnCode(),
                         (zdUnitCode.getMzFlag() == null || YesNoEnum.NO.code.equals(zdUnitCode.getMzFlag())) ? YesNoEnum.NO.name : YesNoEnum.YES.name,
                         (zdUnitCode.getYjFlag() == null || YesNoEnum.NO.code.equals(zdUnitCode.getYjFlag())) ? YesNoEnum.NO.name : YesNoEnum.YES.name,
                         zdUnitCode.getXnhDeptCode(),

+ 19 - 0
src/main/java/cn/hnthyy/thmz/controller/CommonController.java

@@ -967,6 +967,25 @@ public class CommonController {
         }
     }
 
+    @RequestMapping(value = "/getAllTcmIcdCodeByParams", method = {RequestMethod.GET})
+    public Map<String, Object> getAllTcmIcdCodeByParams(@RequestParam(value = "name",defaultValue = "") String name) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            if(StrUtil.isNotBlank(name)){
+                name = name.toUpperCase();
+            }
+            resultMap.put("code", 0);
+            resultMap.put("message", "获取诊断列表成功");
+            resultMap.put("data", zdIcdCodeService.queryTcmIcdCodeByName(name));
+            return resultMap;
+        } catch (Exception e) {
+            resultMap.put("code", -1);
+            resultMap.put("message", "获取诊断列表失败");
+            e.printStackTrace();
+            return resultMap;
+        }
+    }
+
 
     /**
      * 查询所有在职的用户

+ 7 - 3
src/main/java/cn/hnthyy/thmz/controller/mz/MzBlRecordController.java

@@ -95,17 +95,16 @@ public class MzBlRecordController {
             results.put("mzPatientMi", mzPatientMi);
             MzVisitTable mzVisitTable = mzVisitTableService.queryByPatientIdAndTimes(patientId, times);
             String icdText = StringUtils.isBlank(mzBlRecord.getTentativeDiagnosis()) ? "" : mzBlRecord.getTentativeDiagnosis();
-            String tcmIcdText = "";
             if (mzVisitTable != null) {
                 mzBlRecord.setIcdCode(mzVisitTable.getIcdCode());
                 mzBlRecord.setIcdText(mzVisitTable.getIcdText());
+                mzBlRecord.setTcmIcdCode(mzVisitTable.getTcmIcdCode());
+                mzBlRecord.setTcmIcdText(mzVisitTable.getTcmIcdText());
                 if (mzVisitTable.getIcdText() != null && StringUtils.isNotBlank(mzVisitTable.getIcdText())) {
                     icdText= mzVisitTable.getIcdText()+" "+icdText;
                 }
-                tcmIcdText = mzVisitTable.getTcmIcdText();
             }
             results.put("icdText", icdText);
-            results.put("tcmIcdText", tcmIcdText);
             List<PatientAllergenInfo> patientAllergenInfoList= patientAllergenInfoService.queryPatientAllergenInfoByPatNo(patientId);
             if(patientAllergenInfoList!=null &&patientAllergenInfoList.size()>0){
                 for(PatientAllergenInfo patientAllergenInfo:patientAllergenInfoList){
@@ -271,6 +270,9 @@ public class MzBlRecordController {
             if ("请选择".equals(mzBlRecord.getIcdText())) {
                 mzBlRecord.setIcdText(null);
             }
+            if ("请选择".equals(mzBlRecord.getTcmIcdText())) {
+                mzBlRecord.setTcmIcdText(null);
+            }
             dbMzBlRecord.setEmrChiefComplaint(mzBlRecord.getEmrChiefComplaint());
             dbMzBlRecord.setEmrHpi(mzBlRecord.getEmrHpi());
             dbMzBlRecord.setEmrPs(mzBlRecord.getEmrPs());
@@ -291,6 +293,8 @@ public class MzBlRecordController {
             dbMzBlRecord.setTentativeDiagnosis(mzBlRecord.getTentativeDiagnosis());
             dbMzBlRecord.setIcdCode(mzBlRecord.getIcdCode());
             dbMzBlRecord.setIcdText(mzBlRecord.getIcdText());
+            dbMzBlRecord.setTcmIcdCode(mzBlRecord.getTcmIcdCode());
+            dbMzBlRecord.setTcmIcdText(mzBlRecord.getTcmIcdText());
             dbMzBlRecord.setEmrJkjy(mzBlRecord.getEmrJkjy());
             //将前台病历调整的换行转换成强制换行符
             dbMzBlRecord.setEmrProcess(mzBlRecord.getEmrProcess().replaceAll("\n","</br>"));

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/zd/ZdUnitCode.java

@@ -32,7 +32,7 @@ public class ZdUnitCode {
     //停用标记
     private Integer delFlag;
     //院内码
-    private Integer ynCode;
+    private String ynCode;
     //医技标志
     private Integer yjFlag;
     //门诊人次统计标志

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdIcdCodeMapper.java

@@ -23,7 +23,7 @@ public interface ZdIcdCodeMapper {
      * @return
      */
     @Select("select top 50 rtrim(yb_code) code,rtrim(yb_name) name from zd_icd_code_new WITH(NOLOCK) where  del_flag !=1" +
-            "(yb_name like #{commonParams} collate Chinese_PRC_CI_AS or yb_code  like #{commonParams} collate Chinese_PRC_CI_AS or yb_py_code like #{commonParams} collate Chinese_PRC_CI_AS  )")
+            "and (yb_name like #{commonParams} collate Chinese_PRC_CI_AS or yb_code  like #{commonParams} collate Chinese_PRC_CI_AS or yb_py_code like #{commonParams} collate Chinese_PRC_CI_AS  )")
     List<ZdIcdCode> selectAllZdIcdCommonParams(@Param("commonParams") String commonParams);
 
 

+ 2 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzBlRecordServiceImpl.java

@@ -51,6 +51,8 @@ public class MzBlRecordServiceImpl implements MzBlRecordService {
             mzVisitTable.setTimes(mzBlRecord.getTimes());
             mzVisitTable.setIcdCodeNew(mzBlRecord.getIcdCode());
             mzVisitTable.setIcdTextNew(mzBlRecord.getIcdText());
+            mzVisitTable.setTcmIcdCode(mzBlRecord.getTcmIcdCode());
+            mzVisitTable.setTcmIcdText(mzBlRecord.getTcmIcdText());
             mzVisitTableMapper.updateIcdText(mzVisitTable);
             if(mzBlRecord.getPatientAllergenInfoList()!=null && mzBlRecord.getPatientAllergenInfoList().size()>0){
                 patientAllergenInfoMapper.deleteByPatNo(mzBlRecord.getPatientId());

+ 28 - 0
src/main/resources/static/js/mz/clinic.js

@@ -4223,6 +4223,8 @@ function initSelectWithParams() {
     });
     //select 从后台加载数据,并保留之前选择的内容
     dynamicSelectWithOri("editZd", '/thmz/getAllZdIcdCommonParams?commonParams=', false);
+    //中医诊断
+    dynamicSelectWithOri("editTcmZd", '/thmz/getAllTcmIcdCodeByParams?name=',false);
     //手术名称下拉选实现
     dynamicSelect("opName", '/thmz/getZdIcd9Cm3ListByCode?code=', false);
     //手术部位
@@ -12878,6 +12880,12 @@ function printBlRecord(patientId, times, printType) {
                 } else {
                     $("#icdTextBlrecord").parent().css("display", "none");
                 }
+
+                if (mzBlRecord.tcmIcdText != null && mzBlRecord.tcmIcdText != "") {
+                    $("#tcmIcdTextBlrecord").text(mzBlRecord.tcmIcdText);
+                } else {
+                    $("#tcmIcdTextBlrecord").text("无");
+                }
                 if (mzBlRecord.emrProcess != null && mzBlRecord.emrProcess != "") {
                     $("#emrProcessBlrecord").html(mzBlRecord.emrProcess);
                     $("#emrProcessBlrecord").parent().css("display", "block");
@@ -13787,6 +13795,7 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
                 setSelectedAttr("editZd", mzBlRecord.icdCode, mzBlRecord.icdText);
+                setSelectedAttr("editTcmZd", mzBlRecord.tcmIcdCode, mzBlRecord.tcmIcdText);
                 var patientAllergenInfoList = res.patientAllergenInfoList;
                 if (patientAllergenInfoList != null && patientAllergenInfoList.length > 0) {
                     var zdAllergen = [];
@@ -13918,6 +13927,8 @@ function clearInput() {
     $("#editQtjc").val(null);
     $("#editZd").selectpicker('val', null);
     $("#editZd").selectpicker('refresh');
+    $("#editTcmZd").selectpicker('val', null);
+    $("#editTcmZd").selectpicker('refresh');
     $("#edittentativeDiagnosis").val(null);
     $("#editEmrProcess").val(null);
     $("#editEmrJkjy").val(null);
@@ -13961,6 +13972,21 @@ function sendEmrProcess() {
             }
         }
     }
+
+//中医诊断
+    let tcmIcdCodes = $("#editTcmZd").val();
+    let tcmIcdCodeStr = null;
+    if (tcmIcdCodes != null && tcmIcdCodes.length > 0) {
+        for (let i = 0; i < tcmIcdCodes.length; i++) {
+            if (tcmIcdCodeStr == null) {
+                tcmIcdCodeStr = tcmIcdCodes[i];
+            } else {
+                tcmIcdCodeStr += "," + tcmIcdCodes[i];
+            }
+        }
+    }
+
+
     //设置过敏源
     var patientAllergenInfoList = [];
     var zdAllergen = $("#editZdAllergen").val();
@@ -14008,7 +14034,9 @@ function sendEmrProcess() {
             "pressureHighLeft": $("#bl_pressure_high_left").val(),
             "pressureFloorLeft": $("#bl_pressure_floor_left").val(),
             "icdCode": icdCodeStr,
+            "tcmIcdCode": tcmIcdCodeStr,
             "icdText": $('#editZd').next().attr("title"),
+            "tcmIcdText": $('#editTcmZd').next().attr("title"),
             "tentativeDiagnosis": $("#edittentativeDiagnosis").val(),
             "emrJkjy": $("#editEmrJkjy").val(),
             "emrProcess": $("#editEmrProcess").val(),

+ 25 - 0
src/main/resources/static/js/mz/mz_bl_record.js

@@ -248,6 +248,7 @@ function initSelect() {
     initDeptSelect();
     //select 从后台加载数据,并保留之前选择的内容
     dynamicSelectWithOri("editZd", '/thmz/getAllZdIcdCommonParams?commonParams=',false);
+    dynamicSelectWithOri("editTcmZd", '/thmz/getAllTcmIcdCodeByParams?name=',false);
     //过敏源
     dynamicSelectWithOri("editZdAllergen", '/thmz/getZdAllergenListByCode?code=', false);
     //药品列表
@@ -419,6 +420,12 @@ function printBlRecord(patientId, times, printType) {
                 } else {
                     $("#icdTextBlrecord").parent().css("display", "none");
                 }
+
+                if (mzBlRecord.tcmIcdText != null && mzBlRecord.tcmIcdText != "") {
+                    $("#tcmIcdTextBlrecord").text(mzBlRecord.tcmIcdText);
+                } else {
+                    $("#tcmIcdTextBlrecord").text("无");
+                }
                 if (mzBlRecord.emrProcess != null && mzBlRecord.emrProcess != "") {
                     $("#emrProcessBlrecord").html(mzBlRecord.emrProcess);
                     $("#emrProcessBlrecord").parent().css("display", "block");
@@ -583,6 +590,7 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
                 setSelectedAttr("editZd", mzBlRecord.icdCode, mzBlRecord.icdText);
+                setSelectedAttr("editTcmZd", mzBlRecord.tcmIcdCode, mzBlRecord.tcmIcdText);
                 var patientAllergenInfoList = res.patientAllergenInfoList;
                 if (patientAllergenInfoList != null && patientAllergenInfoList.length > 0) {
                     var zdAllergen = [];
@@ -894,6 +902,19 @@ function sendEmrProcess() {
             }
         }
     }
+    //中医诊断
+    let tcmIcdCodes = $("#editTcmZd").val();
+    let tcmIcdCodeStr = null;
+    if (tcmIcdCodes != null && tcmIcdCodes.length > 0) {
+        for (let i = 0; i < tcmIcdCodes.length; i++) {
+            if (tcmIcdCodeStr == null) {
+                tcmIcdCodeStr = tcmIcdCodes[i];
+            } else {
+                tcmIcdCodeStr += "," + tcmIcdCodes[i];
+            }
+        }
+    }
+
     //设置过敏源
     var patientAllergenInfoList = [];
     var zdAllergen = $("#editZdAllergen").val();
@@ -940,7 +961,9 @@ function sendEmrProcess() {
             "pressureHighLeft": $("#bl_pressure_high_left").val(),
             "pressureFloorLeft": $("#bl_pressure_floor_left").val(),
             "icdCode": icdCodeStr,
+            "tcmIcdCode": tcmIcdCodeStr,
             "icdText": $('#editZd').next().attr("title"),
+            "tcmIcdText": $('#editTcmZd').next().attr("title"),
             "tentativeDiagnosis": $("#edittentativeDiagnosis").val(),
             "emrJkjy": $("#editEmrJkjy").val(),
             "emrProcess": $("#editEmrProcess").val(),
@@ -989,6 +1012,8 @@ function clearInput() {
     $("#editQtjc").val(null);
     $("#editZd").selectpicker('val', null);
     $("#editZd").selectpicker('refresh');
+    $("#editTcmZd").selectpicker('val', null);
+    $("#editTcmZd").selectpicker('refresh');
     $("#edittentativeDiagnosis").val(null);
     $("#editEmrProcess").val(null);
     $("#editEmrJkjy").val(null);

+ 18 - 0
src/main/resources/templates/mz/clinic.html

@@ -3323,6 +3323,13 @@
                         <td colspan="7" id="icdTextBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
                     </tr>
+                    <tr>
+                        <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
+                            中医诊断
+                        </td>
+                        <td colspan="7" id="tcmIcdTextBlrecord"
+                            style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
+                    </tr>
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
                             处理(RP.)
@@ -4124,6 +4131,17 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <div class="col-md-12 col-sm-12 col-xs-12 item">
+                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editTcmZd">中医诊断
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <select class="form-control selectpicker show-tick" multiple data-live-search="true"
+                                        id="editTcmZd" title="请选择">
+                                </select>
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group thmz_alert">
                         <div class="col-md-12 col-sm-12 col-xs-12 item">
                             <label class="control-label col-md-2 col-sm-2 col-xs-12" for="edittentativeDiagnosis">初步诊断

+ 18 - 0
src/main/resources/templates/mz/mz_bl_record.html

@@ -179,6 +179,13 @@
                         <td colspan="7" id="icdTextBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
                     </tr>
+                    <tr>
+                        <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
+                            中医诊断
+                        </td>
+                        <td colspan="7" id="tcmIcdTextBlrecord"
+                            style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
+                    </tr>
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
                             处理(RP.)
@@ -380,6 +387,17 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <div class="col-md-12 col-sm-12 col-xs-12 item">
+                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editTcmZd">中医诊断
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <select class="form-control selectpicker show-tick" multiple data-live-search="true"
+                                        id="editTcmZd" title="请选择">
+                                </select>
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group thmz_alert">
                         <div class="col-md-12 col-sm-12 col-xs-12 item">
                             <label class="control-label col-md-2 col-sm-2 col-xs-12" for="edittentativeDiagnosis">初步诊断