Skip to content

Add documentation for X-Ray Revenue and Count queries at SSMM#93

Open
sonzsara wants to merge 3 commits into
mainfrom
ENG-181
Open

Add documentation for X-Ray Revenue and Count queries at SSMM#93
sonzsara wants to merge 3 commits into
mainfrom
ENG-181

Conversation

@sonzsara
Copy link
Copy Markdown
Contributor

@sonzsara sonzsara commented May 4, 2026

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 SSMM dashboard documentation pages for X-Ray operational metrics, covering both volume (count) and financial (revenue) queries.

Changes:

  • Added a new query doc for counting X-Ray charge items at SSMM.
  • Added a new query doc for summing X-Ray revenue from charge items linked to issued/balanced invoices at SSMM.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
Care/Encounter/xray_count_ssmm.md New markdown documentation for an X-Ray count query (charge-item based) with parameters and notes.
Care/Accouting/revenue_xray_ssmm.md New markdown documentation for an X-Ray revenue query (invoice-linked) with parameters and notes.

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

Comment thread Care/Encounter/xray_count_ssmm.md
Comment thread Care/Encounter/xray_count_ssmm.md Outdated
Comment thread Care/Encounter/xray_count_ssmm.md
Comment thread Care/Accouting/revenue_xray_ssmm.md
Comment thread Care/Accouting/revenue_xray_ssmm.md Outdated
Comment thread Care/Accouting/revenue_xray_ssmm.md
Comment thread Care/Accouting/revenue_xray_ssmm.md Outdated
COALESCE(SUM(ci.total_price), 0) AS total_revenue
FROM emr_chargeitem ci
JOIN emr_chargeitemdefinition cid ON ci.charge_item_definition_id = cid.id
JOIN emr_resourcecategory rc ON cid.category_id = rc.id
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

join is unnecessary since we aren't using category table specific filters

Comment thread Care/Encounter/xray_count_ssmm.md Outdated
COUNT(ci.id) AS total_tests
FROM emr_chargeitem ci
JOIN emr_chargeitemdefinition cid ON ci.charge_item_definition_id = cid.id
JOIN emr_resourcecategory rc ON cid.category_id = rc.id
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same here.

Copy link
Copy Markdown
Collaborator

@Jacobjeevan Jacobjeevan May 19, 2026

Choose a reason for hiding this comment

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

Also, we currently don't mark chargeitem as deleted 🤔 so unnecessary filter.

@sonzsara sonzsara requested a review from Jacobjeevan May 20, 2026 10:22
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.

3 participants