Ver código fonte

优化给药方式算法

hurugang 5 anos atrás
pai
commit
3f69ea8af4

+ 3 - 5
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -1781,11 +1781,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
      * @return
      * @throws Exception
      */
-    private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, List<MzChargeDetail> mzChargeDetailList, Integer itemNo, Integer receiptNo) throws MzException {
+    private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, List<MzChargeDetail> mzChargeDetailList, Integer itemNo, Integer receiptNo) {
         for (MzChargeDetail mcd : mzChargeDetailList) {
-            if (!Constants.YJ_GROUP_NO.equals(mcd.getGroupNo()) && mcd.getSupplyAmount() == null) {
-                throw new MzException("当前处方药品给药方式执行次数为空,请联系医生修改处方!");
-            }
             //非口服用药方式,需要写入收费记录
             if (StringUtils.isNotBlank(mcd.getSupplyCode()) && !Constants.KOU_FU_SUPPLY_CODE.equals(mcd.getSupplyCode())) {
                 List<MzZdSupplyCharge> mzZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCode(mcd.getSupplyCode());
@@ -1825,7 +1822,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                             }
                             newMzChargeDetail.setTcName(zdChargeItem.getName());
                             newMzChargeDetail.setBillItemCode(Constants.ZLF);
-                            newMzChargeDetail.setQuantity(Double.valueOf(newMzChargeDetail.getSupplyAmount()));
+                            //给药方式执行次数如果为空,默认为1次
+                            newMzChargeDetail.setQuantity(Double.valueOf(newMzChargeDetail.getSupplyAmount()==null?1:newMzChargeDetail.getSupplyAmount()));
                             newMzChargeDetail.setSupplyAmount(null);
                             mzChargeDetails.add(newMzChargeDetail);
                         }