Compare commits
3 Commits
master
...
解封患者病历-unb
Author | SHA1 | Date |
---|---|---|
|
40fecd5b8c | 2 years ago |
|
106cf6b089 | 2 years ago |
|
4bd7739f13 | 2 years ago |
@ -0,0 +1,14 @@
|
||||
package com.docus.server.reportmanager.mapper;
|
||||
|
||||
|
||||
import com.docus.server.reportmanager.entity.TSeal;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wyb
|
||||
*/
|
||||
@Mapper
|
||||
public interface TSealMapper {
|
||||
TSeal findByCondition(@Param("condition") TSeal condition);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.server.reportmanager.service;
|
||||
|
||||
import javax.jws.WebService;
|
||||
|
||||
/**
|
||||
* 报告管理服务接口
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/1/3 16:11
|
||||
*/
|
||||
@WebService
|
||||
public interface ReportSealedService {
|
||||
/**
|
||||
* 解封患者病历
|
||||
*
|
||||
* @param message 解封信息
|
||||
* @return 处理结果
|
||||
*/
|
||||
String Q_WS_JFHZBL(String message);
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.docus.server.reportmanager.service.impl;
|
||||
|
||||
import com.docus.infrastructure.core.exception.BaseException;
|
||||
import com.docus.server.reportmanager.entity.TSeal;
|
||||
import com.docus.server.reportmanager.mapper.ScanAssortMapper;
|
||||
import com.docus.server.reportmanager.mapper.TSealMapper;
|
||||
import com.docus.server.reportmanager.service.ReportSealedService;
|
||||
import com.docus.server.reportmanager.util.XmlUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 广东省中医报告管理服务接口
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/1/3 16:11
|
||||
*/
|
||||
@Service("SzyReportSealedService")
|
||||
@Slf4j
|
||||
public class SzyReportSealedServiceImpl implements ReportSealedService {
|
||||
|
||||
@Resource
|
||||
private ScanAssortMapper scanAssortMapper;
|
||||
@Resource
|
||||
private TSealMapper sealMapper;
|
||||
|
||||
@Override
|
||||
public String Q_WS_JFHZBL(String message) {
|
||||
log.info("广东省中医报告解封,收到解封患者病历的信息:{}", message);
|
||||
try {
|
||||
XmlUtil xmlUtil = XmlUtil.of(message);
|
||||
// 住院流水号
|
||||
Node jzhNode = xmlUtil.getNode("/Request/INHOSP_NO");
|
||||
String jzh = jzhNode.getTextContent();
|
||||
// 封存id
|
||||
Node sealIdNode = xmlUtil.getNode("/Request/SEAL_ID");
|
||||
String sealId = sealIdNode.getTextContent();
|
||||
|
||||
TSeal condition = new TSeal();
|
||||
condition.setJzh(jzh);
|
||||
condition.setSealId(sealId);
|
||||
|
||||
TSeal seal = sealMapper.findByCondition(condition);
|
||||
if (Objects.isNull(seal)) {
|
||||
log.error("不存在封存患者信息");
|
||||
return error("不存在封存患者信息");
|
||||
}
|
||||
scanAssortMapper.unblocking(seal.getPatientId());
|
||||
return success();
|
||||
} catch (BaseException baseException) {
|
||||
log.error(baseException.getMessage(), baseException);
|
||||
return error(baseException.getMessage());
|
||||
} catch (Exception ex) {
|
||||
log.error(ex.getMessage(), ex);
|
||||
return error("系统内部错误,请联系开发人员");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String error(String msg) {
|
||||
return "<Response>\n" +
|
||||
" <RetInfo>\n" +
|
||||
" <RetCode>1</RetCode>\n" +
|
||||
" <RetCon>" + msg + "</RetCon>\n" +
|
||||
" </RetInfo>\n" +
|
||||
"</Response>";
|
||||
}
|
||||
|
||||
private String success() {
|
||||
return "<Response>\n" +
|
||||
" <RetInfo>\n" +
|
||||
" <RetCode>0</RetCode>\n" +
|
||||
" <RetCon>成功</RetCon>\n" +
|
||||
" </RetInfo>\n" +
|
||||
"</Response>";
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<service>
|
||||
<id>docus-report-manager</id>
|
||||
<name>生产-嘉时-报告管理服务</name>
|
||||
<description>生产-嘉时-报告管理服务</description>
|
||||
<id>docus-report-unblocking</id>
|
||||
<name>生产-嘉时-报告解封</name>
|
||||
<description>生产-嘉时-报告解封</description>
|
||||
<startmode>Automatic</startmode>
|
||||
<executable>%BASE%\start.bat</executable>
|
||||
<log mode="none"></log>
|
||||
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.reportmanager.mapper.TSealMapper">
|
||||
|
||||
|
||||
<select id="findByCondition" resultType="com.docus.server.reportmanager.entity.TSeal">
|
||||
SELECT
|
||||
*
|
||||
FROM `docus_medicalrecord`.`t_seal`
|
||||
<where>
|
||||
<if test="condition.jzh != null and condition.jzh != ''">
|
||||
and jzh=#{condition.jzh}
|
||||
</if>
|
||||
<if test="condition.sealId != null and condition.sealId != ''">
|
||||
and seal_id=#{condition.sealId}
|
||||
</if>
|
||||
<if test="condition.patientId != null and condition.patientId != ''">
|
||||
and patient_id=#{condition.patientId}
|
||||
</if>
|
||||
<if test="condition.name != null and condition.name != ''">
|
||||
and name=#{condition.name}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue