Skip to content

Add booked-in, checked-in, fulfilled, and in consultation reports for Arike facility#102

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

Add booked-in, checked-in, fulfilled, and in consultation reports for Arike facility#102
sonzsara wants to merge 1 commit into
mainfrom
ENG-305

Conversation

@sonzsara
Copy link
Copy Markdown
Contributor

No description provided.

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 new Operations query documentation pages for the Arike facility to support operational reporting across key appointment lifecycle states (booked, checked-in, in consultation, fulfilled).

Changes:

  • Added a “Booked-In” (booked status) report for Arike.
  • Added “Checked-In”, “In Consultation”, and “Fulfilled” reports for Arike.
  • Each report includes a SQL query plus intended Metabase parameters/notes for filtering.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 19 comments.

File Description
Care/Operations/booked_in_report_arike.md New Arike booked appointments report (SQL + params/notes).
Care/Operations/checkedin_report_arike.md New Arike checked-in appointments report (SQL + params/notes).
Care/Operations/fulfilled_report_arike.md New Arike fulfilled appointments report (SQL + params/notes).
Care/Operations/inconsultation_report_arike.md New Arike in-consultation appointments report (SQL + params/notes).

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

@@ -0,0 +1,67 @@

# Booked-In Report - Arike
Comment on lines +18 to +21
| Parameter | Type | Description | Example |
|-----------|------|-------------|---------|
| `created_date` | DATE / range | Metabase date filter on the booking (see Notes for which column it binds to) | `'2026-05-25'` |
| `practitioner` | TEXT | Filter by the practitioner's full name (`first_name + last_name`, trimmed) | `'Dr Asha Menon'` |
Comment on lines +48 to +49
--[[AND {{created_date}}]]
--[[AND TRIM(pr.first_name || ' ' || COALESCE(pr.last_name, '')) = {{practitioner}}]]
- **Hardcoded values:**
- `sr.facility_id = 2` — the Arike facility ID. Update if pointing to a different facility.
- `pi.config_id = 2` — the identifier config representing the Arike ADM ID. Update if the config ID changes.
- **Metabase filters** — `[[AND {{created_date}}]]` is a field filter (bind it to the column you want to filter on in the Metabase UI, typically `ts.start_datetime`), and `[[AND TRIM(pr.first_name || ' ' || COALESCE(pr.last_name, '')) = {{practitioner}}]]` filters by the same expression used to render the `practitioner` column so the value matches what users see.
Comment on lines +65 to +67
*Last updated: 2026-05-25*

````
Comment on lines +65 to +67
*Last updated: 2026-05-25*

````
Comment on lines +18 to +21
| Parameter | Type | Description | Example |
|-----------|------|-------------|---------|
| `created_date` | DATE / range | Metabase date filter on the booking (see Notes for which column it binds to) | `'2026-05-25'` |
| `practitioner` | TEXT | Filter by the practitioner's full name (`first_name + last_name`, trimmed) | `'Dr Asha Menon'` |
Comment on lines +48 to +49
--[[AND {{created_date}}]]
--[[AND TRIM(pr.first_name || ' ' || COALESCE(pr.last_name, '')) = {{practitioner}}]]
- **Hardcoded values:**
- `sr.facility_id = 2` — the Arike facility ID. Update if pointing to a different facility.
- `pi.config_id = 2` — the identifier config representing the Arike ADM ID. Update if the config ID changes.
- **Metabase filters** — `[[AND {{created_date}}]]` is a field filter (bind it to the column you want to filter on in the Metabase UI, typically `ts.start_datetime`), and `[[AND TRIM(pr.first_name || ' ' || COALESCE(pr.last_name, '')) = {{practitioner}}]]` filters by the same expression used to render the `practitioner` column so the value matches what users see.
Comment on lines +65 to +67
*Last updated: 2026-05-25*

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