fhir-data-validator

fhir-data-validator is an agent for Claude Code from BACC-Labs/cynthia-generator. It costs 59 tokens per session (4,855 once invoked), scanned A, original, MIT.

A checker for synthetic FHIR healthcare records. FHIR is a standard format for exchanging medical data; this agent checks whether records follow FHIR R4 rules and make clinical sense.

In plain words
What is it for?
Use it after generating test healthcare data or when running validation. It checks lab values, medication doses, diagnosis-related patterns, chronology, and links between FHIR resources.
Why use it?
It helps catch unrealistic medical values, invalid references between records, and dates or treatments that do not fit together.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the cynthia-generator plugin — 1 skill, 3 commands, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bacc-labs/cynthia-generator/fhir-data-validator
Clone the repo
git clone --depth 1 https://github.com/BACC-Labs/cynthia-generator

Made for: Claude Code.

Or install cynthia-generator, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fhir-data-validator

README.md
[![agentmods](https://agentmods.dev/badge/agents/bacc-labs/cynthia-generator/fhir-data-validator.svg)](https://agentmods.dev/agents/bacc-labs/cynthia-generator/fhir-data-validator)
Your own site
<a href="https://agentmods.dev/agents/bacc-labs/cynthia-generator/fhir-data-validator"><img src="https://agentmods.dev/badge/agents/bacc-labs/cynthia-generator/fhir-data-validator.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,855 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.04855
Opus 5 $0.00030 $0.02427
Sonnet 5 $0.00012 $0.00971
Haiku 4.5 $0.00006 $0.00485

Measured 6d ago against content hash bb60b06ef9b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fhir-data-validator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/fhir-data-validator.md · 632 lines

How it starts

The opening of the file, as written. The whole thing — 632 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FHIR Data Validator Agent

Validate synthetic FHIR healthcare data to ensure clinical realism, referential integrity, and FHIR R4 compliance.

Purpose

Ensure generated synthetic healthcare data is:

  1. Clinically Realistic: Lab values, medications, and disease progression match real-world patterns
  2. Referentially Intact: All resource IDs and references are valid and complete
  3. FHIR Compliant: Resources conform to FHIR R4 specifications

Validation Categories

Category 1: Clinical Realism

Verify generated data matches real-world medical patterns.

Lab Values and Observations

Check observation values against diagnosis-specific ranges:

Load clinical patterns: Use Read tool to load skills/fhir-healthcare-data/references/clinical-patterns.md

For each Observation:

  1. Extract LOINC code and value
  2. Find patient's diagnoses (Condition resources)
  3. Look up expected ranges in clinical-patterns.md for that diagnosis
  4. Compare actual value to expected range

Examples:

  • A1C for diabetes patient:

    • Initial diagnosis: 6.5-9.0% (acceptable)
    • 12%: WARNING (extremely high but possible)

    • <4% or >20%: CRITICAL (impossible/dangerous)
  • Blood pressure for hypertension:

    • At diagnosis: ≥140/90 mmHg (expected)
    • <90/60 mmHg: WARNING (hypotension, may indicate over-treatment)
    • 200/120 mmHg: WARNING (hypertensive crisis range)

  • eGFR for CKD Stage 3:

    • Expected: 30-59 mL/min/1.73m²
    • <30: WARNING (progressed to Stage 4)
    • 59: WARNING (improved to Stage 2 or misclassified)

Value Trending:

  • Check if values trend appropriately over time
  • Example: Diabetes A1C should generally improve with treatment
    • Initial: 7.8% → 3 months: 7.2% → 6 months: 6.9% → 9 months: 6.7% ✓
    • Initial: 7.0% → 3 months: 9.5% → 6 months: 11.0% ⚠️ WARNING (worsening despite treatment)
Medications

Verify medications are appropriate for diagnoses:

For each MedicationStatement:

  1. Extract medication (RxNorm code and name)
  2. Find patient's diagnoses
  3. Check medication is appropriate first-line or second-line treatment
  4. Verify dosage matches standard protocols from clinical-patterns.md

Read the full file on GitHub · 632 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 632 lines · 59 tokens per session scan A bb60b06ef9b9

Subscribe to this mod's changes

fhir-data-validator is an agent published in the GitHub repository BACC-Labs/cynthia-generator (5 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 4,855 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

unfolding-po

PO (Product Owner) role in the Unfolding Specs process. Decomposes Features into smaller Features, creates Acceptance Tests, and identifies implicit business assumptions as Domain Model Decisions (DMDs).

t1/tdder · 45 tokens

evals

LLM evaluation — eval harness design, benchmark suites, automated regression, human eval orchestration.

tonone-ai/tonone · 21 tokens

llm2bedrock-prompt-evaluator

Run each golden prompt against the target Bedrock model via the pinned uv harness, score with LLM-as-judge, and report a pass rate. Handles throttling with backoff; returns a structured eval object, or a partial/blocked control state.

awslabs/startups · 61 tokens

gsd-eval-planner

Designs a structured evaluation strategy for an AI phase. Identifies critical failure modes, selects eval dimensions with rubrics, recommends tooling, and specifies the reference dataset. Writes the Evaluation Strategy, Guardrails, and Production Monitoring sections of AI-SPEC.md. Spawned by /gsd:ai-integration-phase…

gsd-build/get-shit-done · 72 tokens

eval-specialist

LLM evaluation specialist. Designs frameworks to evaluate prompt quality, RAG retrieval performance, and overall app quality. Builds benchmarks, A/B tests, and regression tests.

revfactory/harness-100 · 37 tokens

llm-eval-harness-writer

Gera harness de eval LLM vs rubrica - golden dataset rotulado, LLM-as-judge (temp=0+seed), score agregado e gate CI de regressao entre versoes de prompt. Use ao medir qualidade.

luanpdd/kit-mcp · 56 tokens