|
@@ -7,6 +7,7 @@ import cn.hnthyy.thmz.entity.MzException;
|
|
|
import cn.hnthyy.thmz.entity.his.ResponceType;
|
|
|
import cn.hnthyy.thmz.entity.his.mz.*;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.ZdChequeType;
|
|
|
+import cn.hnthyy.thmz.entity.his.zd.ZdUnitCode;
|
|
|
import cn.hnthyy.thmz.entity.thmz.*;
|
|
|
import cn.hnthyy.thmz.enums.ClinicStatusEnum;
|
|
|
import cn.hnthyy.thmz.enums.OrderStatusEnum;
|
|
@@ -156,6 +157,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
throw new MzException("当前号别不存在,请先设置!");
|
|
|
}
|
|
|
MzyRequest mzyRequest = mzyRequestMapper.selectMzyRequestById(mzyReqrecPageDto.getMzyRequestId());
|
|
|
+ if(mzyRequest==null){
|
|
|
+ throw new MzException("挂号对应的排班不存在!");
|
|
|
+ }
|
|
|
+ pediatricAgeLimit(mzPatientMi, mzyRequest);
|
|
|
//covidManage(mzyReqrec, mzPatientMi, mzyRequest);
|
|
|
if (PayMarkEnum.NO_CHARGE.code.equals(mzyReqrecPageDto.getPayMark())) {
|
|
|
mzyReqrec.setRequestDay(mzyRequest.getRequestDay());
|
|
@@ -222,6 +227,34 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 儿科年龄校验
|
|
|
+ * @param mzPatientMi
|
|
|
+ * @param mzyRequest
|
|
|
+ * @throws MzException
|
|
|
+ */
|
|
|
+ private void pediatricAgeLimit(MzPatientMi mzPatientMi, MzyRequest mzyRequest) throws MzException {
|
|
|
+ ZdUnitCode zdUnitCode= zdUnitCodeService.queryByCode(mzyRequest.getUnitCode());
|
|
|
+ if(zdUnitCode!=null && StringUtils.isNotBlank(zdUnitCode.getParentCode()) && Constants.EK_CODE.equals(zdUnitCode.getParentCode())){
|
|
|
+ Config config= configMapper.selectConfigByKey("pediatric_age_limit");
|
|
|
+ if(config!=null && StringUtils.isNotBlank(config.getConfigValue())){
|
|
|
+ Integer age=mzPatientMi.getAgeForYear();
|
|
|
+ if(age==null){
|
|
|
+ throw new MzException("患者年龄为空,请先完善患者基础信息!");
|
|
|
+ }
|
|
|
+ Integer configValue=99999;
|
|
|
+ try {
|
|
|
+ configValue= Integer.valueOf(config.getConfigValue());
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if(age>configValue){
|
|
|
+ throw new MzException("患者年龄超限,无法继续在儿科相关科室就诊!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取新的缴费次数
|
|
|
*
|