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
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
preparationThe core event has not started yet, but some staging activities have begunin-progressThe event is currently occurringnot-doneThe event was terminated prior to any activity beyond preparationon-holdThe event has been temporarily stopped but is expected to resumestoppedThe event was terminated prior to the full completion of the intended actionscompletedThe event has now concludedentered-in-errorThe event was entered in error and voidedunknownThe 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.
- System
http://www.ama-assn.org/go/cptCurrent Procedural Terminology (CPT) codes maintained by the AMA - the most common procedure coding system in professional and outpatient claimsExample Codes99213Office or other outpatient visit, established patient, low complexity27447Arthroplasty, knee, condyle and plateau36415Collection of venous blood by venipuncture - System
https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSetsLevel II HCPCS codes represent items, supplies, and services not covered by CPT codesExample CodesG0438Annual wellness visit, initial visitA0425Ground mileage, per statute mile - System
http://snomed.info/sctSNOMED CT procedure codes provide a clinical terminology for proceduresExample Codes80146002Appendectomy73761001Colonoscopy - System
http://www.cms.gov/Medicare/Coding/ICD10ICD-10-PCS (Procedure Coding System) codes - used primarily for inpatient proceduresExample Codes0SRD0JZReplacement of Left Knee Joint with Synthetic Substitute, Open Approach0DT70ZZResection 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
- System
http://snomed.info/sctSNOMED CT performer function codesExample Codes304292004Surgeon405279007Primary 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
- System
http://hl7.org/fhir/sid/icd-10-cmICD-10-CM codes used as procedure reasonsExample CodesM17.12Unilateral primary osteoarthritis, left knee - System
http://snomed.info/sctSNOMED CT reason codesExample Codes301011002Foot 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
- System
http://snomed.info/sctSNOMED CT body site codesExample Codes72696002Knee 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
API
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: Bearerheader 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. Most syncs complete in under a minute, but patients with large record sets on slower endpoints can take several minutes.
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
ACCESS_TOKEN=patient-access-token
curl https://api.flexpa.com/fhir/Procedure/3255ee92-6ac7-6bca-9c11-e9ba988bb239 \
-H "Authorization: Bearer $ACCESS_TOKEN"
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: Bearerheader value must presented with a Patient Access Token or an Application Access Token
Search parameters
- _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
Note
Flexpa supports all Procedure SearchParameter values defined in the FHIR R4 specification
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. Most syncs complete in under a minute, but patients with large record sets on slower endpoints can take several minutes.
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
ACCESS_TOKEN=patient-access-token
curl https://api.flexpa.com/fhir/Procedure \
-H "Authorization: Bearer $ACCESS_TOKEN"