IMS Logo

Procedure

Description

Creates a Procedure resource to record a performed clinical procedure within the EHR. This API is used to write superbill procedures for a patient under a specific encounter. The procedure must be associated with an open encounter, and the system will reject the request if the encounter is signed off or closed.

The procedure represents a completed service performed for the patient and is primarily used for billing and clinical documentation through CPT codes. Only CPT codes are supported for procedure coding in this implementation.

Each procedure must reference the patient (subject) and the encounter where the service was performed. The performed date-time represents the start date and time of the procedure. Optionally, the procedure can include a recordedDate indicating when the procedure was documented in the system.

A procedure may also reference a Condition resource when the procedure is associated with a diagnosis included in the superbill. The procedure status defaults to completed unless explicitly provided otherwise.

Special Notes
  • Anesthesia CPT codes must use performedPeriod instead of a single performedDateTime. The start and end times are required so that the EHR can calculate anesthesia units based on the system configuration.
  • The procedure status defaults to completed unless explicitly provided otherwise.
  • Dental CPT codes are not supported.

Interaction:

POST Request

HTTP Method: POST

POST {{Url}}/Procedure
cURL
curl -X POST "{{url}}/mps/fhir/R4/V1/Procedure/" \
  -H "Authorization: Bearer {{token}}" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "resourceType": "Procedure",
    "id": "procedure-1001",
    "meta": {
      "profile": [
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"
      ]
    },
    "status": "completed",
    "category": {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "387713003",
          "display": "Surgical procedure"
        }
      ]
    },
    "code": {
      "coding": [
        {
          "system": "http://www.ama-assn.org/go/cpt",
          "version": "2023",
          "code": "20610",
          "display": "Arthrocentesis, aspiration and/or injection, major joint or bursa"
        }
      ]
    },
    "subject": {
      "reference": "Patient/Patient-265"
    },
    "encounter": {
      "reference": "Encounter/Encounter-805"
    },
    "performedDateTime": "2026-03-14T10:00:00-05:00",
    "recordedDate": "2026-03-14T10:05:00-05:00",
    "reasonReference": [
      {
        "reference": "Condition/Condition-Problem-I-1332"
      }
    ]
  }'

Procedure Resource Content

ElementChild ElementDescriptionR / O / CCardinalityCondition / Notes
resourceTypeIdentifies the FHIR resource type.Required1..1Must always be Procedure.
idUnique identifier for the procedure record.Optional0..1Used to uniquely identify the procedure for a patient.
statusStatus of the procedure.Required1..1Allowed values: completed, entered-in-error. Default value: completed.
categoryHigh-level classification of the procedure.Optional0..1Used to categorize procedure type.
categorycoding.systemCoding system for procedure category.Optional0..1http://snomed.info/sct.
categorycoding.codeSNOMED CT code representing procedure category.Optional0..1Example values: 24642003, 409063005, 409073007, 387713003, 103693007, 46947000, 410606002.
categorycoding.displayDescription of the procedure category.Optional0..1Example: Surgical procedure, Counseling, Diagnostic procedure.
codeProcedure code information.Required1..1Represents the performed procedure.
codecoding.systemCoding system used for the procedure.Required1..1Only CPT (http://www.ama-assn.org/go/cpt) will be considered.
codecoding.versionVersion of the coding system.Optional0..1Example: 2023.
codecoding.codeProcedure code value.Required1..1
codecoding.displayDescription of the procedure code.Required1..1
subjectPatient on whom the procedure was performed.Optional1..1Reference to a Patient resource.
subjectreferenceReference to patient.Optional1..1Example: Patient/Patient-265.
encounterEncounter associated with the procedure.Required1..1Reference to the encounter where the procedure occurred.
encounterreferenceEncounter reference identifier.Required1..1Example: Encounter/Encounter-805.
performedDateTimeDate and time when the procedure was performed.Required1..1Must include timezone. Represents start date and time of procedure. Anesthesia CPT codes must use performedPeriod instead, with both start and end times required.
recordedDateDate and time when the procedure was recorded in the system.Optional0..1Represents documentation timestamp for the procedure.
reasonReferenceCondition or diagnosis associated with the procedure.Conditional0..*Used when a procedure is associated with a diagnosis or condition.
reasonReferencereferenceReference to the related condition.Conditional0..1Example: Condition/ConditionID. Added to procedure in superbill context.

Response Codes

Response CodeDescription
200 OKThe requested resource was found and is contained within the body of the HTTP response.
201 CreatedA new resource was created succesfully. It will return the resource with the EHR generate resource id.
400 Bad RequestThe server could not understand the request due to invalid syntax. The body of the HTTP response will contain an OperationOutcome resource that indicates the invalid request could not be processed.
404 Not FoundThe requested resource does not exist. The body of the HTTP response will contain an OperationOutcome resource that indicates the resource could not be found.
410 GoneThe requested resource has been permanently deleted from the server with no forwarding address. The body of the HTTP response will contain an OperationOutcome resource that indicates the resource could not be found.
422 Unprocessable EntityThe request was well-formed but had semantic errors.
500 Internal Server ErrorThe server has encountered a situation it doesn't know how to handle. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.
5xx Server ErrorThe server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.
500001 VALIDATION_FAILEDThe request failed validation.
500002 DUPLICATE_RECORDA duplicate record was detected.
500003 INSERT_FAILEDThe insert operation failed.
500004 UPDATE_FAILEDThe update operation failed.
500005 DELETE_FAILEDThe delete operation failed.
500006 RECORD_NOT_FOUND_FOR_UPDATENo matching record was found to update.
500007 DATA_MAPPING_ERRORThe request could not be processed due to a data mapping error.
500008 DEPENDENCY_FAILUREA dependent operation failed.
500009 ENCOUNTER_SIGNED_OFFThe encounter is already signed-off.
500010 ENCOUNTER_BILLEDThe encounter is fully or partially billed.
500011 INSURANCE_ACTIVE_ALREADY_EXISTSSame insurance with Active status is already exist.
500012 INSURANCE_PLAN_NOT_FOUNDInsurance Plan does not exist.
500013 CARRIER_CODE_DUPLICATEDCarrier code is duplicated.
500014 PLAN_CODE_DUPLICATEDPlan code is duplicated.
590002 VALUE_OUT_OF_RANGEA value is out of range for the destination.
590001 ROW_NOT_FOUNDRow not found in global temporary table.
590003 NUMERIC_EXPECTEDNumeric value expected but found empty value.
590004 VITAL_ALREADY_PRESENTValue for vital is already present and parameter to add multiple vital is off.
590006 HEIGHT_UNIT_UNSUPPORTEDOnly feet, inch and cm are supported for height (when unit code not in cm, in_i, ft_i).
590007 COMPONENT_INFO_MISSINGComponent information missing (LOINC code or data for component is missing).
590005 LOINC_MAPPING_NOT_FOUNDMapping not found for LOINC code in IMS.
500015 APPOINTMENT_NOT_FOUNDAppointment not found.
500016 APPOINTMENT_ALREADY_CANCELLEDAppointment is already cancelled.
500017 APPOINTMENT_COMPLETEDAppointment is already completed.
500018 INVALID_STATUSInvalid or missing status value.
500019 SERVICE_TYPE_NOT_RECOGNIZEDserviceType code not recognized.
500020 APPOINTMENT_TYPE_NOT_RECOGNIZEDappointmentType code not recognized.
500021 PROVIDER_NOT_FOUNDprovider not found.
500022 LOCATION_NOT_FOUNDlocation not found.
500023 PATIENT_NOT_FOUNDPatient not found.
500024 ENCOUNTER_NOT_FOUNDEncounter not found.
500026 TYPE_REQUIREDType is required.
500027 INVALID_PARTICIPANT_REFERENCEInvalid participant reference.
500028 ORGANIZATION_NOT_INSURANCE_CARRIERThe provided organization-id does not belong to an insurance carrier.
500029 INVALID_PERIOD_RANGEStart date time cannot be greater than end date time.
500030 CPT_DESCRIPTION_REQUIREDCPT description is required to create a new CPT entry in IMS.
500031 INVALID_DATE_RANGEStart date cannot be greater than end date.
500032 ANESTHETIC_PERIOD_REQUIREDPeriod start and end datetime is required for Anesthetic CPT.
500033 REFERENCE_NOT_FOUNDReference not found.
500034 DENTAL_CPT_NOT_ALLOWEDThe selected CPT code is classified as dental and cannot be included on this superbill. Please choose a non-dental CPT code.
500035 SUBSCRIBER_NOT_FOUNDSubscriber not found.
500036 DUPLICATE_ICDDuplicate ICDs are not allowed.
500037 REFERENCED_ICD_MISSINGReferenced ICD is missing in patient diagnosis.
500038 SEVERITY_NOT_SUPPORTEDSeverity is not supported
PATERR001 Missing chartNoMissing required chartNo field.
PATERR003 Missing nameMissing required firstname or lastname field.
PATERR004 Invalid emailEmail should be in proper format.
PATERR005 Invalid phone/fax lengthFax and Phone length must be 10 digits only.
APPT001 Missing serviceTypeMissing required serviceType field.
APPT002 ServiceType not recognizedserviceType code not recognized.
APPT003 Invalid statusInvalid or missing status value.
APPT004 Invalid time rangestart time must be before end time.
APPT006 AppointmentType not recognizedappointmentType code not recognized.
APPT007 Created date missingCreated date is missing.
APPT008 Invalid minimumDurationminimumDuration must be positive.
APPT009 Created date in futurecreated date must not be in the future.
APPT0010 Missing patient referenceReference for patient is missing.
APPT0011 Missing provider referenceReference for provider is missing.
APPT0012 Missing location referenceReference for location is missing.
APPT0014 Provider not foundprovider not found.
APPT0015 Location not foundlocation not found.
APPT0016 Missing provider or locationReference for either provider or location is needed.
APPT0017 Missing organization referenceReference for organization is missing.
APPTR001 Missing appointment referenceMissing Appointment Reference.
APPTR002 Appointment not foundAppointment Not found.
APPTR003 Appointment already cancelledAppointment is already cancelled.
APPTR004 Appointment already completedAppointment is already completed.
OrgINS001 Organization ID requiredOrganization ID is required.
OrgINS002 Invalid organization typeOrganization Type must be defined with ins.
OrgINS003 Name requiredname must present.
OrgINS004 Carrier code duplicatedCarrier code is duplicated.
INSPLAN001 InsurancePlan ID requiredInsurancePlan ID is required.
INSPLAN002 Plan code requiredPlan code must present.
INSPLAN003 Period requiredPeriod must present.
INSPLAN004 Name requiredname must present.
INSPLAN005 Organization reference requiredReference must be there for an organization.
INSPLAN006 Invalid period rangeend date can not be lesser then start date.
INSPLAN007 Status requiredStaus must present.
INSPLAN008 Status must be activeStaus must be active.
COVERR001 Invalid coverage statusStatus must be one of: active, cancelled.
COVERR002 Invalid subscriber referenceSubscriber must reference a Patient or RelatedPerson.
COVERR003 Subscriber ID requiredSubscriber ID (Policy Id) is required.
COVERR004 Invalid beneficiary referenceBeneficiary must reference a Patient.
COVERR005 Invalid relationshipRelatioship is invalid.
COVERR006 Invalid payor referencePayor must reference an organization.
COVERR007 Relationship requiredRelatioship is required.
COVERR008 Insurance order requiredInsurance order is required.
RELPERR001 RelatedPerson ID requiredRelatedPerson ID is required.
RELPERR002 Patient reference requiredPatient reference is required.
RELPERR003 Name requiredName is required.
RELPERR004 Birthdate requiredBirthdate must present.
RELPERR005 Identifier requiredIdnetifier is required.
GEN011 Missing Procedure StatusMissing Procedure Status.
PRO001 Invalid procedure codeInvalid or missing procedure code.
PRO003 Invalid subject referenceInvalid or missing subject reference.
PRO004 Invalid encounter referenceInvalid or missing encounter reference.
PRO005 Invalid performed date/timeInvalid or missing performed date/time.
PRO006 Invalid reasonReferenceInvalid reasonReference.
CON002 Invalid severity codeInvalid severity code.
CON003 Invalid diagnosis codeMissing or invalid diagnosis code. Diagnosis code not found in EHR master data; please add to user diagnosis master.
CON003 Invalid bodySite codingInvalid bodySite coding.
VIT001 Invalid categoryInvalid category: must be 'vital-signs' from the specified coding system.
VIT002 Invalid observation codeInvalid or unsupported observation code.
VIT005 Invalid effectiveDateTimeInvalid or missing effectiveDateTime; must be a valid ISO 8601 datetime string.
VIT006 Invalid valueQuantityMissing or invalid valueQuantity for observation.
VIT007 Invalid component detailsMissing or invalid component details for observation.
VIT008 Invalid component codeInvalid component code.
VIT009 Invalid component valueQuantityMissing or invalid component valueQuantity.
VIT011 Invalid component valueCodeableConceptInvalid component valueCodeableConcept for measurement site.
VIT008 Vital not supportedVital sign '{code}' is not supported by the EHR system.
VIT009 Vital value out of rangeVital sign value {value} is out of acceptable clinical range.

Product Information

IMS (14.0.SP1)