fix: doctorstation手术医嘱advice_type使用category_enum,advice_name支持surgeryName
This commit is contained in:
@@ -547,7 +547,7 @@
|
|||||||
AND T1.refund_device_id IS NULL
|
AND T1.refund_device_id IS NULL
|
||||||
ORDER BY T1.status_enum)
|
ORDER BY T1.status_enum)
|
||||||
UNION ALL
|
UNION ALL
|
||||||
(SELECT 3 AS advice_type,
|
(SELECT COALESCE(T1.category_enum, 3) AS advice_type,
|
||||||
T1.id AS request_id,
|
T1.id AS request_id,
|
||||||
T1.id || '-3' AS unique_key,
|
T1.id || '-3' AS unique_key,
|
||||||
'' AS prescription_no,
|
'' AS prescription_no,
|
||||||
@@ -558,7 +558,7 @@
|
|||||||
null AS skin_test_flag,
|
null AS skin_test_flag,
|
||||||
null AS inject_flag,
|
null AS inject_flag,
|
||||||
null AS group_id,
|
null AS group_id,
|
||||||
COALESCE(T2.NAME, CASE WHEN T1.content_json IS NOT NULL AND T1.content_json != '' THEN T1.content_json::json->>'adviceName' ELSE NULL END) AS advice_name,
|
COALESCE(T2.NAME, T1.content_json::jsonb->>'surgeryName', T1.content_json::jsonb->>'adviceName') AS advice_name,
|
||||||
'' AS volume,
|
'' AS volume,
|
||||||
'' AS lot_number,
|
'' AS lot_number,
|
||||||
T1.quantity AS quantity,
|
T1.quantity AS quantity,
|
||||||
|
|||||||
Reference in New Issue
Block a user