Skip to content

Documentation for community nurse patients linked to a volunteer by facility - #136

Open
sonzsara wants to merge 2 commits into
mainfrom
ENG-767
Open

Documentation for community nurse patients linked to a volunteer by facility#136
sonzsara wants to merge 2 commits into
mainfrom
ENG-767

Conversation

@sonzsara

Copy link
Copy Markdown
Contributor

No description provided.

@sonzsara sonzsara changed the title Documentation for community nurse patients linked to a facility Documentation for community nurse patients linked to a volunteer by facility Jul 24, 2026
@sonzsara
sonzsara requested a review from Copilot July 24, 2026 07:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new query documentation page for reporting the count of community-nurse home-care patients who are also linked to a volunteer, grouped by facility (intended for Metabase use).

Changes:

  • Introduces a new markdown query doc with Purpose, Parameters, SQL, and Notes.
  • Adds SQL logic to (1) scope encounters by geo-organization/facility, (2) filter completed community-nurse questionnaire responses, and (3) intersect patients with active volunteer links.
Comments suppressed due to low confidence (1)

Care/Operations/community_nurse_patients_linked_to_volunteers_kc.md:58

  • This predicate has invalid SQL syntax (IN ()'Community Nurse')). It will fail to run in Postgres/Metabase.
      AND response_element ->> 'question_id' in ('d602b9b2-d4cd-43d7-99d3-3d0169095eba', 'edf6799d-88c4-4f9d-8ced-552dde6ad6af')
      AND response_element -> 'values' -> 0 ->> 'value' IN ()'Community Nurse')
      --[[AND {{date}}]]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Care/Operations/community_nurse_patients_linked_to_volunteers_kc.md
Comment thread Care/Operations/community_nurse_patients_linked_to_volunteers_kc.md
Comment thread Care/Operations/community_nurse_patients_linked_to_volunteers_kc.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

AND emr_questionnaireresponse.status = 'completed'
AND emr_questionnaireresponse.encounter_id IS NOT NULL
AND response_element ->> 'question_id' in ('d602b9b2-d4cd-43d7-99d3-3d0169095eba', 'edf6799d-88c4-4f9d-8ced-552dde6ad6af')
AND response_element -> 'values' -> 0 ->> 'value' IN ()'Community Nurse')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants