|
@@ -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;
|
|
|
}
|