|
@@ -9,7 +9,6 @@ import com.diagbot.dto.StandConvertCrfBatchDTO;
|
|
|
import com.diagbot.dto.StandConvertCrfDTO;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.ExcelUtils;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RedisUtil;
|
|
@@ -110,92 +109,92 @@ public class TestFacade {
|
|
|
|
|
|
if (StringUtil.isNotEmpty(bean.getNeoType())) {
|
|
|
switch (bean.getNeoType()) {
|
|
|
- case "1": // 性别
|
|
|
- if ("男性".equals(bean.getNeoName())) {
|
|
|
- indicationPushVO.setSex(1);
|
|
|
- } else if ("女性".equals(bean.getNeoName())) {
|
|
|
- indicationPushVO.setSex(2);
|
|
|
- }
|
|
|
- break;
|
|
|
- case "2": // 化验, 示例:血小板计数,<,50,10^9/L
|
|
|
- String lisStr = bean.getNeoName();
|
|
|
- String[] lisArr = lisStr.split(",");
|
|
|
-
|
|
|
- List<Lis> lisList = new ArrayList<>();
|
|
|
- Lis lisBean = new Lis();
|
|
|
- lisBean.setUniqueName(lisArr[0]);
|
|
|
- lisBean.setName(lisArr[0]);
|
|
|
- lisBean.setDetailName(lisArr[0]);
|
|
|
- lisBean.setValue(getValue(lisArr));
|
|
|
- lisList.add(lisBean);
|
|
|
- indicationPushVO.setLis(lisList);
|
|
|
- break;
|
|
|
- case "3": // 临床表现
|
|
|
- indicationPushVO.setChief(bean.getNeoName());
|
|
|
- break;
|
|
|
+ // case "1": // 性别
|
|
|
+ // if ("男性".equals(bean.getNeoName())) {
|
|
|
+ // indicationPushVO.setSex(1);
|
|
|
+ // } else if ("女性".equals(bean.getNeoName())) {
|
|
|
+ // indicationPushVO.setSex(2);
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "2": // 化验, 示例:血小板计数,<,50,10^9/L
|
|
|
+ // String lisStr = bean.getNeoName();
|
|
|
+ // String[] lisArr = lisStr.split(",");
|
|
|
+ //
|
|
|
+ // List<Lis> lisList = new ArrayList<>();
|
|
|
+ // Lis lisBean = new Lis();
|
|
|
+ // lisBean.setUniqueName(lisArr[0]);
|
|
|
+ // lisBean.setName(lisArr[0]);
|
|
|
+ // lisBean.setDetailName(lisArr[0]);
|
|
|
+ // lisBean.setValue(getValue(lisArr));
|
|
|
+ // lisList.add(lisBean);
|
|
|
+ // indicationPushVO.setLis(lisList);
|
|
|
+ // break;
|
|
|
+ // case "3": // 临床表现
|
|
|
+ // indicationPushVO.setChief(bean.getNeoName());
|
|
|
+ // break;
|
|
|
case "4": //辅助检查描述
|
|
|
indicationPushVO.setSymptom("B超:提示" + bean.getNeoName());
|
|
|
break;
|
|
|
- case "5": // 诊断
|
|
|
- List<Item> diag = new ArrayList<>();
|
|
|
- Item diagItem = new Item();
|
|
|
- diagItem.setName(bean.getNeoName());
|
|
|
- diagItem.setUniqueName(bean.getNeoName());
|
|
|
- diag.add(diagItem);
|
|
|
- indicationPushVO.setDiag(diag);
|
|
|
- break;
|
|
|
- case "6": // 服用药品
|
|
|
- StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
|
|
|
- symptom.append(bean.getNeoName()).append("。");
|
|
|
- indicationPushVO.setSymptom(symptom.toString());
|
|
|
- break;
|
|
|
- case "7" : // 药品过敏原
|
|
|
- StringBuffer pastStr = new StringBuffer("");
|
|
|
- if ("药品通用名称".equals(bean.getDrugType())) {
|
|
|
- pastStr.append("有“").append(bean.getNeoName()).append("”过敏。");
|
|
|
- indicationPushVO.setPasts(pastStr.toString());
|
|
|
- } else if ("药品类别".equals(bean.getDrugType())) {
|
|
|
- List<String> drugList = (List<String>)redisUtil.get("药品分类_" + bean.getNeoName());
|
|
|
- if (ListUtil.isNotEmpty(drugList)) {
|
|
|
- for (String s : drugList) {
|
|
|
- pastStr = new StringBuffer("");
|
|
|
- IndicationPushVO indicationPushCopy = new IndicationPushVO();
|
|
|
- BeanUtil.copyProperties(indicationPushVO, indicationPushCopy);
|
|
|
- pastStr.append("有“").append(s).append("”过敏。");
|
|
|
- indicationPushCopy.setPasts(pastStr.toString());
|
|
|
- indicationPushCopy.setMsg("过敏药品【" + s + "】");
|
|
|
- indicationPushVOList.add(indicationPushCopy);
|
|
|
- }
|
|
|
- }
|
|
|
- continue;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "12": // 体征
|
|
|
- StringBuffer sbVital = new StringBuffer();
|
|
|
- String[] vitalArr = bean.getNeoName().split(",");
|
|
|
- if (vitalArr.length > 1) {
|
|
|
- if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
|
|
|
- if ("收缩压".equals(vitalArr[0])) {
|
|
|
- sbVital.append("血压");
|
|
|
- sbVital.append(getValue(vitalArr) + "/100mmHg");
|
|
|
- indicationPushVO.setVital(sbVital.toString());
|
|
|
- } else if ("舒张压".equals(vitalArr[0])) {
|
|
|
- sbVital.append("血压");
|
|
|
- sbVital.append("100/" + getValue(vitalArr) + "mmHg");
|
|
|
- indicationPushVO.setVital(sbVital.toString());
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 其他数值类型
|
|
|
- sbVital.append(vitalArr[0]);
|
|
|
- sbVital.append(getValue(vitalArr));
|
|
|
- sbVital.append(vitalArr[3]);
|
|
|
- indicationPushVO.setVital(sbVital.toString());
|
|
|
- }
|
|
|
- } else {
|
|
|
- sbVital.append(vitalArr[0]);
|
|
|
- indicationPushVO.setVital(sbVital.toString());
|
|
|
- }
|
|
|
- break;
|
|
|
+ // case "5": // 诊断
|
|
|
+ // List<Item> diag = new ArrayList<>();
|
|
|
+ // Item diagItem = new Item();
|
|
|
+ // diagItem.setName(bean.getNeoName());
|
|
|
+ // diagItem.setUniqueName(bean.getNeoName());
|
|
|
+ // diag.add(diagItem);
|
|
|
+ // indicationPushVO.setDiag(diag);
|
|
|
+ // break;
|
|
|
+ // case "6": // 服用药品
|
|
|
+ // StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
|
|
|
+ // symptom.append(bean.getNeoName()).append("。");
|
|
|
+ // indicationPushVO.setSymptom(symptom.toString());
|
|
|
+ // break;
|
|
|
+ // case "7" : // 药品过敏原
|
|
|
+ // StringBuffer pastStr = new StringBuffer("");
|
|
|
+ // if ("药品通用名称".equals(bean.getDrugType())) {
|
|
|
+ // pastStr.append("有“").append(bean.getNeoName()).append("”过敏。");
|
|
|
+ // indicationPushVO.setPasts(pastStr.toString());
|
|
|
+ // } else if ("药品类别".equals(bean.getDrugType())) {
|
|
|
+ // List<String> drugList = (List<String>)redisUtil.get("药品分类_" + bean.getNeoName());
|
|
|
+ // if (ListUtil.isNotEmpty(drugList)) {
|
|
|
+ // for (String s : drugList) {
|
|
|
+ // pastStr = new StringBuffer("");
|
|
|
+ // IndicationPushVO indicationPushCopy = new IndicationPushVO();
|
|
|
+ // BeanUtil.copyProperties(indicationPushVO, indicationPushCopy);
|
|
|
+ // pastStr.append("有“").append(s).append("”过敏。");
|
|
|
+ // indicationPushCopy.setPasts(pastStr.toString());
|
|
|
+ // indicationPushCopy.setMsg("过敏药品【" + s + "】");
|
|
|
+ // indicationPushVOList.add(indicationPushCopy);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "12": // 体征
|
|
|
+ // StringBuffer sbVital = new StringBuffer();
|
|
|
+ // String[] vitalArr = bean.getNeoName().split(",");
|
|
|
+ // if (vitalArr.length > 1) {
|
|
|
+ // if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
|
|
|
+ // if ("收缩压".equals(vitalArr[0])) {
|
|
|
+ // sbVital.append("血压");
|
|
|
+ // sbVital.append(getValue(vitalArr) + "/100mmHg");
|
|
|
+ // indicationPushVO.setVital(sbVital.toString());
|
|
|
+ // } else if ("舒张压".equals(vitalArr[0])) {
|
|
|
+ // sbVital.append("血压");
|
|
|
+ // sbVital.append("100/" + getValue(vitalArr) + "mmHg");
|
|
|
+ // indicationPushVO.setVital(sbVital.toString());
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // // 其他数值类型
|
|
|
+ // sbVital.append(vitalArr[0]);
|
|
|
+ // sbVital.append(getValue(vitalArr));
|
|
|
+ // sbVital.append(vitalArr[3]);
|
|
|
+ // indicationPushVO.setVital(sbVital.toString());
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // sbVital.append(vitalArr[0]);
|
|
|
+ // indicationPushVO.setVital(sbVital.toString());
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
default:
|
|
|
continue;
|
|
|
}
|