|  | @@ -15,6 +15,7 @@ import cn.hnthyy.thmz.enums.SettleTypeEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.YesNoEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.ZyReqEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.mz.MzZyReqMapper;
 | 
	
		
			
				|  |  | +import cn.hnthyy.thmz.mapper.his.mz.MzyReqrecMapper;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.zy.PatientMiSfzMapper;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.yz.YzActOrderMapper;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.zy.*;
 | 
	
	
		
			
				|  | @@ -86,6 +87,8 @@ public class ZyActpatientServiceImpl implements ZyActpatientService {
 | 
	
		
			
				|  |  |      private MzPatientMiService mzPatientMiService;
 | 
	
		
			
				|  |  |      @Resource
 | 
	
		
			
				|  |  |      DictDataService dictDataService;
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  | +    MzyReqrecMapper mzyReqrecMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
	
		
			
				|  | @@ -609,7 +612,7 @@ public class ZyActpatientServiceImpl implements ZyActpatientService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * @param patientId
 | 
	
		
			
				|  |  | -     * @description: 判断是否在院
 | 
	
		
			
				|  |  | +     * @description: 判断是否在院 单病种 挂号/住院 GCP  可以开处方
 | 
	
		
			
				|  |  |       * @author: lihong
 | 
	
		
			
				|  |  |       * @date: 2023/12/19 17:15
 | 
	
		
			
				|  |  |       * @param: patientId
 | 
	
	
		
			
				|  | @@ -618,8 +621,17 @@ public class ZyActpatientServiceImpl implements ZyActpatientService {
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public boolean checkZaiYuan(String patientId) {
 | 
	
		
			
				|  |  |          if(StrUtil.isBlank(patientId)) return false;
 | 
	
		
			
				|  |  | +        List<String> chargeTypeList = mzyReqrecMapper.selectChargeType(patientId);
 | 
	
		
			
				|  |  | +        String ghChTypeStr = dictDataService.queryDictVlaue("3.0", "gh_ch_type", "45");
 | 
	
		
			
				|  |  | +        List<String> ghChTypes = CollUtil.newArrayList(ghChTypeStr.split(","));
 | 
	
		
			
				|  |  | +        if(CollUtil.isNotEmpty(chargeTypeList)){
 | 
	
		
			
				|  |  | +            //交集不为空
 | 
	
		
			
				|  |  | +            if(CollUtil.isNotEmpty(CollUtil.intersection(chargeTypeList,ghChTypes))){
 | 
	
		
			
				|  |  | +                return false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          List<String> inPatientNoList = aPatientMiMapper.selectInPatientNoByMzNo(patientId);
 | 
	
		
			
				|  |  | -        String dictVlaue = dictDataService.queryDictVlaue("2.4", "responce_type", "ae,11");
 | 
	
		
			
				|  |  | +        String dictVlaue = dictDataService.queryDictVlaue("2.4", "responce_type", "ae,a0");
 | 
	
		
			
				|  |  |          List<String> dictVlaues = CollUtil.newArrayList(dictVlaue.split(","));
 | 
	
		
			
				|  |  |          if (CollUtil.isNotEmpty(inPatientNoList)) {
 | 
	
		
			
				|  |  |              for (String inPatientNo : inPatientNoList) {
 |