Fix Bug #562: AI修复
This commit is contained in:
@@ -1,15 +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">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.application.mapper.MedicalRecordMapper">
|
||||
|
||||
<!-- 采用 PageHelper 分页,SQL 本身不需要 LIMIT -->
|
||||
<select id="selectPendingRecords" resultType="com.openhis.application.domain.entity.MedicalRecord">
|
||||
SELECT *
|
||||
FROM adm_medical_record
|
||||
WHERE status = 'PENDING'
|
||||
ORDER BY create_time DESC
|
||||
<!-- 修复 Bug #562:专用轻量级查询,避免 SELECT * 拉取大字段 -->
|
||||
<select id="selectPendingSummary" parameterType="com.openhis.application.domain.dto.MedicalRecordQueryDto" resultType="com.openhis.application.domain.entity.MedicalRecord">
|
||||
SELECT
|
||||
id,
|
||||
patient_id,
|
||||
patient_name,
|
||||
visit_date,
|
||||
status,
|
||||
doctor_id,
|
||||
dept_id,
|
||||
create_time
|
||||
FROM emr_medical_record
|
||||
WHERE doctor_id = #{doctorId}
|
||||
AND status = 'PENDING'
|
||||
ORDER BY visit_date DESC
|
||||
</select>
|
||||
|
||||
<!-- 原有完整查询保留,供详情接口使用 -->
|
||||
<select id="selectById" parameterType="java.lang.Long" resultType="com.openhis.application.domain.entity.MedicalRecord">
|
||||
SELECT * FROM emr_medical_record WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user