Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion onprc_ehr/resources/queries/study/ClinicalCases_Open.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ SELECT
c.mostRecentP2,
c.isActive,
c.assignedvet,
c.mostRecentCeg_Plan
c.mostRecentCeg_Plan,
c.caseNo

FROM study.cases c
WHERE c.isOpen = true AND c.category = 'Clinical'
1 change: 1 addition & 0 deletions onprc_ehr/resources/queries/study/cases/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<column name="date"/>
<column name="reviewdate"/>
<column name="enddate"/>
<column name="caseNo"/>
<column name="allProblemCategories"/>
<column name="Id/demographics/species"/>
<column name="Id/demographics/gender"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<column name="Id/demographics/mostRecentHx"/>
<column name="Id/utilization/use"/>
<column name="date"/>
<column name="caseNo"/>
<column name="allProblemCategories"/>
<column name="Id/curLocation/daysInRoom"/>
<column name="assignedvet/DisplayName">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<column name="date"/>
<column name="reviewdate"/>
<column name="enddate"/>
<column name="caseNo"/>
<column name="allProblemCategories"/>
<column name="assignedvet/DisplayName">
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<!--all since last review-->
<column name="mostRecentRemark"/>
<column name="remark"/>
<column name="caseNo"/>
<column name="allProblemCategories"/>
<column name="lastVetReview"/>
<column name="Id/utilization/use"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<column columnName="AssignmentType">
<url replaceMissing="blankValue">executeQuery.view?schemaName=study&amp;query.queryName=VetAssignment_Filter&amp;query.Id~contains=${Id}</url>
</column>
<column columnName="masterProblems">
<columnTitle>Case Number: Master Problem(s)</columnTitle>
</column>
</columns>
</table>
</tables>
Expand Down
6 changes: 3 additions & 3 deletions onprc_ehr/resources/queries/study/demographicsAssignedVet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ SELECT
f.Id,
f.AssignedVet,
f.AssignmentType,
GROUP_CONCAT(
GROUP_CONCAT(DISTINCT
CASE WHEN f.matchedRule = 0 THEN f.ActiveMasterProblems ELSE NULL END,
', '
) AS MasterProblems,
'; '
) AS masterProblems,
f.Area,
f.Room
FROM vetAssignment_filter f
Expand Down
10 changes: 5 additions & 5 deletions onprc_ehr/resources/queries/study/vetAssignment_demographics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Notes:

WITH CasesData AS (
SELECT Id,
Open_CMU_Cases.AssignedVet.DisplayName AS CaseVet,
Open_CMU_Cases.Date AS CaseDate,
GROUP_CONCAT(ProblemCategories, ';') AS ActiveMasterProblems
FROM Study.ClinicalCases_Open AS Open_CMU_Cases
GROUP BY Open_CMU_Cases.AssignedVet.DisplayName, Id, Open_CMU_Cases.Date
c.AssignedVet.DisplayName AS CaseVet,
c.Date AS CaseDate,
GROUP_CONCAT(CAST(c.caseNo AS VARCHAR) + ': ' + c.ProblemCategories, ';') AS ActiveMasterProblems
FROM Study.ClinicalCases_Open AS c
GROUP BY c.AssignedVet.DisplayName, Id, c.Date
)
SELECT
Demographics.Id,
Expand Down