From 452dc5f42692120646d36dd7ca7ca84746b4f4b7 Mon Sep 17 00:00:00 2001 From: ohsudev Date: Thu, 18 Dec 2025 12:24:27 -0800 Subject: [PATCH 1/3] Modified Surgeries Animal History report section to include staff names remarks information. --- .../encounter_participants_summary.query.xml | 32 +++++++++++++++++++ .../ehr/encounter_participants_summary.sql | 22 +++++++++++++ .../study/encounters/Surgeries.qview.xml | 1 + 3 files changed, 55 insertions(+) create mode 100644 onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml create mode 100644 onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql diff --git a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml new file mode 100644 index 000000000..d532af546 --- /dev/null +++ b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml @@ -0,0 +1,32 @@ + + + + + participants + Encounter Participants + + + false + Encounter Id + true + + study + Clinical Encounters + objectid + + + + Participants + 300 + ALWAYS_OFF + + + Participant Remarks + 300 + ALWAYS_OFF + + +
+
+
+
diff --git a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql new file mode 100644 index 000000000..1ba79d36c --- /dev/null +++ b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2019 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + */ +SELECT + p2.id, + p2.parentid, + p2.taskid, + p2.comment, + GROUP_CONCAT(DISTINCT p2.userrole, '') as participants +FROM ( +SELECT + p.role || ': ' || p.username || chr(10) as userrole, + p.id, + p.parentid, + p.taskid, + p.comment +FROM ehr.encounter_participants p +) p2 + +GROUP BY p2.id, p2.parentid, p2.taskid, p2.comment \ No newline at end of file diff --git a/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml b/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml index e203f41fd..61c231575 100644 --- a/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml +++ b/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml @@ -9,6 +9,7 @@ + From 6a78f52e286663f2408158b924abaf17cd82089b Mon Sep 17 00:00:00 2001 From: ohsudev Date: Thu, 18 Dec 2025 14:20:09 -0800 Subject: [PATCH 2/3] Modified Surgeries Animal History report section to include staff names remarks information. --- .../ehr/encounter_participants_summary.query.xml | 6 +----- .../queries/ehr/encounter_participants_summary.sql | 10 +++++----- .../queries/study/encounters/Surgeries.qview.xml | 1 - 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml index d532af546..4fd6fe1df 100644 --- a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml +++ b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml @@ -20,11 +20,7 @@ 300 ALWAYS_OFF - - Participant Remarks - 300 - ALWAYS_OFF - + diff --git a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql index 1ba79d36c..30caee532 100644 --- a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql +++ b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.sql @@ -7,16 +7,16 @@ SELECT p2.id, p2.parentid, p2.taskid, - p2.comment, GROUP_CONCAT(DISTINCT p2.userrole, '') as participants FROM ( SELECT - p.role || ': ' || p.username || chr(10) as userrole, + p.role || ': ' || p.username || ': ' || p.comment || chr(10) as userrole, p.id, p.parentid, - p.taskid, - p.comment + p.taskid + FROM ehr.encounter_participants p ) p2 -GROUP BY p2.id, p2.parentid, p2.taskid, p2.comment \ No newline at end of file +GROUP BY p2.id, p2.parentid, p2.taskid + diff --git a/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml b/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml index 61c231575..e203f41fd 100644 --- a/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml +++ b/onprc_ehr/resources/queries/study/encounters/Surgeries.qview.xml @@ -9,7 +9,6 @@ - From 883ed56a9064978ce77f652e87b740985b79c24c Mon Sep 17 00:00:00 2001 From: ohsudev Date: Thu, 18 Dec 2025 14:56:39 -0800 Subject: [PATCH 3/3] Modified Surgeries Animal History report section to include staff names remarks information. --- .../queries/ehr/encounter_participants_summary.query.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml index 4fd6fe1df..7fca357ef 100644 --- a/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml +++ b/onprc_ehr/resources/queries/ehr/encounter_participants_summary.query.xml @@ -17,7 +17,7 @@ Participants - 300 + 350 ALWAYS_OFF