|
@@ -1060,6 +1060,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
throw new MzException("本次处方有医技申请,请完善既往史内容!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
setFullMzPrescriptionVo(mzPrescriptionVo, true, true);
|
|
|
MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(mzPrescriptionVo.getPatientId());
|
|
|
if (mzPatientMi == null) {
|
|
@@ -2245,6 +2246,21 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
MzZyReq mzZyReq = mzPrescriptionVo.getMzZyReq();
|
|
|
if (mzZyReq != null && mzZyReq.getReqDept() != null && StringUtils.isNotBlank(mzZyReq.getReqDept())) {
|
|
|
+ if(needPatient ){
|
|
|
+ if(mzPrescriptionVo.getIcdCode()==null || StringUtils.isBlank(mzPrescriptionVo.getIcdCode())){
|
|
|
+ throw new MzException("保存处方失败,开立住院证必须是标准诊断!");
|
|
|
+ }
|
|
|
+ int count=0;
|
|
|
+ List<String> arr = Arrays.asList(mzPrescriptionVo.getIcdCode().split(","));
|
|
|
+ for(String str:arr){
|
|
|
+ if(str!=null && StringUtils.isNotBlank(str)){
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(count>1){
|
|
|
+ throw new MzException("保存处方失败,开立住院证只允许一个标准诊断!");
|
|
|
+ }
|
|
|
+ }
|
|
|
//有入院证
|
|
|
mzZyReq.setDeptCode(mzPrescriptionVo.getVisitDeptCode());
|
|
|
mzZyReq.setDoctorCode(mzPrescriptionVo.getDoctorCode());
|
|
@@ -2261,18 +2277,18 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
} else {
|
|
|
mzZyReq.setIcdText(mzZyReq.getIcdTextNew());
|
|
|
}
|
|
|
- if (StringUtils.isBlank(mzZyReq.getIcdText())) {
|
|
|
- if (StringUtils.isNotBlank(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis())) {
|
|
|
- mzZyReq.setIcdTextNew(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis());
|
|
|
- mzZyReq.setIcdText(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis());
|
|
|
- if (mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis().length() > 25) {
|
|
|
- mzZyReq.setIcdText(mzZyReq.getIcdTextNew().substring(0, 20));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (mzZyReq.getIcdCode() == null) {
|
|
|
- mzZyReq.setIcdCode("");
|
|
|
- }
|
|
|
+// if (StringUtils.isBlank(mzZyReq.getIcdText())) {
|
|
|
+// if (StringUtils.isNotBlank(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis())) {
|
|
|
+// mzZyReq.setIcdTextNew(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis());
|
|
|
+// mzZyReq.setIcdText(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis());
|
|
|
+// if (mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis().length() > 25) {
|
|
|
+// mzZyReq.setIcdText(mzZyReq.getIcdTextNew().substring(0, 20));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (mzZyReq.getIcdCode() == null) {
|
|
|
+// mzZyReq.setIcdCode("");
|
|
|
+// }
|
|
|
mzZyReq.setReqStatus(YesNoEnum.NO.code.toString());
|
|
|
mzZyReq.setVisitDate(now);
|
|
|
mzZyReq.setName(mzPatientMi.getName());
|