|  | @@ -12,8 +12,10 @@ import cn.hnthyy.thmz.entity.his.mz.MzPatientMi;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.his.mz.MzVisitTable;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.his.zd.ZdEmpTitle;
 | 
	
		
			
				|  |  | +import cn.hnthyy.thmz.entity.thmz.Config;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.PayMarkEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.UnitTypeEnum;
 | 
	
		
			
				|  |  | +import cn.hnthyy.thmz.enums.YesNoEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.mz.MzChargeDetailMapper;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.his.mz.MzPatientMiMapper;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.mapper.thmz.ClinicMapper;
 | 
	
	
		
			
				|  | @@ -22,6 +24,7 @@ import cn.hnthyy.thmz.service.his.mz.MzVisitTableService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.his.yp.YpZdDictService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.his.zd.ZdEmpTitleService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
 | 
	
		
			
				|  |  | +import cn.hnthyy.thmz.service.thmz.ConfigService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.thmz.RationalUseService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.vo.MzPrescriptionVo;
 | 
	
		
			
				|  |  |  import lombok.Data;
 | 
	
	
		
			
				|  | @@ -63,6 +66,8 @@ public class RationalUseServiceImpl implements RationalUseService {
 | 
	
		
			
				|  |  |      private MzPatientMiMapper mzPatientMiMapper;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private YpZdDictService ypZdDictService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private ConfigService configService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 提交药品分析
 | 
	
	
		
			
				|  | @@ -72,6 +77,15 @@ public class RationalUseServiceImpl implements RationalUseService {
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public Map<String, Object> rationalUseOfMedicine(MzPrescriptionVo mzPrescriptionVo) throws MzException {
 | 
	
		
			
				|  |  | +        Config config=configService.queryUserByKey("rational_use_of_medicine");
 | 
	
		
			
				|  |  | +        if(config==null){
 | 
	
		
			
				|  |  | +            //未配置合理用药开关,无需判定
 | 
	
		
			
				|  |  | +            return null;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(!YesNoEnum.YES.code.equals(Integer.valueOf(config.getConfigValue()))){
 | 
	
		
			
				|  |  | +            //未配置合理用药开关,无需判定
 | 
	
		
			
				|  |  | +            return null;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          // 医生信息
 | 
	
		
			
				|  |  |          Map<String, String> doctorMap = doctorInfo(mzPrescriptionVo);
 | 
	
		
			
				|  |  |          String baseXml = doctorMap.get("baseXml");
 |