瀏覽代碼

医学规则测试

zhaops 4 年之前
父節點
當前提交
b7d2fe4786

+ 368 - 0
cdssman-service/src/main/java/com/diagbot/entity/ResultOtherPacs.java

@@ -0,0 +1,368 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-20
+ */
+@TableName("test_result_other_pacs")
+public class ResultOtherPacs implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 测试结果id
+     */
+    private Long resultId;
+
+    /**
+     * 辅检描述
+     */
+    private String pacsDescribe;
+
+    /**
+     * 辅检结果
+     */
+    private String pacsResult;
+
+    /**
+     * 提醒项类型
+     */
+    private String remindItemType;
+
+    /**
+     * 提醒项名称
+     */
+    private String remindItemName;
+
+    /**
+     * 提醒项名称(医院端)
+     */
+    private String remindItemHisName;
+
+    /**
+     * 提醒项名称-细项(医院端)
+     */
+    private String remindItemHisDetailName;
+
+    /**
+     * 参考值
+     */
+    private String referenceValue;
+
+    /**
+     * 参考值(最大值)
+     */
+    private BigDecimal maxAge;
+
+    /**
+     * 参考值(最小值)
+     */
+    private BigDecimal minAge;
+
+    /**
+     * 年龄范围(0:范围内,1:范围外)
+     */
+    private Integer ageRange;
+
+    /**
+     * 输入值
+     */
+    private String inputAge;
+
+    /**
+     * 性别
+     */
+    private String gender;
+
+    /**
+     * 检查结论有
+     */
+    private String postoken;
+
+    /**
+     * 检查结论无
+     */
+    private String negtoken;
+
+    /**
+     * 输出结果(提醒文本)
+     */
+    private String output;
+
+    /**
+     * 期望输出结果(提醒文本)
+     */
+    private String expectedOutput;
+
+    /**
+     * 成功标志(1:成功,0:失败)
+     */
+    private Integer success;
+
+    /**
+     * 提示信息(异常提醒)
+     */
+    private String message;
+
+    /**
+     * 模拟入参
+     */
+    private String inputParams;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(Long resultId) {
+        this.resultId = resultId;
+    }
+    public String getPacsDescribe() {
+        return pacsDescribe;
+    }
+
+    public void setPacsDescribe(String pacsDescribe) {
+        this.pacsDescribe = pacsDescribe;
+    }
+    public String getPacsResult() {
+        return pacsResult;
+    }
+
+    public void setPacsResult(String pacsResult) {
+        this.pacsResult = pacsResult;
+    }
+    public String getRemindItemType() {
+        return remindItemType;
+    }
+
+    public void setRemindItemType(String remindItemType) {
+        this.remindItemType = remindItemType;
+    }
+    public String getRemindItemName() {
+        return remindItemName;
+    }
+
+    public void setRemindItemName(String remindItemName) {
+        this.remindItemName = remindItemName;
+    }
+    public String getRemindItemHisName() {
+        return remindItemHisName;
+    }
+
+    public void setRemindItemHisName(String remindItemHisName) {
+        this.remindItemHisName = remindItemHisName;
+    }
+    public String getRemindItemHisDetailName() {
+        return remindItemHisDetailName;
+    }
+
+    public void setRemindItemHisDetailName(String remindItemHisDetailName) {
+        this.remindItemHisDetailName = remindItemHisDetailName;
+    }
+    public String getReferenceValue() {
+        return referenceValue;
+    }
+
+    public void setReferenceValue(String referenceValue) {
+        this.referenceValue = referenceValue;
+    }
+    public BigDecimal getMaxAge() {
+        return maxAge;
+    }
+
+    public void setMaxAge(BigDecimal maxAge) {
+        this.maxAge = maxAge;
+    }
+    public BigDecimal getMinAge() {
+        return minAge;
+    }
+
+    public void setMinAge(BigDecimal minAge) {
+        this.minAge = minAge;
+    }
+    public Integer getAgeRange() {
+        return ageRange;
+    }
+
+    public void setAgeRange(Integer ageRange) {
+        this.ageRange = ageRange;
+    }
+    public String getInputAge() {
+        return inputAge;
+    }
+
+    public void setInputAge(String inputAge) {
+        this.inputAge = inputAge;
+    }
+    public String getGender() {
+        return gender;
+    }
+
+    public void setGender(String gender) {
+        this.gender = gender;
+    }
+    public String getPostoken() {
+        return postoken;
+    }
+
+    public void setPostoken(String postoken) {
+        this.postoken = postoken;
+    }
+    public String getNegtoken() {
+        return negtoken;
+    }
+
+    public void setNegtoken(String negtoken) {
+        this.negtoken = negtoken;
+    }
+    public String getOutput() {
+        return output;
+    }
+
+    public void setOutput(String output) {
+        this.output = output;
+    }
+    public String getExpectedOutput() {
+        return expectedOutput;
+    }
+
+    public void setExpectedOutput(String expectedOutput) {
+        this.expectedOutput = expectedOutput;
+    }
+    public Integer getSuccess() {
+        return success;
+    }
+
+    public void setSuccess(Integer success) {
+        this.success = success;
+    }
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+    public String getInputParams() {
+        return inputParams;
+    }
+
+    public void setInputParams(String inputParams) {
+        this.inputParams = inputParams;
+    }
+
+    @Override
+    public String toString() {
+        return "ResultOtherPacs{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", resultId=" + resultId +
+            ", pacsDescribe=" + pacsDescribe +
+            ", pacsResult=" + pacsResult +
+            ", remindItemType=" + remindItemType +
+            ", remindItemName=" + remindItemName +
+            ", remindItemHisName=" + remindItemHisName +
+            ", remindItemHisDetailName=" + remindItemHisDetailName +
+            ", referenceValue=" + referenceValue +
+            ", maxAge=" + maxAge +
+            ", minAge=" + minAge +
+            ", ageRange=" + ageRange +
+            ", inputAge=" + inputAge +
+            ", gender=" + gender +
+            ", postoken=" + postoken +
+            ", negtoken=" + negtoken +
+            ", output=" + output +
+            ", expectedOutput=" + expectedOutput +
+            ", success=" + success +
+            ", message=" + message +
+            ", inputParams=" + inputParams +
+        "}";
+    }
+}

+ 369 - 0
cdssman-service/src/main/java/com/diagbot/entity/ResultOtherTransfusion.java

@@ -0,0 +1,369 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+@TableName("test_result_other_transfusion")
+public class ResultOtherTransfusion implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 测试结果id
+     */
+    private Long resultId;
+
+    /**
+     * 其他开单项名称
+     */
+    private String otherItemName;
+
+    /**
+     * 其他开单项名称(医院端)
+     */
+    private String otherItemHisName;
+
+    /**
+     * 其他开单项名称-细项(医院端)
+     */
+    private String otherItemHisDetailName;
+
+    /**
+     * 范围(0:范围内,1:范围外)
+     */
+    private Integer otherItemRange;
+
+    /**
+     * 参考值(最大值)
+     */
+    private BigDecimal otherItemMaxValue;
+
+    /**
+     * 参考值(最小值)
+     */
+    private BigDecimal otherItemMinValue;
+
+    /**
+     * 单位
+     */
+    private String otherItemUnit;
+
+    /**
+     * 输入值
+     */
+    private String otherItemInputValue;
+
+    /**
+     * 输注类型
+     */
+    private String transfusionType;
+
+    /**
+     * 禁忌项类型
+     */
+    private String conflictItemType;
+
+    /**
+     * 禁忌项名称
+     */
+    private String conflictItemName;
+
+    /**
+     * 禁忌项名称(医院端)
+     */
+    private String conflictItemHisName;
+
+    /**
+     * 禁忌项名称-细项(医院端)
+     */
+    private String conflictItemHisDetailName;
+
+    /**
+     * 参考值
+     */
+    private String referenceValue;
+
+    /**
+     * 输出结果(提醒文本)
+     */
+    private String output;
+
+    /**
+     * 期望输出结果(提醒文本)
+     */
+    private String expectedOutput;
+
+    /**
+     * 成功标志(1:成功,0:失败)
+     */
+    private Integer success;
+
+    /**
+     * 提示信息(异常提醒)
+     */
+    private String message;
+
+    /**
+     * 模拟入参
+     */
+    private String inputParams;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(Long resultId) {
+        this.resultId = resultId;
+    }
+    public String getOtherItemName() {
+        return otherItemName;
+    }
+
+    public void setOtherItemName(String otherItemName) {
+        this.otherItemName = otherItemName;
+    }
+    public String getOtherItemHisName() {
+        return otherItemHisName;
+    }
+
+    public void setOtherItemHisName(String otherItemHisName) {
+        this.otherItemHisName = otherItemHisName;
+    }
+    public String getOtherItemHisDetailName() {
+        return otherItemHisDetailName;
+    }
+
+    public void setOtherItemHisDetailName(String otherItemHisDetailName) {
+        this.otherItemHisDetailName = otherItemHisDetailName;
+    }
+    public Integer getOtherItemRange() {
+        return otherItemRange;
+    }
+
+    public void setOtherItemRange(Integer otherItemRange) {
+        this.otherItemRange = otherItemRange;
+    }
+    public BigDecimal getOtherItemMaxValue() {
+        return otherItemMaxValue;
+    }
+
+    public void setOtherItemMaxValue(BigDecimal otherItemMaxValue) {
+        this.otherItemMaxValue = otherItemMaxValue;
+    }
+    public BigDecimal getOtherItemMinValue() {
+        return otherItemMinValue;
+    }
+
+    public void setOtherItemMinValue(BigDecimal otherItemMinValue) {
+        this.otherItemMinValue = otherItemMinValue;
+    }
+    public String getOtherItemUnit() {
+        return otherItemUnit;
+    }
+
+    public void setOtherItemUnit(String otherItemUnit) {
+        this.otherItemUnit = otherItemUnit;
+    }
+    public String getOtherItemInputValue() {
+        return otherItemInputValue;
+    }
+
+    public void setOtherItemInputValue(String otherItemInputValue) {
+        this.otherItemInputValue = otherItemInputValue;
+    }
+    public String getTransfusionType() {
+        return transfusionType;
+    }
+
+    public void setTransfusionType(String transfusionType) {
+        this.transfusionType = transfusionType;
+    }
+    public String getConflictItemType() {
+        return conflictItemType;
+    }
+
+    public void setConflictItemType(String conflictItemType) {
+        this.conflictItemType = conflictItemType;
+    }
+    public String getConflictItemName() {
+        return conflictItemName;
+    }
+
+    public void setConflictItemName(String conflictItemName) {
+        this.conflictItemName = conflictItemName;
+    }
+    public String getConflictItemHisName() {
+        return conflictItemHisName;
+    }
+
+    public void setConflictItemHisName(String conflictItemHisName) {
+        this.conflictItemHisName = conflictItemHisName;
+    }
+    public String getConflictItemHisDetailName() {
+        return conflictItemHisDetailName;
+    }
+
+    public void setConflictItemHisDetailName(String conflictItemHisDetailName) {
+        this.conflictItemHisDetailName = conflictItemHisDetailName;
+    }
+    public String getReferenceValue() {
+        return referenceValue;
+    }
+
+    public void setReferenceValue(String referenceValue) {
+        this.referenceValue = referenceValue;
+    }
+    public String getOutput() {
+        return output;
+    }
+
+    public void setOutput(String output) {
+        this.output = output;
+    }
+    public String getExpectedOutput() {
+        return expectedOutput;
+    }
+
+    public void setExpectedOutput(String expectedOutput) {
+        this.expectedOutput = expectedOutput;
+    }
+    public Integer getSuccess() {
+        return success;
+    }
+
+    public void setSuccess(Integer success) {
+        this.success = success;
+    }
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+    public String getInputParams() {
+        return inputParams;
+    }
+
+    public void setInputParams(String inputParams) {
+        this.inputParams = inputParams;
+    }
+
+    @Override
+    public String toString() {
+        return "ResultOtherTransfusion{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", resultId=" + resultId +
+            ", otherItemName=" + otherItemName +
+            ", otherItemHisName=" + otherItemHisName +
+            ", otherItemHisDetailName=" + otherItemHisDetailName +
+            ", otherItemRange=" + otherItemRange +
+            ", otherItemMaxValue=" + otherItemMaxValue +
+            ", otherItemMinValue=" + otherItemMinValue +
+            ", otherItemUnit=" + otherItemUnit +
+            ", otherItemInputValue=" + otherItemInputValue +
+            ", transfusionType=" + transfusionType +
+            ", conflictItemType=" + conflictItemType +
+            ", conflictItemName=" + conflictItemName +
+            ", conflictItemHisName=" + conflictItemHisName +
+            ", conflictItemHisDetailName=" + conflictItemHisDetailName +
+            ", referenceValue=" + referenceValue +
+            ", output=" + output +
+            ", expectedOutput=" + expectedOutput +
+            ", success=" + success +
+            ", message=" + message +
+            ", inputParams=" + inputParams +
+        "}";
+    }
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/ResultOtherPacsFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ResultOtherPacsServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/1/20 10:47
+ */
+@Component
+public class ResultOtherPacsFacade extends ResultOtherPacsServiceImpl {
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/ResultOtherTransfusionFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ResultOtherTransfusionServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/1/19 20:14
+ */
+@Component
+public class ResultOtherTransfusionFacade extends ResultOtherTransfusionServiceImpl {
+}

+ 310 - 1
cdssman-service/src/main/java/com/diagbot/facade/RuleConvertFacade.java

@@ -8,6 +8,8 @@ import com.diagbot.entity.ResultCritical;
 import com.diagbot.entity.ResultHighriskDrug;
 import com.diagbot.entity.ResultHighriskOperation;
 import com.diagbot.entity.ResultOtherLis;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.entity.ResultOtherTransfusion;
 import com.diagbot.entity.node.BillItem;
 import com.diagbot.entity.node.LisCritical;
 import com.diagbot.entity.node.LisName;
@@ -15,11 +17,16 @@ import com.diagbot.entity.node.LisRemind;
 import com.diagbot.entity.node.MedNameRegName;
 import com.diagbot.entity.node.MedRegName;
 import com.diagbot.entity.node.PacsCritical;
+import com.diagbot.entity.node.PacsRemind;
 import com.diagbot.entity.node.TransfusionRemind;
+import com.diagbot.entity.node.TransfusionSuggest;
+import com.diagbot.entity.node.YiBaoDiseaseName;
 import com.diagbot.entity.node.YiBaoOperationName;
 import com.diagbot.entity.relationship.LisRemindGroup;
 import com.diagbot.entity.relationship.LisRemindMedicine;
 import com.diagbot.entity.relationship.LisRemindYiBaoDiseaseName;
+import com.diagbot.entity.relationship.TransfusionSuggestYiBaoDiseaseName;
+import com.diagbot.entity.relationship.TransfusionSuggestYiBaoOperationName;
 import com.diagbot.enums.GraphLabelEnum;
 import com.diagbot.enums.NeoEnum;
 import com.diagbot.enums.StatusEnum;
@@ -1090,6 +1097,217 @@ public class RuleConvertFacade {
         return retList;
     }
 
+    /**
+     * 其他值提醒-辅检
+     * @param items
+     * @param hospitalId
+     * @return
+     */
+    public List<ResultOtherPacs> otherRuleConvert_pacs(List<PacsRemind> items,Long hospitalId) {
+        List<ResultOtherPacs> retList = Lists.newLinkedList();
+        List<ResultOtherPacs> retOtherList = Lists.newLinkedList();
+
+        Map<String, Map<String, List<Long>>> diseaseConfigMap = diseaseConfigFacade.getUniqueConfigMap(hospitalId, null, null);
+
+        if (ListUtil.isEmpty(items)) {
+            return retList;
+        }
+
+        for (PacsRemind item : items) {
+            ResultOtherPacs result = new ResultOtherPacs();
+            result.setPacsResult(item.getResult());
+            result.setExpectedOutput(item.getMsg());
+            result.setMessage("");
+
+            if (StringUtil.isNotBlank(item.getGender())) {
+                result.setGender(item.getGender());
+            }
+            if (item.getRange() != null) {
+                result.setAgeRange(item.getRange());
+            }
+            if (item.getMaxval() != null) {
+                result.setMaxAge(BigDecimal.valueOf(item.getMaxval()));
+            }
+            if (item.getMinval() != null) {
+                result.setMinAge(BigDecimal.valueOf(item.getMinval()));
+            }
+            result.setPostoken(item.getPostoken());
+            result.setNegtoken(item.getNegtoken());
+
+            if (StringUtil.isNotBlank(item.getDisease())) {
+                result.setRemindItemType(GraphLabelEnum.YiBaoDiseaseName.getName());
+                result.setRemindItemName(item.getDisease());
+                Map<String, List<Long>> subMap = diseaseConfigMap.get(item.getDisease());
+                if (subMap != null && subMap.size() > 0) {
+                    subMap.keySet().forEach(hisName -> {
+                        ResultOtherPacs resultExt = new ResultOtherPacs();
+                        BeanUtil.copyProperties(result, resultExt);
+                        resultExt.setRemindItemHisName(hisName);
+                        retOtherList.add(resultExt);
+                    });
+                } else {
+                    result.setSuccess(0);
+                    result.setMessage(result.getMessage() + "诊断缺少医院端映射;");
+                    retOtherList.add(result);
+                }
+            } else {
+                retOtherList.add(result);
+            }
+        }
+
+        //生成模拟数据
+        for (ResultOtherPacs result : retOtherList) {
+            if (result.getMaxAge() != null || result.getMinAge() != null) {
+                if (result.getAgeRange() == null) {
+                    result.setAgeRange(0);
+                }
+                if (result.getAgeRange().equals(1)) {
+                    if (result.getMinAge() != null) {
+                        ResultOtherPacs minResult = new ResultOtherPacs();
+                        BeanUtil.copyProperties(result, minResult);
+                        minResult.setInputAge(random_int(null, result.getMinAge().intValue()).toString());
+                        retList.add(minResult);
+                    }
+                    if (result.getMaxAge() != null) {
+                        ResultOtherPacs maxResult = new ResultOtherPacs();
+                        BeanUtil.copyProperties(result, maxResult);
+                        maxResult.setInputAge(random_int(result.getMaxAge().intValue(), null).toString());
+                        retList.add(maxResult);
+                    }
+                } else {
+                    result.setInputAge(random_int(result.getMinAge().intValue(), result.getMaxAge().intValue()).toString());
+                    retList.add(result);
+                }
+            } else {
+                retList.add(result);
+            }
+        }
+
+        return retList;
+    }
+
+    /**
+     * 其他值提醒-输血
+     * @param items
+     * @param hospitalId
+     * @return
+     */
+    public List<ResultOtherTransfusion> otherRuleConvert_transfusion(List<TransfusionSuggest> items,Long hospitalId) {
+        List<ResultOtherTransfusion> retList = Lists.newLinkedList();
+        List<ResultOtherTransfusion> retOtherList = Lists.newLinkedList();
+        List<ResultOtherTransfusion> retMappingList = Lists.newLinkedList();
+
+        if (ListUtil.isEmpty(items)) {
+            return retList;
+        }
+
+        Map<String, Map<String, Map<String, List<Long>>>> lisConfigMap = lisConfigFacade.getUniqueConfigMap(hospitalId, null, null);
+        Map<String, Map<String, List<Long>>> diseaseConfigMap = diseaseConfigFacade.getUniqueConfigMap(hospitalId, null, null);
+        Map<String, Map<String, List<Long>>> operationConfigMap = operationConfigFacade.getUniqueConfigMap(hospitalId, null, null);
+
+        for (TransfusionSuggest item : items) {
+            ResultOtherTransfusion result = new ResultOtherTransfusion();
+            result.setOtherItemName(item.getIndex_name());
+            result.setTransfusionType(item.getTransfusion_type());
+            if (item.getMaxval() != null) {
+                result.setOtherItemMaxValue(BigDecimal.valueOf(item.getMaxval()));
+            }
+            if (item.getMinval() != null) {
+                result.setOtherItemMinValue(BigDecimal.valueOf(item.getMinval()));
+            }
+            result.setOtherItemUnit(item.getUnit());
+            result.setOtherItemRange(item.getRange());
+            result.setMessage("");
+
+            //诊断
+            Set<TransfusionSuggestYiBaoDiseaseName> transfusionSuggestYiBaoDiseaseNameSet = item.getTransfusionSuggestDiseases();
+            if (transfusionSuggestYiBaoDiseaseNameSet != null && transfusionSuggestYiBaoDiseaseNameSet.size() > 0) {
+                transfusionSuggestYiBaoDiseaseNameSet.forEach(transDis -> {
+                    YiBaoDiseaseName dis = transDis.getYiBaoDiseaseName();
+                    result.setConflictItemType(GraphLabelEnum.YiBaoDiseaseName.getName());
+                    if (dis != null) {
+                        result.setConflictItemName(dis.getName());
+                        Map<String, List<Long>> subMap = diseaseConfigMap.get(dis.getName());
+                        if (subMap != null && subMap.size() > 0) {
+                            subMap.keySet().forEach(hisName -> {
+                                ResultOtherTransfusion resultExt = new ResultOtherTransfusion();
+                                BeanUtil.copyProperties(result, resultExt);
+                                resultExt.setConflictItemHisName(hisName);
+                                retOtherList.add(resultExt);
+                            });
+                        } else {
+                            result.setMessage(result.getMessage() + "禁忌项缺少医院端映射;");
+                            result.setSuccess(0);
+                            retOtherList.add(result);
+                        }
+                    } else {
+                        result.setMessage(result.getMessage() + "缺少禁忌项;");
+                        result.setSuccess(0);
+                        retOtherList.add(result);
+                    }
+                });
+            }
+
+            //手术和操作
+            Set<TransfusionSuggestYiBaoOperationName> transfusionSuggestYiBaoOperationNameSet = item.getTransfusionSuggestOperations();
+            if (transfusionSuggestYiBaoOperationNameSet != null && transfusionSuggestYiBaoOperationNameSet.size() > 0) {
+                transfusionSuggestYiBaoOperationNameSet.forEach(transOpt -> {
+                    YiBaoOperationName opt = transOpt.getYiBaoOperationName();
+                    result.setConflictItemType(GraphLabelEnum.YiBaoOperationName.getName());
+                    if (opt != null) {
+                        result.setConflictItemName(opt.getName());
+                        Map<String, List<Long>> subMap = operationConfigMap.get(opt.getName());
+                        if (subMap != null && subMap.size() > 0) {
+                            subMap.keySet().forEach(hisName -> {
+                                ResultOtherTransfusion resultExt = new ResultOtherTransfusion();
+                                BeanUtil.copyProperties(result, resultExt);
+                                resultExt.setConflictItemHisName(hisName);
+                                retOtherList.add(resultExt);
+                            });
+                        } else {
+                            result.setMessage(result.getMessage() + "禁忌项缺少医院端映射;");
+                            result.setSuccess(0);
+                            retOtherList.add(result);
+                        }
+                    } else {
+                        result.setMessage(result.getMessage() + "缺少禁忌项;");
+                        result.setSuccess(0);
+                        retOtherList.add(result);
+                    }
+                });
+            }
+        }
+
+        for (ResultOtherTransfusion result : retOtherList) {
+            Map<String, Map<String, List<Long>>> subMap = lisConfigMap.get(result.getOtherItemName());
+            if (subMap != null && subMap.size() > 0) {
+                subMap.entrySet().forEach(subEntry -> {
+                    ResultOtherTransfusion resultExt = new ResultOtherTransfusion();
+                    BeanUtil.copyProperties(result, resultExt);
+                    resultExt.setOtherItemHisName(subEntry.getKey());
+                    if (subEntry.getValue() != null && subEntry.getValue().size() > 0) {
+                        subEntry.getValue().keySet().forEach(detailName -> {
+                            ResultOtherTransfusion resultOtherTransfusion = new ResultOtherTransfusion();
+                            BeanUtil.copyProperties(resultExt, resultOtherTransfusion);
+                            resultOtherTransfusion.setOtherItemHisDetailName(detailName);
+                            retMappingList.add(resultOtherTransfusion);
+                        });
+                    } else {
+                        retMappingList.add(resultExt);
+                    }
+                });
+            } else {
+                result.setMessage(result.getMessage() + "实验室检查缺少医院端映射;");
+                result.setSuccess(0);
+                retMappingList.add(result);
+            }
+        }
+
+        retList = createOhterTransfusionInputValue(retMappingList);
+
+        return retList;
+    }
+
     public MappingShortEntity setMappingShortEntity(String name, String hisName, String hisDetailName) {
         MappingShortEntity item = new MappingShortEntity();
         item.setName(name);
@@ -1318,6 +1536,57 @@ public class RuleConvertFacade {
         return retList;
     }
 
+    /**
+     * 模拟输入数值-其他值-输血
+     * @param resultList
+     * @return
+     */
+    public List<ResultOtherTransfusion> createOhterTransfusionInputValue(List<ResultOtherTransfusion> resultList) {
+        List<ResultOtherTransfusion> retList = Lists.newLinkedList();
+        if (ListUtil.isEmpty(resultList)) {
+            return retList;
+        }
+        for (ResultOtherTransfusion result : resultList) {
+            if (result.getSuccess() != null && result.getSuccess().equals(0)) {
+                retList.add(result);
+                continue;
+            }
+            if (result.getOtherItemMinValue() != null || result.getOtherItemMaxValue() != null) {
+                if (result.getOtherItemRange() == null) {
+                    result.setOtherItemRange(0);
+                }
+                if (result.getOtherItemRange().equals(1)) {
+                    if (result.getOtherItemMinValue() != null) {
+                        ResultOtherTransfusion minResult = new ResultOtherTransfusion();
+                        BeanUtil.copyProperties(result, minResult);
+                        minResult.setOtherItemInputValue(random(null, result.getOtherItemMinValue()).toString());
+                        BillMsg billMsg = getOtherTransfusionMsg(result);
+                        minResult.setExpectedOutput(billMsg.getMsg());
+                        retList.add(minResult);
+                    }
+                    if (result.getOtherItemMaxValue() != null) {
+                        ResultOtherTransfusion maxResult = new ResultOtherTransfusion();
+                        BeanUtil.copyProperties(result, maxResult);
+                        maxResult.setOtherItemInputValue(random(result.getOtherItemMaxValue(), null).toString());
+                        BillMsg billMsg = getOtherTransfusionMsg(result);
+                        maxResult.setExpectedOutput(billMsg.getMsg());
+                        retList.add(maxResult);
+                    }
+                } else {
+                    result.setOtherItemInputValue(random(result.getOtherItemMinValue(), result.getOtherItemMaxValue()).toString());
+                    BillMsg billMsg = getOtherTransfusionMsg(result);
+                    result.setExpectedOutput(billMsg.getMsg());
+                    retList.add(result);
+                }
+            } else {
+                BillMsg billMsg = getOtherTransfusionMsg(result);
+                result.setExpectedOutput(billMsg.getMsg());
+                retList.add(result);
+            }
+        }
+        return retList;
+    }
+
     /**
      * 模拟提示信息
      *
@@ -1532,7 +1801,7 @@ public class RuleConvertFacade {
     }
 
     /**
-     * 模拟提示信息-其他化验
+     * 模拟提示信息-其他值-化验
      *
      * @param result
      * @return
@@ -1557,6 +1826,46 @@ public class RuleConvertFacade {
         return billMsg;
     }
 
+    /**
+     * 模拟提示信息-其他值-输血
+     *
+     * @param result
+     * @return
+     */
+    public BillMsg getOtherTransfusionMsg(ResultOtherTransfusion result) {
+        BillMsg billMsg = new BillMsg();
+        if (result.getConflictItemType().equals(GraphLabelEnum.YiBaoDiseaseName.getName())) {
+            String content = "诊断" + result.getConflictItemHisName() + ",";
+            content += result.getOtherItemHisName();
+            if (StringUtil.isNotBlank(result.getOtherItemHisDetailName())
+                    && !result.getOtherItemHisDetailName().equals(result.getOtherItemHisName())) {
+                content += result.getOtherItemHisDetailName();
+            }
+            if (StringUtil.isNotBlank(result.getOtherItemInputValue())) {
+                content += trimZero(result.getOtherItemInputValue());
+            }
+            billMsg = MsgUtil.getCommonOtherTipTransfusionMsg(content, result.getTransfusionType());
+        } else if (result.getConflictItemType().equals(GraphLabelEnum.YiBaoOperationName.getName())) {
+            String content = "";
+            content += result.getOtherItemHisName();
+            if (StringUtil.isNotBlank(result.getOtherItemHisDetailName())
+                    && !result.getOtherItemHisDetailName().equals(result.getOtherItemHisName())) {
+                content += result.getOtherItemHisDetailName();
+            }
+            if (StringUtil.isNotBlank(result.getOtherItemInputValue())) {
+                content += trimZero(result.getOtherItemInputValue());
+            }
+            if (StringUtil.isNotBlank(content)) {
+                content += ",";
+            }
+            content += "已开" + result.getConflictItemHisName();
+
+            billMsg = MsgUtil.getCommonOtherTipTransfusionMsg(content, result.getTransfusionType());
+        }
+
+        return billMsg;
+    }
+
     /**
      * 生成随机数
      *

+ 217 - 1
cdssman-service/src/main/java/com/diagbot/facade/RuleTestFacade.java

@@ -16,6 +16,8 @@ import com.diagbot.entity.ResultHighriskDrug;
 import com.diagbot.entity.ResultHighriskOperation;
 import com.diagbot.entity.ResultInfo;
 import com.diagbot.entity.ResultOtherLis;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.entity.ResultOtherTransfusion;
 import com.diagbot.entity.TransfusionConfig;
 import com.diagbot.entity.node.BillItem;
 import com.diagbot.entity.node.LisCritical;
@@ -45,6 +47,8 @@ import com.diagbot.service.ResultHighriskDrugService;
 import com.diagbot.service.ResultHighriskOperationService;
 import com.diagbot.service.ResultInfoService;
 import com.diagbot.service.ResultOtherLisService;
+import com.diagbot.service.ResultOtherPacsService;
+import com.diagbot.service.ResultOtherTransfusionService;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.FastJsonUtils;
@@ -96,6 +100,12 @@ public class RuleTestFacade {
     @Autowired
     @Qualifier("resultOtherLisServiceImpl")
     private ResultOtherLisService resultOtherLisService;
+    @Autowired
+    @Qualifier("resultOtherPacsServiceImpl")
+    private ResultOtherPacsService resultOtherPacsService;
+    @Autowired
+    @Qualifier("resultOtherTransfusionServiceImpl")
+    private ResultOtherTransfusionService resultOtherTransfusionService;
 
 
     @Autowired
@@ -298,7 +308,12 @@ public class RuleTestFacade {
     public Boolean otherPacsRuleTest(OtherRuleVO otherRuleVO) {
         Long hospitalId = otherRuleVO.getHospitalId();
         List<PacsRemind> items = pacsRemindRepository.findByStatus(1);
-
+        //生成测试规则
+        List<ResultOtherPacs> resultList = ruleConvertFacade.otherRuleConvert_pacs(items, hospitalId);
+        //远程调用推理
+        List<ResultOtherPacs> saveList = callOther_pacs(resultList, hospitalId);
+        //保存测试结果
+        saveResultOther_pacs(saveList, otherRuleVO);
         return true;
     }
 
@@ -311,6 +326,12 @@ public class RuleTestFacade {
     public Boolean otherTransfusionRuleTest(OtherRuleVO otherRuleVO) {
         Long hospitalId = otherRuleVO.getHospitalId();
         List<TransfusionSuggest> items = transfusionSuggestRepository.findByStatus(1);
+        //生成测试规则
+        List<ResultOtherTransfusion> resultList = ruleConvertFacade.otherRuleConvert_transfusion(items, hospitalId);
+        //远程调用推理
+        List<ResultOtherTransfusion> saveList = callOther_transfusion(resultList, hospitalId);
+        //保存测试结果
+        saveResultOther_transfusion(saveList, otherRuleVO);
         return true;
     }
 
@@ -656,6 +677,114 @@ public class RuleTestFacade {
         return retList;
     }
 
+    /**
+     * 其他值提醒(辅检)远程调用接口
+     *
+     * @param list
+     * @param hospitalId
+     * @return
+     */
+    public List<ResultOtherPacs> callOther_pacs(List<ResultOtherPacs> list, Long hospitalId) {
+        List<ResultOtherPacs> retList = Lists.newLinkedList();
+        if (ListUtil.isEmpty(list)) {
+            return retList;
+        }
+        for (ResultOtherPacs result : list) {
+            if (result.getSuccess() != null
+                    && result.getSuccess().equals(0)) {
+                retList.add(result);
+                continue;
+            }
+            IndicationPushVO indicationPushVO = searchDataFacade.createOther_pacs(result);
+            indicationPushVO.setHospitalId(hospitalId);
+
+            result.setInputParams(FastJsonUtils.getBeanToJson(indicationPushVO));
+
+            RespDTO<IndicationDTO> respDTO = cdssCoreClient.indication(indicationPushVO);
+            if (RespDTOUtil.respIsOK(respDTO)) {
+                IndicationDTO data = respDTO.data;
+                List<BillMsg> billMsgList = data.getOtherList();
+                if (ListUtil.isEmpty(billMsgList)) {
+                    result.setSuccess(0);
+                    result.setMessage("其他值未提醒");
+                    retList.add(result);
+                } else {
+                    for (BillMsg billMsg : billMsgList) {
+                        ResultOtherPacs saveResult = new ResultOtherPacs();
+                        BeanUtil.copyProperties(result, saveResult);
+                        saveResult.setOutput(billMsg.getMsg());
+                        if (saveResult.getOutput().equals(saveResult.getExpectedOutput())) {
+                            saveResult.setSuccess(1);
+                        } else {
+                            saveResult.setSuccess(0);
+                            saveResult.setMessage("提示内容与预期不符");
+                        }
+                        retList.add(saveResult);
+                    }
+                }
+            } else {
+                result.setSuccess(0);
+                result.setMessage("远程调用推理接口失败");
+                retList.add(result);
+            }
+        }
+        return retList;
+    }
+
+    /**
+     * 其他值提醒(输血)远程调用接口
+     *
+     * @param list
+     * @param hospitalId
+     * @return
+     */
+    public List<ResultOtherTransfusion> callOther_transfusion(List<ResultOtherTransfusion> list, Long hospitalId) {
+        List<ResultOtherTransfusion> retList = Lists.newLinkedList();
+        if (ListUtil.isEmpty(list)) {
+            return retList;
+        }
+        for (ResultOtherTransfusion result : list) {
+            if (result.getSuccess() != null
+                    && result.getSuccess().equals(0)) {
+                retList.add(result);
+                continue;
+            }
+            IndicationPushVO indicationPushVO = searchDataFacade.createOther_transfusion(result);
+            indicationPushVO.setHospitalId(hospitalId);
+
+            result.setInputParams(FastJsonUtils.getBeanToJson(indicationPushVO));
+
+            RespDTO<IndicationDTO> respDTO = cdssCoreClient.indication(indicationPushVO);
+            if (RespDTOUtil.respIsOK(respDTO)) {
+                IndicationDTO data = respDTO.data;
+                List<BillMsg> billMsgList = data.getOtherList();
+                if (ListUtil.isEmpty(billMsgList)) {
+                    result.setSuccess(0);
+                    result.setMessage("其他值未提醒");
+                    retList.add(result);
+                } else {
+                    for (BillMsg billMsg : billMsgList) {
+                        ResultOtherTransfusion saveResult = new ResultOtherTransfusion();
+                        BeanUtil.copyProperties(result, saveResult);
+                        saveResult.setOutput(billMsg.getMsg());
+                        if (saveResult.getOutput().equals(saveResult.getExpectedOutput())) {
+                            saveResult.setSuccess(1);
+                        } else {
+                            saveResult.setSuccess(0);
+                            saveResult.setMessage("提示内容与预期不符");
+                        }
+                        retList.add(saveResult);
+                    }
+                }
+            } else {
+                result.setSuccess(0);
+                result.setMessage("远程调用推理接口失败");
+                retList.add(result);
+            }
+        }
+        return retList;
+    }
+
     /**
      * 保存开单合理性测试结果
      *
@@ -872,4 +1001,91 @@ public class RuleTestFacade {
         resultOtherLisService.saveOrUpdateBatch(list);
         return true;
     }
+
+    /**
+     * 保存其他值提醒(辅检)测试结果
+     *
+     * @param list
+     * @param otherRuleVO
+     * @return
+     */
+    public Boolean saveResultOther_pacs(List<ResultOtherPacs> list, OtherRuleVO otherRuleVO) {
+        Date now = new Date();
+        Integer totleNum = list.size();
+        Integer successNum = list.stream().filter(i -> i.getSuccess().equals(1)).collect(Collectors.toList()).size();
+        Integer failedNum = list.stream().filter(i -> i.getSuccess().equals(0)).collect(Collectors.toList()).size();
+        QueryWrapper<ResultInfo> resultInfoQueryWrapper = new QueryWrapper<>();
+        resultInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", otherRuleVO.getHospitalId())
+                .eq("case_id", otherRuleVO.getCaseId());
+        ResultInfo resultInfo = resultInfoService.getOne(resultInfoQueryWrapper, false);
+        if (resultInfo == null) {
+            resultInfo = new ResultInfo();
+            resultInfo.setHospitalId(otherRuleVO.getHospitalId());
+            resultInfo.setCaseId(otherRuleVO.getCaseId());
+            resultInfo.setGmtCreate(now);
+        }
+        resultInfo.setGmtModified(now);
+        resultInfo.setRuleNum(totleNum);
+        resultInfo.setRuleSuccessNum(successNum);
+        resultInfo.setRuleFailedNum(failedNum);
+        resultInfoService.saveOrUpdate(resultInfo);
+
+        QueryWrapper<ResultOtherPacs> resultOtherPacsQueryWrapper = new QueryWrapper<>();
+        resultOtherPacsQueryWrapper.eq("result_id", resultInfo.getId());
+        resultOtherPacsService.remove(resultOtherPacsQueryWrapper);
+
+        for (ResultOtherPacs result : list) {
+            result.setGmtCreate(now);
+            result.setGmtModified(now);
+            result.setResultId(resultInfo.getId());
+        }
+
+        resultOtherPacsService.saveOrUpdateBatch(list);
+        return true;
+    }
+
+
+    /**
+     * 保存其他值提醒(输血)测试结果
+     *
+     * @param list
+     * @param otherRuleVO
+     * @return
+     */
+    public Boolean saveResultOther_transfusion(List<ResultOtherTransfusion> list, OtherRuleVO otherRuleVO) {
+        Date now = new Date();
+        Integer totleNum = list.size();
+        Integer successNum = list.stream().filter(i -> i.getSuccess().equals(1)).collect(Collectors.toList()).size();
+        Integer failedNum = list.stream().filter(i -> i.getSuccess().equals(0)).collect(Collectors.toList()).size();
+        QueryWrapper<ResultInfo> resultInfoQueryWrapper = new QueryWrapper<>();
+        resultInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", otherRuleVO.getHospitalId())
+                .eq("case_id", otherRuleVO.getCaseId());
+        ResultInfo resultInfo = resultInfoService.getOne(resultInfoQueryWrapper, false);
+        if (resultInfo == null) {
+            resultInfo = new ResultInfo();
+            resultInfo.setHospitalId(otherRuleVO.getHospitalId());
+            resultInfo.setCaseId(otherRuleVO.getCaseId());
+            resultInfo.setGmtCreate(now);
+        }
+        resultInfo.setGmtModified(now);
+        resultInfo.setRuleNum(totleNum);
+        resultInfo.setRuleSuccessNum(successNum);
+        resultInfo.setRuleFailedNum(failedNum);
+        resultInfoService.saveOrUpdate(resultInfo);
+
+        QueryWrapper<ResultOtherTransfusion> resultOtherTransfusionQueryWrapper = new QueryWrapper<>();
+        resultOtherTransfusionQueryWrapper.eq("result_id", resultInfo.getId());
+        resultOtherTransfusionService.remove(resultOtherTransfusionQueryWrapper);
+
+        for (ResultOtherTransfusion result : list) {
+            result.setGmtCreate(now);
+            result.setGmtModified(now);
+            result.setResultId(resultInfo.getId());
+        }
+
+        resultOtherTransfusionService.saveOrUpdateBatch(list);
+        return true;
+    }
 }

+ 90 - 0
cdssman-service/src/main/java/com/diagbot/facade/SearchDataFacade.java

@@ -8,6 +8,8 @@ import com.diagbot.entity.ResultCritical;
 import com.diagbot.entity.ResultHighriskDrug;
 import com.diagbot.entity.ResultHighriskOperation;
 import com.diagbot.entity.ResultOtherLis;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.entity.ResultOtherTransfusion;
 import com.diagbot.enums.GraphLabelEnum;
 import com.diagbot.enums.TypeEnum;
 import com.diagbot.util.StringUtil;
@@ -360,4 +362,92 @@ public class SearchDataFacade {
         }
         return indicationPushVO;
     }
+
+    /**
+     * 生成其他值提醒(辅检)入参
+     *
+     * @param result
+     * @return
+     */
+    public IndicationPushVO createOther_pacs(ResultOtherPacs result) {
+        IndicationPushVO indicationPushVO = new IndicationPushVO();
+        indicationPushVO.setSex(3);
+        indicationPushVO.setRuleType("4");
+        indicationPushVO.setAge("20");
+
+        Pacs pacs = new Pacs();
+        pacs.setResult(result.getPacsResult());
+        if (StringUtil.isNotBlank(result.getPostoken())) {
+            pacs.setResult(pacs.getResult() + "," + result.getPostoken());
+        }
+        if (StringUtil.isNotBlank(result.getNegtoken())) {
+            pacs.setResult(pacs.getResult() + ",无" + result.getNegtoken());
+        }
+        indicationPushVO.getPacs().add(pacs);
+
+        if (StringUtil.isNotBlank(result.getGender())) {
+            if (result.getGender().equals("男")) {
+                indicationPushVO.setSex(1);
+            } else if (result.getGender().equals("女")) {
+                indicationPushVO.setSex(2);
+            }
+        }
+
+        if (StringUtil.isNotBlank(result.getInputAge())) {
+            indicationPushVO.setAge(result.getInputAge());
+        }
+
+        if (StringUtil.isNotBlank(result.getRemindItemType())
+                && result.getRemindItemType().equals(GraphLabelEnum.YiBaoDiseaseName.getName())) {
+            Item diag = new Item();
+            diag.setName(result.getRemindItemHisName());
+            diag.setUniqueName(result.getRemindItemName());
+            indicationPushVO.getDiag().add(diag);
+        }
+        return indicationPushVO;
+    }
+
+    /**
+     * 生成其他值提醒(输血)入参
+     *
+     * @param result
+     * @return
+     */
+    public IndicationPushVO createOther_transfusion(ResultOtherTransfusion result) {
+        IndicationPushVO indicationPushVO = new IndicationPushVO();
+        indicationPushVO.setSex(3);
+        indicationPushVO.setRuleType("4");
+        indicationPushVO.setAge("20");
+
+        Lis lis = new Lis();
+        lis.setName(result.getOtherItemHisName());
+        lis.setDetailName(result.getOtherItemHisDetailName());
+        lis.setUniqueName(result.getOtherItemName());
+        lis.setUnits(result.getOtherItemUnit());
+        if (result.getOtherItemMinValue() != null || result.getOtherItemMaxValue() != null) {
+            lis.setValue(Double.valueOf(result.getOtherItemInputValue()));
+        } else {
+            lis.setOtherValue(result.getOtherItemInputValue());
+        }
+        if (result.getOtherItemMaxValue() != null) {
+            lis.setMaxValue(result.getOtherItemMaxValue().doubleValue());
+        }
+        if (result.getOtherItemMinValue() != null) {
+            lis.setMinValue(result.getOtherItemMinValue().doubleValue());
+        }
+        indicationPushVO.getLis().add(lis);
+
+        if (result.getConflictItemType().equals(GraphLabelEnum.YiBaoOperationName.getName())) {
+            Item item = new Item();
+            item.setName(result.getConflictItemHisName());
+            item.setUniqueName(result.getConflictItemName());
+            indicationPushVO.getOperation().add(item);
+        } else if (result.getConflictItemType().equals(GraphLabelEnum.YiBaoDiseaseName.getName())) {
+            Item item = new Item();
+            item.setName(result.getConflictItemHisName());
+            item.setUniqueName(result.getConflictItemName());
+            indicationPushVO.getDiag().add(item);
+        }
+        return indicationPushVO;
+    }
 }

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/mapper/ResultOtherPacsMapper.java

@@ -0,0 +1,19 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+public interface ResultOtherPacsMapper extends BaseMapper<ResultOtherPacs> {
+    IPage<ResultOtherPacs> getPage(@Param("resultPageVO") ResultPageVO resultPageVO);
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/mapper/ResultOtherTransfusionMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.ResultOtherTransfusion;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+public interface ResultOtherTransfusionMapper extends BaseMapper<ResultOtherTransfusion> {
+
+    IPage<ResultOtherTransfusion> getPage(@Param("resultPageVO")ResultPageVO resultPageVO);
+}

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/service/ResultOtherPacsService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.ResultOtherPacs;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+public interface ResultOtherPacsService extends IService<ResultOtherPacs> {
+    IPage<ResultOtherPacs> getPage(@Param("resultPageVO") ResultPageVO resultPageVO);
+}

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/service/ResultOtherTransfusionService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.ResultOtherTransfusion;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+public interface ResultOtherTransfusionService extends IService<ResultOtherTransfusion> {
+    IPage<ResultOtherTransfusion> getPage(@Param("resultPageVO") ResultPageVO resultPageVO);
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/ResultOtherPacsServiceImpl.java

@@ -0,0 +1,26 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.mapper.ResultOtherPacsMapper;
+import com.diagbot.service.ResultOtherPacsService;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+@Service
+public class ResultOtherPacsServiceImpl extends ServiceImpl<ResultOtherPacsMapper, ResultOtherPacs> implements ResultOtherPacsService {
+
+    public IPage<ResultOtherPacs> getPage(@Param("resultPageVO") ResultPageVO resultPageVO) {
+        return baseMapper.getPage(resultPageVO);
+    }
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/ResultOtherTransfusionServiceImpl.java

@@ -0,0 +1,26 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.ResultOtherTransfusion;
+import com.diagbot.mapper.ResultOtherTransfusionMapper;
+import com.diagbot.service.ResultOtherTransfusionService;
+import com.diagbot.vo.ResultPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-01-19
+ */
+@Service
+public class ResultOtherTransfusionServiceImpl extends ServiceImpl<ResultOtherTransfusionMapper, ResultOtherTransfusion> implements ResultOtherTransfusionService {
+
+    public IPage<ResultOtherTransfusion> getPage(@Param("resultPageVO") ResultPageVO resultPageVO) {
+        return baseMapper.getPage(resultPageVO);
+    }
+}

+ 31 - 1
cdssman-service/src/main/java/com/diagbot/web/RuleTestController.java

@@ -9,12 +9,16 @@ import com.diagbot.entity.ResultCritical;
 import com.diagbot.entity.ResultHighriskDrug;
 import com.diagbot.entity.ResultHighriskOperation;
 import com.diagbot.entity.ResultOtherLis;
+import com.diagbot.entity.ResultOtherPacs;
+import com.diagbot.entity.ResultOtherTransfusion;
 import com.diagbot.facade.ResultBillFacade;
 import com.diagbot.facade.ResultCriticalFacade;
 import com.diagbot.facade.ResultHighriskDrugFacade;
 import com.diagbot.facade.ResultHighriskOperationFacade;
 import com.diagbot.facade.ResultInfoFacade;
 import com.diagbot.facade.ResultOtherLisFacade;
+import com.diagbot.facade.ResultOtherPacsFacade;
+import com.diagbot.facade.ResultOtherTransfusionFacade;
 import com.diagbot.facade.RuleTestFacade;
 import com.diagbot.vo.BillRuleVO;
 import com.diagbot.vo.CriticalRuleVO;
@@ -61,6 +65,10 @@ public class RuleTestController {
     private ResultHighriskOperationFacade resultHighriskOperationFacade;
     @Autowired
     private ResultOtherLisFacade resultOtherLisFacade;
+    @Autowired
+    private ResultOtherPacsFacade resultOtherPacsFacade;
+    @Autowired
+    private ResultOtherTransfusionFacade resultOtherTransfusionFacade;
 
     /**
      * 数据导出
@@ -195,6 +203,26 @@ public class RuleTestController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "其他值提醒(辅检)测试列表[zhaops]",
+            notes = "success: 成功标志(0:失败,1:成功) <br>" +
+                    "resultId: 结果id <br>")
+    @PostMapping("/getResultOtherPacsPage")
+    @SysLogger("getResultOtherPacsPage")
+    public RespDTO<IPage<ResultOtherPacs>> getResultOtherPacsPage(@Valid @RequestBody ResultPageVO resultPageVO) {
+        IPage<ResultOtherPacs> data = resultOtherPacsFacade.getPage(resultPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "其他值提醒(输血)测试列表[zhaops]",
+            notes = "success: 成功标志(0:失败,1:成功) <br>" +
+                    "resultId: 结果id <br>")
+    @PostMapping("/getResultOtherTransfusionPage")
+    @SysLogger("getResultOtherTransfusionPage")
+    public RespDTO<IPage<ResultOtherTransfusion>> getResultOtherTransfusionPage(@Valid @RequestBody ResultPageVO resultPageVO) {
+        IPage<ResultOtherTransfusion> data = resultOtherTransfusionFacade.getPage(resultPageVO);
+        return RespDTO.onSuc(data);
+    }
+
     @ApiOperation(value = "其他值提醒规则测试[zhaops]",
             notes = "hospitalId: 医院Id <br>" +
                     "caseId: 测试用例id<br>" +
@@ -206,7 +234,9 @@ public class RuleTestController {
         if (otherRuleVO.getOtherType().equals(1)) {
             data = ruleTestFacade.otherLisRuleTest(otherRuleVO);
         } else if (otherRuleVO.getOtherType().equals(2)) {
-
+            data = ruleTestFacade.otherPacsRuleTest(otherRuleVO);
+        } else if (otherRuleVO.getOtherType().equals(3)) {
+            data = ruleTestFacade.otherTransfusionRuleTest(otherRuleVO);
         }
         return RespDTO.onSuc(data);
     }

+ 48 - 0
cdssman-service/src/main/resources/mapper/ResultOtherPacsMapper.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.ResultOtherPacsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ResultOtherPacs">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="result_id" property="resultId" />
+        <result column="pacs_describe" property="pacsDescribe" />
+        <result column="pacs_result" property="pacsResult" />
+        <result column="remind_item_type" property="remindItemType" />
+        <result column="remind_item_name" property="remindItemName" />
+        <result column="remind_item_his_name" property="remindItemHisName" />
+        <result column="remind_item_his_detail_name" property="remindItemHisDetailName" />
+        <result column="reference_value" property="referenceValue" />
+        <result column="max_age" property="maxAge" />
+        <result column="min_age" property="minAge" />
+        <result column="age_range" property="ageRange" />
+        <result column="input_age" property="inputAge" />
+        <result column="gender" property="gender" />
+        <result column="postoken" property="postoken" />
+        <result column="negtoken" property="negtoken" />
+        <result column="output" property="output" />
+        <result column="expected_output" property="expectedOutput" />
+        <result column="success" property="success" />
+        <result column="message" property="message" />
+        <result column="input_params" property="inputParams" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.ResultOtherPacs">
+        select a.*
+        from test_result_other_pacs a
+        where a.is_deleted='N'
+        <if test="resultPageVO.success != null">
+            and a.success = #{resultPageVO.success}
+        </if>
+        <if test="resultPageVO.resultId != null">
+            and a.result_id = #{resultPageVO.resultId}
+        </if>
+    </select>
+
+</mapper>

+ 48 - 0
cdssman-service/src/main/resources/mapper/ResultOtherTransfusionMapper.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.ResultOtherTransfusionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ResultOtherTransfusion">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="result_id" property="resultId" />
+        <result column="other_item_name" property="otherItemName" />
+        <result column="other_item_his_name" property="otherItemHisName" />
+        <result column="other_item_his_detail_name" property="otherItemHisDetailName" />
+        <result column="other_item_range" property="otherItemRange" />
+        <result column="other_item_max_value" property="otherItemMaxValue" />
+        <result column="other_item_min_value" property="otherItemMinValue" />
+        <result column="other_item_unit" property="otherItemUnit" />
+        <result column="other_item_input_value" property="otherItemInputValue" />
+        <result column="transfusion_type" property="transfusionType" />
+        <result column="conflict_item_type" property="conflictItemType" />
+        <result column="conflict_item_name" property="conflictItemName" />
+        <result column="conflict_item_his_name" property="conflictItemHisName" />
+        <result column="conflict_item_his_detail_name" property="conflictItemHisDetailName" />
+        <result column="reference_value" property="referenceValue" />
+        <result column="output" property="output" />
+        <result column="expected_output" property="expectedOutput" />
+        <result column="success" property="success" />
+        <result column="message" property="message" />
+        <result column="input_params" property="inputParams" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.ResultOtherTransfusion">
+        select a.*
+        from test_result_other_transfusion a
+        where a.is_deleted='N'
+        <if test="resultPageVO.success != null">
+            and a.success = #{resultPageVO.success}
+        </if>
+        <if test="resultPageVO.resultId != null">
+            and a.result_id = #{resultPageVO.resultId}
+        </if>
+    </select>
+
+</mapper>