|
|
@ -87,6 +87,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
LEFT JOIN t_patient tp ON tr.patient_id = tp.id
|
|
|
|
LEFT JOIN t_patient tp ON tr.patient_id = tp.id
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectHomePatientList" parameterType="TRecordResultReq" resultType="TRecordResp">
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
|
|
|
|
t.id,
|
|
|
|
|
|
|
|
t.patientId,
|
|
|
|
|
|
|
|
t.doctorId,
|
|
|
|
|
|
|
|
t.hospitalId,
|
|
|
|
|
|
|
|
t. STATUS,
|
|
|
|
|
|
|
|
t.aiResult2,
|
|
|
|
|
|
|
|
t.updateResult2,
|
|
|
|
|
|
|
|
t.createTime,
|
|
|
|
|
|
|
|
t.updateTime,
|
|
|
|
|
|
|
|
t.uploadTime,
|
|
|
|
|
|
|
|
t.waitingTime,
|
|
|
|
|
|
|
|
t.aiResultReturnTime,
|
|
|
|
|
|
|
|
t.aiResultModifyTime,
|
|
|
|
|
|
|
|
t.responseTime,
|
|
|
|
|
|
|
|
t.doctorName,
|
|
|
|
|
|
|
|
t.identifier,
|
|
|
|
|
|
|
|
t.patientName,
|
|
|
|
|
|
|
|
t.sex,
|
|
|
|
|
|
|
|
t.age,
|
|
|
|
|
|
|
|
t.disease,
|
|
|
|
|
|
|
|
t.firstTime,
|
|
|
|
|
|
|
|
max(t.createTime)
|
|
|
|
|
|
|
|
FROM
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
|
|
|
|
tr.id,
|
|
|
|
|
|
|
|
tr.patient_id AS patientId,
|
|
|
|
|
|
|
|
tr.doctor_id AS doctorId,
|
|
|
|
|
|
|
|
tr.hospital_id AS hospitalId,
|
|
|
|
|
|
|
|
tr. STATUS,
|
|
|
|
|
|
|
|
tr.ai_result2 AS aiResult2,
|
|
|
|
|
|
|
|
tr.update_result2 AS updateResult2,
|
|
|
|
|
|
|
|
tr.create_time AS createTime,
|
|
|
|
|
|
|
|
tr.update_time AS updateTime,
|
|
|
|
|
|
|
|
tr.upload_time AS uploadTime,
|
|
|
|
|
|
|
|
tr.create_time AS waitingTime,
|
|
|
|
|
|
|
|
tr.ai_result_return_time AS aiResultReturnTime,
|
|
|
|
|
|
|
|
tr.ai_result_modify_time AS aiResultModifyTime,
|
|
|
|
|
|
|
|
tr.response_time AS responseTime,
|
|
|
|
|
|
|
|
td. NAME AS doctorName,
|
|
|
|
|
|
|
|
tp.identifier,
|
|
|
|
|
|
|
|
tp. NAME AS patientName,
|
|
|
|
|
|
|
|
tp.sex,
|
|
|
|
|
|
|
|
tp.age,
|
|
|
|
|
|
|
|
tp.disease,
|
|
|
|
|
|
|
|
tp.create_time AS firstTime
|
|
|
|
|
|
|
|
FROM
|
|
|
|
|
|
|
|
t_record tr
|
|
|
|
|
|
|
|
LEFT JOIN t_doctor td ON tr.doctor_id = td.id
|
|
|
|
|
|
|
|
LEFT JOIN t_patient tp ON tr.patient_id = tp.id
|
|
|
|
|
|
|
|
WHERE
|
|
|
|
|
|
|
|
tr.doctor_id = #{doctorId}
|
|
|
|
|
|
|
|
AND tr.hospital_id = #{hospitalId}
|
|
|
|
|
|
|
|
) t
|
|
|
|
|
|
|
|
GROUP BY
|
|
|
|
|
|
|
|
t.patientId
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!--====================工作台相关接口=====================-->
|
|
|
|
<!--====================工作台相关接口=====================-->
|
|
|
|
<select id="selectEquCount" resultType="int">
|
|
|
|
<select id="selectEquCount" resultType="int">
|
|
|
|
select count(*) from t_record
|
|
|
|
select count(*) from t_record
|
|
|
|