Metriport · Arazzo Workflow

Metriport Consolidated FHIR Query

Version 1.0.0

Register a patient, start a consolidated FHIR R4 query for the requested resources, poll until conversion completes, then count the consolidated data.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub HealthcareMedical RecordsFHIRHealth DataWearablesOpen-SourceArazzoWorkflows

Provider

metriport

Workflows

consolidated-fhir-query
Create a patient, run a consolidated FHIR R4 query, then count the assembled resources.
Implements the Metriport consolidated FHIR R4 sequence end to end: patient registration, consolidated query launch, status polling, and resource counting.
4 steps inputs: facilityId, patient, resources outputs: counts, patientId
1
createPatient
Register the patient under the given facility so a consolidated query can be assembled.
2
startConsolidated
Start a consolidated FHIR R4 query that assembles the requested resource types as a JSON bundle.
3
pollConsolidated
Poll the consolidated query until its status reports complete.
4
countData
Count the consolidated FHIR R4 resources assembled for the patient.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Metriport Consolidated FHIR Query
  summary: Register a patient, start a consolidated FHIR R4 query for the requested resources, poll until conversion completes, then count the consolidated data.
  description: >-
    The canonical Metriport consolidated-record flow over the FHIR R4 data model.
    A patient is created under a facility, a consolidated query is started to
    assemble the requested US Core resource types as a JSON FHIR bundle, the query
    is polled until its status reports complete, and a per-resource count of the
    consolidated data is retrieved. Every step inlines its request so the flow is
    self-contained.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-2900.60
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-2900.60
      capability_name: Healthcare Interoperability Operations
      spec: metriport-consolidated-api-openapi.yml
      confidence: 0.75
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: consolidatedApi
  url: ../openapi/metriport-consolidated-api-openapi.yml
  type: openapi
- name: patientApi
  url: ../openapi/metriport-patient-api-openapi.yml
  type: openapi
workflows:
- workflowId: consolidated-fhir-query
  summary: Create a patient, run a consolidated FHIR R4 query, then count the assembled resources.
  description: >-
    Implements the Metriport consolidated FHIR R4 sequence end to end: patient
    registration, consolidated query launch, status polling, and resource
    counting.
  inputs:
    type: object
    required:
    - facilityId
    - patient
    - resources
    properties:
      facilityId:
        type: string
        description: Identifier of the facility the patient is registered under.
      patient:
        type: object
        description: Patient demographic packet used to create the Metriport patient.
      resources:
        type: string
        description: Comma-separated list of FHIR R4 resource types to assemble (e.g. Condition,Observation,MedicationRequest).
  steps:
  - stepId: createPatient
    description: Register the patient under the given facility so a consolidated query can be assembled.
    operationId: createPatient
    parameters:
    - name: facilityId
      in: query
      value: $inputs.facilityId
    requestBody:
      contentType: application/json
      payload: $inputs.patient
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      patientId: $response.body#/id
  - stepId: startConsolidated
    description: Start a consolidated FHIR R4 query that assembles the requested resource types as a JSON bundle.
    operationId: startConsolidatedQuery
    parameters:
    - name: id
      in: path
      value: $steps.createPatient.outputs.patientId
    - name: resources
      in: query
      value: $inputs.resources
    - name: conversionType
      in: query
      value: json
    successCriteria:
    - condition: $statusCode == 200
  - stepId: pollConsolidated
    description: Poll the consolidated query until its status reports complete.
    operationId: getConsolidatedQueryStatus
    parameters:
    - name: id
      in: path
      value: $steps.createPatient.outputs.patientId
    successCriteria:
    - context: $response.body
      condition: $.queries[0].status == "completed"
      type: jsonpath
    outputs:
      status: $response.body#/queries/0/status
  - stepId: countData
    description: Count the consolidated FHIR R4 resources assembled for the patient.
    operationId: countConsolidatedData
    parameters:
    - name: id
      in: path
      value: $steps.createPatient.outputs.patientId
    - name: resources
      in: query
      value: $inputs.resources
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      counts: $response.body
  outputs:
    patientId: $steps.createPatient.outputs.patientId
    counts: $steps.countData.outputs.counts

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/metriport-consolidated-fhir-query-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.