##10853 Medication Interactions → Careplans
Moves Report Medication Interactions to Physician under the Dashboard
Careplans header (after VBP Alerts) and sets
emp_permissions = r_PN_QA.
Lookup DB only. Safe to re-run. Does not change agency databases.
UPDATE Dashboard
SET Header = {Careplans Header},
Block_ID = {Careplans Block_ID},
Order_ID = {VBP Alerts Order_ID + 1},
emp_permissions = 'r_PN_QA',
cron_header = 'medication interactions physician'
WHERE Status = 0
AND (Description LIKE '%Medication Interaction%'
OR Link LIKE '%medication_interactions_physician%');
Migration Progress
SELECT Block_ID, Header, Order_ID, Description
FROM #Request.prefix_db_lookup#.Dashboard
WHERE Status = 0
AND (
cron_header IN ('vbp alerts', 'vbp_alerts')
OR Description LIKE '%VBP Alert%'
OR Header LIKE '%Careplan%'
)
ORDER BY
CASE
WHEN cron_header IN ('vbp alerts', 'vbp_alerts') OR Description LIKE '%VBP Alert%' THEN 0
WHEN Header LIKE '%Careplan%' THEN 1
ELSE 2
END,
Order_ID,
ID
LIMIT 1
SELECT ID, Block_ID, Header, Order_ID, emp_permissions, cron_header, Description, Link
FROM #Request.prefix_db_lookup#.Dashboard
WHERE Status = 0
AND (
Description =
OR Link LIKE
OR cron_header =
)
ORDER BY ID
LIMIT 1
UPDATE #Request.prefix_db_lookup#.Dashboard
SET
Block_ID = ,
Header = ,
Order_ID = ,
Description = ,
Link = ,
cron_header = ,
emp_permissions =
WHERE ID =
Dashboard — updated ID #checkDash.ID# →
Header="#HTMLEditFormat(headerTxt)#", Block_ID=#blockId#,
Order_ID=#orderId#, emp_permissions=#dashPerm#
UPDATE #Request.prefix_db_lookup#.Dashboard
SET
Block_ID = ,
Header = ,
Order_ID = ,
Description = ,
Link = ,
cron_header =
WHERE ID =
Dashboard — updated ID #checkDash.ID# without emp_permissions
(#HTMLEditFormat(cfcatch.message)#). Display falls back under Careplans.
Dashboard — #HTMLEditFormat(cfcatch.message)#
INSERT INTO #Request.prefix_db_lookup#.Dashboard
(Block_ID, Header, Order_ID, Description, Link, cron_header, emp_permissions, Status)
VALUES (
,
,
,
,
,
,
,
0
)
Dashboard — inserted under "#HTMLEditFormat(headerTxt)#" with #dashPerm#
INSERT INTO #Request.prefix_db_lookup#.Dashboard
(Block_ID, Header, Order_ID, Description, Link, cron_header, Status)
VALUES (
,
,
,
,
,
,
0
)
Dashboard — inserted under Careplans without emp_permissions
(#HTMLEditFormat(cfcatch.message)#).
Dashboard — #HTMLEditFormat(cfcatch.message)#
Fatal — #HTMLEditFormat(cfcatch.message)#