hurugang 4 rokov pred
rodič
commit
bae39148b1

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzChargeDetail.java

@@ -187,7 +187,7 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     private String printFlagYj;
     //
     private String confirmFlagQx;
-    //处方编组
+    //处方编组  借用为原始处方药品字段 1 原始处方药品,即医生开的,0 处方生成的
     private Integer groupId;
     //统计的优惠后总金额
     private BigDecimal amount;

+ 22 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -826,6 +826,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         clinic.setDoctorCode(mzPrescriptionVo.getDoctorCode());
         clinic.setOpId(mzPrescriptionVo.getDoctorCode());
         clinic.setOpDay(new Date());
+        clinic.setIcdCode(mzPrescriptionVo.getIcdCode());
+        clinic.setIcdText(mzPrescriptionVo.getIcdText());
         clinic.setClinicStatus(ClinicStatusEnum.HAD_CLINIC.code);
         clinicMapper.insertClinic(clinic);
         return 1;
@@ -1082,6 +1084,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 mzChargeDetail.setReqYj(YesNoEnum.NO.code.toString());
                 mzChargeDetail.setReqNo(0);
                 mzChargeDetail.setOrderBill(100);
+                mzChargeDetail.setGroupId(YesNoEnum.YES.code);
                 if (!Constants.YJ_GROUP_NO.equals(mzChargeDetail.getGroupNo())) {
                     int num = ypBaseYfMapper.updateStockAmountVirtual(mzChargeDetail.getChargeItemCode(), mzChargeDetail.getSerial(), mzChargeDetail.getGroupNo(), BigDecimal.valueOf(mzChargeDetail.getQuantity()).multiply(BigDecimal.valueOf(mzChargeDetail.getDrugWin())));
                     if (num == 0) {
@@ -1303,7 +1306,18 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             //只需要构造病历信息,不需要设置用药和诊疗信息
             return mzPrescriptionVo;
         }
-        mzPrescriptionVo.setMzChargeDetailList(mzChargeDetailMapper.selectMzChargeDetailByPatientId(patientId,times, null, payMark));
+        List<MzChargeDetail> mzChargeDetailList= mzChargeDetailMapper.selectMzChargeDetailByPatientId(patientId,times, null, payMark);
+        if(PayMarkEnum.CHARGED.code.equals(payMark)){
+            //对于已经收费的药品记录查询,只需要查询医生开立的药品,给要方式等记录需要过滤
+            List<MzChargeDetail> removeList = new ArrayList<>();
+            for (MzChargeDetail mzChargeDetail:mzChargeDetailList){
+                if(YesNoEnum.YES.code!=(mzChargeDetail.getGroupId())){
+                    removeList.add(mzChargeDetail);
+                }
+            }
+            mzChargeDetailList.removeAll(removeList);
+        }
+        mzPrescriptionVo.setMzChargeDetailList(mzChargeDetailList);
         mzPrescriptionVo.setMzYjReqList(mzYjReqMapper.selectNotPayMzYjReq(new MzYjReq(patientId,times)));
         return mzPrescriptionVo;
     }
@@ -2596,6 +2610,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 newMzChargeDetail.setOrigPrice(newMzChargeDetail.getUnitPrice());
                 newMzChargeDetail.setTcName("四舍五入");
                 newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
+                newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
                 mzChargeDetails.add(newMzChargeDetail);
             }
         }
@@ -2685,6 +2700,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             newMzChargeDetail.setResponceType(mzPatientMi != null ? mzPatientMi.getResponseType() : ResponceTypeEnum.SELF_PAYING.code);
             newMzChargeDetail.setGlPercentFt(BigDecimal.ONE);
             newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
+            newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
             mzChargeDetails.add(newMzChargeDetail);
         }
         return itemNo;
@@ -2854,6 +2870,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         newMzChargeDetail.setQuantity(Double.valueOf(newMzChargeDetail.getDrugWin() == null ? 1 : newMzChargeDetail.getDrugWin()));
                         newMzChargeDetail.setDrugWin(1);
                         newMzChargeDetail.setSupplyAmount(null);
+                        newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
                         mzChargeDetails.add(newMzChargeDetail);
                     }
                     hadCountSupplyFeeSet.add(key);
@@ -2916,6 +2933,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         //给药方式执行次数如果为空,默认为1次
                         newMzChargeDetail.setQuantity(Double.valueOf(newMzChargeDetail.getSupplyAmount() == null ? 1 : newMzChargeDetail.getSupplyAmount()));
                         newMzChargeDetail.setSupplyAmount(null);
+                        newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
                         mzChargeDetails.add(newMzChargeDetail);
                     }
                     hadCountSupplyFeeSet.add(key);
@@ -2976,6 +2994,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         //皮试收费默认为1次
                         newMzChargeDetail.setQuantity(1D);
                         newMzChargeDetail.setSupplyAmount(null);
+                        newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
                         mzChargeDetails.add(newMzChargeDetail);
                     }
                 }
@@ -3052,6 +3071,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         newMzChargeDetail.setOrigPrice(BigDecimal.ZERO);
         newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
         mzChargeDetails.add(newMzChargeDetail);
+        newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
         if (ReqTypeEnum.JIAN_YAN.code.equals(mzYjReq.getReqType())) {
             jianYans.add(mzYjReq.getOrderCode());
         } else if (ReqTypeEnum.JIAN_CHA.code.equals(mzYjReq.getReqType())) {
@@ -3137,6 +3157,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         newMzChargeDetail.setGlPercentFt(BigDecimal.ONE);
         newMzChargeDetail.setOrigPrice(zdChargeItem.getChargeAmount());
         newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
+        newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
         mzChargeDetails.add(newMzChargeDetail);
         return itemNo;
     }

+ 5 - 3
src/main/resources/static/js/mz/clinic.js

@@ -5762,6 +5762,8 @@ function getMzPrescriptionVoUnPaid(patientId, times, clnicId) {
                         return;
                     }
                     if (res.code == 0) {
+                        loadInClinicTableList();
+                        loadClinicTableList();
                         getMzPrescriptionVoUnPaidCommon(patientId, times, clnicId);
                     } else {
                         errorMesage(res);
@@ -5987,13 +5989,13 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                 $("#prescriptionDetail_zyzlContent").html("");
                 $("#prescriptionDetail_zlyjContent").html("");
                 if (res.opDate != null) {
-                    $("#visitingDetailDate").val(res.opDate);
+                    $("#visitingDetailDate").text(res.opDate);
                 }
                 if (res.deptName != null) {
-                    $("#visitingDetailDept").val(res.deptName);
+                    $("#visitingDetailDept").text(res.deptName);
                 }
                 if (res.doctorName != null) {
-                    $("#visitingDetailDoctor").val(res.doctorName);
+                    $("#visitingDetailDoctor").text(res.doctorName);
                 }
                 var firstOrNot = jsonData.mzBlRecord.firstOrNot;
                 if (firstOrNot == 0) {