IMS Logo

Medication RequestUSCDI

Description

Represents an order or request for a medication for a patient. Used to support medication management, prescribing workflows, and clinical review.


Interaction:

GET Request

HTTP Method: GET

GET {baseUrl}/MedicationRequest/{id}
GET {baseUrl}/MedicationRequest?{searchParams}
cURL
curl -X GET "{{url}}/mps/fhir/R4/V1/MedicationRequest/" \
  -H "Authorization: Bearer {{token}}"

Parameters

idpath_idtokenpatientreferenceintenttokenstatustoken_revinclude=Provenance:targetspecial

Response

{
  "entry": [
    {
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "MedicationRequest-208",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"
          ]
        },
        "identifier": [
          {
            "system": "http://hl7.org/fhir/sid/ndc",
            "value": "00338350341"
          }
        ],
        "status": "active",
        "intent": "order",
        "reportedBoolean": false,
        "medicationCodeableConcept": {
          "coding": [
            {
              "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
              "code": "1665050",
              "display": "CEFAZOLIN 1 G/50 ML-DEXTROSE GRAM/50 ML"
            }
          ]
        },
        "subject": {
          "reference": "Patient/Patient-207"
        },
        "encounter": {
          "extension": [
            {
              "url": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
              "valueCode": "unknown"
            }
          ]
        },
        "authoredOn": "2023-12-19T06:15:18-08:00",
        "requester": {
          "reference": "Practitioner/Practitioner-1"
        },
        "performer": {
          "reference": "Organization/Organization-P-1"
        },
        "dosageInstruction": [
          {
            "text": "1 FROZ.PIGGY every morning,  2 FROZ.PIGGY every afternoon"
          }
        ],
        "dispenseRequest": {
          "numberOfRepeatsAllowed": 1,
          "quantity": {
            "value": 90,
            "unit": "Milliliter",
            "system": "http://unitsofmeasure.org",
            "code": "C28254"
          },
          "expectedSupplyDuration": {
            "value": 30,
            "unit": "days",
            "system": "http://unitsofmeasure.org",
            "code": "d"
          }
        },
        "substitution": {
          "allowedBoolean": true
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Medication Request Resource Content

NameDescriptionRequired / Optional
resourceTypeIdentifies the resource as MedicationRequestRequired
idMedication request identifierRequired
meta.profileUS Core MedicationRequest profileRequired
statusCurrent order statusRequired
intentOrder intentRequired
reportedBooleanIndicates reported vs authoredOptional
medicationCodeableConceptMedication prescribedRequired
subjectPatient referenceRequired
encounterRelated encounterOptional
authoredOnDate authoredRequired
requesterOrdering practitionerRequired
dosageInstructionDosing instructionsOptional
dispenseRequestDispense detailsOptional

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)