feat:肇庆第一人民医院添加临床提交电子病历和护理
parent
d6908b3f00
commit
1d456fdc20
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"method": "WS_RECORD_SUBMIT",
|
||||
"urls": ["http://127.0.0.1:9314/message/receive/wsRecordSubmit/do"],
|
||||
"urls": ["http://127.0.0.1:9314/hospital/zqFirstRy/wsRecordSubmit/do"],
|
||||
"errorResult": "<Response><RetInfo><RetCode>0</RetCode><RetCon>成功</RetCon></RetInfo></Response>",
|
||||
"messageDataType": 1
|
||||
} , {
|
||||
"method": "WS_NURS_SUBMIT",
|
||||
"urls": ["http://127.0.0.1:9314/message/receive/wsNurseSubmit/do"],
|
||||
"urls": ["http://127.0.0.1:9314/hospital/zqFirstRy/wsNurseSubmit/do"],
|
||||
"errorResult": "<Response><RetInfo><RetCode>1</RetCode><RetCon>系统内部错误!</RetCon></RetInfo></Response>",
|
||||
"messageDataType": 1
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.docus.server.message.busservice;
|
||||
|
||||
import com.docus.server.message.dto.Message;
|
||||
import com.docus.server.message.dto.MessageResponse;
|
||||
|
||||
/**
|
||||
* 临床提交业务接口
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/1/22 13:50
|
||||
*/
|
||||
public interface SubmitBusinessService {
|
||||
/**
|
||||
* 临床电子病历提交信息
|
||||
*
|
||||
* @param message 信息
|
||||
* @return 消息处理结果
|
||||
*/
|
||||
MessageResponse recordSubmitHandle(Message message);
|
||||
|
||||
/**
|
||||
* 临床护理提交信息
|
||||
*
|
||||
* @param message 信息
|
||||
* @return 消息处理结果
|
||||
*/
|
||||
MessageResponse wsNurseSubmitHandle(Message message);
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.docus.server.message.busservice;
|
||||
/**
|
||||
* 肇庆第一人民医院业务接口
|
||||
* @date 2024/1/22 13:51
|
||||
* @author YongBin Wen
|
||||
*/
|
||||
public interface ZqBusinessService extends SubmitBusinessService{
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,167 @@
|
||||
package com.docus.server.message.busservice.impl;
|
||||
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.infrastructure.web.api.CommonResult;
|
||||
import com.docus.infrastructure.web.api.ResultCode;
|
||||
import com.docus.server.message.busservice.ZqBusinessService;
|
||||
import com.docus.server.message.config.CollectTaskConfig;
|
||||
import com.docus.server.message.converters.ZqWsNurseSubmitMessageConvert;
|
||||
import com.docus.server.message.converters.ZqWsRecordSubmitMessageConvert;
|
||||
import com.docus.server.message.dto.*;
|
||||
import com.docus.server.message.feign.dto.CompensateTasRequest;
|
||||
import com.docus.server.message.feign.dto.HospitalSubmitNodeLogAddDTO;
|
||||
import com.docus.server.message.feign.enums.HospitalSubmitNodeEnum;
|
||||
import com.docus.server.message.feign.service.CollectTaskService;
|
||||
import com.docus.server.message.feign.service.HospitalSubmitNodeServiceApi;
|
||||
import com.docus.server.message.mapper.TBasicMapper;
|
||||
import com.docus.server.message.validate.ZqRecordSubmitValidate;
|
||||
import com.docus.server.message.validate.ZqWsNurseSubmitValidate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 肇庆业务实现类
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/1/22 13:58
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("ZqBusinessService")
|
||||
public class ZqBusinessServiceImpl implements ZqBusinessService {
|
||||
|
||||
@Resource
|
||||
private TBasicMapper tBasicMapper;
|
||||
|
||||
@Resource
|
||||
private HospitalSubmitNodeServiceApi hospitalSubmitNodeServiceApi;
|
||||
|
||||
@Resource
|
||||
private CollectTaskService collectTaskService;
|
||||
|
||||
@Override
|
||||
public MessageResponse recordSubmitHandle(Message message) {
|
||||
try {
|
||||
CollectTaskConfig.TaskConfig taskConfig = CollectTaskConfig.getTaskConfig("WS_RECORD_SUBMIT");
|
||||
if (taskConfig == null || Func.isEmpty(taskConfig.getCollectorIds())) {
|
||||
throw new RuntimeException("任务配置未配置采集器id,WS_RECORD_SUBMIT");
|
||||
}
|
||||
ZqRecordSubmitDTO recordSubmitDto = ZqWsRecordSubmitMessageConvert.convert(message.getMessage());
|
||||
ZqRecordSubmitValidate.verifyRecordSubmitDTO(recordSubmitDto);
|
||||
TbasicQrPreciseCondition condition = ZqWsRecordSubmitMessageConvert.convert(recordSubmitDto);
|
||||
List<String> patientIds = tBasicMapper.getPatientIdByPreciseConditions(condition);
|
||||
verifyPatientIds(patientIds);
|
||||
|
||||
String submitDate = recordSubmitDto.getSubmitDate();
|
||||
|
||||
// 添加提交记录
|
||||
HospitalSubmitNodeLogAddDTO nodeLogAddDTO = new HospitalSubmitNodeLogAddDTO();
|
||||
nodeLogAddDTO.setPatientId(patientIds.get(0));
|
||||
nodeLogAddDTO.setContent(new String[]{submitDate});
|
||||
nodeLogAddDTO.setSubmitNodeEnum(HospitalSubmitNodeEnum.EMR);
|
||||
nodeLogAddDTO.setCreater("电子病历提交");
|
||||
nodeLogAddDTO.setCreaterName("电子病历提交");
|
||||
hospitalSubmitNodeServiceApi.addLog(nodeLogAddDTO);
|
||||
|
||||
tBasicMapper.insertOrUpdateDoctorSubmitTime(patientIds.get(0), Func.parseDate(submitDate, DateUtil.PATTERN_DATETIME));
|
||||
|
||||
compensateTask("电子病历提交",patientIds, taskConfig.getCollectorIds());
|
||||
tBasicMapper.updateEmrSubmitState(patientIds.get(0), 1);
|
||||
return new MessageResponse(ResultCode.SUCCESS.getCode(), success());
|
||||
} catch (BaseException baseException) {
|
||||
log.error(baseException.getMessage(), baseException);
|
||||
// 业务异常,不希望重试,直接消息返回错误
|
||||
MessageResponse response = new MessageResponse(ResultCode.FAILED.getCode(), fail(baseException.getMessage()));
|
||||
response.setRetry(0);
|
||||
return response;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex.getMessage(), ex);
|
||||
// 不可知的错误,希望重试
|
||||
MessageResponse response = new MessageResponse(ResultCode.FAILED.getCode(), fail("系统错误"));
|
||||
response.setRetry(1);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageResponse wsNurseSubmitHandle(Message message) {
|
||||
try {
|
||||
CollectTaskConfig.TaskConfig taskConfig = CollectTaskConfig.getTaskConfig("WS_NURS_SUBMIT");
|
||||
if (taskConfig == null || Func.isEmpty(taskConfig.getCollectorIds())) {
|
||||
throw new RuntimeException("任务配置未配置采集器id,WS_NURS_SUBMIT");
|
||||
}
|
||||
ZqWsNurseSubmitDTO nurseSubmitDTO = ZqWsNurseSubmitMessageConvert.convert(message.getMessage());
|
||||
ZqWsNurseSubmitValidate.verifyNurseSubmitDTO(nurseSubmitDTO);
|
||||
TbasicQrPreciseCondition condition = ZqWsNurseSubmitMessageConvert.convert(nurseSubmitDTO);
|
||||
List<String> patientIds = tBasicMapper.getPatientIdByPreciseConditions(condition);
|
||||
verifyPatientIds(patientIds);
|
||||
|
||||
String submitDate = nurseSubmitDTO.getSubmitDate();
|
||||
// 添加提交内容
|
||||
HospitalSubmitNodeLogAddDTO nodeLogAddDTO = new HospitalSubmitNodeLogAddDTO();
|
||||
nodeLogAddDTO.setPatientId(patientIds.get(0));
|
||||
nodeLogAddDTO.setContent(new String[]{submitDate});
|
||||
nodeLogAddDTO.setSubmitNodeEnum(HospitalSubmitNodeEnum.NURSE);
|
||||
nodeLogAddDTO.setCreater("护理提交");
|
||||
nodeLogAddDTO.setCreaterName("护理提交");
|
||||
hospitalSubmitNodeServiceApi.addLog(nodeLogAddDTO);
|
||||
|
||||
tBasicMapper.insertOrUpdateNurseSubmitTime(patientIds.get(0), Func.parseDate(submitDate, DateUtil.PATTERN_DATETIME));
|
||||
compensateTask("护理提交",patientIds, taskConfig.getCollectorIds());
|
||||
return new MessageResponse(ResultCode.SUCCESS.getCode(), success());
|
||||
} catch (BaseException baseException) {
|
||||
log.error(baseException.getMessage(), baseException);
|
||||
// 业务异常,不希望重试,直接消息返回错误
|
||||
MessageResponse response = new MessageResponse(ResultCode.FAILED.getCode(), fail(baseException.getMessage()));
|
||||
response.setRetry(0);
|
||||
return response;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex.getMessage(), ex);
|
||||
// 不可知的错误,希望重试
|
||||
MessageResponse response = new MessageResponse(ResultCode.FAILED.getCode(), fail("系统错误"));
|
||||
response.setRetry(1);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
private void verifyPatientIds(List<String> patientIds) {
|
||||
if (Func.isEmpty(patientIds)) {
|
||||
throw new BaseException("系统无此患者!");
|
||||
}
|
||||
if (patientIds.size() > 1) {
|
||||
throw new BaseException("系统中患者有多个,无法确认!");
|
||||
}
|
||||
}
|
||||
|
||||
private void compensateTask(String source,List<String> patientIds, List<String> collectorIds) {
|
||||
log.info("{},补偿任务 patientIds:{} collectId:{}",source, patientIds, collectorIds);
|
||||
CompensateTasRequest dto = new CompensateTasRequest();
|
||||
dto.setPatientIds(patientIds);
|
||||
dto.setCollectorIds(collectorIds);
|
||||
dto.setPriority(3);
|
||||
CommonResult<String> result = collectTaskService.compensateTask(dto);
|
||||
log.info("{},补偿任务结果:{}", source,Func.toJson(result));
|
||||
}
|
||||
|
||||
private String success() {
|
||||
return "<Response>" +
|
||||
"<RetInfo>" +
|
||||
"<RetCode>0</RetCode>" +
|
||||
"<RetCon>成功</RetCon>" +
|
||||
"</RetInfo>" +
|
||||
"</Response>";
|
||||
}
|
||||
|
||||
private String fail(String message) {
|
||||
return "<Response>" +
|
||||
"<RetInfo>" +
|
||||
"<RetCode>1</RetCode>" +
|
||||
"<RetCon>" + message + "</RetCon>" +
|
||||
"</RetInfo>" +
|
||||
"</Response>";
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.docus.server.message.controller;
|
||||
|
||||
import com.docus.server.message.busservice.ZqBusinessService;
|
||||
import com.docus.server.message.dto.Message;
|
||||
import com.docus.server.message.dto.MessageResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author WYBDEV
|
||||
*/
|
||||
@Api("肇庆第一人民医院")
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/hospital/zqFirstRy")
|
||||
public class ZhaoQingFirstHospitalController {
|
||||
|
||||
@Resource
|
||||
private ZqBusinessService zqBusinessService;
|
||||
|
||||
|
||||
@PostMapping("/wsRecordSubmit/do")
|
||||
@ApiOperation("肇庆第一人医电子病历提交消息接收")
|
||||
public MessageResponse receiveWsRecordSubmitMessage(@RequestBody Message message) {
|
||||
log.info("肇庆第一人医电子病历提交消息接收:{}", message);
|
||||
return zqBusinessService.recordSubmitHandle(message);
|
||||
}
|
||||
|
||||
@PostMapping("/wsNurseSubmit/do")
|
||||
@ApiOperation("肇庆第一人医护理提交消息接收")
|
||||
public MessageResponse receiveWsNurseSubmitMessage(@RequestBody Message message) {
|
||||
log.info("肇庆第一人医护理提交消息接收:{}", message);
|
||||
return zqBusinessService.wsNurseSubmitHandle(message);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.docus.server.message.converters;
|
||||
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.server.message.dto.TbasicQrPreciseCondition;
|
||||
import com.docus.server.message.dto.ZqWsNurseSubmitDTO;
|
||||
import com.docus.server.message.util.XmlUtil;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class ZqWsNurseSubmitMessageConvert {
|
||||
public static ZqWsNurseSubmitDTO convert(String str) {
|
||||
String jzh = null;
|
||||
String inpatientNo = null;
|
||||
String name = null;
|
||||
String submitDate = null;
|
||||
Integer admissTimes = null;
|
||||
String admissDate = null;
|
||||
String disDate = null;
|
||||
XmlUtil xmlUtil = XmlUtil.of(str);
|
||||
try {
|
||||
// 住院流水号
|
||||
Node inHospNoNode = xmlUtil.getNode("/Request/Msg/INHOSP_NO");
|
||||
jzh = inHospNoNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院流水号 出错!");
|
||||
}
|
||||
|
||||
try {
|
||||
// 住院号
|
||||
Node inHospIndexNoNode = xmlUtil.getNode("/Request/Msg/INHOSP_INDEX_NO");
|
||||
inpatientNo = inHospIndexNoNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院号 出错!");
|
||||
}
|
||||
try {
|
||||
// 住院次数
|
||||
Node visitNoNode = xmlUtil.getNode("/Request/Msg/VISIT_NO");
|
||||
String admissTimesStr = visitNoNode.getTextContent();
|
||||
if (Func.isNotBlank(admissTimesStr)) {
|
||||
admissTimes = Integer.parseInt(admissTimesStr.trim());
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院次数 出错!");
|
||||
}
|
||||
try {
|
||||
// 患者姓名
|
||||
Node nameNode = xmlUtil.getNode("/Request/Msg/NAME");
|
||||
name = nameNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 姓名 出错!");
|
||||
}
|
||||
try {
|
||||
// 提交时间
|
||||
Node admissTimeNode = xmlUtil.getNode("/Request/Msg/ADMISS_TIME");
|
||||
String admissTime = admissTimeNode.getTextContent();
|
||||
if (Func.isNotBlank(admissTime)) {
|
||||
Date admissDateTime = Func.parseDate(admissTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
admissDate = Func.formatDateTime(admissDateTime);
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 入院时间 出错!");
|
||||
}
|
||||
try {
|
||||
// 提交时间
|
||||
Node disTimeNode = xmlUtil.getNode("/Request/Msg/DIS_TIME");
|
||||
String disTime = disTimeNode.getTextContent();
|
||||
if (Func.isNotBlank(disTime)) {
|
||||
Date disDateTime = Func.parseDate(disTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
disDate = Func.formatDateTime(disDateTime);
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 出院时间 出错!");
|
||||
}
|
||||
|
||||
try {
|
||||
// 提交时间
|
||||
Node submitTimeNode = xmlUtil.getNode("/Request/Msg/SUBMIT_TIME");
|
||||
String submitTime = submitTimeNode.getTextContent();
|
||||
Date submitDateTime = Func.parseDate(submitTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
submitDate = Func.formatDateTime(submitDateTime);
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 提交时间 出错!");
|
||||
}
|
||||
|
||||
ZqWsNurseSubmitDTO nurseSubmitDTO = new ZqWsNurseSubmitDTO();
|
||||
nurseSubmitDTO.setJzh(jzh);
|
||||
nurseSubmitDTO.setInpatientNo(inpatientNo);
|
||||
nurseSubmitDTO.setAdmissTimes(admissTimes);
|
||||
nurseSubmitDTO.setName(name);
|
||||
nurseSubmitDTO.setAdmissDate(admissDate);
|
||||
nurseSubmitDTO.setDisDate(disDate);
|
||||
nurseSubmitDTO.setSubmitDate(submitDate);
|
||||
return nurseSubmitDTO;
|
||||
}
|
||||
|
||||
|
||||
public static TbasicQrPreciseCondition convert(ZqWsNurseSubmitDTO dto) {
|
||||
if (dto == null) {
|
||||
return null;
|
||||
}
|
||||
TbasicQrPreciseCondition condition = new TbasicQrPreciseCondition();
|
||||
condition.setJzh(dto.getJzh());
|
||||
condition.setInpatientNo(dto.getInpatientNo());
|
||||
condition.setAdmissTimes(dto.getAdmissTimes());
|
||||
condition.setAdmissDate(dto.getAdmissDate());
|
||||
condition.setDisDate(dto.getDisDate());
|
||||
condition.setName(dto.getName());
|
||||
return condition;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package com.docus.server.message.converters;
|
||||
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.server.message.dto.TbasicQrPreciseCondition;
|
||||
import com.docus.server.message.dto.ZqRecordSubmitDTO;
|
||||
import com.docus.server.message.util.XmlUtil;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class ZqWsRecordSubmitMessageConvert {
|
||||
public static ZqRecordSubmitDTO convert(String str) {
|
||||
String jzh = null;
|
||||
String inpatientNo = null;
|
||||
String name = null;
|
||||
String submitDate = null;
|
||||
Integer admissTimes = null;
|
||||
String admissDate = null;
|
||||
String disDate = null;
|
||||
XmlUtil xmlUtil = XmlUtil.of(str);
|
||||
try {
|
||||
// 住院流水号
|
||||
Node inHospNoNode = xmlUtil.getNode("/Request/Msg/INHOSP_NO");
|
||||
jzh = inHospNoNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院流水号 出错!");
|
||||
}
|
||||
|
||||
try {
|
||||
// 住院号
|
||||
Node inHospIndexNoNode = xmlUtil.getNode("/Request/Msg/INHOSP_INDEX_NO");
|
||||
inpatientNo = inHospIndexNoNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院号 出错!");
|
||||
}
|
||||
try {
|
||||
// 住院次数
|
||||
Node visitNoNode = xmlUtil.getNode("/Request/Msg/VISIT_NO");
|
||||
String admissTimesStr = visitNoNode.getTextContent();
|
||||
if (Func.isNotBlank(admissTimesStr)) {
|
||||
admissTimes = Integer.parseInt(admissTimesStr.trim());
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 住院次数 出错!");
|
||||
}
|
||||
try {
|
||||
// 患者姓名
|
||||
Node nameNode = xmlUtil.getNode("/Request/Msg/NAME");
|
||||
name = nameNode.getTextContent();
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 姓名 出错!");
|
||||
}
|
||||
try {
|
||||
// 提交时间
|
||||
Node admissTimeNode = xmlUtil.getNode("/Request/Msg/ADMISS_TIME");
|
||||
String admissTime = admissTimeNode.getTextContent();
|
||||
if (Func.isNotBlank(admissTime)) {
|
||||
Date admissDateTime = Func.parseDate(admissTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
admissDate = Func.formatDateTime(admissDateTime);
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 入院时间 出错!");
|
||||
}
|
||||
try {
|
||||
// 提交时间
|
||||
Node disTimeNode = xmlUtil.getNode("/Request/Msg/DIS_TIME");
|
||||
String disTime = disTimeNode.getTextContent();
|
||||
if (Func.isNotBlank(disTime)) {
|
||||
Date disDateTime = Func.parseDate(disTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
disDate = Func.formatDateTime(disDateTime);
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 出院时间 出错!");
|
||||
}
|
||||
|
||||
try {
|
||||
// 提交时间
|
||||
Node submitTimeNode = xmlUtil.getNode("/Request/Msg/SUBMIT_TIME");
|
||||
String submitTime = submitTimeNode.getTextContent();
|
||||
Date submitDateTime = Func.parseDate(submitTime.trim(), DateUtil.PATTERN_DATETIME);
|
||||
submitDate = Func.formatDateTime(submitDateTime);
|
||||
} catch (Exception ex) {
|
||||
throw new BaseException("解析 提交时间 出错!");
|
||||
}
|
||||
|
||||
ZqRecordSubmitDTO recordSubmitDTO = new ZqRecordSubmitDTO();
|
||||
recordSubmitDTO.setJzh(jzh);
|
||||
recordSubmitDTO.setInpatientNo(inpatientNo);
|
||||
recordSubmitDTO.setAdmissTimes(admissTimes);
|
||||
recordSubmitDTO.setName(name);
|
||||
recordSubmitDTO.setAdmissDate(admissDate);
|
||||
recordSubmitDTO.setDisDate(disDate);
|
||||
recordSubmitDTO.setSubmitDate(submitDate);
|
||||
return recordSubmitDTO;
|
||||
}
|
||||
|
||||
public static TbasicQrPreciseCondition convert(ZqRecordSubmitDTO dto) {
|
||||
if (dto==null) {
|
||||
return null;
|
||||
}
|
||||
TbasicQrPreciseCondition condition = new TbasicQrPreciseCondition();
|
||||
condition.setJzh(dto.getJzh());
|
||||
condition.setInpatientNo(dto.getInpatientNo());
|
||||
condition.setAdmissTimes(dto.getAdmissTimes());
|
||||
condition.setAdmissDate(dto.getAdmissDate());
|
||||
condition.setDisDate(dto.getDisDate());
|
||||
condition.setName(dto.getName());
|
||||
return condition;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.docus.server.message.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 肇庆第一人民医院电子病历提交信息
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Data
|
||||
public class ZqRecordSubmitDTO {
|
||||
/**
|
||||
* 住院流水号/记账号
|
||||
*/
|
||||
private String jzh;
|
||||
/**
|
||||
* 住院号
|
||||
*/
|
||||
private String inpatientNo;
|
||||
/**
|
||||
* 住院次数
|
||||
*/
|
||||
private Integer admissTimes;
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 入院时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String admissDate;
|
||||
/**
|
||||
* 出院时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String disDate;
|
||||
/**
|
||||
* 提交时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String submitDate;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.docus.server.message.dto;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
* 肇庆第一人民医院临床护理提交信息
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Data
|
||||
public class ZqWsNurseSubmitDTO {
|
||||
/**
|
||||
* 住院流水号/记账号
|
||||
*/
|
||||
private String jzh;
|
||||
/**
|
||||
* 住院号
|
||||
*/
|
||||
private String inpatientNo;
|
||||
/**
|
||||
* 住院次数
|
||||
*/
|
||||
private Integer admissTimes;
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 入院时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String admissDate;
|
||||
/**
|
||||
* 出院时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String disDate;
|
||||
/**
|
||||
* 提交时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String submitDate;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.message.validate;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.server.message.dto.ZqRecordSubmitDTO;
|
||||
|
||||
public class ZqRecordSubmitValidate {
|
||||
public static void verifyRecordSubmitDTO(ZqRecordSubmitDTO recordSubmitDto) throws BaseException{
|
||||
String jzh = recordSubmitDto.getJzh();
|
||||
String inpatientNo = recordSubmitDto.getInpatientNo();
|
||||
String name = recordSubmitDto.getName();
|
||||
String submitDate = recordSubmitDto.getSubmitDate();
|
||||
if (Func.isBlank(jzh)
|
||||
&& Func.isBlank(inpatientNo)
|
||||
&& Func.isBlank(name)) {
|
||||
throw new BaseException("住院流水号、住院号、患者姓名 不可全部为空!");
|
||||
}
|
||||
if (Func.isBlank(submitDate)) {
|
||||
throw new BaseException("提交时间不能为空!");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.message.validate;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.server.message.dto.ZqWsNurseSubmitDTO;
|
||||
|
||||
public class ZqWsNurseSubmitValidate {
|
||||
public static void verifyNurseSubmitDTO(ZqWsNurseSubmitDTO dto) throws BaseException {
|
||||
String jzh = dto.getJzh();
|
||||
String inpatientNo = dto.getInpatientNo();
|
||||
String name = dto.getName();
|
||||
String submitDate = dto.getSubmitDate();
|
||||
if (Func.isBlank(jzh)
|
||||
&& Func.isBlank(inpatientNo)
|
||||
&& Func.isBlank(name)) {
|
||||
throw new BaseException("住院流水号、住院号、患者姓名 不可全部为空!");
|
||||
}
|
||||
if (Func.isBlank(submitDate)) {
|
||||
throw new BaseException("提交时间不能为空!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue