fix(prescription): 解决处方列表中手术类型和其他医嘱类型的问题
- 更新 lodash.template 修复脚本以处理 assignWith 函数的自定义器参数 - 在多个处方组件中引入 drord_doctor_type 字典用于动态生成医嘱类型列表 - 修复手术类型(adviceType=6)的特殊处理逻辑,包括类型映射和字段过滤 - 调整后端医嘱保存服务中的类型分类逻辑,正确处理手术类型 - 更新数据库查询映射以支持手术类型的正确显示和数据传输 - 修复费用对话框和订单表单中的相关类型显示问题
This commit is contained in:
@@ -468,6 +468,7 @@
|
||||
T1.dose AS dose,
|
||||
T1.dose_unit_code AS dose_unit_code,
|
||||
T4.id AS charge_item_id,
|
||||
T4.unit_price AS unit_price,
|
||||
T4.total_price AS total_price,
|
||||
T4.status_enum AS charge_status,
|
||||
al.id AS position_id,
|
||||
@@ -477,7 +478,9 @@
|
||||
ccd.name AS condition_definition_name,
|
||||
T1.sort_number AS sort_number,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.category_enum AS category_enum
|
||||
T1.category_enum AS category_enum,
|
||||
T1.encounter_id AS encounter_id,
|
||||
T1.patient_id AS patient_id
|
||||
FROM med_medication_request AS T1
|
||||
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -520,6 +523,7 @@
|
||||
NULL AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T3.id AS charge_item_id,
|
||||
T3.unit_price AS unit_price,
|
||||
T3.total_price AS total_price,
|
||||
T3.status_enum AS charge_status,
|
||||
al.id AS position_id,
|
||||
@@ -529,7 +533,9 @@
|
||||
'' AS condition_definition_name,
|
||||
99 AS sort_number,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.category_enum AS category_enum
|
||||
T1.category_enum AS category_enum,
|
||||
T1.encounter_id AS encounter_id,
|
||||
T1.patient_id AS patient_id
|
||||
FROM wor_device_request AS T1
|
||||
LEFT JOIN adm_device_definition AS T2 ON T2.ID = T1.device_def_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -547,7 +553,7 @@
|
||||
AND T1.refund_device_id IS NULL
|
||||
ORDER BY T1.status_enum)
|
||||
UNION ALL
|
||||
(SELECT COALESCE(T1.category_enum, 3) AS advice_type,
|
||||
(SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE COALESCE(T1.category_enum, 3) END AS advice_type,
|
||||
T1.id AS request_id,
|
||||
T1.id || '-3' AS unique_key,
|
||||
'' AS prescription_no,
|
||||
@@ -561,15 +567,16 @@
|
||||
COALESCE(T2.NAME, T1.content_json::jsonb->>'surgeryName', T1.content_json::jsonb->>'adviceName') AS advice_name,
|
||||
'' AS volume,
|
||||
'' AS lot_number,
|
||||
T1.quantity AS quantity,
|
||||
T1.unit_code AS unit_code,
|
||||
T1.status_enum AS status_enum,
|
||||
'' AS method_code,
|
||||
'' AS rate_code,
|
||||
NULL AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T3.id AS charge_item_id,
|
||||
T3.total_price AS total_price,
|
||||
T1.quantity AS quantity,
|
||||
T1.unit_code AS unit_code,
|
||||
T1.status_enum AS status_enum,
|
||||
'' AS method_code,
|
||||
'' AS rate_code,
|
||||
NULL AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T3.id AS charge_item_id,
|
||||
T3.unit_price AS unit_price,
|
||||
T3.total_price AS total_price,
|
||||
T3.status_enum AS charge_status,
|
||||
ao.id AS position_id,
|
||||
ao.name AS position_name,
|
||||
@@ -577,9 +584,11 @@
|
||||
1 AS part_percent,
|
||||
'' AS condition_definition_name,
|
||||
99 AS sort_number,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.category_enum AS category_enum
|
||||
FROM wor_service_request AS T1
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.category_enum AS category_enum,
|
||||
T1.encounter_id AS encounter_id,
|
||||
T1.patient_id AS patient_id
|
||||
FROM wor_service_request AS T1
|
||||
LEFT JOIN wor_activity_definition AS T2
|
||||
ON T2.ID = T1.activity_id
|
||||
AND T2.delete_flag = '0'
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
T1.dose AS dose,
|
||||
T1.dose_unit_code AS dose_unit_code,
|
||||
T4.id AS charge_item_id,
|
||||
T4.unit_price AS unit_price,
|
||||
T4.total_price AS total_price,
|
||||
T4.status_enum AS charge_status,
|
||||
al.id AS position_id,
|
||||
@@ -254,6 +255,7 @@
|
||||
NULL AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T3.id AS charge_item_id,
|
||||
T3.unit_price AS unit_price,
|
||||
T3.total_price AS total_price,
|
||||
T3.status_enum AS charge_status,
|
||||
al.id AS position_id,
|
||||
@@ -281,7 +283,7 @@
|
||||
AND T1.refund_device_id IS NULL
|
||||
ORDER BY T1.status_enum)
|
||||
UNION ALL
|
||||
(SELECT COALESCE(T1.category_enum, 3) AS advice_type,
|
||||
(SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE COALESCE(T1.category_enum, 3) END AS advice_type,
|
||||
T1.id AS request_id,
|
||||
T1.id || '-3' AS unique_key,
|
||||
T1.requester_id AS requester_id,
|
||||
@@ -302,6 +304,7 @@
|
||||
NULL AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T3.id AS charge_item_id,
|
||||
T3.unit_price AS unit_price,
|
||||
T3.total_price AS total_price,
|
||||
T3.status_enum AS charge_status,
|
||||
ao.id AS position_id,
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
||||
SELECT wsr.quantity,
|
||||
wsr.unit_code,
|
||||
wad.NAME AS advice_name,
|
||||
COALESCE(wad.NAME, wsr.content_json::jsonb->>'surgeryName') AS advice_name,
|
||||
aci.total_price
|
||||
FROM wor_service_request AS wsr
|
||||
LEFT JOIN wor_activity_definition AS wad ON wad.ID = wsr.activity_id
|
||||
AND wad.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item AS aci ON aci.service_id = wsr.ID
|
||||
AND aci.service_table = 'wor_service_request'
|
||||
AND aci.delete_flag = '0'
|
||||
WHERE wsr.delete_flag = '0'
|
||||
AND wsr.prescription_no = #{prescriptionNo}
|
||||
|
||||
Reference in New Issue
Block a user