|
@@ -3,6 +3,7 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
+import com.diagbot.biz.push.entity.Pacs;
|
|
|
import com.diagbot.dto.RegularValueDTO;
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.entity.KlRegularConfig;
|
|
@@ -11,10 +12,14 @@ import com.diagbot.enums.RegularConfigEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.model.entity.AllergyMedicine;
|
|
|
+import com.diagbot.model.entity.PD;
|
|
|
+import com.diagbot.model.entity.PacsNum;
|
|
|
+import com.diagbot.model.label.PacsLabel;
|
|
|
import com.diagbot.model.label.PastLabel;
|
|
|
import com.diagbot.service.impl.KlRegularConfigServiceImpl;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RegexUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
|
import com.diagbot.vo.RegularConfigSaveVO;
|
|
@@ -109,7 +114,11 @@ public class KlRegularConfigFacade extends KlRegularConfigServiceImpl {
|
|
|
String allergyStr = indicationPushVO.getAllergy();
|
|
|
String symptom = wordCrfDTO.getSymptom();//现病史
|
|
|
String pasts = wordCrfDTO.getPasts();//既往史
|
|
|
- if (StringUtil.isBlank(symptom) && StringUtil.isBlank(pasts)) {
|
|
|
+ //辅检
|
|
|
+ PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
+ List<PacsNum> pacsNumList = pacsLabel.getPacsNumList();
|
|
|
+ String pacs = pacsLabel.getText();
|
|
|
+ if (StringUtil.isBlank(symptom) && StringUtil.isBlank(pasts)&& StringUtil.isBlank(pacs)) {
|
|
|
return wordCrfDTO;
|
|
|
}
|
|
|
|
|
@@ -141,6 +150,31 @@ public class KlRegularConfigFacade extends KlRegularConfigServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //辅检
|
|
|
+ List<KlRegularConfig> rulesTepy = EntityUtil.makeEntityListMap(regularConfigs, "rulesTepy").get(RegularConfigEnum.pacs.getKey());
|
|
|
+ if(ListUtil.isNotEmpty(rulesTepy)){
|
|
|
+ for (KlRegularConfig klrc:rulesTepy) {
|
|
|
+ String rulesValue = klrc.getRulesValue();
|
|
|
+ //找出所有匹配的,例如“心率40次/分” ,“心率23.25”
|
|
|
+ List<String> regexDataAll = RegexUtil.getRegexDataAll(pacs, rulesValue);
|
|
|
+ if(ListUtil.isNotEmpty(regexDataAll)){
|
|
|
+ for (String content:regexDataAll) {
|
|
|
+ //每个匹配的分组 例如 “心率40次/分” => 心率,40,次/分
|
|
|
+ List<String> group_contents = RegexUtil.getRegexDataList(content, rulesValue);
|
|
|
+ PacsNum pacsNum = new PacsNum();
|
|
|
+ pacsNum.setName(group_contents.get(0));
|
|
|
+ pacsNum.setStandName(group_contents.get(0));
|
|
|
+ PD pd = new PD();
|
|
|
+ pd.setValue((group_contents.get(1)));
|
|
|
+ if(group_contents.size() == 3){
|
|
|
+ pd.setUnit(group_contents.get(2));
|
|
|
+ }
|
|
|
+ pacsNum.setPd(pd);
|
|
|
+ pacsNumList.add(pacsNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 既往史过敏史
|
|
|
List<RegularValueDTO> regularConfigPastss = getRegularConfigDatas(pasts,
|
|
|
EntityUtil.makeEntityListMap(regularConfigs, "rulesTepy").get(RegularConfigEnum.allergy.getKey()));
|