|
@@ -1254,8 +1254,14 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (mzPrescriptionVo.getMzBlRecord().getEmrPs() == null || StringUtils.isBlank(mzPrescriptionVo.getMzBlRecord().getEmrPs())) {
|
|
|
throw new MzException("请完善既往史内容!");
|
|
|
}
|
|
|
+ if (StrUtil.isBlank(mzPrescriptionVo.getMzBlRecord().getEmrJkjy()) || mzPrescriptionVo.getMzBlRecord().getEmrJkjy().length() < 10) {
|
|
|
+ throw new MzException("健康教育为必填且不能少于10个字符!");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
setFullMzPrescriptionVo(mzPrescriptionVo, true, true);
|
|
|
+ verifyDoctorZy(mzPrescriptionVo.getMzChargeDetailList(), TokenUtil.getUser().getUserIdCode());
|
|
|
MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(mzPrescriptionVo.getPatientId());
|
|
|
if (mzPatientMi == null) {
|
|
|
throw new MzException("当前病人信息不存在,请先保存病人信息!");
|
|
@@ -3369,6 +3375,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
@Override
|
|
|
public Map<String, Object> getAmountForTempPrescription(MzPrescriptionVo mzPrescriptionVo) throws MzException {
|
|
|
setFullMzPrescriptionVo(mzPrescriptionVo, false, true);
|
|
|
+ verifyDoctorZy(mzPrescriptionVo.getMzChargeDetailList(),TokenUtil.getUser().getUserIdCode());
|
|
|
if (mzPrescriptionVo == null || (mzPrescriptionVo.getMzChargeDetailList() == null || mzPrescriptionVo.getMzYjReqList() == null)) {
|
|
|
throw new MzException("处方内容为空,无需进行计算!");
|
|
|
}
|
|
@@ -3427,6 +3434,26 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
resultMap.put("amountList", amountList);
|
|
|
return resultMap;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @description: 效验 中药处方权限
|
|
|
+ * @author: lihong
|
|
|
+ * @date: 2024/10/9 10:21
|
|
|
+ * @param: mzChargeDetailList
|
|
|
+ * @param: userIdCode
|
|
|
+ **/
|
|
|
+ private void verifyDoctorZy(List<MzChargeDetail> mzChargeDetailList, String userIdCode) throws MzException{
|
|
|
+ if(StrUtil.isBlank(userIdCode) || CollUtil.isEmpty(mzChargeDetailList)) return;
|
|
|
+ Employee employee = employeeService.queryByUserCode(userIdCode);
|
|
|
+ if(employee == null) return;
|
|
|
+ for(MzChargeDetail md : mzChargeDetailList){
|
|
|
+ if(Constants.KL_GROUP_NO.equals(md.getGroupNo()) && Convert.toInt(employee.getDoctorZy(),0) == 0){
|
|
|
+ throw new MzException("您没有开颗粒剂处方权限,如要开通该权限,请找医务部开通权限!");
|
|
|
+ }
|
|
|
+ if(Constants.CYF.equals(md.getBillItemCode()) && Convert.toInt(employee.getDoctorZy(),0) == 0){
|
|
|
+ throw new MzException("您没有开中草药["+md.getTcName()+"]处方权限,如要开通该权限,请找医务部开通权限!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public MzPrescriptionVo getMzPrescriptionVo(String patientId, Integer times, Boolean MzBlRecordFlag, String payMark) throws MzException {
|