Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

WebChart ingest never fetches medication orders, referrals or device orders, which all six routed measures read

Open
#713 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start at backend-ts/src/engine/ingress/webchart/webchart-client.ts:72 and check WebChart's FHIR CapabilityStatement for patient searches of MedicationRequest, ServiceRequest, and DeviceRequest. Read docs/WEBCHART_FHIR_MAPPING.md:156 and corpus-bundle.ts, then compare WebChart-shaped fixtures with the corpus paths. Done means served types are profile-stamped, composed, and tests show the affected measure outcomes change accordingly.

Written by the indexing model from the issue text.

Description

backend maui-pilot webchart-convergence

What is wrong

The WebChart ingest composes each patient from five resource types only:

backend-ts/src/engine/ingress/webchart/webchart-client.ts:72

export const COMPOSED_RESOURCE_TYPES = ["Observation", "Condition", "Procedure", "Immunization", "Encounter"] as const;

The six routed measures also read MedicationRequest, ServiceRequest and DeviceRequest. The vendored CQL in .official-content/bundles/measure/* retrieves them here:

Library (included by) Type Value sets Role
Hospice (CMS122, 125, 130, 165, 137) ServiceRequest Hospice Care Ambulatory denominator exclusion
AdvancedIllnessandFrailty (CMS122, 125, 130, 165) MedicationRequest Dementia Medications exclusion (advanced illness, 66+)
AdvancedIllnessandFrailty (CMS122, 125, 130, 165) DeviceRequest Frailty Device exclusion (frailty, 66+)
CMS2FHIRPCSDepScreenAndFollowUp ServiceRequest Referral for Adult / Adolescent Depression numerator (follow-up plan)
CMS2FHIRPCSDepScreenAndFollowUp MedicationRequest Adult / Adolescent Depression Medications numerator (follow-up plan)
CMS137FHIRSUDTxInitEngagement MedicationRequest SUD Long / Short Acting Medication initiation and engagement

Coverage is also retrieved but feeds only the supplemental payer data, not the score.

What it does to the numbers on real data

For these facts, a WebChart-sourced evaluation sees nothing, so:

  • CMS122, 125, 130 and 165. A patient with a hospice order, or (at 66+) a dementia medication or a frailty device order, is not excluded. They stay in the denominator and can show as an open gap they should never have had.
  • CMS2. A positive screen followed up by a referral or an antidepressant counts as no follow-up. The patient shows as a gap although the practice did the work.
  • CMS137. Treatment by medication is invisible to initiation and engagement.

Nothing warns of this. The measures run and report numbers, and those numbers are wrong in one direction.

Why the sandbox does not show it

The synthetic corpus emits these facts: corpus-bundle.ts writes a dementia MedicationRequest (the frailty exclusion) and a PHQ-9 follow-up ServiceRequest (CMS2). So the sandbox exercises paths that live ingest can never feed. The sandbox's exclusion and CMS2 follow-up counts are therefore higher than a WebChart-fed run would produce from the same chart.

What is needed

  1. Check what WebChart serves. Read WebChart's FHIR CapabilityStatement for MedicationRequest, ServiceRequest and DeviceRequest search by patient. If a type is missing there, the fact has to come from the database side instead. The mapping doc already names encounter_orders → ServiceRequest for pending orders (docs/WEBCHART_FHIR_MAPPING.md:156), but it is unimplemented.
  2. Add the types that are served to the composed set, profile-stamped at ingest like the rest. cqf-fhir-cr retrieval is meta.profile-sensitive, so an unstamped resource is silently never retrieved (the #591 trap).
  3. Test it. A WebChart-shaped fixture per path (a hospice order, a dementia medication, a frailty device, a CMS2 referral, a CMS137 medication) proves each moves the outcome the way the corpus version does.

Gating

This does not affect the sandbox. It gates the real-data (PHI) phase, under locked decision §4A.5: no known-unverified measure runs over the pilot's real data. It sits alongside #591 (cms165's blood pressures are not profile-stamped at ingest).

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
4h 20m
Merged PRs (30d)
104

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Taleef7/workwell

All issues in Taleef7/workwell

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.