门诊输液记录 更新
This commit is contained in:
@@ -179,7 +179,7 @@
|
||||
resultType="com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto">
|
||||
SELECT
|
||||
T1.service_id,
|
||||
T1.service_status,
|
||||
T1.request_status,
|
||||
T1.bus_no,
|
||||
T1.execute_num,
|
||||
T1.based_on_id,
|
||||
@@ -216,7 +216,7 @@
|
||||
sr.prescription_no, --处方号
|
||||
sr.encounter_id , --就诊ID
|
||||
sr.tenant_id,
|
||||
sr.status_enum AS service_status, --服务状态
|
||||
sr.status_enum AS request_status, --服务请求状态
|
||||
e.bus_no AS encounter_busNo, --就诊ID(前台显示用)
|
||||
pt.name AS patient_name, --病人姓名
|
||||
pt.bus_no AS patient_busNo, --病人ID(前台显示用)
|
||||
@@ -250,7 +250,7 @@
|
||||
LEFT JOIN med_medication_definition md ON md.id = m.medication_def_id
|
||||
LEFT JOIN cli_allergy_intolerance ai ON ai.request_id = sr.id
|
||||
<where>
|
||||
ad.bus_no = 'sy001' -- 皮试检查的编号,todo:编号未定,后期修改
|
||||
ad.bus_no = 'sy001' -- 输液检查的编号,todo:编号未定,后期修改
|
||||
AND mr.infusion_flag = 1
|
||||
AND md.infusion_flag = 1
|
||||
|
||||
@@ -261,4 +261,40 @@
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 查询药品已执行数量/查询同组内药品数量 -->
|
||||
<select id="countMedicationExecuteNum" resultType="long">
|
||||
|
||||
SELECT COUNT(*)
|
||||
FROM
|
||||
wor_service_request sr
|
||||
LEFT JOIN adm_encounter e ON e.id = sr.encounter_id
|
||||
LEFT JOIN adm_patient pt ON pt.id = sr.patient_id
|
||||
LEFT JOIN wor_activity_definition ad ON ad.id = sr.activity_id
|
||||
LEFT JOIN med_medication_request mr ON mr.prescription_no = sr.prescription_no
|
||||
LEFT JOIN med_medication m ON m.id = mr.medication_id
|
||||
LEFT JOIN med_medication_definition md ON md.id = m.medication_def_id
|
||||
LEFT JOIN cli_allergy_intolerance ai ON ai.request_id = sr.id
|
||||
<where>
|
||||
ad.bus_no = 'sy001' -- 输液检查的编号,todo:编号未定,后期修改
|
||||
AND mr.infusion_flag = 1
|
||||
AND md.infusion_flag = 1
|
||||
|
||||
<!-- 药品已执行数量 条件筛选 -->
|
||||
<if test="flag and paramId != null and paramId != '' and prefixBusNo != null and prefixBusNo != '' ">
|
||||
AND sr.base_on_id = #{paramId}
|
||||
AND sr.bus_no LIKE CONCAT(#{prefixBusNo}, '%')
|
||||
AND sr.status_enum = 6 --服务状态是已完成
|
||||
</if>
|
||||
|
||||
<!-- 同组内药品数量 条件筛选 -->
|
||||
<if test="!flag and paramId != null and paramId != '' and groupId != null and groupId != ''">
|
||||
AND sr.id = #{paramId}
|
||||
AND mr.group_id = #{groupId}
|
||||
AND sr.status_enum = 2 --服务状态是进行中
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user