diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseaseAncillaryManageController.java b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseaseAncillaryManageController.java index 7886c7e7..5a9b65b7 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseaseAncillaryManageController.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseaseAncillaryManageController.java @@ -6,6 +6,7 @@ import com.supervision.vo.ask.AncillaryItemReqVo; import com.supervision.vo.ask.ConfigAncillaryItemResVO; import com.supervision.vo.manage.DiseaseAncillaryReqVo; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -20,7 +21,7 @@ import java.util.List; @RequiredArgsConstructor public class DiseaseAncillaryManageController { - private final DiseaseAncillaryManageService diseaseAncillaryManageService; + private final DiseaseAncillaryManageService diseaseAncillaryManageService; @Operation(summary = "新增辅助检查信息") @PostMapping("/save") @@ -53,9 +54,9 @@ public class DiseaseAncillaryManageController { @Operation(summary = "根据疾病id查询疾病辅助检查信息列表") @GetMapping("/queryListByDiseaseId") - public List<DiseaseAncillaryResVo> queryListByDiseaseId(@RequestParam("diseaseId") String diseaseId) { + public List<DiseaseAncillaryStrResVo> queryListByDiseaseId(@RequestParam("diseaseId") String diseaseId) { - return diseaseAncillaryManageService.queryListByDiseaseId(diseaseId); + return diseaseAncillaryManageService.queryListStrByDiseaseId(diseaseId); } diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseasePhysicalManageController.java b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseasePhysicalManageController.java index a0723a4d..67795648 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseasePhysicalManageController.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/diseasemanage/DiseasePhysicalManageController.java @@ -6,6 +6,7 @@ import com.supervision.model.DiseasePhysical; import com.supervision.vo.manage.DiseasePhysicalLocationNodeVo; import com.supervision.vo.manage.DiseasePhysicalReqVo; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -50,9 +51,10 @@ public class DiseasePhysicalManageController { @Operation(summary = "根据疾病id查询体格检查列表") @GetMapping("/queryListByDiseaseId") - public List<DiseasePhysicalResVo> queryListByDiseaseId(@RequestParam("diseaseId") String diseaseId) { + public List<DiseasePhysicalStrResVo> queryListByDiseaseId(@RequestParam("diseaseId") String diseaseId) { - return diseasePhysicalManageService.queryListByDiseaseId(diseaseId); +// return diseasePhysicalManageService.queryListByDiseaseId(diseaseId); + return diseasePhysicalManageService.queryListToStringByDiseaseId(diseaseId); } diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseaseAncillaryManageService.java b/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseaseAncillaryManageService.java index 861601c0..619ff224 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseaseAncillaryManageService.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseaseAncillaryManageService.java @@ -4,6 +4,7 @@ import com.supervision.model.DiseaseAncillary; import com.supervision.vo.ask.AncillaryItemReqVo; import com.supervision.vo.ask.ConfigAncillaryItemResVO; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import java.util.List; @@ -11,6 +12,8 @@ public interface DiseaseAncillaryManageService { List<DiseaseAncillaryResVo> queryListByDiseaseId(String diseaseId); + List<DiseaseAncillaryStrResVo> queryListStrByDiseaseId(String diseaseId); + DiseaseAncillary saveAncillary(DiseaseAncillary diseaseAncillary); boolean deleteDiseaseAncillary(String id); diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseasePhysicalManageService.java b/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseasePhysicalManageService.java index ac4b402e..6c12b40c 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseasePhysicalManageService.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/service/DiseasePhysicalManageService.java @@ -3,6 +3,7 @@ package com.supervision.manage.service; import com.supervision.model.DiseasePhysical; import com.supervision.vo.manage.DiseasePhysicalLocationNodeVo; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import com.supervision.vo.manage.PhysicalLocationNode; import java.util.List; @@ -11,6 +12,13 @@ public interface DiseasePhysicalManageService { List<DiseasePhysicalResVo> queryListByDiseaseId(String diseaseId); + /** + * 查询体格检查 + * @param diseaseId + * @return 诊断依据返回字符串 + */ + List<DiseasePhysicalStrResVo> queryListToStringByDiseaseId(String diseaseId); + DiseasePhysical savePhysical(DiseasePhysical diseasePhysical); boolean deletePhysical(String id); diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseAncillaryManageServiceImpl.java b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseAncillaryManageServiceImpl.java index d60e4318..e631b2a7 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseAncillaryManageServiceImpl.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseAncillaryManageServiceImpl.java @@ -12,6 +12,7 @@ import com.supervision.service.DiseaseAncillaryService; import com.supervision.vo.ask.AncillaryItemReqVo; import com.supervision.vo.ask.ConfigAncillaryItemResVO; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import com.supervision.vo.result.ConfigAncillaryItemVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -33,11 +34,18 @@ public class DiseaseAncillaryManageServiceImpl implements DiseaseAncillaryManage Assert.isTrue(StrUtil.isNotEmpty(diseaseId),"diseaseId不能为空"); List<DiseaseAncillaryResVo> diseaseAncillaryResVos = diseaseAncillaryService.queryListByDiseaseId(diseaseId); - diseaseAncillaryResVos.forEach(DiseaseAncillaryResVo::populateOther); return diseaseAncillaryResVos; } + @Override + public List<DiseaseAncillaryStrResVo> queryListStrByDiseaseId(String diseaseId) { + Assert.isTrue(StrUtil.isNotEmpty(diseaseId),"diseaseId不能为空"); + List<DiseaseAncillaryStrResVo> diseaseAncillaryResVos = diseaseAncillaryService.queryListStrByDiseaseId(diseaseId); + diseaseAncillaryResVos.forEach(DiseaseAncillaryStrResVo::populateOther); + return diseaseAncillaryResVos; + } + @Override public DiseaseAncillary saveAncillary(DiseaseAncillary diseaseAncillary) { diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseasePhysicalManageServiceImpl.java b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseasePhysicalManageServiceImpl.java index 14d0fe05..d18ee472 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseasePhysicalManageServiceImpl.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseasePhysicalManageServiceImpl.java @@ -14,6 +14,7 @@ import com.supervision.service.DefaultPhysicalIndicatorService; import com.supervision.service.DiseasePhysicalService; import com.supervision.vo.manage.DiseasePhysicalLocationNodeVo; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import com.supervision.vo.manage.PhysicalLocationNode; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -46,6 +47,16 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe return diseasePhysicalResVos; } + @Override + public List<DiseasePhysicalStrResVo> queryListToStringByDiseaseId(String diseaseId) { + + Assert.isTrue(StrUtil.isNotEmpty(diseaseId),"id不能为空"); + List<DiseasePhysicalStrResVo> diseasePhysicalResVos = diseasePhysicalService.queryListStrByDiseaseId(diseaseId); + + diseasePhysicalResVos.forEach(DiseasePhysicalStrResVo::populateOther); + return diseasePhysicalResVos; + } + @Override public DiseasePhysical savePhysical(DiseasePhysical diseasePhysical) { @@ -131,7 +142,7 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe // 2. 该身体部位(下级部位)配置了默认检查结果,结果为可用 physicalLocationNodeVo.setFlag( locationIds.contains(nodeId) || - !(indicatorMap.containsKey(nodeId) || childLocationIds.contains(nodeId))); + !(indicatorMap.containsKey(nodeId) || childLocationIds.contains(nodeId))); if (Objects.nonNull(indicatorMap.get(nodeId))) { physicalLocationNodeVo.setIndicatorValue(indicatorMap.get(nodeId).getIndicatorValue()); } diff --git a/virtual-patient-model/src/main/java/com/supervision/mapper/DiseaseAncillaryMapper.java b/virtual-patient-model/src/main/java/com/supervision/mapper/DiseaseAncillaryMapper.java index a3a3e9ed..64438f14 100644 --- a/virtual-patient-model/src/main/java/com/supervision/mapper/DiseaseAncillaryMapper.java +++ b/virtual-patient-model/src/main/java/com/supervision/mapper/DiseaseAncillaryMapper.java @@ -4,16 +4,17 @@ import com.supervision.dto.DiseaseAncillaryDto; import com.supervision.model.DiseaseAncillary; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import org.apache.ibatis.annotations.Param; import java.util.List; /** -* @author flevance -* @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Mapper -* @createDate 2023-10-20 17:19:21 -* @Entity com.supervision.model.DiseaseAncillary -*/ + * @author flevance + * @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Mapper + * @createDate 2023-10-20 17:19:21 + * @Entity com.supervision.model.DiseaseAncillary + */ public interface DiseaseAncillaryMapper extends BaseMapper<DiseaseAncillary> { List<DiseaseAncillaryDto> queryDiseaseAncillaryDtoList(@Param("diseaseAncillary")DiseaseAncillary diseaseAncillary); @@ -21,6 +22,8 @@ public interface DiseaseAncillaryMapper extends BaseMapper<DiseaseAncillary> { List<DiseaseAncillaryResVo> queryListByDiseaseId(@Param("diseaseId")String diseaseId); + List<DiseaseAncillaryStrResVo> queryListStrByDiseaseId(@Param("diseaseId")String diseaseId); + } diff --git a/virtual-patient-model/src/main/java/com/supervision/mapper/DiseasePhysicalMapper.java b/virtual-patient-model/src/main/java/com/supervision/mapper/DiseasePhysicalMapper.java index a8162b1f..51dfe262 100644 --- a/virtual-patient-model/src/main/java/com/supervision/mapper/DiseasePhysicalMapper.java +++ b/virtual-patient-model/src/main/java/com/supervision/mapper/DiseasePhysicalMapper.java @@ -3,19 +3,21 @@ package com.supervision.mapper; import com.supervision.model.DiseasePhysical; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import org.apache.ibatis.annotations.Param; import java.util.List; /** -* @author flevance -* @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Mapper -* @createDate 2023-10-20 17:19:21 -* @Entity com.supervision.model.DiseasePhysical -*/ + * @author flevance + * @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Mapper + * @createDate 2023-10-20 17:19:21 + * @Entity com.supervision.model.DiseasePhysical + */ public interface DiseasePhysicalMapper extends BaseMapper<DiseasePhysical> { List<DiseasePhysicalResVo> queryListByDiseaseId(@Param("diseaseId") String diseaseId); + List<DiseasePhysicalStrResVo> queryListStrByDiseaseId(@Param("diseaseId") String diseaseId); } diff --git a/virtual-patient-model/src/main/java/com/supervision/service/DiseaseAncillaryService.java b/virtual-patient-model/src/main/java/com/supervision/service/DiseaseAncillaryService.java index d3b114c5..5c7edc6a 100644 --- a/virtual-patient-model/src/main/java/com/supervision/service/DiseaseAncillaryService.java +++ b/virtual-patient-model/src/main/java/com/supervision/service/DiseaseAncillaryService.java @@ -4,15 +4,16 @@ import com.supervision.dto.DiseaseAncillaryDto; import com.supervision.model.DiseaseAncillary; import com.baomidou.mybatisplus.extension.service.IService; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import java.util.List; import java.util.function.Supplier; /** -* @author flevance -* @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Service -* @createDate 2023-10-20 17:19:21 -*/ + * @author flevance + * @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Service + * @createDate 2023-10-20 17:19:21 + */ public interface DiseaseAncillaryService extends IService<DiseaseAncillary> { List<DiseaseAncillaryDto> queryDiseaseAncillaryDtoList(DiseaseAncillary diseaseAncillary); @@ -21,6 +22,7 @@ public interface DiseaseAncillaryService extends IService<DiseaseAncillary> { DiseaseAncillaryDto queryDiseaseAncillaryDtoOne(DiseaseAncillary diseaseAncillary, Supplier<DiseaseAncillaryDto> other); List<DiseaseAncillaryResVo> queryListByDiseaseId(String diseaseId); + List<DiseaseAncillaryStrResVo> queryListStrByDiseaseId(String diseaseId); } diff --git a/virtual-patient-model/src/main/java/com/supervision/service/DiseasePhysicalService.java b/virtual-patient-model/src/main/java/com/supervision/service/DiseasePhysicalService.java index 9b180b22..2efdd69c 100644 --- a/virtual-patient-model/src/main/java/com/supervision/service/DiseasePhysicalService.java +++ b/virtual-patient-model/src/main/java/com/supervision/service/DiseasePhysicalService.java @@ -3,15 +3,23 @@ package com.supervision.service; import com.supervision.model.DiseasePhysical; import com.baomidou.mybatisplus.extension.service.IService; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import java.util.List; /** -* @author flevance -* @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Service -* @createDate 2023-10-20 17:19:21 -*/ + * @author flevance + * @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Service + * @createDate 2023-10-20 17:19:21 + */ public interface DiseasePhysicalService extends IService<DiseasePhysical> { List<DiseasePhysicalResVo> queryListByDiseaseId(String diseaseId); + + /** + * 诊断依据返回字符串 + * @param diseaseId + * @return + */ + List<DiseasePhysicalStrResVo> queryListStrByDiseaseId(String diseaseId); } diff --git a/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseaseAncillaryServiceImpl.java b/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseaseAncillaryServiceImpl.java index 27a0dcb5..a6d9e740 100644 --- a/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseaseAncillaryServiceImpl.java +++ b/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseaseAncillaryServiceImpl.java @@ -8,6 +8,7 @@ import com.supervision.mapper.DiseaseAncillaryMapper; import com.supervision.model.DiseaseAncillary; import com.supervision.service.DiseaseAncillaryService; import com.supervision.vo.manage.DiseaseAncillaryResVo; +import com.supervision.vo.manage.DiseaseAncillaryStrResVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -15,14 +16,14 @@ import java.util.List; import java.util.function.Supplier; /** -* @author flevance -* @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Service实现 -* @createDate 2023-10-20 17:19:21 -*/ + * @author flevance + * @description 针对表【vp_disease_ancillary(疾病辅助检查)】的数据库操作Service实现 + * @createDate 2023-10-20 17:19:21 + */ @Service @RequiredArgsConstructor public class DiseaseAncillaryServiceImpl extends ServiceImpl<DiseaseAncillaryMapper, DiseaseAncillary> - implements DiseaseAncillaryService{ + implements DiseaseAncillaryService{ @Override public List<DiseaseAncillaryDto> queryDiseaseAncillaryDtoList(DiseaseAncillary diseaseAncillary) { @@ -48,6 +49,11 @@ public class DiseaseAncillaryServiceImpl extends ServiceImpl<DiseaseAncillaryMap return super.getBaseMapper().queryListByDiseaseId(diseaseId); } + @Override + public List<DiseaseAncillaryStrResVo> queryListStrByDiseaseId(String diseaseId) { + return super.getBaseMapper().queryListStrByDiseaseId(diseaseId); + } + } diff --git a/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseasePhysicalServiceImpl.java b/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseasePhysicalServiceImpl.java index 2e34e979..d89cb503 100644 --- a/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseasePhysicalServiceImpl.java +++ b/virtual-patient-model/src/main/java/com/supervision/service/impl/DiseasePhysicalServiceImpl.java @@ -5,24 +5,30 @@ import com.supervision.model.DiseasePhysical; import com.supervision.service.DiseasePhysicalService; import com.supervision.mapper.DiseasePhysicalMapper; import com.supervision.vo.manage.DiseasePhysicalResVo; +import com.supervision.vo.manage.DiseasePhysicalStrResVo; import org.springframework.stereotype.Service; import java.util.List; /** -* @author flevance -* @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Service实现 -* @createDate 2023-10-20 17:19:21 -*/ + * @author flevance + * @description 针对表【vp_disease_physical(疾病体格检查)】的数据库操作Service实现 + * @createDate 2023-10-20 17:19:21 + */ @Service public class DiseasePhysicalServiceImpl extends ServiceImpl<DiseasePhysicalMapper, DiseasePhysical> - implements DiseasePhysicalService{ + implements DiseasePhysicalService{ @Override public List<DiseasePhysicalResVo> queryListByDiseaseId(String diseaseId) { - return super.getBaseMapper().queryListByDiseaseId(diseaseId); } + + + @Override + public List<DiseasePhysicalStrResVo> queryListStrByDiseaseId(String diseaseId) { + return super.getBaseMapper().queryListStrByDiseaseId(diseaseId); + } } diff --git a/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseaseAncillaryStrResVo.java b/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseaseAncillaryStrResVo.java new file mode 100644 index 00000000..41c4298e --- /dev/null +++ b/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseaseAncillaryStrResVo.java @@ -0,0 +1,133 @@ +package com.supervision.vo.manage; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.digest.MD5; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class DiseaseAncillaryStrResVo { + + /** + * 主键 + */ + @TableId + private String id; + + /** + * 病历ID + */ + @Schema(description = "疾病id") + private String diseaseId; + + /** + * 工具ID + */ + @Schema(description = "工具ID") + private String itemId; + + @Schema(description = "项目名称") + private String itemName; + + @Schema(description = "项目类型") + private String itemType; + + + @Schema(description = "初步诊断依据(0否1是)") + private String primarilyDiagnosisCriteriaFlag; + + @Schema(description = "是否是证实诊断依据(0否1是)") + private String basisConfirmFlag; + + @Schema(description = "是否是鉴别依据(0否1是)") + private String basisIdentificationFlag; + + @Schema(description = "全面检查 0否1是") + private String fullCheckFlag; + + @Schema(description = "是否诊断判读 0否1是") + private Integer diagnosisAssessmentFlag; + + @Schema(description = "预期诊断结果 0正常 1 不正常") + private Integer expectedDiagnosisResult; + + + @Schema(description = "是否必查(0否1是)") + private Integer requireCheckFlag; + + /** + * 结果 + * 当预期结果为正常:结果值为正常结果; + * 当预期结果为不正常:结果值为不正常结果; + */ + @Schema(description = "结果") + private String result; + + /** + * 正常结果: + * 只有当预期结果为异常时,才会有值 + */ + + @Schema(description = "正常结果") + private String normalResult; + + /** + * 说明 + */ + @Schema(description = "说明") + private String description; + + + @Schema(description = "项目id路径") + private List<String> itemIdPath; + + @Schema(description = "诊断依据 0:初步诊断依据 1:证实诊断依据 2:鉴别诊断依据 3:全面诊断依据") + private List<Integer> diagnosticCriteria; + + @Schema(description = "诊断依据") + private String diagnosticCriteriaName; + + + /** + * 聚合诊断依据 通过 primarilyDiagnosisCriteriaFlag basisConfirmFlag basisIdentificationFlag fullCheckFlag + * 属性值设置 诊断依据的值 + */ + public void aggregationDiagnosticCriteria() { + if (StrUtil.isBlank(this.primarilyDiagnosisCriteriaFlag) + && StrUtil.isBlank(this.basisConfirmFlag) + && StrUtil.isBlank(this.basisIdentificationFlag) + && StrUtil.isBlank(this.fullCheckFlag)) { + this.diagnosticCriteriaName = "——"; + } + if (this.primarilyDiagnosisCriteriaFlag != null) { + this.diagnosticCriteriaName = getPrimarilyDiagnosisCriteriaFlag(); + } + if (this.basisConfirmFlag != null) { + this.diagnosticCriteriaName = this.diagnosticCriteriaName + "-" + getBasisConfirmFlag(); + } + if (this.basisIdentificationFlag != null) { + this.diagnosticCriteriaName = this.diagnosticCriteriaName + "-" + getBasisIdentificationFlag(); + } + if (this.fullCheckFlag != null) { + this.diagnosticCriteriaName = this.diagnosticCriteriaName + "-" + getFullCheckFlag(); + } + } + + public void initItemIdPath() { + if (null == itemIdPath) { + itemIdPath = new ArrayList<>(); + } + itemIdPath.add(new MD5().digestHex16(itemType)); + itemIdPath.add(getItemId()); + } + + public void populateOther() { + aggregationDiagnosticCriteria(); + initItemIdPath(); + } + +} diff --git a/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseasePhysicalStrResVo.java b/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseasePhysicalStrResVo.java new file mode 100644 index 00000000..718a1014 --- /dev/null +++ b/virtual-patient-model/src/main/java/com/supervision/vo/manage/DiseasePhysicalStrResVo.java @@ -0,0 +1,155 @@ +package com.supervision.vo.manage; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.digest.MD5; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class DiseasePhysicalStrResVo { + + + /** + * 主键 + */ + @TableId + private String id; + + /** + * 病历ID + */ + @Schema(description = "疾病id") + private String diseaseId; + /** + * 工具ID + */ + @Schema(description = "工具ID") + private String toolId; + + @Schema(description = "工具父级id") + private String toolParentId; + + /** + * 检查部位ID + */ + @Schema(description = "检查部位ID") + private String locationId; + + @Schema(description = "身体部位名称") + private String locationName; + + @Schema(description = "工具名称") + private String toolName; + + @Schema(description = "工具类型") + private String toolType; + + @Schema(description = "初步诊断依据(0否1是)") + private String primarilyDiagnosisCriteriaFlag; + + @Schema(description = "是否是证实诊断依据(0否1是)") + private String basisConfirmFlag; + + @Schema(description = "是否是鉴别依据(0否1是)") + private String basisIdentificationFlag; + + @Schema(description = "全面检查 0正常 1 不正常") + private String fullCheckFlag; + + @Schema(description = "诊断依据") + private String diagnosticCriteria; + + @Schema(description = "是否诊断判读 0否1是") + private Integer diagnosisAssessmentFlag; + + @Schema(description = "部位诊断结果 0正常 1 不正常") + private Integer locationDiagnosisFlag; + + + /** + * "原本是为了标识诊断结果是否正常的", + * 现在有了result,normalResult就不用区分结果是否正确了 + */ + @Deprecated + @Schema(description = "是否预期诊断结果 0正常 1 不正常") + private Integer expectedDiagnosisResult; + + + @Schema(description = "是否必查 (0否1是)") + private Integer requireCheckFlag; + + /** + * 结果(异常结果) + */ + @Schema(description = "结果") + private String result; + + @Schema(description = "正常结果") + private String normalResult; + + /** + * 表征 + */ + @Schema(description = "表征 默认诊断结果") + private String trait; + + @Schema(description = "工具id路径") + private List<String> toolIdPath; + + @Schema(description = "身体部位id路径") + private List<String> locationIdPath; + + + public void aggregationDiagnosticCriteria() { + if (StrUtil.isBlank(this.primarilyDiagnosisCriteriaFlag) + && StrUtil.isBlank(this.basisConfirmFlag) + && StrUtil.isBlank(this.basisIdentificationFlag) + && StrUtil.isBlank(this.fullCheckFlag)) { + this.diagnosticCriteria = "——"; + } + if (this.primarilyDiagnosisCriteriaFlag != null) { + this.diagnosticCriteria = getPrimarilyDiagnosisCriteriaFlag(); + } + if (this.basisConfirmFlag != null) { + this.diagnosticCriteria = this.diagnosticCriteria + "-" + getBasisConfirmFlag(); + } + if (this.basisIdentificationFlag != null) { + this.diagnosticCriteria = this.diagnosticCriteria + "-" + getBasisIdentificationFlag(); + } + if (this.fullCheckFlag != null) { + this.diagnosticCriteria = this.diagnosticCriteria + "-" + getFullCheckFlag(); + } + } + + + public void initToolIdPath() { + if (null == toolIdPath) { + toolIdPath = new ArrayList<>(); + } + toolIdPath.add(new MD5().digestHex16(toolType)); + toolIdPath.add(getToolId()); + } + + public void initLocationIdPath() { + if (null == locationIdPath) { + locationIdPath = new ArrayList<>(); + } + if (StrUtil.isNotEmpty(getToolParentId())) { + locationIdPath.add(getToolParentId()); + } + if (StrUtil.isNotEmpty(getLocationId())) { + locationIdPath.add(getLocationId()); + } + } + + public void populateOther() { + this.aggregationDiagnosticCriteria(); + this.initToolIdPath(); + this.initLocationIdPath(); + } + +} diff --git a/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml index 138feab9..ff932875 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml @@ -83,4 +83,27 @@ order by da.create_time desc </select> + + <select id="queryListStrByDiseaseId" resultType="com.supervision.vo.manage.DiseaseAncillaryStrResVo"> + select da.id, + da.disease_id as diseaseId, + da.item_id as itemId, + cai.item_name as itemName, + cai.type as itemType, + case ifnull(da.primarily_diagnosis_criteria_flag,0) when 0 then null when 1 then '初步诊断依据' end as primarilyDiagnosisCriteriaFlag, + case ifnull(da.basis_confirm_flag,0) when 0 then null when 1 then '证实诊断依据' end as basisConfirmFlag, + case ifnull(da.basis_identification_flag,0) when 0 then null when 1 then '鉴别依据' end as basisIdentificationFlag, + case ifnull(da.full_check_flag,0) when 0 then null when 1 then '全面依据' end as fullCheckFlag, + da.diagnosis_assessment_flag as diagnosisAssessmentFlag, + da.expected_diagnosis_result as expectedDiagnosisResult, + da.require_check_flag as requireCheckFlag, + da.result as result, + da.normal_result as normalResult, + da.description as description + from vp_disease_ancillary da + left join vp_config_ancillary_item cai on da.item_id = cai.id + where da.disease_id = #{diseaseId} + order by da.create_time desc + </select> + </mapper> diff --git a/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml index e54125da..2fb763f5 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml @@ -5,25 +5,25 @@ <mapper namespace="com.supervision.mapper.DiseasePhysicalMapper"> <resultMap id="BaseResultMap" type="com.supervision.model.DiseasePhysical"> - <id property="id" column="id" jdbcType="VARCHAR"/> - <result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/> - <result property="toolId" column="tool_id" jdbcType="VARCHAR"/> - <result property="locationId" column="location_id" jdbcType="VARCHAR"/> - <result property="requireCheckFlag" column="require_check_flag" jdbcType="INTEGER"/> - <result property="primarilyDiagnosisCriteriaFlag" column="primarily_diagnosis_criteria_flag" jdbcType="INTEGER"/> - <result property="basisConfirmFlag" column="basis_confirm_flag" jdbcType="INTEGER"/> - <result property="basisIdentificationFlag" column="basis_identification_flag" jdbcType="INTEGER"/> - <result property="diagnosisAssessmentFlag" column="diagnosis_assessment_flag" jdbcType="INTEGER"/> - <result property="expectedDiagnosisResult" column="expected_diagnosis_result" jdbcType="VARCHAR"/> - <result property="fullCheckFlag" column="full_check_flag" jdbcType="INTEGER"/> - <result property="locationDiagnosisFlag" column="location_diagnosis_flag" jdbcType="INTEGER"/> - <result property="result" column="result" jdbcType="VARCHAR"/> - <result property="normalResult" column="normal_result" jdbcType="VARCHAR"/> - <result property="trait" column="trait" jdbcType="VARCHAR"/> - <result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/> - <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> - <result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/> - <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> + <id property="id" column="id" jdbcType="VARCHAR"/> + <result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/> + <result property="toolId" column="tool_id" jdbcType="VARCHAR"/> + <result property="locationId" column="location_id" jdbcType="VARCHAR"/> + <result property="requireCheckFlag" column="require_check_flag" jdbcType="INTEGER"/> + <result property="primarilyDiagnosisCriteriaFlag" column="primarily_diagnosis_criteria_flag" jdbcType="INTEGER"/> + <result property="basisConfirmFlag" column="basis_confirm_flag" jdbcType="INTEGER"/> + <result property="basisIdentificationFlag" column="basis_identification_flag" jdbcType="INTEGER"/> + <result property="diagnosisAssessmentFlag" column="diagnosis_assessment_flag" jdbcType="INTEGER"/> + <result property="expectedDiagnosisResult" column="expected_diagnosis_result" jdbcType="VARCHAR"/> + <result property="fullCheckFlag" column="full_check_flag" jdbcType="INTEGER"/> + <result property="locationDiagnosisFlag" column="location_diagnosis_flag" jdbcType="INTEGER"/> + <result property="result" column="result" jdbcType="VARCHAR"/> + <result property="normalResult" column="normal_result" jdbcType="VARCHAR"/> + <result property="trait" column="trait" jdbcType="VARCHAR"/> + <result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/> + <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> + <result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/> + <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> </resultMap> <sql id="Base_Column_List"> @@ -60,4 +60,33 @@ left join vp_config_physical_location cpl on dp.location_id = cpl.id where dp.disease_id = #{diseaseId} order by dp.create_time desc </select> + + <select id="queryListStrByDiseaseId" resultType="com.supervision.vo.manage.DiseasePhysicalStrResVo"> + select dp.id, + dp.disease_id as diseaseId, + dp.tool_id as toolId, + cpl.parent_id as toolParentId, + dp.location_id as locationId, + cpl.location_name as locationName, + cpt.tool_name as toolName, + cpt.type as toolType, + case ifnull(dp.primarily_diagnosis_criteria_flag,0) when 0 then null when 1 then '初步诊断依据' end as primarilyDiagnosisCriteriaFlag, + case ifnull(dp.basis_confirm_flag,0) when 0 then null when 1 then '证实诊断依据' end as basisConfirmFlag, + case ifnull(dp.basis_identification_flag,0) when 0 then null when 1 then '鉴别依据' end as basisIdentificationFlag, + case ifnull(dp.full_check_flag,0) when 0 then null when 1 then '全面依据' end as fullCheckFlag, + dp.diagnosis_assessment_flag as diagnosisAssessmentFlag, + dp.location_diagnosis_flag as locationDiagnosisFlag, + dp.expected_diagnosis_result as expectedDiagnosisResult, + dp.require_check_flag as requireCheckFlag, + dp.result as result, + dp.normal_result as normalResult, + dp.trait as trait + from vp_disease_physical dp + left join vp_config_physical_tool cpt on dp.tool_id = cpt.id + left join vp_config_physical_location cpl on dp.location_id = cpl.id + where dp.disease_id = #{diseaseId} order by dp.create_time desc + </select> + + + </mapper>