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

dev_2.0.0
xueqingkun
parent b638a661ef
commit c89bf42035

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

@ -59,9 +59,10 @@ public class DiseasePhysicalManageController {
@ApiOperation("查询疾病身体部位树") @ApiOperation("查询疾病身体部位树")
@GetMapping("/queryTree") @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查询问题库信息列表") @ApiOperation("根据疾病id查询问题库信息列表")
@GetMapping("/queryListByDiseaseId") @GetMapping("/queryListByDiseaseId")
public List<DiseaseQuestionResVo> queryPageByDiseaseId(String diseaseId) { public List<DiseaseQuestionResVo> queryPageByDiseaseId(@RequestParam("diseaseId") String diseaseId) {
return diseaseQuestionManageService.queryPageByDiseaseId(diseaseId); return diseaseQuestionManageService.queryPageByDiseaseId(diseaseId);

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

@ -19,5 +19,5 @@ public interface DiseasePhysicalManageService {
boolean deleteByDiseaseId(String diseaseId); 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 @Override
public List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId) { public List<DiseasePhysicalLocationNodeVo> queryTree(String diseaseId, String toolId) {
// 1. 查询体格检查工具 // 1. 查询体格检查位置
List<PhysicalLocationNode> physicalLocationNodes = physicalToolManageService.queryTree(); List<PhysicalLocationNode> physicalLocationNodes = physicalToolManageService.queryTree();
if (CollectionUtil.isEmpty(physicalLocationNodes)){ if (CollectionUtil.isEmpty(physicalLocationNodes)){
return CollectionUtil.newArrayList(); return CollectionUtil.newArrayList();
@ -84,6 +84,9 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe
physicalLocationNode.setChild(physicalLocationNodes); physicalLocationNode.setChild(physicalLocationNodes);
DiseasePhysicalLocationNodeVo bean = BeanUtil.toBean(physicalLocationNode, DiseasePhysicalLocationNodeVo.class); DiseasePhysicalLocationNodeVo bean = BeanUtil.toBean(physicalLocationNode, DiseasePhysicalLocationNodeVo.class);
if (StrUtil.isEmpty(toolId)){
return bean.getChild();
}
// 2. 根据疾病id查询疾病体格检查项 // 2. 根据疾病id查询疾病体格检查项
List<DiseasePhysicalResVo> diseasePhysicalResVos = diseasePhysicalService.queryListByDiseaseId(diseaseId); List<DiseasePhysicalResVo> diseasePhysicalResVos = diseasePhysicalService.queryListByDiseaseId(diseaseId);
if (CollectionUtil.isEmpty(diseasePhysicalResVos)){ if (CollectionUtil.isEmpty(diseasePhysicalResVos)){
@ -91,20 +94,21 @@ public class DiseasePhysicalManageServiceImpl implements DiseasePhysicalManageSe
} }
// 3. 填充疾病体格检查树中的flag属性 // 3. 填充疾病体格检查树中的flag属性
List<String> toolIds = diseasePhysicalResVos.stream().map(DiseasePhysical::getToolId).distinct().collect(Collectors.toList()); List<String> locationIds = diseasePhysicalResVos.stream().filter(vo->toolId.equals(vo.getToolId()))
populateDiseasePhysicalLocationNodeFlag(bean,toolIds); .map(DiseasePhysical::getLocationId).distinct().collect(Collectors.toList());
populateDiseasePhysicalLocationNodeFlag(bean,locationIds);
return bean.getChild(); return bean.getChild();
} }
private void populateDiseasePhysicalLocationNodeFlag(DiseasePhysicalLocationNodeVo node,List<String> toolIds) { private void populateDiseasePhysicalLocationNodeFlag(DiseasePhysicalLocationNodeVo node,List<String> locationIds) {
if (StrUtil.isNotEmpty(node.getId())){ 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())){ if (CollectionUtil.isNotEmpty(node.getChild())){
for (DiseasePhysicalLocationNodeVo childNode : 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); treatmentPlanTreeNode.setChild(treatmentPlanTreeNodes);
DiseaseTreatmentPlanTreeNode rootNode = new DiseaseTreatmentPlanTreeNode(treatmentPlanTreeNode); DiseaseTreatmentPlanTreeNode rootNode = new DiseaseTreatmentPlanTreeNode(treatmentPlanTreeNode);
// 2. // 2.根据疾病id查询疾病处置计划信息
List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = this.queryListByDiseaseId(diseaseId); List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = this.queryListByDiseaseId(diseaseId);
// 3. 初始化flag
if (CollUtil.isNotEmpty(diseaseTreatmentPlanResVos)){ if (CollUtil.isNotEmpty(diseaseTreatmentPlanResVos)){
rootNode.initFlag(diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getPlanId).collect(Collectors.toList())); rootNode.initFlag(diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getPlanId).collect(Collectors.toList()));
} }

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

Loading…
Cancel
Save