Gaps in care reports with HAPI FHIR

Care gap reports list patients who are missing a recommended measure action. On HAPI FHIR, the report depends on the measure logic, the patient data it evaluates and how often it runs.

On this page

What care gap reports on HAPI FHIR answer and when teams need them

A care gap report on HAPI FHIR answers one question for a defined population: which patients have a measure requirement that is still open, and what data would close it. Payer and provider teams need this list on a regular cycle, because quality programs, value-based contracts and outreach teams act on it for exchange with each other. The report is produced by running measure logic against stored clinical and coverage data, then writing out the patients who fall short. Teams need it when they must send the same list repeatedly, on a schedule, to a defined recipient, and when doing that by hand from EHR extracts no longer keeps pace with the reporting period.

A care gap report is best understood as a scheduled output, not a product feature. It consumes three things: the measure definitions, the FHIR data those measures read, and a run schedule with a destination. The HAPI FHIR JPA server stores the resources and exposes the search and operation endpoints, while the care gap logic itself, meaning which measures apply, which populations they target, which exclusions count and how gaps are labeled, must be designed and confirmed by your clinical quality and data teams. The supplied HAPI FHIR facts cover the JPA server, its security building blocks and partitioning. They do not establish how a given measure set maps to care gap output, so treat that mapping as a design deliverable to validate against your own measure specifications before any list leaves your organization.

Consumers differ by side. A payer quality team usually wants member-level gaps across an attributed population, while a provider outreach team wants gaps for its own patients, often in worklists. Both need the report to be reproducible, so the same inputs produce the same list for an audit or a dispute. Confirm early which recipient gets which population, how often the run happens, and who approves a report before it is sent. Because each run exposes patient data, the schedule, the account the job runs under and the audit trail of each output should be settled with your security and privacy owners before the first run.

How a scheduled care gap run moves from measure to exchange

A scheduler starts each run, and the run loads the measure and its Library from the HAPI FHIR JPA server, which is the operator-controlled component. The evaluation reads patient data from the database behind that server, then writes a report artifact. The report crosses a trust boundary through an exchange gateway to the payer or provider system. Check that access control and audit logging sit on every hop into and out of the server, and that the exchange gateway is the only path leaving your environment.

Scheduled care gap run from measure evaluation to external exchange, with control points marked.

Report scope and delivery options and when each fits

This table compares the main choices for scoping and delivering care gap reports from HAPI FHIR, with the fit, server and data cost, and what the operator must build around each option. Read each row against your receiving team's workflow, then decide the combination that matches your measures and data volumes.

OptionBest fitCost and load to expectWhat to build around it
Population-level reportQuality or submission teams that need counts and rates across a plan or panelOne large evaluation per measure period, with load concentrated in the run window and heavy use of stored clinical dataRun history, a measure period parameter, reconciliation of counts against a reference build before release
Patient-level reportOutreach teams that need a named list of members with open gaps to contactReturns individual detail, so more result rows and more personal data leaving the server in each filePatient identifiers handled as protected data, access limits on the list, a suppression rule for members already closed
On-demand runAd hoc questions, measure troubleshooting and a clinician checking one patient before a visitLoad arrives at unpredictable times and can compete with clinical reads on the same serverRate limits or a queue for requests, a clear owner who can start a run, logging of who ran what and when
Scheduled runDaily outreach lists, weekly operational reports and periodic payer exchangePredictable load in a set window, but failed runs can go unnoticed if no one watches the scheduleJob monitoring and alerts, retry rules, a documented calendar aligned with the receiving team's cutoffs
Output stored on the serverResults the server must serve back through the API for later lookup or auditStored reports grow over time and add database storage and backup scopeRetention periods, a naming and versioning scheme, access control on report resources, backup coverage
Output exported to the receiving systemPayer or provider systems that ingest files on their own schedule and keep their own copyExport generation adds transfer and handling work, and copies outside the server widen the data footprintAgreed file format, transport security, checksums, a record of each transfer and a delete or retention rule at the receiver
Measure-by-measure reportTeams validating one measure at a time or tracking a measure changeSimple to verify, but many runs multiply load and repeat the same data readsConsistent naming, a list of measures in each release, a comparison step to catch differences between measures
Combined reportConsolidated submissions or a single operational view across several measuresFewer delivery steps, but one failure can hold back the whole package and larger outputs are harder to reviewPer-measure status inside the combined output, a fallback that sends completed measures when one fails, review sign-off before release

Decisions that shape a care gap report before any build starts

A care gap report is only as defensible as the decisions behind it: which measures count, which data feeds them, and what a gap is allowed to mean. Settle these with the people who will act on the report and answer for it, before anyone configures a Library or schedules a job.

Measures and versions in scope

Fix the list of measures, their published versions and the reporting period each one uses before the build starts. A measure updated mid-cycle can change which patients appear as open gaps, so a report produced in one month may not be comparable with the next. Confirm with the payer or quality program which measure versions they accept for exchange. Quality leadership and the measure owner should sign off on this list.

Data sources and patient matching

List every system that holds data the measures need, such as EHR encounters, labs, immunizations and claims, and decide how patients are matched across them. Without a matching rule, one patient can appear as several people and show gaps that were already closed elsewhere. Record which identifiers are trusted and who resolves duplicates. The HIM or data governance lead and the interoperability team should approve the matching approach.

Report cadence and recipients

Decide how often reports run, which population each recipient receives, and whether the output is a snapshot or a rolling view. A monthly run that goes to a care manager and a quarterly run that goes to a payer answer different questions and carry different disclosure obligations. Write the schedule and the distribution list into the operating agreement. The business owner for each recipient group should sign off.

What a gap means for each receiver

Define what counts as an open gap for each audience, including the exclusions, the look-back window and how a documented exception is recorded. A gap that means 'no test on file' to a care team may mean 'not eligible' to a payer. Agree the definitions in writing so that clinical staff do not reclassify patients differently from the report. The clinical quality lead and the privacy officer should sign off.

Approval of measure logic changes

Set a change control path for CQL libraries, value sets and report parameters, with a named approver, a test baseline and a record of each version in use. Unreviewed edits to logic can silently shift results between runs, which undermines both the clinical team and any external exchange. Keep changes in version control and require a test run against a known patient set before promotion. The measure owner and the platform owner should approve each change.

Where report artifacts are retained

Decide where generated MeasureReports, input bundles and distribution copies are stored, for how long, and who can read them. Reports contain patient-level results, so an unmanaged export folder becomes a privacy exposure. Check your retention rule against records policy and be ready to reproduce an earlier report on request. The records manager and the information security lead should approve the retention and access settings.

Setting up a care gap report on HAPI FHIR, step by step

This sequence takes a HAPI FHIR JPA server from first deployment to a scheduled care gap report that has been checked against known answers, audited and access-tested before any data leaves your environment. Each step ends with a check so that a gap in the result is traced to a specific stage.

  1. Deploy the JPA server in a non-production environment

    The platform team deploys the HAPI FHIR JPA server starter in a non-production environment, using the deployment method your team already supports. Confirm the Java version for the release you choose before you build, because HAPI FHIR 8.2.0 requires JDK 17 and later releases may change that requirement. For production work, plan a PostgreSQL or Microsoft SQL Server database rather than the embedded H2 default. Done means the server answers a capability statement request and its FHIR version matches the measure content you plan to load.

  2. Load measure and Library resources

    The measure team loads the Measure, Library and value set resources that define the quality measures, along with the CQL source they reference, into the non-production server. Confirm the exact operations and parameters for loading and evaluating against the HAPI FHIR version in use, since these can differ between releases. Check that each Library compiles without errors and that every value set referenced by the CQL is present on the server. Done means each measure resolves to a compiled Library with no missing value set references.

  3. Load a controlled test patient set

    The clinical informatics team loads a small, controlled set of synthetic patients whose expected measure outcomes are written down before the run. Each patient is designed to be in the denominator or numerator, or to produce a gap, for specific measures, so every expected result is known in advance. Keep the expected values in a version-controlled file that the test team owns. Done means the expected results file lists every patient and measure pair, and the data loads without validation failures on the server.

  4. Run evaluation and compare against expected values

    The measure team runs the population evaluation for each measure against the test patient set and compares the results with the expected values file. Any mismatch is traced back to the CQL logic, the value set content, the test data or the evaluation parameters before anything else moves forward. Repeat the run until every patient and measure pair matches, and record the server version, Library versions and value set versions used. Done means the comparison shows zero unexplained differences and the run is saved as the baseline for later regression checks.

  5. Add the scheduler and report output location

    The platform team configures the job that runs the evaluation on a schedule, and sets the location where the report output is written, with access limited to the people and systems that need it. Set the report run parameters, including the measurement period and the population, from a reviewed configuration rather than from ad hoc input. Test a manual run first, then confirm the scheduled run produces the same output as the manual run on the same inputs. Done means the scheduled job completes, the output lands in the designated location and the output matches the baseline.

  6. Verify audit records and access controls

    The security team confirms that every evaluation, data load and report read is recorded in the audit log, and that the audit records identify the actor and the resources touched. Test access with accounts from each role, confirming that users without a clinical or reporting role cannot read patient-level data or report output. HAPI FHIR provides building blocks such as the AuthorizationInterceptor and BALP audit logging, but the operator must configure and test them, so review each control against your own policy. Done means the audit trail and the access tests are documented and signed off.

  7. Approve the setup before production exchange

    Before any care gap report is shared with a payer or provider, the responsible owners review the test results, scheduler configuration, audit evidence and access tests together in one sign-off. Repeat the baseline comparison against the production server after the production configuration is in place, because connection settings and data volumes can change results. Confirm with the exchange partner which report format, transport and recipient list they expect, and confirm those details in writing. Done means the sign-off record names the approvers, the baseline run ID and the production verification result.

What payers and providers each need from the exchange

Payers typically consume care gap results to plan outreach, manage quality programs and reconcile submitted data. Their requirements usually define which measures are in scope, which measure version and reporting period apply, and how each gap is identified so that it can be matched to a member record. The exact format and identifiers are set by the payer's own program rules and data intake agreements, not by the server, so they should be written down as a specification the report must meet.

  • Report format: the structure, file or resource type and field set the payer expects, including whether results come back as FHIR resources or as an agreed flat file.
  • Identifiers: which member and patient identifiers are used for matching, and which system URIs they come from.
  • Measure version and run date: the measure version, the reporting period and the date the calculation ran, so results can be compared across runs.
  • Returned confirmations: whether the payer sends back acknowledgments, rejected records or matched and unmatched counts that the provider must reconcile.
  • Dispute window: how long a provider has to contest a gap, and what evidence the payer accepts for a closed gap.

Confirm the report specification, identifier rules and dispute window in writing with each payer before the first run, because these set the shape of every report the operator builds.

Protecting patient data in care gap runs and reports

HAPI FHIR does not ship a single security layer for care gap runs. The project provides building blocks: authentication interceptors, the AuthorizationInterceptor, consent and search narrowing interceptors, CORS support and BALP audit logging. Your team assembles these into a design that matches your patient data obligations, and the scheduled report job becomes one more client that must pass through them. Treat the run as a clinical data access path from the start, not as an internal batch task that sits outside your access model.

The main risk sits in the service identity. Scheduled runs often authenticate as one account with broad read access so the measure engine can reach every patient, Encounter, Condition and Observation it touches. Scope that identity to the measure's data needs: list the resource types and search parameters each measure's Library reads, then write authorization rules that allow only those reads for that identity. Use the AuthorizationInterceptor for resource-level rules and the search narrowing interceptors to limit which patients a run can see, such as a population defined by payer or organization. Confirm how your chosen authentication interceptor issues and rotates the run's credentials, and who can change them.

Every run should leave an audit trail that answers who ran which measure, against which data window, with which Library version and parameters, and where the output went. BALP audit logging records FHIR access events at the server, so enable it and confirm that it captures the run's identity and resource reads. Store report artifacts, such as MeasureReport resources and exported files, encrypted at rest and under a defined retention period set by your compliance team, and make sure deletion of expired copies is also logged. For exports, send the minimum necessary data: a payer or provider usually needs member identifiers, gap status and measure version, not full clinical records. Controls you must add around the server include network restriction, TLS for every hop, secret storage for credentials, and documented review of who can run or download reports. Confirm each of these with your security and privacy teams before the first scheduled run.

Limits to confirm in your environment before committing

A care gap report is only as reliable as the release, data and schedule behind it. The items below are the points where a plan can look sound on paper and still fail in your environment, so each one needs an answer from a named owner before you commit.

Release and CQL support

Confirm that the HAPI FHIR release you plan to run supports the CQL version, FHIR version and $evaluate-measure operations that your measure logic needs. Ask the measure owner which CQL and quality measure framework versions the measures were authored against, and ask the HAPI FHIR maintainers or the release notes which of those features the chosen release covers. Test the exact release on a copy of your measures before you fix a version.

HAPI FHIR versions

Partition design for payer and region data

If you separate members by payer contract, region or tenant, confirm how partitions map to your data sources and whether reports can span partitions. Ask your data owners which populations must never appear in another partition's report, and ask the platform team how partition selection is enforced on each request. Partitioning is a design decision that is hard to reverse once data is loaded, so settle it before the first load.

Patient matching and split records

Duplicate or split patients produce gaps that are false positives (a service was done under another record) or false negatives (a patient is counted in one record but not the other). Ask your master data or identity team how patient matching is performed, who reviews uncertain matches, and whether the matching module will be used. Agree the rule for how a merged or unmerged patient changes the denominator in a report before you run one.

Scheduler hosting and monitoring

Scheduled report runs depend on a job runner outside the measure engine, and a missed or silent failure means a stale report reaches a payer or provider. Ask your platform team which system will trigger runs, where its credentials live, and who receives an alert when a run fails or finishes late. Confirm that a report carries the date and data cut it was built from, so a reader can tell whether it is current.

Database sizing and run load

Population-level evaluation reads large volumes of resources and can slow live clinical queries if it shares the same database and server. Ask your database owner to size storage and connections for the expected patient count and to confirm whether runs can use a separate server or read capacity. Measure the load of a full population run in a test environment and set a window for large runs that does not overlap clinical use.

Testing measure updates against reference results

Each measure update can change which patients fall into a denominator or numerator, so a logic change can alter reported gaps without any error. Ask your quality team for a reference set of patients with expected results, and ask the measure publisher or reference implementation which results you should compare against. Keep the reference results under version control and require a comparison before any updated measure goes into a scheduled run.

Questions buyers ask before hiring help with care gap reports

What drives the cost of a care gap report build?

Cost follows the written scope, and the main drivers are the number of measures, the number of data sources the measures read from, the number of receivers, how deep validation goes, and how many exchange formats the reports must support. Each measure adds logic to confirm, test data to prepare and results to reconcile. Each data source adds access work, mapping and data quality checks. Each receiver adds a format, a delivery route and a partner test. DeployOpen does not publish a price list. A quote follows from the written scope, which should list the measures, sources, receivers, formats and validation steps so both sides can compare like with like. Ask the quote to separate one-time build work from recurring run and update work.

How long does a care gap reporting project take?

The timeline is set mostly by three things: the quality of the source data, how quickly measure owners confirm the intended logic, and how long partner testing takes with each payer or provider that receives the reports. Source data problems, such as missing codes, inconsistent patient identifiers or incomplete encounters, usually take the longest to resolve. Measure confirmation is slow when the measure owner has not yet decided how an edge case should be scored. Partner testing depends on the receiving organization's own test windows. No duration is given here because it depends on those inputs. Ask any provider to state its timeline as dependencies with named owners, not as a single number.

What does the client need to provide for a care gap build?

The work needs several named people and access before it starts:

  • Measure owners who can confirm the intended logic, value sets and exclusions for each measure.
  • Data access to the systems that hold the source data, along with a sample that reflects real coding practice.
  • Test patients, including known-positive and known-negative cases, so results can be checked against expected outcomes.
  • A sign-off owner who accepts the measure logic and the report content before production use.
  • A named exchange contact at each receiving payer or provider who can agree formats, delivery routes and test windows.

If any of these roles is missing, the build usually stalls at the step that needs it. Confirm the names and availability in the scope document.

Can an internal team build care gap reports without a partner?

Yes, an internal team can build care gap reports alone if it already has FHIR, CQL and relational database skills, and if it can staff measure owners and exchange contacts for the duration of the work. The trade-off is time and attention. Internal teams often underestimate validation, the work of matching their logic against reference results, and the operational work of scheduled runs and error handling. A partner brings a repeatable test approach and can take on specific pieces, such as measure logic review or exchange testing, while the internal team keeps ownership of the platform and the data. Assess the team honestly against the skill list before deciding.

What ongoing work follows a care gap report launch?

After launch, recurring work includes updating measures when the published specifications change, keeping the Java runtime and HAPI FHIR versions current, and monitoring scheduled runs. Measure updates need a fresh review of logic and value sets, plus retesting against known cases. Upgrades need a plan for the JDK requirement in each release and for any schema changes, since the target version determines the required Java version. Scheduled run monitoring covers job failures, empty or unexpectedly large result sets, delivery errors and receiver acknowledgements. Ask any provider whether these are included in a retainer or priced separately. DeployOpen offers ongoing support, upgrades and continuous testing as retainers.

Which parts of a care gap build are most often underestimated?

Teams most often underestimate validation and data preparation. Validation means proving the report produces the expected results for known patients, then reconciling any differences with the measure owner and receiving partner. Data preparation covers mapping source codes to the value sets the measure expects, fixing identifier mismatches and handling encounters that arrive late. Scheduling and error handling also take more effort than expected, because a report that fails silently can look like a clean result. Ask for the validation plan, the reconciliation method and the failure alerting approach in the scope before work starts.

Does a self-hosted HAPI FHIR server handle care gap security by default?

No. HAPI FHIR does not provide a single security layer that covers every care gap workflow. It offers building blocks, including authentication interceptors, the AuthorizationInterceptor, consent and search narrowing interceptors, CORS support and BALP audit logging. The operator must decide how report jobs authenticate, which identities can read which patient data, how exported reports are delivered and how access is logged. Confirm each control in your own environment and in the scope, since the controls apply to the server, the job runner and the delivery route alike.

How DeployOpen scopes, builds and supports care gap reports

DeployOpen approaches care gap reporting on HAPI FHIR as a written, fixed-scope engagement inside infrastructure you control. We agree which measures, data sources, report outputs and schedules are in scope, then build, test, document and hand over the server-side pieces so your team can run them.

How we scope

  • Written scope names the measures, patient populations and report recipients for your care gap reports
  • Data inventory maps which FHIR resources the measures need and where they currently come from
  • Scope sets the report schedule, output format and the payer or provider exchange channels involved

How we build

  • Build covers the HAPI FHIR JPA server setup, Library and Measure resource loading, and report generation jobs
  • Testing compares measure results against expected outcomes using test patients agreed with your clinical reviewers
  • Access controls, audit logging and data handling are configured so your security and compliance teams can review them

How we hand over

  • Handover includes configuration records, deployment files and runbooks for the report schedule and failure handling
  • Documentation explains each measure's data dependencies so your team can trace a gap back to source data
  • Knowledge transfer sessions walk your engineers through running, rerunning and changing the reports

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Retainers can cover HAPI FHIR version upgrades and measure updates when your reporting requirements change
  • Confirm with DeployOpen in the quote which support hours, response channels and review cadence apply

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.