lihong 1 月之前
父节点
当前提交
f7a5c264b2

+ 2 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzOrderDetail.java

@@ -25,6 +25,8 @@ public class MzOrderDetail {
     private String patientId;
     /**号别 mzy_zd_charge_type*/
     private String reqType;
+    /**0 开始处方自动收取挂号费 不收取挂号费  1 收取挂号费*/
+    private String ghFeeFlag;
     @TableField(exist = false)
     private String reqTypeName;
     private Integer times;

+ 18 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1582,6 +1582,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 .chargeDate(new Date())
                 .receiptNo(newMzVisitTable.getReceiptNo())
                 .reqType(Tools.beforeAddZeroStr(mzPrescriptionVo.getReqType()))
+                .ghFeeFlag(Convert.toStr(mzPrescriptionVo.getGhFeeFlag(),"0"))
                 .build();
         mzOrderDetailService.save(mzOrderDetail);
         //保存处方锁信息
@@ -3878,7 +3879,14 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzVisitTable == null) {
             throw new MzException("病人就诊记录不存在!");
         }
+
+        //查询处方信息
+        MzOrderDetail mzOrderDetail = mzOrderDetailService.queryByPatientIdAndTimes(patientId, times);
+        if(mzOrderDetail != null){
+            mzPrescriptionVo.setGhFeeFlag(Convert.toStr(mzOrderDetail.getGhFeeFlag(),"0"));
+        }
         mzPrescriptionVo.setVisitDeptCode(mzVisitTable.getVisitDeptCode());
+        mzPrescriptionVo.setDoctorCode(mzVisitTable.getDoctorCode());
         MzBlRecord mzBlRecord = mzBlRecordMapper.selectMzBlRecordByPatientIdAndTimes(patientId, times);
         if (mzBlRecord == null) {
             //throw new MzException("病人门诊病历记录不存在!");
@@ -4021,6 +4029,16 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (supplyList != null && mzChargeDetailList != null) {
             mzChargeDetailList.removeAll(supplyList);
         }
+        //开出房挂号费 不会写到厨房页面
+        String doctorCode = StrUtil.isBlank(mzPrescriptionVo.getDoctorCode()) ? TokenUtil.getUser().getUserIdCode() : mzPrescriptionVo.getDoctorCode();
+        ZdChargeItem zdChargeItem = zdChargeItemService.queryZdChargeItemGhFeeByEmpCode(doctorCode);
+        if(zdChargeItem !=null && StrUtil.isNotBlank(zdChargeItem.getCode()) && CollUtil.isNotEmpty(mzChargeDetailList)){
+            BeanUtil.trimStrFields(zdChargeItem);
+            List<MzChargeDetail> autoGhCharge = mzChargeDetailList.stream().filter(item -> zdChargeItem.getCode().equals(item.getChargeItemCode())).collect(Collectors.toList());
+            if(CollUtil.isNotEmpty(autoGhCharge)){
+                mzChargeDetailList.removeAll(autoGhCharge);
+            }
+        }
         mzPrescriptionVo.setMzChargeDetailList(mzChargeDetailList);
         if (PayMarkEnum.CHARGED.code.equals(payMark)) {
             MzYjReq mzYjReq = new MzYjReq(patientId, times);

+ 7 - 0
src/main/resources/otherSource/update_table.sql

@@ -2277,4 +2277,11 @@ go
 
 exec sp_addextendedproperty 'MS_Description', '中医诊断名称', 'SCHEMA', 'dbo', 'TABLE', 'mz_visit_table', 'COLUMN', 'tcm_icd_text'
 go
+--自动收取挂号费标识  20250630
+alter table mz_order_detail
+    add gh_fee_flag varchar(5)
+go
+
+exec sp_addextendedproperty 'MS_Description', '0 开处方不自动收取挂号费 1 开处方自动收取挂号费', 'SCHEMA', 'dbo', 'TABLE', 'mz_order_detail', 'COLUMN', 'gh_fee_flag'
+go
 

+ 10 - 7
src/main/resources/static/js/mz/clinic.js

@@ -3601,16 +3601,19 @@ function editPrescription(jsonData, type) {
             });
         }
         $("#healthEducation").val(jsonData.mzBlRecord.emrJkjy);
-    }
-
-    if(!stringIsBlank(jsonData.tcmIcdCode)){
-       let tcmIcdCodes =  jsonData.tcmIcdCode.split(",");
-       let tcmIcdTexts =  jsonData.tcmIcdText.split(",");
-        for (let i = 0; i < tcmIcdCodes.length; i++) {
-            fitTcmDiagnoseValue(tcmIcdTexts[i],tcmIcdCodes[i])
+        if(!stringIsBlank(jsonData.tcmIcdCode)){
+            let tcmIcdCodes =  jsonData.tcmIcdCode.split(",");
+            let tcmIcdTexts =  jsonData.tcmIcdText.split(",");
+            for (let i = 0; i < tcmIcdCodes.length; i++) {
+                fitTcmDiagnoseValue(tcmIcdTexts[i],tcmIcdCodes[i])
+            }
         }
     }
 
+    if(jsonData.ghFeeFlag === '1'){
+        $("#ghFeeSelect").val('1')
+        $('#ghFeeSelect').selectpicker('refresh');
+    }
     var patientAllergenInfoList = jsonData.patientAllergenInfoList;
     if (patientAllergenInfoList != null && patientAllergenInfoList.length > 0) {
         var zdAllergen = [];