I Connected My Own Health Records. Here's What the Technology Got Right What the Data Got Wrong.
A field report from building an open-source AI health agent, written by the person whose chart it read.
For the past several months I’ve been building HealthClaw an open-source guardrail stack that sits between AI agents and FHIR health data. The premise is simple: your health records are increasingly being consumed by AI, and there should be a layer in between that enforces PHI redaction, audit trails, step-up authorization, and human-in-the-loop review before any model touches clinical data.
I ran HealthClaw against my own records.
This is the report.
The Setup: Three Sources, One Pipeline
Modern health interoperability gives patients three distinct ways to access their own records:
TEFCA / QHIN access the nationwide network. One identity verification (CLEAR or ID.me), and in theory your records flow from every participating health system automatically. I used Fasten Connect as the TEFCA IAS (Individual Access Services). After verification, records arrive over 5–45 minutes.
SMART on FHIR / patient portal OAuth the practice-level API. My primary care physician uses MEDENT, a small-practice EHR common on the US East Coast. MEDENT exposes a standard FHIR R4 API protected by SMART App Launch. I wrote a script that drives the full PKCE authorization dance, caches tokens, and pulls structured data.
Health Bank One an emerging model where patients own a verified record vault. HBO bridges the gap between patient-held data and provider-held data with a verified identity layer.
All three flow into HealthClaw’s guardrail stack, which applies PHI redaction in-process before anything hits storage, emits FHIR AuditEvents for every resource access, and runs the Curatr data-quality pipeline before surfacing anything to an AI agent (in my case, OpenClaw via a Telegram bot named Sally).
The Technical Friction (For the Builders in the Room)
If you build health data integrations, you’ll recognize these.
Problem 1: The SMART token that doesn’t tell you who you are.
MEDENT issues access tokens via their SMART authorization server. The token exchange response per the SMART on FHIR spec should include a patient claim identifying which patient’s records this token unlocks. MEDENT’s doesn’t. The token is valid, it carries the correct patient-level scopes, and the introspection endpoint confirms the patient binding but the initial token response is silent on the subject.
The fix is a single follow-up call to MEDENT’s introspection endpoint using HTTP Basic auth (client ID, no secret PKCE clients don’t have one). The introspect response includes the patient FHIR ID. Without this fallback, every FHIR query returns 401 because the server receives patient-scoped requests with no patient filter and correctly refuses to guess.
This is a MEDENT-specific quirk but represents a broader pattern: spec compliance is partial everywhere. Build for what servers actually do, not what the spec says they must.
Problem 2: The OAuth callback that needs a broker.
Both MEDENT and Health Bank One require a redirect_uri pointing to a publicly accessible HTTPS URL for the authorization callback. Scripts running on a laptop or Mac mini can’t satisfy this. The solution: a callback broker on a public server (Railway, in our case) that receives the redirect, stores the authorization code keyed by OAuth state, and lets the local script poll to pick it up.
The pattern: browser opens auth URL → user authorizes in their patient portal → provider redirects to https://app.healthclaw.io/shc/<provider>/callback → Railway stores the code → Mac mini script polls GET /shc/<provider>/code?state=<state> → script exchanges code for tokens locally.
This is a solved problem, but every new data source requires implementing it. The OAuth Callback Broker should be a standard component in any patient-data integration toolkit.
Problem 3: Not all FHIR is FHIR.
Health Bank One’s MCP tools return a {"result": "<xml>..."} payload their own proprietary XML format, not FHIR R4 JSON. The data is there, the clinical content is present, but it’s incompatible with a pipeline expecting structured FHIR Bundles. This isn’t unusual; it’s the industry’s dirty secret. “FHIR-enabled” means many different things in practice.
What worked smoothly: PHI redaction. The pipeline correctly hashed patient identifiers, coarsened birthdates to year-only, masked contact information, and dropped free-text notes from clinical resources without corrupting the structured clinical content underneath. Conditions remained conditions. Observations remained observations. The FHIR resource graph survived the sanitization intact.
What the Data Actually Said
Once the three sources were connected and deduplicated into the HealthClaw tenant, Sally (my OpenClaw clinical AI persona) ran a full review. Here’s the interoperability scorecard:
CapabilityStatus Multi-source connection✓ Works
SMART on FHIR patient OAuth✓ Works
Structured condition data⚠️ Present, carries historical noise
Observation / lab data⚠️ Incomplete in structured form; complete in PDFs
Procedure / referral loop closure✗ Broken
Care gap detection (unfinished orders)✗ Not surfaced in structured data
Problem list accuracy✗ Hypothesis codes persist as confirmed
Immunizations: TEFCA was wrong, MEDENT was right
The TEFCA export returned 7 immunizations. MEDENT returned 27 including COVID boosters annually through 2025, a Tdap in 2021, and the full childhood record. The TEFCA picture would have suggested I was significantly undervaccinated. The MEDENT picture was accurate.
This isn’t a TEFCA failure per se it’s a coverage gap. The records TEFCA can see are only the records that were generated at TEFCA-connected facilities. My primary care practice is the canonical source for immunizations; if that practice’s data isn’t flowing cleanly into the QHIN network, the nationwide picture is incomplete.
For patients using interoperability tools to assess their own care: always check multiple sources. Never assume that a connected record is a complete record.
The problem list problem
This one matters clinically.
Structured condition data was present and mostly accurate. But buried in the problem list were conditions added as working diagnoses encounter-level hypotheses from a specific visit that had never been resolved or confirmed. One specific example: a code added as a differential during a dermatology visit in early 2023. It was never confirmed. It was never removed. It sat on the problem list with verificationStatus: confirmed because that’s what the EHR defaulted to.
That code now appears in every structured export. Every FHIR query for my conditions returns it. Every AI system that consumes my health record will treat it as a confirmed, current diagnosis.
This is not a technical problem. The FHIR verificationStatus field exists precisely to handle this. entered-in-error and refuted are valid values. The problem is workflow: EHR systems don’t prompt providers to review problem list entries at subsequent encounters, and there’s no clinical incentive to clean up a list that “works” for billing purposes.
The invisible procedure
A colonoscopy referral was ordered. The study was completed. The pathology came back. But in the structured FHIR data, the original ServiceRequest shows as open never closed, never linked to a DiagnosticReport. The clinical loop closed in the real world. It never closed in the data.
This matters for care gap detection. Any system trying to identify overdue screenings based on structured FHIR data would see an open colonoscopy order and flag it as incomplete. It’s not incomplete. It’s just invisible.
The FHIR data model has the constructs to represent this correctly ServiceRequest.basedOn, DiagnosticReport.basedOn, explicit status transitions. EHR implementations routinely omit these linkages because they add documentation burden without clinical reimbursement value.
What Should Change
For EHR vendors: Implement problem list review prompts at every encounter. A condition added as an encounter diagnosis should require active confirmation to persist across subsequent visits. The verificationStatus field should reflect clinical confidence, not default documentation status. This is a UI problem as much as a data problem providers need affordance to clean up entries without it costing them time.
For standards bodies: The ServiceRequest → DiagnosticReport completion loop needs better tooling. Ordered-but-not-completed procedures are a significant clinical gap, and they’re nearly invisible in current FHIR implementations. Profiling guidance for explicit status lifecycle (ordered → scheduled → completed → reported) would help. So would a reference validator that checks loop closure as part of conformance.
For app builders: Do not treat the problem list as ground truth. Treat it as a starting point for clinical review. Surface the coding date, the originating provider, and the most recent confirming note not just the condition name and status. The metadata is what tells you whether to trust the code.
For patients: Connect your records. Read them. Push back when something looks wrong. The data that follows you through the healthcare system is only as accurate as you help make it.
The Punchline
A single incorrect code a working hypothesis from a 2023 dermatology visit, never confirmed, never resolved would follow me into every future encounter, every insurance submission, and every AI-assisted clinical review until someone noticed.
I noticed because I read my own chart.
Most patients don’t read their charts. Most providers don’t audit problem lists at annual physicals. Most interoperability pipelines faithfully carry the error forward with verificationStatus: confirmed, because that’s what the source system said and the pipeline’s job is to move data, not to question it.
This is the gap. Not the technology the technology largely works. The SMART authorization servers hand out tokens. The FHIR servers return structured Bundles. The redaction pipelines hash identifiers without corrupting clinical content. The AI agents surface findings in comprehensible language.
The gap is the assumption that structured data is accurate data. It isn’t, until someone does the work to make it so.
That work is what FHIR IQ is about.
Built with HealthClaw Guardrails and the OpenClaw AI agent stack. All clinical data is the author’s own. The technical implementation including source code for the MEDENT SMART OAuth integration, the TEFCA pipeline, and the PHI redaction stack is open source and MIT licensed.
Next issue: drilling into the ServiceRequest → DiagnosticReport gap and what a better FHIR loop-closure profile would look like.
Footnotes for the technically inclined:
¹ The MEDENT introspection endpoint requires HTTP Basic auth with client ID and empty password not Bearer token. This is non-obvious and undocumented.
² Fasten Connect in TEFCA mode does not send postMessage events to the parent window. Completion events are delivered via server-side webhooks to your registered endpoint. The patient.connection_success event (disabled by default in the Fasten developer portal) carries the external_id parameter you passed to the widget which is your tenant identifier. Enable it before deploying.
³ The full Interoperability Scorecard is based on structured FHIR R4 data only. Clinical PDFs (CCD, C-CDA) carried more complete information for labs and procedures which is itself a finding about the state of structured data adoption.






Discussion about this post