|
@@ -329,7 +329,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
maxOrderNo = firstMzChargeDetail.getOrderNo();
|
|
|
priceId = firstMzChargeDetail.getPriceId();
|
|
|
priceTime = firstMzChargeDetail.getPriceTime();
|
|
|
- itemNo = formatSupplyFee(mzChargeDetails, mzChargeDetailList, itemNo, receiptNo,mzPatientMi);
|
|
|
+ itemNo = formatSupplyFee(mzChargeDetails, mzChargeDetailList, itemNo, receiptNo, mzPatientMi);
|
|
|
}
|
|
|
maxOrderNo++;
|
|
|
Map<String, MzYjReq> mzYjReqMap = new HashMap<>();
|
|
@@ -499,10 +499,10 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
int serialNo = mzSerialNoService.getSerialNo();
|
|
|
MzReceiptSerial mzReceiptSerial = new MzReceiptSerial();
|
|
|
ReceiptSerialFee receiptSerialFee = new ReceiptSerialFee();
|
|
|
- if(!Constants.DBZJF_CODE.equals(opId)){
|
|
|
+ if (!Constants.DBZJF_CODE.equals(opId)) {
|
|
|
//单病种收费方式也是医保记账,但是不用传医保费用 所以需要排除
|
|
|
for (MzDepositFile m : mzDepositFileVo.getMzDepositFiles()) {
|
|
|
- if (Constants.YBJZ.equals(m.getChequeType()) ) {
|
|
|
+ if (Constants.YBJZ.equals(m.getChequeType())) {
|
|
|
PayInfo payInfo = tsmzService.calculateCost(opId, mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), receiptNo);
|
|
|
if (payInfo == null || payInfo.getCode() == -1) {
|
|
|
throw new MzException("特门费用结算失败,错误原因:" + payInfo.getErrorMessage());
|
|
@@ -779,7 +779,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
- public int savePrescription(MzPrescriptionVo mzPrescriptionVo, Clinic dbClinic) throws MzException {
|
|
|
+ public Clinic savePrescription(MzPrescriptionVo mzPrescriptionVo, Clinic dbClinic) throws MzException {
|
|
|
String realIcdText = null;
|
|
|
if (mzPrescriptionVo.getIcdText() != null) {
|
|
|
realIcdText = mzPrescriptionVo.getIcdText().replaceAll(",", "");
|
|
@@ -802,7 +802,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
}
|
|
|
setFullMzPrescriptionVo(mzPrescriptionVo, true);
|
|
|
- setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.YES);
|
|
|
+ MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(mzPrescriptionVo.getPatientId());
|
|
|
+ if (mzPatientMi == null) {
|
|
|
+ throw new MzException("当前病人信息不存在,请先保存病人信息!");
|
|
|
+ }
|
|
|
+ setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.YES, mzPatientMi.getBirthDay());
|
|
|
if (dbClinic != null && dbClinic.getId() != null && StringUtils.isNotBlank(dbClinic.getPatientId()) && dbClinic.getTimes() != null && ClinicStatusEnum.HAD_CLINIC.code.equals(dbClinic.getClinicStatus())) {
|
|
|
List<MzChargeDetail> dbMzChargeDetailList = mzChargeDetailMapper.selectNotPayMzChargeDetailByPatientId(mzPrescriptionVo.getPatientId(), dbClinic.getTimes());
|
|
|
if (dbMzChargeDetailList != null && dbMzChargeDetailList.size() > 0) {
|
|
@@ -822,10 +826,6 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (lastMzVisitTable != null) {
|
|
|
times = lastMzVisitTable.getTimes();
|
|
|
}
|
|
|
- MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(mzPrescriptionVo.getPatientId());
|
|
|
- if (mzPatientMi == null) {
|
|
|
- throw new MzException("当前病人信息不存在,请先保存病人信息!");
|
|
|
- }
|
|
|
if (mzPatientMi.getTimes() != null && mzPatientMi.getTimes() > times) {
|
|
|
times = mzPatientMi.getTimes();
|
|
|
}
|
|
@@ -854,6 +854,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (mzBlRecord.getTentativeDiagnosis() == null) {
|
|
|
mzBlRecord.setTentativeDiagnosis("");
|
|
|
}
|
|
|
+ MzBlRecord.formatMzBlRecord(mzBlRecord);
|
|
|
mzBlRecordMapper.insertMzBlRecord(mzBlRecord);
|
|
|
MzZyReq mzZyReq = mzPrescriptionVo.getMzZyReq();
|
|
|
if (mzZyReq != null && mzZyReq.getReqDept() != null && StringUtils.isNotBlank(mzZyReq.getReqDept())) {
|
|
@@ -887,7 +888,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
clinic.setIcdText(realIcdText != null ? mzPrescriptionVo.getIcdText() : mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis());
|
|
|
clinic.setClinicStatus(ClinicStatusEnum.HAD_CLINIC.code);
|
|
|
clinicMapper.insertClinic(clinic);
|
|
|
- return 1;
|
|
|
+ return clinic;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -896,7 +897,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param mzPrescriptionVo
|
|
|
* @param savePrescription Yes 新处方 已入库处方
|
|
|
*/
|
|
|
- private void setPrescriptionDetail(MzPrescriptionVo mzPrescriptionVo, YesNoEnum savePrescription) throws MzException {
|
|
|
+ private void setPrescriptionDetail(MzPrescriptionVo mzPrescriptionVo, YesNoEnum savePrescription, Date birthDay) throws MzException {
|
|
|
Map<String, Object> prescriptionDetail = new HashMap<>();
|
|
|
List<Map<String, Object>> zyPrescription = new ArrayList();
|
|
|
prescriptionDetail.put("zyPrescription", zyPrescription);
|
|
@@ -938,6 +939,18 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
for (ZdChargeItem zd : zdChargeItemList) {
|
|
|
totalAmount = totalAmount.add(zd.getTotalAmount() == null ? BigDecimal.ZERO : zd.getTotalAmount());
|
|
|
+ //项目加价且加收比例不为空
|
|
|
+ if (zd.getCo() != null && YesNoEnum.YES.code.equals(zd.getCo()) && zd.getXlCode() != null && StringUtils.isNotBlank(zd.getXlCode()) && birthDay != null) {
|
|
|
+ int age = DateUtil.getAge(birthDay);
|
|
|
+ //6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
+ if (age < 6) {
|
|
|
+ BigDecimal xlCode = new BigDecimal(zd.getXlCode());
|
|
|
+ if (xlCode != null) {
|
|
|
+ xlCode = xlCode.add(BigDecimal.ONE);
|
|
|
+ totalAmount = totalAmount.multiply(xlCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal amount = (BigDecimal) yjMap.get("amount");
|
|
|
amount = amount.add(totalAmount);
|
|
@@ -1016,6 +1029,23 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (amount == null) {
|
|
|
amount = BigDecimal.ZERO;
|
|
|
}
|
|
|
+ if (birthDay != null) {
|
|
|
+ int age = DateUtil.getAge(birthDay);
|
|
|
+ //6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
+ if (age < 6) {
|
|
|
+ ZdChargeItem zdChargeItem = zdChargeItemService.queryZdChargeItemByCode(mzChargeDetail.getChargeItemCode());
|
|
|
+ if (zdChargeItem != null) {
|
|
|
+ //项目加价且加收比例不为空
|
|
|
+ if (zdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(zdChargeItem.getCo()) && zdChargeItem.getXlCode() != null && StringUtils.isNotBlank(zdChargeItem.getXlCode())) {
|
|
|
+ BigDecimal xlCode = new BigDecimal(zdChargeItem.getXlCode());
|
|
|
+ if (xlCode != null) {
|
|
|
+ xlCode = xlCode.add(BigDecimal.ONE);
|
|
|
+ tempAmount = tempAmount.multiply(xlCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
amount = amount.add(tempAmount);
|
|
|
tempMap.put("amount", amount);
|
|
|
if (StringUtils.isBlank(mzChargeDetail.getTcNo())) {
|
|
@@ -1535,7 +1565,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public int nucleicAcidApplication(String patientId) throws MzException {
|
|
|
+ public Clinic nucleicAcidApplication(String patientId) throws MzException {
|
|
|
MzPrescriptionVo mzPrescriptionVo = new MzPrescriptionVo();
|
|
|
mzPrescriptionVo.setPatientId(patientId);
|
|
|
mzPrescriptionVo.setIcdCode("");
|
|
@@ -1781,7 +1811,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mzPrescriptionVo.setMzYjReqList(mzYjReqMapper.selectNotPayMzYjReq(new MzYjReq(patientId, times)));
|
|
|
}
|
|
|
if (mzBlRecord.getPrescriptionDetail() == null || StringUtils.isBlank(mzBlRecord.getPrescriptionDetail())) {
|
|
|
- setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.NO);
|
|
|
+ MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(mzPrescriptionVo.getPatientId());
|
|
|
+ if (mzPatientMi == null) {
|
|
|
+ throw new MzException("当前病人信息不存在,请先保存病人信息!");
|
|
|
+ }
|
|
|
+ setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.NO, mzPatientMi.getBirthDay());
|
|
|
}
|
|
|
List<MzChargeDetail> removeList = null;
|
|
|
if (mzChargeDetailList != null && mzChargeDetailList.size() > 0) {
|
|
@@ -2271,9 +2305,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mzPrescriptionVo.setMzYjReqList(mzYjReqs);
|
|
|
if (mzBlRecord != null) {
|
|
|
mzBlRecord.setTimes(times);
|
|
|
- setBlRecord(mzBlRecord);
|
|
|
mzPrescriptionVo.setMzBlRecord(mzBlRecord);
|
|
|
- setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.NO);
|
|
|
+ setPrescriptionDetail(mzPrescriptionVo, YesNoEnum.NO, mzPatientMi.getBirthDay());
|
|
|
+ MzBlRecord.formatMzBlRecord(mzBlRecord);
|
|
|
mzBlRecordMapper.insertMzBlRecord(mzBlRecord);
|
|
|
}
|
|
|
}
|
|
@@ -2283,70 +2317,6 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
return times;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 去空
|
|
|
- *
|
|
|
- * @param mzBlRecord
|
|
|
- */
|
|
|
- private void setBlRecord(MzBlRecord mzBlRecord) {
|
|
|
- if (mzBlRecord.getWeight() == null) {
|
|
|
- mzBlRecord.setWeight(0D);
|
|
|
- }
|
|
|
- if (mzBlRecord.getTemperature() == null) {
|
|
|
- mzBlRecord.setTemperature(0D);
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrChiefComplaint() == null) {
|
|
|
- mzBlRecord.setEmrChiefComplaint("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrHpi() == null) {
|
|
|
- mzBlRecord.setEmrHpi("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrPs() == null) {
|
|
|
- mzBlRecord.setEmrPs("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrPe() == null) {
|
|
|
- mzBlRecord.setEmrPe("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrFzjc() == null) {
|
|
|
- mzBlRecord.setEmrFzjc("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrBzfx() == null) {
|
|
|
- mzBlRecord.setEmrBzfx("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getDiseases() == null) {
|
|
|
- mzBlRecord.setDiseases("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getTentativeDiagnosis() == null) {
|
|
|
- mzBlRecord.setTentativeDiagnosis("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrXyy() == null) {
|
|
|
- mzBlRecord.setEmrXyy("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrYypg() == null) {
|
|
|
- mzBlRecord.setEmrYypg("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrGnpg() == null) {
|
|
|
- mzBlRecord.setEmrGnpg("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrJkjy() == null) {
|
|
|
- mzBlRecord.setEmrJkjy("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getPersonalHistory() == null) {
|
|
|
- mzBlRecord.setPersonalHistory("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getFamilyHistory() == null) {
|
|
|
- mzBlRecord.setFamilyHistory("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getObstericalHistory() == null) {
|
|
|
- mzBlRecord.setObstericalHistory("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getPrescriptionDetail() == null) {
|
|
|
- mzBlRecord.setPrescriptionDetail("");
|
|
|
- }
|
|
|
- if (mzBlRecord.getEmrProcess() == null) {
|
|
|
- mzBlRecord.setEmrProcess("");
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
private List<MzReceiptSerial> formatRefundReceiptSerial(List<MzReceiptSerial> mzReceiptSerials, String opId) {
|
|
|
Set<String> tempSet = new HashSet<>();
|
|
@@ -3502,7 +3472,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
|
|
|
newMzChargeDetail.setGroupId(YesNoEnum.YES.code);
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, newMzChargeDetail);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, newMzChargeDetail);
|
|
|
mzChargeDetails.add(newMzChargeDetail);
|
|
|
vesselSets.add(jyZdItem.getVessel());
|
|
|
}
|
|
@@ -3518,28 +3488,28 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, List<MzChargeDetail> mzChargeDetailList, Integer itemNo, Integer receiptNo,MzPatientMi mzPatientMi) throws MzException {
|
|
|
+ private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, List<MzChargeDetail> mzChargeDetailList, Integer itemNo, Integer receiptNo, MzPatientMi mzPatientMi) throws MzException {
|
|
|
//已经计算过给药方式费用的列表
|
|
|
Set<String> hadCountSupplyFeeSet = new HashSet<>();
|
|
|
for (MzChargeDetail mcd : mzChargeDetailList) {
|
|
|
//设置皮试收费
|
|
|
- itemNo = setPsSupplyCharge(mzChargeDetails, itemNo, receiptNo, mcd,mzPatientMi);
|
|
|
+ itemNo = setPsSupplyCharge(mzChargeDetails, itemNo, receiptNo, mcd, mzPatientMi);
|
|
|
//成组的西药注射费 和中药的代煎费只算一次需要重复计算
|
|
|
String key = mcd.getOrderNo() + "-" + mcd.getGroupOrder();
|
|
|
if (hadCountSupplyFeeSet.contains(key)) {
|
|
|
continue;
|
|
|
}
|
|
|
//中药计算代煎费用
|
|
|
- itemNo = setDjSupplyCharge(mzChargeDetails, itemNo, receiptNo, hadCountSupplyFeeSet, mcd, key,mzPatientMi);
|
|
|
+ itemNo = setDjSupplyCharge(mzChargeDetails, itemNo, receiptNo, hadCountSupplyFeeSet, mcd, key, mzPatientMi);
|
|
|
//非口服用药方式,需要写入收费记录
|
|
|
- itemNo = formatSupplyFee(mzChargeDetails, itemNo, receiptNo, hadCountSupplyFeeSet, mcd, key,mzPatientMi);
|
|
|
- if(Constants.YJ_GROUP_NO.equals(mcd.getGroupNo()) && !Constants.TC.equals(mcd.getBillItemCode())){
|
|
|
+ itemNo = formatSupplyFee(mzChargeDetails, itemNo, receiptNo, hadCountSupplyFeeSet, mcd, key, mzPatientMi);
|
|
|
+ if (Constants.YJ_GROUP_NO.equals(mcd.getGroupNo()) && !Constants.TC.equals(mcd.getBillItemCode())) {
|
|
|
ZdChargeItem zdChargeItem = zdChargeItemService.queryZdChargeItemByCode(mcd.getChargeItemCode());
|
|
|
- if(zdChargeItem==null){
|
|
|
- throw new MzException("编码为【"+mcd.getChargeItemCode()+"】的项目不存在!");
|
|
|
+ if (zdChargeItem == null) {
|
|
|
+ throw new MzException("编码为【" + mcd.getChargeItemCode() + "】的项目不存在!");
|
|
|
}
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, mcd);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, mcd);
|
|
|
}
|
|
|
}
|
|
|
return itemNo;
|
|
@@ -3556,7 +3526,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param key
|
|
|
* @return
|
|
|
*/
|
|
|
- private Integer setDjSupplyCharge(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, Set<String> hadCountSupplyFeeSet, MzChargeDetail mcd, String key,MzPatientMi mzPatientMi) {
|
|
|
+ private Integer setDjSupplyCharge(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, Set<String> hadCountSupplyFeeSet, MzChargeDetail mcd, String key, MzPatientMi mzPatientMi) {
|
|
|
if (StringUtils.isNotBlank(mcd.getCyDj())) {
|
|
|
List<MzZdSupplyCharge> mzZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCode(mcd.getCyDj());
|
|
|
List<String> chargeCodes = mzZdSupplyChargeList.stream().map(u -> u.getChargeCode()).collect(Collectors.toList());
|
|
@@ -3601,7 +3571,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setSupplyAmount(null);
|
|
|
newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, newMzChargeDetail);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, newMzChargeDetail);
|
|
|
mzChargeDetails.add(newMzChargeDetail);
|
|
|
}
|
|
|
hadCountSupplyFeeSet.add(key);
|
|
@@ -3622,7 +3592,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param key
|
|
|
* @return
|
|
|
*/
|
|
|
- private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, Set<String> hadCountSupplyFeeSet, MzChargeDetail mcd, String key,MzPatientMi mzPatientMi) {
|
|
|
+ private Integer formatSupplyFee(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, Set<String> hadCountSupplyFeeSet, MzChargeDetail mcd, String key, MzPatientMi mzPatientMi) {
|
|
|
if (StringUtils.isNotBlank(mcd.getSupplyCode()) && !Constants.KOU_FU_SUPPLY_CODE.equals(mcd.getSupplyCode())) {
|
|
|
List<MzZdSupplyCharge> mzZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCode(mcd.getSupplyCode());
|
|
|
List<String> chargeCodes = mzZdSupplyChargeList.stream().map(u -> u.getChargeCode()).collect(Collectors.toList());
|
|
@@ -3666,7 +3636,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setSupplyAmount(null);
|
|
|
newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, newMzChargeDetail);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, newMzChargeDetail);
|
|
|
mzChargeDetails.add(newMzChargeDetail);
|
|
|
}
|
|
|
hadCountSupplyFeeSet.add(key);
|
|
@@ -3685,7 +3655,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param mcd
|
|
|
* @return
|
|
|
*/
|
|
|
- private Integer setPsSupplyCharge(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, MzChargeDetail mcd,MzPatientMi mzPatientMi) {
|
|
|
+ private Integer setPsSupplyCharge(List<MzChargeDetail> mzChargeDetails, Integer itemNo, Integer receiptNo, MzChargeDetail mcd, MzPatientMi mzPatientMi) {
|
|
|
if (YesNoEnum.YES.code.toString().equals(mcd.getTryFlag())) {
|
|
|
List<MzZdSupplyCharge> psZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCode(Constants.SUPPLY_TYPE_PS);
|
|
|
List<String> psChargeCodes = psZdSupplyChargeList.stream().map(u -> u.getChargeCode()).collect(Collectors.toList());
|
|
@@ -3729,7 +3699,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setSupplyAmount(null);
|
|
|
newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, newMzChargeDetail);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, newMzChargeDetail);
|
|
|
mzChargeDetails.add(newMzChargeDetail);
|
|
|
}
|
|
|
}
|
|
@@ -3895,26 +3865,27 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setReqYj(YesNoEnum.YES.code.toString());
|
|
|
newMzChargeDetail.setGroupId(YesNoEnum.NO.code);
|
|
|
//是否需要加价
|
|
|
- setUnitPrice(mzPatientMi, zdChargeItem, newMzChargeDetail);
|
|
|
+ setUnitPrice(mzPatientMi.getBirthDay(), zdChargeItem, newMzChargeDetail);
|
|
|
mzChargeDetails.add(newMzChargeDetail);
|
|
|
return itemNo;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 是否需要加价
|
|
|
- * @param mzPatientMi
|
|
|
+ *
|
|
|
+ * @param birthDay
|
|
|
* @param zdChargeItem
|
|
|
* @param newMzChargeDetail
|
|
|
*/
|
|
|
- private void setUnitPrice(MzPatientMi mzPatientMi, ZdChargeItem zdChargeItem, MzChargeDetail newMzChargeDetail) {
|
|
|
+ private void setUnitPrice(Date birthDay, ZdChargeItem zdChargeItem, MzChargeDetail newMzChargeDetail) {
|
|
|
//项目加价且加收比例不为空
|
|
|
- if (zdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(zdChargeItem.getCo()) && zdChargeItem.getXlCode() != null && StringUtils.isNotBlank(zdChargeItem.getXlCode()) && mzPatientMi.getBirthDay() != null) {
|
|
|
- int age = DateUtil.getAge(mzPatientMi.getBirthDay());
|
|
|
+ if (zdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(zdChargeItem.getCo()) && zdChargeItem.getXlCode() != null && StringUtils.isNotBlank(zdChargeItem.getXlCode()) && birthDay != null) {
|
|
|
+ int age = DateUtil.getAge(birthDay);
|
|
|
//6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
if (age < 6) {
|
|
|
BigDecimal xlCode = new BigDecimal(zdChargeItem.getXlCode());
|
|
|
- if (xlCode!= null) {
|
|
|
- xlCode=xlCode.add(BigDecimal.ONE);
|
|
|
+ if (xlCode != null) {
|
|
|
+ xlCode = xlCode.add(BigDecimal.ONE);
|
|
|
newMzChargeDetail.setUnitPrice(newMzChargeDetail.getUnitPrice().multiply(xlCode));
|
|
|
}
|
|
|
}
|