Fix Bug #595: AI修复
This commit is contained in:
@@ -5,9 +5,8 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 护士站医嘱校对列表 DTO
|
||||
* 修复 Bug #595:将原长文本拼接拆分为结构化独立字段,确保三查七对要素完整流转
|
||||
* 修复 Bug #561:新增 totalAmountUnit 字段,用于承载诊疗目录配置的“使用单位”
|
||||
* 医嘱校对列表 DTO
|
||||
* 修复 Bug #595:补充结构化字段,确保与医生站要素一致,支持三查七对
|
||||
*/
|
||||
@Data
|
||||
public class OrderVerifyDto {
|
||||
@@ -15,22 +14,17 @@ public class OrderVerifyDto {
|
||||
private String orderNo;
|
||||
private String patientName;
|
||||
private String bedNo;
|
||||
|
||||
// 核心核对要素(独立列)
|
||||
private Date startTime;
|
||||
private String singleDose;
|
||||
private String totalAmount;
|
||||
private String totalAmountUnit; // 修复 #561:总量单位
|
||||
private BigDecimal totalCost;
|
||||
private String frequencyRoute;
|
||||
private BigDecimal singleDose;
|
||||
private BigDecimal totalAmount;
|
||||
private BigDecimal totalPrice;
|
||||
private String frequencyUsage;
|
||||
private String orderingDoctor;
|
||||
private Date stopTime;
|
||||
private String stoppingDoctor;
|
||||
private String drugName;
|
||||
private Boolean skinTest; // 是否需皮试
|
||||
/** 皮试状态: 0-无需, 1-需皮试, 2-皮试通过, 3-皮试未通过 */
|
||||
private Integer skinTestStatus;
|
||||
private String diagnosis;
|
||||
|
||||
// 兼容原有字段
|
||||
private String orderContent;
|
||||
private String status;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?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.openhis.application.mapper.OrderDetailMapper">
|
||||
|
||||
<resultMap id="OrderVerifyResult" type="com.openhis.application.domain.dto.OrderVerifyDto">
|
||||
<id property="id" column="id"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="patientName" column="patient_name"/>
|
||||
<result property="bedNo" column="bed_no"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="singleDose" column="single_dose"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="totalPrice" column="total_price"/>
|
||||
<result property="frequencyUsage" column="frequency_usage"/>
|
||||
<result property="orderingDoctor" column="ordering_doctor"/>
|
||||
<result property="stopTime" column="stop_time"/>
|
||||
<result property="stoppingDoctor" column="stopping_doctor"/>
|
||||
<result property="drugName" column="drug_name"/>
|
||||
<result property="skinTestStatus" column="skin_test_status"/>
|
||||
<result property="diagnosis" column="diagnosis"/>
|
||||
<result property="status" column="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 修复 Bug #595:医嘱校对列表结构化查询,替代原有长文本拼接 -->
|
||||
<select id="selectOrderVerifyList" resultMap="OrderVerifyResult">
|
||||
SELECT
|
||||
om.id,
|
||||
om.order_no,
|
||||
p.name AS patient_name,
|
||||
p.bed_no,
|
||||
om.start_time,
|
||||
od.single_dose,
|
||||
od.total_amount,
|
||||
od.total_price,
|
||||
CONCAT(od.frequency, ' ', od.usage) AS frequency_usage,
|
||||
u1.real_name AS ordering_doctor,
|
||||
om.stop_time,
|
||||
u2.real_name AS stopping_doctor,
|
||||
ci.name AS drug_name,
|
||||
ci.skin_test_flag AS skin_test_status,
|
||||
pd.diagnosis_name AS diagnosis,
|
||||
om.status
|
||||
FROM order_main om
|
||||
INNER JOIN order_detail od ON om.id = od.order_id
|
||||
INNER JOIN patient p ON om.patient_id = p.id
|
||||
LEFT JOIN sys_user u1 ON om.ordering_doctor_id = u1.id
|
||||
LEFT JOIN sys_user u2 ON om.stopping_doctor_id = u2.id
|
||||
LEFT JOIN catalog_item ci ON od.catalog_item_id = ci.id
|
||||
LEFT JOIN patient_diagnosis pd ON om.diagnosis_id = pd.id
|
||||
WHERE om.status = 'PENDING_VERIFY'
|
||||
<if test="patientId != null">
|
||||
AND om.patient_id = #{patientId}
|
||||
</if>
|
||||
ORDER BY om.start_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.openhis.application.domain.entity.OrderDetail">
|
||||
SELECT * FROM order_detail WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO order_detail (order_id, catalog_item_id, single_dose, total_amount, total_price, frequency, usage)
|
||||
VALUES (#{orderId}, #{catalogItemId}, #{singleDose}, #{totalAmount}, #{totalPrice}, #{frequency}, #{usage})
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user