Skip to content

Add documentation for Internal Supply Delivery Purchase query#94

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

Add documentation for Internal Supply Delivery Purchase query#94
sonzsara wants to merge 2 commits into
mainfrom
ENG-218

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 documentation page for the Metabase query "Internal Supply Delivery Purchase Summary by Location", describing its purpose, parameters, SQL, and notes.

Changes:

  • New documentation file describing the query, parameters (created_date, location), and supplier hardcoding caveat.
  • Includes the full SQL with Metabase optional filter clauses and explanatory notes.

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

Comment thread Care/Inventory/internalsupplydeliverypurchase_ssmm.md Outdated
AND sd.status IN ('completed', 'in_progress')
AND delivery_order.status IN ('completed', 'pending')
AND fl.status = 'active'
--[[AND {{created_date}}]]
FROM emr_supplydelivery sd
JOIN emr_deliveryorder delivery_order ON sd.order_id = delivery_order.id
JOIN emr_facilitylocation fl ON delivery_order.destination_id = fl.id
JOIN emr_organization org ON delivery_order.supplier_id = org.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.

since supplier_id is hardcoded, we can just specify name directly in the query rather than joining to organization.

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