|  | @@ -1,6 +1,5 @@
 | 
	
		
			
				|  |  |  package thyyxxk.webserver.service.zhuyuanyisheng.emr;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import cn.hutool.extra.spring.SpringUtil;
 | 
	
		
			
				|  |  |  import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  |  import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  |  import com.alibaba.fastjson.JSONObject;
 | 
	
	
		
			
				|  | @@ -15,14 +14,8 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.emr.ProblemQualityControl;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.entity.zhuyuanyisheng.emrcontrolrule.EmrRuleV2;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.entity.zhuyuanyisheng.emrcontrolrule.QualityControlAnalysisOfMedicalRecords;
 | 
	
		
			
				|  |  |  import thyyxxk.webserver.service.externalhttp.emr.EmrEditor;
 | 
	
		
			
				|  |  | -import thyyxxk.webserver.utils.DateUtil;
 | 
	
		
			
				|  |  | -import thyyxxk.webserver.utils.ListUtil;
 | 
	
		
			
				|  |  | -import thyyxxk.webserver.utils.ResultVoUtil;
 | 
	
		
			
				|  |  | -import thyyxxk.webserver.utils.StringUtil;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import javax.annotation.PostConstruct;
 | 
	
		
			
				|  |  | -import javax.script.ScriptEngine;
 | 
	
		
			
				|  |  | -import javax.script.ScriptEngineManager;
 | 
	
		
			
				|  |  | +import thyyxxk.webserver.utils.*;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import javax.script.ScriptException;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -45,6 +38,20 @@ public class EmrControlRuleSeverV2 {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有查询到患者信息。");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(qualityControlOfMedicalRecords(patInfo));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public ResultVo<Object> myPatientQualityControl() {
 | 
	
		
			
				|  |  | +        List<QualityControlAnalysisOfMedicalRecords> patInfo = dao.myPatients(TokenUtil.getTokenUserId());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (ListUtil.isBlank(patInfo)) {
 | 
	
		
			
				|  |  | +            return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(qualityControlOfMedicalRecords(patInfo));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public JSONObject qualityControlOfMedicalRecords(List<QualityControlAnalysisOfMedicalRecords> patInfo) {
 | 
	
		
			
				|  |  |          List<EmrRuleData> ruleData = dao.selectEmrRule();
 | 
	
		
			
				|  |  |          ProblemQualityControl error = new ProblemQualityControl();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -68,13 +75,11 @@ public class EmrControlRuleSeverV2 {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              error.setName("病程间隔");
 | 
	
		
			
				|  |  |              intervalBetweenEpisodesOfTheCourseOfIllness(p, error);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              病程记录结果回报(p, error);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          log.info("ruleData:{}", JSON.toJSONString(error.returnsData()));
 | 
	
		
			
				|  |  | -        return ResultVoUtil.success(error.returnsData());
 | 
	
		
			
				|  |  | +        return error.returnsData();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -340,7 +345,6 @@ public class EmrControlRuleSeverV2 {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @PostConstruct
 | 
	
		
			
				|  |  |      public void test() throws ScriptException {
 | 
	
		
			
				|  |  |          List<QualityControlAnalysisOfMedicalRecords> list = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 |