|
|
@@ -156,7 +156,8 @@
|
|
|
FROM afterwards_audit
|
|
|
WHERE
|
|
|
medical_dept_code = #{medicalDeptCode,jdbcType=VARCHAR}
|
|
|
- AND check_state = 'issue_review'
|
|
|
+ AND check_state = 'process'
|
|
|
+ AND review_results = 'issue_review'
|
|
|
GROUP BY doctor_id
|
|
|
</select>
|
|
|
<!-- 获取科室下的医生 -->
|
|
|
@@ -166,8 +167,8 @@
|
|
|
u.doctor_id as doctorId,
|
|
|
u.realname as doctorName
|
|
|
FROM sys_user as u
|
|
|
- LEFT JOIN sys_user_depart as dm on u.id = dm.user_id
|
|
|
- WHERE username = #{loginUserName,jdbcType=VARCHAR}
|
|
|
+ LEFT JOIN sys_user_depart as dm on u.id = dm.user_id
|
|
|
+ WHERE dm.dep_id = #{dptId,jdbcType=VARCHAR}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
@@ -232,4 +233,22 @@
|
|
|
RIGHT JOIN medical_record_homepage as h ON ad.outpatient_number = h.zyh
|
|
|
WHERE ad.id = #{id, jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="loadMedicalOrderInfo"
|
|
|
+ resultType="org.jeecg.modules.medical.common.bo.MedicalOrderInfoResponse">
|
|
|
+ SELECT
|
|
|
+ p.hisid as associatedSettlementMaster, -- 关联结算主单
|
|
|
+ p.patient_id as personalCode, -- 个人编码
|
|
|
+ p.inp_outpatient_number as admissionOutpatientNumber, -- 住院号/门诊号
|
|
|
+ ad.patient_name as patientName, -- 患者姓名
|
|
|
+ p.order_number as orderNumber, -- 医嘱号
|
|
|
+ p.order_time as orderTime, -- 下嘱时间
|
|
|
+ p.stop_order_time as stopOrderTime, -- 停嘱时间
|
|
|
+ p.order_status as orderStatus -- 医嘱状态
|
|
|
+ FROM
|
|
|
+ afterwards_audit as ad
|
|
|
+ RIGHT JOIN prescription_order as p ON p.inp_outpatient_number = ad.outpatient_number
|
|
|
+ WHERE
|
|
|
+ ad.id = #{id, jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
</mapper>
|