画像审核。
This commit is contained in:
parent
3737124901
commit
d7c83e87b2
@ -3,6 +3,7 @@ package com.xinelu.manage.controller.labelfieldcontent;
|
|||||||
import com.xinelu.common.annotation.Log;
|
import com.xinelu.common.annotation.Log;
|
||||||
import com.xinelu.common.core.controller.BaseController;
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.core.domain.R;
|
||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.enums.BusinessType;
|
import com.xinelu.common.enums.BusinessType;
|
||||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
@ -11,12 +12,19 @@ import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
|||||||
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import java.util.List;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签字段内容信息Controller
|
* 标签字段内容信息Controller
|
||||||
@ -115,4 +123,12 @@ public class LabelFieldContentController extends BaseController {
|
|||||||
public AjaxResult insertLabelField(@RequestBody LabelField labelField) {
|
public AjaxResult insertLabelField(@RequestBody LabelField labelField) {
|
||||||
return labelFieldContentService.insertLabelField(labelField);
|
return labelFieldContentService.insertLabelField(labelField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/getPortaitByPatient")
|
||||||
|
public R<List<Map<String, List<List<GroupingValue>>>>> getPortaitByPatient(Long patientId) {
|
||||||
|
return R.ok(labelFieldContentService.getPortaitByPatient(patientId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,11 +4,13 @@ import com.xinelu.common.core.controller.BaseController;
|
|||||||
import com.xinelu.common.core.domain.R;
|
import com.xinelu.common.core.domain.R;
|
||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
||||||
|
import com.xinelu.manage.dto.signpatientrecord.PortaitCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
||||||
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
||||||
|
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||||
@ -110,9 +112,8 @@ public class SignPatientRecordController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("路径审核->左侧画像信息列表")
|
@ApiOperation("路径审核->左侧画像信息列表")
|
||||||
@GetMapping("/getPortaitInfo/{patientId}")
|
@GetMapping("/getPortaitInfo/{patientId}")
|
||||||
public R<SignPatientInfoVo> getPortaitInfo(@PathVariable("patientId") Long patientId) {
|
public R<PatientPortaitVo> getPortaitInfo(@PathVariable("patientId") Long patientId) {
|
||||||
signPatientRecordService.getPortaitInfo(patientId);
|
return R.ok(signPatientRecordService.getPortaitInfo(patientId));
|
||||||
return R.ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -120,8 +121,8 @@ public class SignPatientRecordController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("画像审核")
|
@ApiOperation("画像审核")
|
||||||
@PostMapping("/updatePortaitCheckStatus")
|
@PostMapping("/updatePortaitCheckStatus")
|
||||||
public R<String> updatePortaitCheckStatus(@RequestBody RouteCheckDto checkDto) {
|
public R<String> updatePortaitCheckStatus(@RequestBody PortaitCheckDto portaitCheckDto) {
|
||||||
int flag = signPatientRecordService.updatePortaitCheckStatus(checkDto);
|
int flag = signPatientRecordService.updatePortaitCheckStatus(portaitCheckDto);
|
||||||
return flag < 0 ? R.fail() : R.ok();
|
return flag < 0 ? R.fail() : R.ok();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -245,6 +245,12 @@ public class SignPatientRecord extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "画像审核时间")
|
@ApiModelProperty(value = "画像审核时间")
|
||||||
private LocalDateTime portaitCheckDate;
|
private LocalDateTime portaitCheckDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像审核备注信息,存储审核备注信息以及审核不通过原因等信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像审核备注信息,存储审核备注信息以及审核不通过原因等信息")
|
||||||
|
private String portaitCheckRemark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专病路径审核状态,同意:AGREE,不同意:DISAGREE
|
* 专病路径审核状态,同意:AGREE,不同意:DISAGREE
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.xinelu.manage.dto.signpatientrecord;
|
||||||
|
|
||||||
|
import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 画像审核传输对象
|
||||||
|
* @author: haown
|
||||||
|
* @create: 2024-06-27 11:31
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class PortaitCheckDto {
|
||||||
|
|
||||||
|
@ApiModelProperty("画像信息")
|
||||||
|
List<List<GroupingValue>> labelFieldContentList;
|
||||||
|
|
||||||
|
@ApiModelProperty("患者主键")
|
||||||
|
private Long patientId;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约记录主键")
|
||||||
|
private Long signPatientRecordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像审核状态,同意:AGREE,不同意:DISAGREE
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像审核状态,同意:AGREE,不同意:DISAGREE")
|
||||||
|
private String portaitCheckStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像审核备注信息,存储审核备注信息以及审核不通过原因等信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像审核备注信息,存储审核备注信息以及审核不通过原因等信息")
|
||||||
|
private String portaitCheckRemark;
|
||||||
|
}
|
||||||
@ -7,6 +7,7 @@ import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
|||||||
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签字段内容信息Service接口
|
* 标签字段内容信息Service接口
|
||||||
@ -91,4 +92,9 @@ public interface ILabelFieldContentService {
|
|||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
AjaxResult insertLabelField(LabelField labelField);
|
AjaxResult insertLabelField(LabelField labelField);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像审核->查询患者画像信息
|
||||||
|
*/
|
||||||
|
List<Map<String, List<List<GroupingValue>>>> getPortaitByPatient(Long patientId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,20 +20,24 @@ import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
|||||||
import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
import com.xinelu.manage.vo.labelfieldcontent.GroupingValue;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO;
|
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签字段内容信息Service业务层处理
|
* 标签字段内容信息Service业务层处理
|
||||||
*
|
*
|
||||||
@ -281,7 +285,31 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override public List<Map<String, List<List<GroupingValue>>>> getPortaitByPatient(Long patientId) {
|
||||||
|
List<Map<String, List<List<GroupingValue>>>> retMap = new ArrayList<>();
|
||||||
|
List<GroupingValue> labelFieldContents = labelFieldContentMapper.groupingValue(null, patientId, null);
|
||||||
|
if (CollectionUtils.isEmpty(labelFieldContents)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 按照任务细分分组
|
||||||
|
Map<Long, List<GroupingValue>> groupByPartition = labelFieldContents.stream().collect(Collectors.groupingBy(GroupingValue::getTaskPartitionDictId));
|
||||||
|
|
||||||
|
for (Long taskPartitionDictId : groupByPartition.keySet()) {
|
||||||
|
Map<String, List<List<GroupingValue>>> retObj = new HashMap<>();
|
||||||
|
List<List<GroupingValue>> lists = new ArrayList<>();
|
||||||
|
// 按照sn分组
|
||||||
|
List<GroupingValue> partitionList = groupByPartition.get(taskPartitionDictId);
|
||||||
|
Map<String, List<GroupingValue>> groupBySn = partitionList.stream().collect(Collectors.groupingBy(GroupingValue::getPortraitSn));
|
||||||
|
for (String sn : groupBySn.keySet()) {
|
||||||
|
lists.add(groupBySn.get(sn));
|
||||||
|
}
|
||||||
|
retObj.put(partitionList.get(0).getTaskPartitionDictName(), lists);
|
||||||
|
retMap.add(retObj);
|
||||||
|
}
|
||||||
|
return retMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* 根据任务细分类型获取患者的真实信息
|
* 根据任务细分类型获取患者的真实信息
|
||||||
*
|
*
|
||||||
* @param patientId 患者主键
|
* @param patientId 患者主键
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
package com.xinelu.manage.service.signpatientrecord;
|
package com.xinelu.manage.service.signpatientrecord;
|
||||||
|
|
||||||
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
||||||
|
import com.xinelu.manage.dto.signpatientrecord.PortaitCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
||||||
|
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||||
@ -48,13 +50,13 @@ public interface ISignPatientRecordService {
|
|||||||
*/
|
*/
|
||||||
int intentionalSign(IntentionalSignDto intentionalSignDto);
|
int intentionalSign(IntentionalSignDto intentionalSignDto);
|
||||||
|
|
||||||
void getPortaitInfo(Long patientId);
|
PatientPortaitVo getPortaitInfo(Long patientId);
|
||||||
/**
|
/**
|
||||||
* 画像审核
|
* 画像审核
|
||||||
* @param checkDto 画像审核传输对象
|
* @param portaitCheckDto 画像审核传输对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updatePortaitCheckStatus(RouteCheckDto checkDto);
|
int updatePortaitCheckStatus(PortaitCheckDto portaitCheckDto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路径审核
|
* 路径审核
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
|||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||||
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
|
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto;
|
||||||
|
import com.xinelu.manage.dto.signpatientrecord.PortaitCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
import com.xinelu.manage.dto.signpatientrecord.RouteCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||||
@ -39,8 +40,10 @@ import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerCondit
|
|||||||
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
|
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
|
||||||
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
||||||
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
|
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
|
||||||
|
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
||||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||||
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
||||||
|
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
||||||
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||||
@ -97,6 +100,8 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
|||||||
private ISignPatientManageRouteNodeService signPatientManageRouteNodeService;
|
private ISignPatientManageRouteNodeService signPatientManageRouteNodeService;
|
||||||
@Resource
|
@Resource
|
||||||
private LabelFieldContentMapper labelFieldContentMapper;
|
private LabelFieldContentMapper labelFieldContentMapper;
|
||||||
|
@Resource
|
||||||
|
private ILabelFieldContentService labelFieldContentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataScope(agencyAlias = "sign")
|
@DataScope(agencyAlias = "sign")
|
||||||
@ -319,7 +324,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
|||||||
* @param patientId 患者主键
|
* @param patientId 患者主键
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void getPortaitInfo(Long patientId) {
|
public PatientPortaitVo getPortaitInfo(Long patientId) {
|
||||||
// 查询患者诊断信息、手术信息
|
// 查询患者诊断信息、手术信息
|
||||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
||||||
if (ObjectUtils.isEmpty(patientInfo)) {
|
if (ObjectUtils.isEmpty(patientInfo)) {
|
||||||
@ -355,14 +360,15 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
|||||||
|
|
||||||
// 查询复诊日期
|
// 查询复诊日期
|
||||||
List<LabelFieldInfoContentVo> consultationList = labelFieldContentList.stream().filter(labelField->labelField.getFieldCode().equals("CONSULTATIONDATE")).collect(Collectors.toList());
|
List<LabelFieldInfoContentVo> consultationList = labelFieldContentList.stream().filter(labelField->labelField.getFieldCode().equals("CONSULTATIONDATE")).collect(Collectors.toList());
|
||||||
|
Map<Long, List<LabelFieldInfoContentVo>> groupByPartitionDictId = consultationList.stream().collect(Collectors.groupingBy(LabelFieldInfoContentVo::getTaskPartitionDictId));
|
||||||
// 包含复诊的标签列表
|
// 包含复诊的标签列表
|
||||||
List<LabelFieldInfoContentVo> consultationLabelList = new ArrayList<>();
|
List<LabelFieldInfoContentVo> consultationLabelList = new ArrayList<>();
|
||||||
for (LabelFieldInfoContentVo consultation : consultationList) {
|
for (Long taskPartitionDictId : groupByPartitionDictId.keySet()) {
|
||||||
consultationLabelList.addAll(groupByPartition.get(consultation.getTaskPartitionDictId()));
|
consultationLabelList.addAll(groupByPartition.get(taskPartitionDictId));
|
||||||
}
|
}
|
||||||
// 按照sn分组,每个分组是一个复诊
|
// 按照sn分组,每个分组是一个复诊
|
||||||
if (!CollectionUtils.isEmpty(consultationLabelList)) {
|
if (!CollectionUtils.isEmpty(consultationLabelList)) {
|
||||||
Map<String, List<LabelFieldInfoContentVo>> patientConsultationList = drugLabelList.stream().collect(Collectors.groupingBy(LabelFieldInfoContentVo::getPortraitSn));
|
Map<String, List<LabelFieldInfoContentVo>> patientConsultationList = consultationLabelList.stream().collect(Collectors.groupingBy(LabelFieldInfoContentVo::getPortraitSn));
|
||||||
for (String sn : patientConsultationList.keySet()) {
|
for (String sn : patientConsultationList.keySet()) {
|
||||||
List<LabelFieldInfoContentVo> propertyList = patientConsultationList.get(sn);
|
List<LabelFieldInfoContentVo> propertyList = patientConsultationList.get(sn);
|
||||||
JSONObject consultation = new JSONObject();
|
JSONObject consultation = new JSONObject();
|
||||||
@ -374,12 +380,48 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PatientPortaitVo.builder().mainDiagnosis(patientInfo.getMainDiagnosis())
|
return PatientPortaitVo.builder().patientName(patientInfo.getPatientName())
|
||||||
.surgicalName(patientInfo.getSurgicalName()).drugInfo(drugInfo).consultationInfo(consultationInfo).build();
|
.birthDate(patientInfo.getBirthDate())
|
||||||
|
.sex(patientInfo.getSex())
|
||||||
|
.visitMethod(patientInfo.getVisitMethod())
|
||||||
|
.patientSource(patientInfo.getPatientSource())
|
||||||
|
.mainDiagnosis(patientInfo.getMainDiagnosis())
|
||||||
|
.surgicalName(patientInfo.getSurgicalName())
|
||||||
|
.drugInfo(drugInfo)
|
||||||
|
.consultationInfo(consultationInfo).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public int updatePortaitCheckStatus(RouteCheckDto checkDto) {
|
@Override
|
||||||
return 0;
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int updatePortaitCheckStatus(PortaitCheckDto portaitCheckDto) {
|
||||||
|
// 画像信息保存
|
||||||
|
if (CollectionUtils.isEmpty(portaitCheckDto.getLabelFieldContentList())) {
|
||||||
|
throw new ServiceException("请输入画像信息");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(portaitCheckDto.getPortaitCheckStatus())) {
|
||||||
|
throw new ServiceException("请输入审核信息");
|
||||||
|
}
|
||||||
|
LabelField labelField = new LabelField();
|
||||||
|
labelField.setGroupingValues(portaitCheckDto.getLabelFieldContentList());
|
||||||
|
labelFieldContentService.insertLabelField(labelField);
|
||||||
|
|
||||||
|
// 修改签约记录
|
||||||
|
SignPatientRecord signPatientRecord = signPatientRecordMapper.selectByPrimaryKey(portaitCheckDto.getSignPatientRecordId());
|
||||||
|
if (ObjectUtils.isEmpty(signPatientRecord)) {
|
||||||
|
throw new ServiceException("未找到该签约记录");
|
||||||
|
}
|
||||||
|
signPatientRecord.setPortaitCheckStatus(portaitCheckDto.getPortaitCheckStatus());
|
||||||
|
signPatientRecord.setPortaitCheckRemark(portaitCheckDto.getPortaitCheckRemark());
|
||||||
|
signPatientRecord.setPortaitCheckDate(LocalDateTime.now());
|
||||||
|
signPatientRecord.setPortaitCheckPerson(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||||
|
int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signPatientRecord);
|
||||||
|
if (StringUtils.equals(RouteCheckStatusEnum.AGREE.getInfo(), signPatientRecord.getRouteCheckStatus()) && StringUtils.equals(RouteCheckStatusEnum.AGREE.getInfo(), signPatientRecord.getPortaitCheckStatus())) {
|
||||||
|
// 路径、画像都审核通过则生成主路径任务
|
||||||
|
signPatientManageRouteNodeService.generateMainRouteTask(portaitCheckDto.getSignPatientRecordId());
|
||||||
|
// 替换手动生成的任务中的标签
|
||||||
|
signPatientManageRouteNodeService.manualCreateTaskLabelReplace(portaitCheckDto.getSignPatientRecordId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.xinelu.manage.vo.labelfieldcontent;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 画像审核返回视图类
|
||||||
|
* @author: haown
|
||||||
|
* @create: 2024-06-27 15:01
|
||||||
|
**/
|
||||||
|
public class PatientPortaitVo {
|
||||||
|
Map<String, List<List<GroupingValue>>> portaitInfo;
|
||||||
|
}
|
||||||
@ -1,7 +1,10 @@
|
|||||||
package com.xinelu.manage.vo.patientinfo;
|
package com.xinelu.manage.vo.patientinfo;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
@ -18,6 +21,38 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class PatientPortaitVo {
|
public class PatientPortaitVo {
|
||||||
|
/**
|
||||||
|
* 患者姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "患者姓名")
|
||||||
|
@Excel(name = "患者姓名")
|
||||||
|
private String patientName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生日期,格式:yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate birthDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别,男:MALE,女:FEMALE
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "性别,男:MALE,女:FEMALE")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL")
|
||||||
|
private String visitMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END")
|
||||||
|
private String patientSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主要诊断
|
* 主要诊断
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -306,6 +306,9 @@
|
|||||||
<if test="portaitCheckDate != null">
|
<if test="portaitCheckDate != null">
|
||||||
portait_check_date = #{portaitCheckDate,jdbcType=TIMESTAMP},
|
portait_check_date = #{portaitCheckDate,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="portaitCheckRemark != null">
|
||||||
|
portait_check_remark = #{portaitCheckRemark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="routeCheckStatus != null">
|
<if test="routeCheckStatus != null">
|
||||||
route_check_status = #{routeCheckStatus,jdbcType=VARCHAR},
|
route_check_status = #{routeCheckStatus,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user