MedVertical
Open menu

Use cases

Agentic FHIR Workflows

Give an agent a deterministic check for the FHIR it generates or changes. Return the affected field and requirement, then validate its correction.

Give the agent a check it can act on

The validator returns a concrete finding. The agent can correct the input; the calling workflow decides whether to proceed.

Agent-generated FHIR

The exact resource the agent created or changed.

Deterministic validation

Check the resource against explicit FHIR requirements.

Actionable tool result

The affected field, requirement and remaining findings.

Return findings to the agent → correct the input → validate again.

Give the agent a specific finding it can correct and check again.

  1. Keep the generated input explicit

    The assistant-authored synthetic Patient contains a string where FHIR expects a boolean. Send the exact resource and FHIR release to the validator tool.

    Agent · InputJSON

    String instead of boolean

    validate_resource({ resource, fhirVersion: "R4" })
    {  "resourceType": "Patient",  "id": "synthetic-cli-patient",  "active": "true"}
    Synthetic R4 · Validator 0.6.4
  2. Use the actual tool finding

    The Records validate_resource handler calls the validator and reports the type error at Patient.active. The finding gives the agent a specific correction to make.

    Agent · ResultJSON

    Patient.active fails validation

    validate_resource({ resource, fhirVersion: "R4" })
    {  "errors": 1,  "warnings": 0,  "information": 6,  "findings": [    {      "path": "Patient.active",      "message": "Primitive type mismatch for Patient.active: expected boolean, found string"    }  ]}
    Synthetic R4 · Validator 0.6.4 · 1 error · 6 information · Excerpt
  3. Recheck and decide the next action

    The corrected input produces zero errors and six information findings. The tool returns this bounded result; the reviewer or calling workflow decides whether downstream use is appropriate.

    Agent · ResultJSON

    Correction verified

    validate_resource({ resource, fhirVersion: "R4" })
    {  "errors": 0,  "warnings": 0,  "information": 6,  "correctedValue": {    "active": true  }}
    Synthetic R4 · Validator 0.6.4 · 0 errors · 6 information · Excerpt

The corrected input has zero errors and six information findings. The calling application or reviewer decides whether to proceed, retry or request review.

Add FHIR checks to your agent workflow.

Start with Records Agent Tools in Claude Code or Codex. Use the MCP guide when connecting to a Records deployment.