Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new markdown documentation page for a Metabase/SQL analytics query that reports completed “doctor visit” questionnaire responses grouped by facility, scoped to patients in a specific organization.
Changes:
- Introduces a new query doc: Total Doctor Visit Count by Facility
- Documents parameters (
organization_id,date) and includes the SQL used to generate the metric - Adds notes about hardcoded questionnaire ID and result ordering
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (3)
Care/Operations/total_doctor_visit_count_by_facility_kc.md:72
- The documentation says
organization_idis required and the query will not run without it, but the only{{organization_id}}predicate is currently commented out. Update the note to reflect the current SQL (or uncomment the predicate if the intention is to require scoping).
- **`organization_id` is required** (no `[[...]]` wrapper) — the query will not run without a value.
Care/Operations/total_doctor_visit_count_by_facility_kc.md:8
- Purpose claims the query is scoped to living patients, but the SQL never joins to a patient table or filters on a "deceased"/"deceased_datetime" field. This makes the documentation inaccurate; either add the living-patient filter in SQL or remove the claim from the Purpose section.
Counts completed responses to the doctor visit questionnaire (`questionnaire_id = 68`) per facility, scoped to living patients within a specified organization.
Care/Operations/total_doctor_visit_count_by_facility_kc.md:65
- The Notes say results are ordered by visit count descending (then facility name for ties), but the SQL orders only by facility name. Update the ORDER BY clause to match the documented behavior (or adjust the note if alphabetical order is intended).
GROUP BY facility_facility.name
ORDER BY facility_facility.name;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.