FlexpaFlexpa
Developer PortalGet SandboxTry it yourself

All docs

Schema

    API

    • GETRead
    • GETSearch

    Procedure

    Procedure is a FHIR resource that represents an action that is or was performed on or for a patient. This can be a physical intervention like a surgery or operation, or less invasive like counseling, physiotherapy, or diagnostic procedures.

    Procedure resources document what was done, when it was done, who performed it, and how it was coded. They are essential for understanding a patient's surgical and procedural history, tracking care delivery, and supporting utilization management and quality measurement workflows.

    Procedure data is available from health insurers (derived from claims), medical record systems (from provider EHRs), and nationwide exchanges (via TEFCA). Procedures are coded with CPT, HCPCS, ICD-10-PCS, and SNOMED CT code systems.

    Flexpa makes procedure data available as FHIR resources conforming to the US Core STU 6.1 Procedure Profile to support communicating USCDI v3 data. Data types used in this reference are defined in the FHIR R4 Data Types specification.

    FHIR API

    https://api.flexpa.com/fhir/Procedure
    

    New to FHIR?

    Intro to FHIR

    FHIR, or Fast Healthcare Interoperability Resources, is a standard for exchanging healthcare information electronically

    Read introduction →

    Related

    Claims to Clinical

    Flexpa generates US Core Encounter, Condition, and Procedure resources from ExplanationOfBenefit claims data

    View Claims to Clinical →

    #Schema

    The FHIR R4 Procedure resource represents an activity performed on, with, or for a patient as part of the provision of care. The US Core Procedure Profile constrains this resource to ensure consistent representation across US healthcare systems.

    Procedures are structured around the core question of what was done, when it was performed, who performed it, and why. The code element is the central data point, representing the specific procedure using standard medical coding systems.

    Elements

    metaMeta

    Metadata about the resource. See also Tags defined by Flexpa.

    lastUpdatedinstant

    The last time the procedure was updated in the Endpoint's system of record

    statuscode

    The status of the procedure

    Codes
    preparation
    The core event has not started yet, but some staging activities have begun
    in-progress
    The event is currently occurring
    not-done
    The event was terminated prior to any activity beyond preparation
    on-hold
    The event has been temporarily stopped but is expected to resume
    stopped
    The event was terminated prior to the full completion of the intended actions
    completed
    The event has now concluded
    entered-in-error
    The event was entered in error and voided
    unknown
    The authoring/source system does not know which of the status values currently applies
    codeCodeableConcept

    The specific procedure performed. Bound to the US Core Procedure Codes value set (extensible), which includes CPT, HCPCS, SNOMED CT, and ICD-10-PCS codes.

    Systemhttp://www.ama-assn.org/go/cpt
    Current Procedural Terminology (CPT) codes maintained by the AMA - the most common procedure coding system in professional and outpatient claims
    Example Codes
    99213
    Office or other outpatient visit, established patient, low complexity
    27447
    Arthroplasty, knee, condyle and plateau
    36415
    Collection of venous blood by venipuncture
    Systemhttps://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets
    Level II HCPCS codes represent items, supplies, and services not covered by CPT codes
    Example Codes
    G0438
    Annual wellness visit, initial visit
    A0425
    Ground mileage, per statute mile
    Systemhttp://snomed.info/sct
    SNOMED CT procedure codes provide a clinical terminology for procedures
    Example Codes
    80146002
    Appendectomy
    73761001
    Colonoscopy
    Systemhttp://www.cms.gov/Medicare/Coding/ICD10
    ICD-10-PCS (Procedure Coding System) codes - used primarily for inpatient procedures
    Example Codes
    0SRD0JZ
    Replacement of Left Knee Joint with Synthetic Substitute, Open Approach
    0DT70ZZ
    Resection of duodenum, open approach
    subjectReference(Patient)

    Reference to the Patient on whom the procedure was performed

    encounterReference(Encounter)

    Reference to the Encounter during which the procedure was performed

    performedDateTimedateTime

    When the procedure was performed as a single point in time - mutually exclusive with performedPeriod

    performedPeriodPeriod

    When the procedure was performed as a time range - mutually exclusive with performedDateTime

    startdateTime

    Starting time of the procedure

    enddateTime

    End time of the procedure

    performerBackboneElement[]

    The people who performed the procedure

    functionCodeableConcept

    The type of involvement of the performer in the procedure

    Systemhttp://snomed.info/sct
    SNOMED CT performer function codes
    Example Codes
    304292004
    Surgeon
    405279007
    Primary surgeon
    actorReference(Practitioner|PractitionerRole|Organization)

    The practitioner who was involved in the procedure

    onBehalfOfReference(Organization)

    Organization the performer was acting for

    reasonCodeCodeableConcept[]

    Coded reason why the procedure was performed

    Systemhttp://hl7.org/fhir/sid/icd-10-cm
    ICD-10-CM codes used as procedure reasons
    Example Codes
    M17.12
    Unilateral primary osteoarthritis, left knee
    Systemhttp://snomed.info/sct
    SNOMED CT reason codes
    Example Codes
    301011002
    Foot pain
    reasonReferenceReference(Condition|Observation|Procedure|DiagnosticReport)[]

    Reference to the justification for the procedure, such as a Condition that was being treated

    bodySiteCodeableConcept[]

    Target body sites for the procedure

    Systemhttp://snomed.info/sct
    SNOMED CT body site codes
    Example Codes
    72696002
    Knee region structure

    Procedure Example

    {
      "resourceType": "Procedure",
      "id": "3255ee92-6ac7-6bca-9c11-e9ba988bb239",
      "meta": {
        "lastUpdated": "2024-03-15T10:30:00Z",
        "profile": [
          "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"
        ]
      },
      "status": "completed",
      "code": {
        "coding": [
          {
            "system": "http://www.ama-assn.org/go/cpt",
            "code": "27447",
            "display": "Arthroplasty, knee, condyle and plateau"
          }
        ],
        "text": "Total knee replacement"
      },
      "subject": {
        "reference": "Patient/example"
      },
      "encounter": {
        "reference": "Encounter/example"
      },
      "performedDateTime": "2024-01-15",
      "performer": [
        {
          "function": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "304292004",
                "display": "Surgeon"
              }
            ]
          },
          "actor": {
            "identifier": {
              "system": "http://hl7.org/fhir/sid/us-npi",
              "value": "1234567890"
            },
            "display": "Dr. Robert Johnson, MD"
          }
        }
      ],
      "reasonCode": [
        {
          "coding": [
            {
              "system": "http://hl7.org/fhir/sid/icd-10-cm",
              "code": "M17.12",
              "display": "Unilateral primary osteoarthritis, left knee"
            }
          ]
        }
      ],
      "bodySite": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "72696002",
              "display": "Knee region structure"
            }
          ]
        }
      ]
    }
    

    #Example FHIRPaths

    Data PointFHIRPath Expression
    Procedure CPT codescode.coding.where(system = 'http://www.ama-assn.org/go/cpt')
    Procedure HCPCS codescode.coding.where(system = 'https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets')
    Procedure ICD-10-PCS codescode.coding.where(system = 'http://www.cms.gov/Medicare/Coding/ICD10')
    All procedure codescode.coding
    Procedure date (with fallback)(performedDateTime | performedPeriod.start | performedPeriod.end).first()
    Performer NPIperformer.actor.identifier.where(system = 'http://hl7.org/fhir/sid/us-npi')
    Reason codes (ICD-10-CM)reasonCode.coding.where(system = 'http://hl7.org/fhir/sid/icd-10-cm')
    Body sitebodySite.coding

    #API

    GEThttps://api.flexpa.com/fhir/Procedure/:id

    #Read

    A read is the most basic operation in FHIR. It allows you to retrieve the current version of a single resource by its ID.

    For a full list of available Resources, please refer to the FHIR Resources documentation.

    Request headers

    AuthorizationstringRequired

    An Authorization: Bearer header value must presented with a Patient Access Token or an Application Access Token

    Request path parameters

    identifierstring

    The identifier of the resource to be retrieved - used in the last part of the URL path segment

    Error codes

    transient429 status code

    The API is expected to return a 429 status code until the data is ready to be retrieved. This error is returned by the API while in the initial sync period, which typically lasts less than 1 minute.

    You will need to implement retry logic to handle this error. If you are using the Node SDK which we demonstrate in our Quickstart guide, retry logic is already built in and you don't need to implement it yourself.

    processing422 status code
    The API is expected to return a 422 when Flexpa fails to synchronize any resources from the Endpoint for the requested Patient. Please re-authorize or reach out to support.

    Request

    GET
    /fhir/Procedure/:id
    ACCESS_TOKEN=flexpa-link-access-token
    
    curl https://api.flexpa.com/fhir/Procedure/3255ee92-6ac7-6bca-9c11-e9ba988bb239 \
      -H "Authorization: Bearer $ACCESS_TOKEN"
    

    GEThttps://api.flexpa.com/fhir/Procedure

    #Search

    Searches on Flexpa API follow the RESTful style of the FHIR specification by submitting a GET HTTP request to the base URL of the resource with parameters to define the exact search criteria to filter the response.

    Request headers

    AuthorizationstringRequired

    An Authorization: Bearer header value must presented with a Patient Access Token or an Application Access Token

    Search parameters

    Flexpa supports all Procedure SearchParameter values defined in the FHIR R4 specification

    _idtoken

    The logical ID of the resource

    patientreference

    Search by subject - a patient

    datedate

    When the procedure was performed

    codetoken

    A code to identify a procedure

    statustoken

    Current status of the procedure

    identifiertoken

    A unique identifier for a procedure

    encounterreference

    Encounter created as part of

    performerreference

    The reference to the practitioner

    reason-codetoken

    Coded reason procedure performed

    reason-referencereference

    The justification that the procedure was performed

    Error codes

    transient429 status code

    The API is expected to return a 429 status code until the data is ready to be retrieved. This error is returned by the API while in the initial sync period, which typically lasts less than 1 minute.

    You will need to implement retry logic to handle this error. If you are using the Node SDK which we demonstrate in our Quickstart guide, retry logic is already built in and you don't need to implement it yourself.

    processing422 status code
    The API is expected to return a 422 when Flexpa fails to synchronize any resources from the Endpoint for the requested Patient. Please re-authorize or reach out to support.

    Request

    GET
    /fhir/Procedure
    ACCESS_TOKEN=flexpa-link-access-token
    
    curl https://api.flexpa.com/fhir/Procedure \
      -H "Authorization: Bearer $ACCESS_TOKEN"
    
    Status TwitterGitHub

    © 2026 Flexpa. All rights reserved.