Skip to content

Add IP/OP/Emergency Encounter Count documentation for SSMM#100

Open
sonzsara wants to merge 1 commit into
mainfrom
ENG-320
Open

Add IP/OP/Emergency Encounter Count documentation for SSMM#100
sonzsara wants to merge 1 commit into
mainfrom
ENG-320

Conversation

@sonzsara
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

Copilot AI left a comment

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 Markdown query documentation page for the SSMM operational dashboard question covering daily month-to-date (through yesterday) IP bed occupancy, OP encounters, and Emergency encounters.

Changes:

  • Added Care/Encounter/ip_op_emer_encounter_count_ssmm.md documenting the dashboard purpose, date window, and SQL query.
  • Implemented SQL CTEs to generate a day series, compute daily occupied beds, and aggregate OP/Emergency volumes.

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

Comment on lines +57 to +61
SELECT
created_date::date AS encounter_date,
COUNT(DISTINCT patient_id) FILTER (WHERE encounter_class = 'amb') AS ambulatory_count,
COUNT(DISTINCT patient_id) FILTER (WHERE encounter_class = 'emer') AS emergency_count
FROM emr_encounter
Comment on lines +89 to +91


`````
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