manage:添加体格检查、辅助检查 诊断依据视图字段

dev_2.0.0
xueqingkun 1 year ago
parent b638a661ef
commit c89bf42035

@ -33,7 +33,7 @@ public class DiseaseAncillaryManageController {
@ApiOperation("删除疾病辅助检查信息")
@DeleteMapping("/delete")
public boolean deleteDiseaseAncillary(String id) {
public boolean deleteDiseaseAncillary(@RequestParam("id") String id) {
return diseaseAncillaryManageService.deleteDiseaseAncillary(id);
@ -51,7 +51,7 @@ public class DiseaseAncillaryManageController {
@ApiOperation("根据疾病id查询疾病辅助检查信息列表")
@GetMapping("/queryListByDiseaseId")
public List<DiseaseAncillaryResVo> queryListByDiseaseId(String diseaseId) {
public List<DiseaseAncillaryResVo> queryListByDiseaseId(@RequestParam("diseaseId") String diseaseId) {
return diseaseAncillaryManageService.queryListByDiseaseId(diseaseId);

@ -59,9 +59,10 @@ public class DiseasePhysicalManageController {
@ApiOperation("查询疾病身体部位树")
@GetMapping("/queryTree")
public List<DiseasePhysicalLocationNodeVo> queryTree(@RequestParam String diseaseId) {
public List<DiseasePhysicalLocationNodeVo> queryTree(@RequestParam("diseaseId") String diseaseId,
@RequestParam(value = "toolId",required = false) String toolId) {
return diseasePhysicalManageService.queryTree(diseaseId);
return diseasePhysicalManageService.queryTree(diseaseId, toolId);
}

@ -40,7 +40,7 @@ public class DiseaseQuestionManageController {
@ApiOperation("根据疾病id查询问题库信息列表")
@GetMapping("/queryListByDiseaseId")
public List<DiseaseQuestionResVo> queryPageByDiseaseId(String diseaseId) {
public List<DiseaseQuestionResVo> queryPageByDiseaseId(@RequestParam("diseaseId") String diseaseId) {
return diseaseQuestionManageService.queryPageByDiseaseId(diseaseId);

@ -52,7 +52,7 @@ public class DiseaseTreatmentPlanManageController {
@ApiOperation("删除疾病处置计划")
@DeleteMapping("/delete")
public boolean deleteDiseaseTreatmentPlan(@RequestParam String id) {
public boolean deleteDiseaseTreatmentPlan(@RequestParam("id") String id) {
return diseaseTreatmentPlanManageService.deleteDiseaseTreatmentPlan(id);

@ -19,5 +19,5 @@ public interface DiseasePhysicalManageService {
boolean deleteByDiseaseId(String diseaseId);
List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId);
List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId, String toolId);
}

@ -72,9 +72,9 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe
}
@Override
public List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId) {
public List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId, String toolId) {
// 1. 查询体格检查工具
// 1. 查询体格检查位置
List<PhysicalLocationNode> physicalLocationNodes = physicalToolManageService.queryTree();
if (CollectionUtil.isEmpty(physicalLocationNodes)){
return CollectionUtil.newArrayList();
@ -84,6 +84,9 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe
physicalLocationNode.setChild(physicalLocationNodes);
DiseasePhysicalLocationNodeVo bean = BeanUtil.toBean(physicalLocationNode, DiseasePhysicalLocationNodeVo.class);
if (StrUtil.isEmpty(toolId)){
return bean.getChild();
}
// 2. 根据疾病id查询疾病体格检查项
List<DiseasePhysicalResVo> diseasePhysicalResVos = diseasePhysicalService.queryListByDiseaseId(diseaseId);
if (CollectionUtil.isEmpty(diseasePhysicalResVos)){
@ -91,20 +94,21 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe
}
// 3. 填充疾病体格检查树中的flag属性
List<String> toolIds = diseasePhysicalResVos.stream().map(DiseasePhysical::getToolId).distinct().collect(Collectors.toList());
populateDiseasePhysicalLocationNodeFlag(bean,toolIds);
List<String> locationIds = diseasePhysicalResVos.stream().filter(vo->toolId.equals(vo.getToolId()))
.map(DiseasePhysical::getLocationId).distinct().collect(Collectors.toList());
populateDiseasePhysicalLocationNodeFlag(bean,locationIds);
return bean.getChild();
}
private void populateDiseasePhysicalLocationNodeFlag(DiseasePhysicalLocationNodeVo node,List<String> toolIds) {
private void populateDiseasePhysicalLocationNodeFlag(DiseasePhysicalLocationNodeVo node,List<String> locationIds) {
if (StrUtil.isNotEmpty(node.getId())){
node.setFlag(toolIds.stream().anyMatch(id->node.getId().equals(id)));
node.setFlag(locationIds.stream().anyMatch(locationId->node.getId().equals(locationId)));
}
if (CollectionUtil.isNotEmpty(node.getChild())){
for (DiseasePhysicalLocationNodeVo childNode : node.getChild()) {
populateDiseasePhysicalLocationNodeFlag(childNode,toolIds);
populateDiseasePhysicalLocationNodeFlag(childNode,locationIds);
}
}
}

@ -78,8 +78,10 @@ public class DiseaseTreatmentPlanManageServiceImpl implements DiseaseTreatmentPl
treatmentPlanTreeNode.setChild(treatmentPlanTreeNodes);
DiseaseTreatmentPlanTreeNode rootNode = new DiseaseTreatmentPlanTreeNode(treatmentPlanTreeNode);
// 2.
// 2.根据疾病id查询疾病处置计划信息
List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = this.queryListByDiseaseId(diseaseId);
// 3. 初始化flag
if (CollUtil.isNotEmpty(diseaseTreatmentPlanResVos)){
rootNode.initFlag(diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getPlanId).collect(Collectors.toList()));
}

@ -9,7 +9,9 @@ import java.util.List;
@Data
public class DiseasePhysicalLocationNodeVo {
@TableId
/**
* id
*/
private String id;
/**

Loading…
Cancel
Save