Clinical data integration contracts
On synthetic clinical feeds, quarantining consent withdrawals with a prefixed patient number kept withdrawn patients in the figures for 631 member-months, against 15 with no fault.
Main limitation Synthetic feeds, no clinical validity claim: one fault from an author told the kinds of break the checks cover, mean of five runs (with no consent gate, all of them count); outcome labels, blind faults' scored metrics and leaving out one that changed no record (5 of 10 caught counting it) were set after the results. With all twelve declared faults at assumed shares, schema-only contracts did no better than none, and semantic ones, a self-test, left LDL control up to 0.6 points off in months published as final.
A health data platform joins clinical messages, lab results, home device readings, enrollment files and claims about the same people, then publishes monthly figures. Each feed can break in ways that still look like valid data. I built a synthetic population where the truth of every record is known, broke the feeds on a declared schedule, and ran the same metrics behind three kinds of contract: none, schema checks, and checks on meaning. Then an independent author who never saw the checks wrote ten more faults.
Worst monthly error with schema-only contracts, all faults at once, base case (assumed shares)
40.3 and 42.4 points
LDL control and adherence; follow-up 10.9 points. Schema-only contracts flagged none of the 9 faults written blind | The same with semantic contracts, months published as final
0.4 and 0.0 points
LDL control and adherence, with 6.2 of 10 LDL months and 5.2 of 10 follow-up months held. A self-test: the checks were written for these faults. Follow-up stayed 6.9 points off; the member count 177 off, against 109 with no contract, where two errors cancel | Faults written blind that semantic contracts caught
5 of 9
2 enrollment faults missed; one flagged, but its quarantine let consent withdrawals through. A tenth changed no record | LDL months held with no fault at all
1.6 of 10
(2.0 of 40 metric-months): the cost of the semantic checks, 0 to 5 false holds per run |
In plain words
A care organisation that also runs a health plan receives records about the same people from many places: its hospitals' admission and discharge messages, lab results, readings from home blood pressure cuffs, enrollment files and claims from outside doctors. It joins them and publishes monthly figures that drive care programs and payments. A feed rarely stops; it changes. A lab switches units, an interface drops a leading zero, a clinic registers a patient twice, a clearinghouse falls behind. Every record still parses, and the monthly figure moves.
The question: which checks between landing and the metric keep identity, clinical meaning, time, provenance and consent intact, and what does each failure do to the figures if nothing catches it? The data is synthetic so that the truth of every record is known and no patient data is shared; it stands in for any organisation that joins clinical and claims data.
The answer. Format checks are necessary and catch almost nothing that moves a metric: every fault here that did damage was well formed. Checks on meaning fix most of the damage they were written for, but two of them did harm through their own action, and faults that only touch enrollment got past every check. Write the meaning checks, decide what each one does when it fires, and reconcile enrollment against a second source.
- Contract
- A written, machine-checked rule about what a feed must deliver: here, the checks run between the moment a record lands and the moment a metric reads it.
- Schema check
- Is the record well formed: required fields present, dates and numbers valid, codes in their lists. Here schema means structure only; a real profile validation that ties units to codes would catch the labelled unit change, which this study counts as a semantic check.
- Semantic check
- Does the record mean what the metric assumes: the right patient, the right unit, the right test, a possible time, the person's consent.
- Held
- A month published with a flag ("this figure is not final") instead of as final.
- Published as final
- A month no check held. Its error is the one a reader meets without warning.
- MRN
- Medical record number: the hospital system's patient identifier. The plan has its own member id.
- Base case
- Every fault at its declared share of records. The shares are assumptions.
How far the rates drift with all twelve faults at once
All twelve declared faults ran together on each of five synthetic years. For each rate, the dot is the worst monthly error with schema-only contracts, the ring the worst month with semantic contracts, and the diamond the worst month semantic contracts published as final. Errors are against the generator's own truth, so there is no sampling interval; the range in the table is the spread across the five runs.
- Schema only (no contract is within a tenth of a point)
- Semantic, any month
- Semantic, published as final
| Metric | No contract | Schema only | Semantic, any month | Semantic, published as final | Months held |
|---|---|---|---|---|---|
| LDL control rate (points) | 40.3 (39.6 to 40.9) | 40.3 (39.5 to 40.9) | 1.7 (1.0 to 2.9) | 0.4 (0.3 to 0.6) | 6.2 |
| 30-day follow-up rate (points) | 10.9 (7.7 to 16.2) | 10.9 (7.7 to 16.2) | 12.7 (7.8 to 16.5) | 6.9 (1.1 to 11.8) | 5.2 |
| Monitoring adherence (points) | 42.4 (37.7 to 46.9) | 42.4 (37.7 to 46.9) | 42.5 (37.6 to 47.2) | 0.0 (0.0 to 0.0) | 1.0 |
| Active enrolled members (members) | 109 (81 to 127) | 109 (81 to 127) | 177 (166 to 188) | 177 (166 to 188) | 0.0 |
The member count is in members: of about 9,600 members, semantic contracts were further off than no contract (177 against 109). That is two errors cancelling in the arms without a consent gate: they count people who withdrew consent (with no fault at all they were up to 285 members off, against 14 with the gate), while the lost reinstatements push the count down. The semantic arm removes the first and is left with the second. Truth leaves out people who withdrew consent, so the 285-member error with no contract and no fault comes from that definition.
Each declared fault alone
Each fault ran alone, at its base share, on five synthetic years. The table shows the fault's own part of the error (the error with the fault minus the error without it) on the metric it moves most, and which check flagged it. These catches are a self-test: I wrote each check knowing the fault it was meant for, and several are true by construction, such as the consent gate removing withdrawn people's rows or a unit conversion undoing a unit the record declares.
| Fault | Month | Metric | No contract | Schema | Semantic, final | Held | Flagged by | Written for it | Semantic outcome |
|---|---|---|---|---|---|---|---|---|---|
| MRN reformatted | 5 | LDL control (points) | 1.5 | 1.5 | 0.0 | 0.0 | Identifier format | Identifier format | Caught |
| Member id lost | 6 | Follow-up (points) | 1.1 | 1.1 | 0.5 | 0.0 | Identity matching | Identity matching | Caught |
| Duplicate MRN | 4 | Follow-up (points) | 5.3 | 5.3 | 0.0 | 0.0 | Identity matching | Identity matching | Caught |
| Unit change, labelled | 7 | LDL control (points) | 22.8 | 22.8 | 0.0 | 0.0 | Units and ranges | Units and ranges | Caught |
| Unit change, unlabelled | 9 | LDL control (points) | 8.0 | 8.0 | 0.5 | 0.0 | Units and ranges | Units and ranges | Caught |
| Wrong concept | 8 | LDL control (points) | 9.7 | 9.7 | 0.1 | 4.4 | Units and ranges, Distribution drift | Distribution drift | Caught |
| Time zone | 8 | Follow-up (points) | 0.0 | 0.0 | 6.4 | 4.8 | Event time against arrival, Completeness | Event time against arrival | Flagged, but the check's own action moved the metric |
| Claims backlog | 10 | Follow-up (points) | 7.5 | 7.5 | 1.5 | 1.0 | Completeness | Completeness | Caught |
| Device gap | 6 | Adherence (points) | 41.8 | 41.8 | 0.0 | 1.0 | Completeness | Completeness | Caught |
| Reinstatements lost | 3 | Members (members) | 189 | 189 | 184 | 0.0 | Nothing | Enrollment against claims | Missed |
| Consent ignored | 2 | Adherence (points) | 2.9 | 2.9 | 0.0 | 0.0 | Consent gate | Consent gate | Caught |
| Malformed values | 4 | LDL control (points) | 0.0 | 0.5 | 0.5 | 0.2 | Completeness, Schema | Schema | Flagged; under half a point moved |
Month: the month the fault starts. Held: months the semantic checks held because of the fault, beyond those held with no fault. Points for the rates; members for the member count. Flagged by lists every check that raised a quarantine, a fix, a hold or a review on a record or source and month the fault touched, in every run. The malformed values and the time zone moved no metric with no contract at all, so the semantic error there is the checks' own doing.
Faults written blind
An independent author who never saw the checks, the declared faults or the design wrote ten faults from a description of the feeds, the four metrics and fourteen sample records from another synthetic year. The faults ran once each on the same five years, with no change to any check. The author's own words say what each one breaks. The instructions named the kinds of break to vary (identity, value meaning, time, completeness, coverage, consent), the same families the checks cover.
| Fault | What its author says breaks | Metric | No contract | Semantic, final | Flagged by | Semantic outcome |
|---|---|---|---|---|---|---|
| Analyzer unit upgrade | One site's analyzer changes cholesterol numbers to mmol/L for five months, while its HL7 interface continues labeling them mg/dL. | LDL control (points) | 20.5 | 0.0 | Units and ranges, Completeness | Caught |
| Numeric gateway MRNs | A six-month gateway rollout stores MRNs numerically for a persistent 35% cohort, removing leading zeroes from their Observation identifiers. | Adherence (points) | 28.9 | 0.0 | Identifier format | Caught |
| Gateway buffer outage | For three months, readings from the 8th through the 17th remain in a gateway buffer until five days into the following month. | Adherence (points) | 48.5 | 0.0 | Completeness | Caught |
| Missing termination partition | An enrollment export splits terminations into another file partition. The receiver misses 70% of termination interchanges for five months. | Members (members) | 286 | 280 | Nothing | Missed |
| Month end termination dates | A six-month export configuration rounds every termination end date to the final calendar day of its original month. | Members (members) | 46 | 45 | Nothing | Missed |
| Claims date mapping | During a four-month clearinghouse migration, 80% of claims carry their transmission date in DTP*472 instead of their service date. | Follow-up (points) | 11.2 | 0.8 | Event time against arrival, Completeness, Consent gate | Caught |
| Clinic event upgrade | One site's clinic upgrade sends A08 patient updates for five months where it previously sent A04 outpatient visit notifications. | Follow-up (points) | 0 | 0 | Nothing | Changed no record |
| Portal consent identifiers | For six months, 75% of withdrawal messages use a portal-prefixed MRN while still declaring the original MRN identifier namespace. | Members (members) | 0 | 125 | Identifier format | Flagged, but the check's own action moved the metric |
| Instrument clock configuration | For four months at one site, collection and observation timestamps contain UTC clock digits followed by the original Toronto offset, making draws appear four or five hours later. | LDL control (points) | 0.0 | 0.4 | Event time against arrival | Flagged; under half a point moved |
| Reversed lipid result columns | A vendor mapping edit swaps the LDL and total-cholesterol value columns at one site for three months, retaining their original codes and units. | LDL control (points) | 12.2 | 0.0 | Units and ranges, Distribution drift | Caught |
Semantic contracts caught 5 of the 9 that changed records: Analyzer unit upgrade, Numeric gateway MRNs, Gateway buffer outage, Claims date mapping and Reversed lipid result columns. The two enrollment faults passed every check: a missing file of terminations kept up to 286 members on the books who had left. The portal consent identifiers were flagged, but the flag was a quarantine of the withdrawal itself, so the consent gate never saw it: the semantic arm then counted 631 member-months after a withdrawal, against 15 with no fault. It also moved adherence by 1.2 points (up to 1.7) under semantic contracts. The clinic event change touched no record so it is left out of the count (decided after the results); counted as missed, the result is 5 of 10.
One patient whose lab unit changed
In month 7 the Central lab starts sending LDL cholesterol in mmol/L. The record says so in its unit field but keeps the code for a mass measurement. This is the result line for one synthetic patient whose true LDL was 108 mg/dL:
OBX|1|NM|13457-7^Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation^LN||2.79|mmol/L|<2.59|H|||F|||20220701070200-0400
- No contract and schema only. The record is well formed, so it loads. The metric reads the value in the unit it expects: 2.79 mg/dL, under 100, so the patient counts as controlled.
- Semantic. The units check sees mmol/L under a code whose unit is mass per volume, converts it (2.79 × 38.67 = 107.9 mg/dL) and flags the record. The patient counts as not controlled, as in truth.
- The metric. Every Central result goes the same way, so with no contract the LDL control rate rose by up to 22.8 points; with semantic contracts the fault's own error was 0.0. When the same values arrive still marked mg/dL, only the plausible range catches them (a reading of 3 mg/dL is impossible): with no contract that moved the rate by 8.0 points.
What it means
Schema checks are the floor, not the protection. On all 9 blind faults that changed records, the schema-only arm flagged nothing and left exactly the error of loading everything. On the declared faults it did the same 11 times in 12, which is largely by construction: those faults were written to be well formed. The one fault it flagged, malformed values, moved no metric with no contract, because a lenient load read those values correctly; quarantining them moved the LDL rate by 0.5 points.
Meaning checks pay where a value or a join can be wrong and still valid. Unit and code meaning (the unit changes and total cholesterol sent as LDL: 22.8, 8.0 and 9.7 points with no contract) and identity for joined metrics (duplicate registrations: 5.3 points on follow-up) came back to half a point or less in months published as final. Identity matters most for the metric that joins feeds: the identity faults moved the follow-up rate 3.5 times as far as the LDL rate, which reads one feed.
A check's action needs as much design as the check. The time-zone fault moved no metric on its own. The event-time check quarantined that clinic's messages, and the completeness check held the months it saw, but the quarantine also removed follow-up visits of the month before, which no check held: final follow-up figures were up to 6.4 points off where the fault alone did nothing. That harm belongs to this study's 10-minute event-time rule and its quarantine action, not to event-time checks in general. The blind consent fault is worse: quarantining a withdrawal that fails a format check lets the person's records through. A consent record that fails a check should block the person until it is resolved.
Enrollment faults hide from every check here. Lost reinstatements (189 members), a missing termination file (286) and termination dates rounded to month end (46) passed all three arms. The check of claims against coverage spans only sees members who had a claim, and its line (0.3% of members) sat above what the base share produces; with every reinstatement lost it fired in 4 of 5 runs, holding 1.2 months on average. What would catch them is a count from a second source, such as a monthly full enrollment file or premium billing, reconciled every month.
Late data needs a hold, and holds have a price. The device outage cut adherence by up to 41.8 points and the claims backlog the follow-up rate by 7.5; the completeness check held those months rather than fixing them. With no fault at all the semantic checks still held 2.0 of 40 metric-months a run, all through the completeness check on days when a source sent few records, mostly on the LDL rate. Even with no fault, every arm published the follow-up rate 2.7 to 2.8 points low, because some outside claims arrive after the 45-day publication.
The errors are base-case figures. With no contract, every fault's error grows with its share: the labelled unit change moved the LDL rate 11.8 points at half the records and 22.8 at all of them, the claims backlog 3.4, 7.5 and 15.8 points at a quarter, half and all of a month's claims. The shares are assumptions; the table below gives every fault.
| Fault | Metric | Half | Base case | Double |
|---|---|---|---|---|
| MRN reformatted | LDL control rate | 0.9 (50%) | 1.5 (100%) | the base share is already every record |
| Member id lost | 30-day follow-up rate | 0.5 (50%) | 1.1 (100%) | the base share is already every record |
| Duplicate MRN | 30-day follow-up rate | 2.6 (2%) | 5.3 (4%) | 5.8 (8%) |
| Unit change, labelled | LDL control rate | 11.8 (50%) | 22.8 (100%) | the base share is already every record |
| Unit change, unlabelled | LDL control rate | 4.3 (15%) | 8.0 (30%) | 15.7 (60%) |
| Wrong concept | LDL control rate | 5.1 (50%) | 9.7 (100%) | the base share is already every record |
| Time zone | 30-day follow-up rate | 0.0 (50%) | 0.0 (100%) | the base share is already every record |
| Claims backlog | 30-day follow-up rate | 3.4 (25%) | 7.5 (50%) | 15.8 (100%) |
| Device gap | Monitoring adherence | 15.8 (50%) | 41.8 (100%) | the base share is already every record |
| Reinstatements lost | Active enrolled members | 95 (30%) | 189 (60%) | 319 (100%) |
| Consent ignored | Monitoring adherence | 0.7 (50%) | 2.9 (100%) | the base share is already every record |
| Malformed values | LDL control rate | 0.0 (1.5%) | 0.0 (3%) | 0.0 (6%) |
Predictions, written before any run
- Schema-only contracts leave the same metric error as no contract on every fault except the malformed values. Held: all 11 of them.
- The follow-up rate, which joins clinical, claims and enrollment records, moves at least three times as far under the identity faults as the LDL control rate, which reads one feed. Held: 5.3 points on follow-up against 1.5 on LDL control, 3.5 times as far.
- The consent fault moves no rate by more than half a point, while the arms without a gate use the withdrawn people's records. Not held: 2,201 records arrived after a withdrawal in an average run, and adherence moved by 2.9 points on average (up to 3.7): the withdrawn people's readings made them look adherent (second clause scored on records sent after a withdrawal, chosen after the results).
- The semantic checks flag every declared fault (a check of the code, since they were written for them). Not held: 11 of 12. The missing reinstatements were never flagged: too few of the members they affect had claims to cross the span check's line.
- On the faults written blind, the semantic checks catch a smaller share than on the declared faults. Held: 7 of 9 against 11 of 12 by the design's rule (flagged in every run); 5 of 9 against 9 of 12 with the stricter labels.
- Without provenance, the drift check misses the one-site wrong-concept fault. Not held: the drift check still fired in 1 of 5 runs; final LDL figures were up to 9.3 points off.
What each check is worth
All twelve faults at once again, with one semantic check removed at a time. The largest jumps: without the drift check final LDL figures were 11.5 points off, without provenance (the drift check then sees all sites pooled) 9.3, without the completeness check adherence 42.5 and follow-up 12.7, and without the consent gate the member count included 1,805 member-months after a withdrawal. Removing the event-time check made final follow-up figures better (2.8 points against 6.9): here its quarantine did more harm than the fault it caught.
| Check removed | LDL control (points) | Follow-up (points) | Adherence (points) | Members | Member-months counted after a withdrawal |
|---|---|---|---|---|---|
| None (all checks) | 0.4 | 6.9 | 0.0 | 177 | 17 |
| Identifier format | 1.1 | 6.9 | 0.0 | 177 | 17 |
| Identity matching | 0.4 | 9.6 | 0.0 | 172 | 42 |
| Units and ranges | 0.5 | 6.9 | 0.0 | 177 | 17 |
| Code sets | 0.4 | 6.9 | 0.0 | 177 | 17 |
| Distribution drift | 11.5 | 6.9 | 0.0 | 177 | 17 |
| Event time against arrival | 0.4 | 2.8 | 0.0 | 177 | 17 |
| Completeness | 0.4 | 12.7 | 42.5 | 177 | 17 |
| Enrollment against claims | 0.4 | 6.9 | 0.0 | 177 | 17 |
| Consent gate | 0.4 | 7.1 | 0.5 | 109 | 1,805 |
| Provenance | 9.3 | 10.2 | 0.0 | 177 | 17 |
| Metric | No contract | Schema only | Semantic | Semantic months held |
|---|---|---|---|---|
| LDL control rate (points) | 0.1 | 0.1 | 0.0 | 1.6 |
| 30-day follow-up rate (points) | 2.8 | 2.8 | 2.7 | 0.4 |
| Monitoring adherence (points) | 2.6 | 2.6 | 0.0 | 0.0 |
| Active enrolled members (members) | 285 | 285 | 14 | 0.0 |
How I would run this with a team
- Start from the metrics, not the feeds. List the figures the organisation publishes and, for each, the feeds and joins it reads. Each check earns its place by the metric it protects.
- Give every check an owner and a declared action. The interface or integration engineers own format and identifier checks per feed; clinical informatics owns the code maps and unit tables; the data platform team owns completeness, drift and provenance; the privacy officer owns the consent gate, which fails closed; the analytics lead owns which months are held and how a restatement is announced. For each check, write down whether it fixes, quarantines or holds, and what a quarantine does to the metrics downstream.
- Tie checks to change. Most faults here start at an interface upgrade, a mapping edit or a vendor change. Make a contract review part of every such change, and replay a month of fixtures through the checks before the switch.
- Reconcile what the checks cannot see. Enrollment needs a monthly count from a second source. Late claims need a publication date set from the measured lag, or a restated figure.
- Keep testing the checks. Run the declared faults on every release of the pipeline, and once a quarter ask someone who has not seen the checks to write new ones. Here that found two enrollment faults and a consent failure the checks did not cover.
- Bad news early. A held month goes out on time, with the flag, the cause and the date the final figure is expected, to the people who use it first: care program leads and the finance team.
Limits
- Synthetic people and synthetic feeds. The fixtures follow the public HL7, FHIR and X12 layouts but were not conformance tested, and real feeds carry far more variety.
- No clinical validity claim: the LDL line of 100 mg/dL, the 30-day window and the 16-day adherence line define metrics here, not standards of care.
- The fault shares are assumptions, and every error grows with its fault's share. The declared faults and the checks were written by the same author, so their catches are a self-test; the ten faults written blind are the closer test, and nine of them are a small set. The instructions named the kinds of break to vary (identity, value meaning, time, completeness, coverage, consent), the same families the checks cover.
- The time zone and the code sets are placeholders: one Canadian time zone with US diagnosis codes (ICD-10-CM), and a single procedure code (G0463) on every outside doctor's claim.
- Five synthetic years, one population size. The checks' thresholds (drift, completeness, span and match scores) were set before any run and not tuned; other thresholds move the false holds and the catches.
- The study shows a method. It claims no healthcare employment.
Use this at your company
To test the integration checks behind your own clinical or claims metrics, paste this into an AI assistant along with a description of your feeds and the figures you publish.
This method comes from Diogo Travassos's study "Clinical data integration contracts" (https://diogotravassos.dev/clinical-data-contracts/). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't. Help me decide which integration checks our health data platform needs, by measuring what each failure does to the metrics we publish. Truth: 1. Build a synthetic population with the same shape as ours: identities across our clinical, lab, device, enrollment and claims feeds, units and codes, event and arrival times, coverage spans and consent. Keep the truth for every record. 2. Shape the fixtures after the standards our feeds use, and compute every metric we publish from the truth, as of each publication date. Faults: 3. List the integration failures we have seen or fear: identifier formats, duplicate registrations, unit and code mapping changes, time zones, late and missing files, coverage changes, consent. Give each a start date and a share of records, and say they are assumptions. 4. Ask someone who has not seen our checks to write more faults, and keep their faults apart in the report. Checks: 5. Run the pipeline three ways: load what arrives, schema checks only, and schema plus meaning checks (identity matching, units and ranges, code sets, drift, event against arrival time, completeness, coverage against claims, a consent gate at read time, provenance on every row). 6. For each fault and each way, report whether a check flagged it, the metric error left in months published as final, the months held, and the false holds with no fault. Remove one check at a time to see what each is worth. Report back: which checks matter for which metric, which faults no check sees, where a check's own action (a quarantine) did harm, and how the errors scale with the fault shares. Say which results are true by construction because the check was written for that fault. In your report, say which study you followed and link it: https://diogotravassos.dev/clinical-data-contracts/
Method and checks
Data, standards and licences
Every person and record is generated by the study's code from fixed seeds: 12,000 people over a 12-month year plus two months for late records, three sites (40%, 35% and 25% of people) in one time zone. 85% are plan members at the start; each month 1.2% of members terminate, and 30% of terminations are later reversed by a back-dated reinstatement. The enrollment file's demographics differ from the clinical system's for 7% of people (nicknames, typos, surname changes, swapped day and month), and 0.5% have a twin. 35% are in lipid monitoring, 1% are admitted each month, 3% use a home blood pressure cuff, and 3% withdraw consent for analytics during the year. Claims arrive with a median lag of 12 days.
The feeds are HL7 version 2 messages (admission, discharge, outpatient visit and registration; lab results), FHIR R4 Observation and Consent resources as JSON, and X12 834 (enrollment) and 837P (professional claims) segment layouts, written from their public descriptions. HL7 and FHIR are trademarks of Health Level Seven International. This study is not affiliated with or endorsed by HL7. The 834 and 837P files imitate publicly described X12 segment layouts; they were not checked against any X12 implementation guide and claim no conformance.
Lab and device results carry LOINC codes: 13457-7 Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation; 18262-6 Cholesterol in LDL [Mass/volume] in Serum or Plasma by Direct assay; 22748-8 Cholesterol in LDL [Moles/volume] in Serum or Plasma; 2093-3 Cholesterol [Mass/volume] in Serum or Plasma; 8480-6 Systolic blood pressure. This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc. Claims carry ICD-10-CM diagnosis codes. Notice.
Metrics and publication
- LDL control rate: of people with an LDL result drawn in the month, the share whose last result is under 100 mg/dL; published 7 days after month end.
- 30-day follow-up rate: of inpatient discharges of active members in the month, the share followed by an outpatient visit within 30 days, in-system or on an outside claim; published 45 days after month end.
- Active enrolled members: members with an active coverage span on the 15th; published 7 days after month end.
- Monitoring adherence: of people in home monitoring, the share with readings on 16 or more days; published 3 days after month end.
- Each month's figure is computed once, from what had arrived by its publication time, for months 3 to 12. Truth comes from the generator and leaves out people who had withdrawn consent by then.
The checks
- No contract: lenient parsing (digits pulled out of a value, a missing unit read as mg/dL), joins on the raw identifier, exact match on name and date of birth where no identifier is shared.
- Schema: required segments and fields, valid timestamps and dates (a FHIR time needs an offset), numeric values, units present, fields in their tables. A failing record is quarantined.
- Semantic, on top of schema: identifier formats (an unpadded MRN is padded); identity matching on names, date of birth, sex and postal code (link at 8.0 of 11.5, review from 5.5); units against each code's unit, converted and flagged, with plausible ranges (LDL 15 to 400 mg/dL); code sets; drift of each source's monthly median over 12% against the 3 months before, with at least 30 results; events stamped more than 10 minutes after arrival quarantined; completeness, a day under 30% of the trailing 28-day median, or claims under 85% of the three months before, holds the month; claims outside every coverage span above 0.3% of members hold the member count; a consent gate at read time; provenance on every row.
- The completeness check counts the records that passed the other checks, so a mass quarantine shows as a gap. The drift and completeness references leave out months and days already held.
Design, set before any run
The design, the fault schedule, the checks' thresholds and six predictions were committed before any code ran. The code was written and checked on a development year that is not one of the five study years. The independent author's instructions and samples were committed before the author ran, and its faults before any study year ran. The author worked once, from those inputs only.
A fault counts as flagged when a check raises a quarantine, fix, hold or review in the fault's run that it did not raise in the same year without the fault, on a record the fault touched or on a source and month it touched. The outcome labels (caught, flagged with error left, flagged but the check's own action moved the metric, flagged with under half a point moved, missed) were defined after the results; the numbers behind every label are in the tables. Caught means flagged in every run with a final error of at most the larger of half a point and half the no-contract error. A metric counts as moved at 0.5 points on a rate or 0.5% of members. For the blind faults, the metric is the one each author named in their expected effect; that map was also set after the results.
Added after the development runs, before any study year: registration messages so every patient is in the master index, and bookkeeping flags for the rows the consent gate keeps out.
README with the reproduction stepsComplete resultsDesign, as committed before any code ranWhat the blind author sawThe blind faults (Python)The checks (Python)