Skip to content
MD Live logoMD Live logoMD Live Developer API

Medications

To add a medication to a patient, make a request to:

POST {server_url}/api/v2/patients/{patient_id}/medications

This request must include a valid User JWT token, please see our documentation.

Parameter Default
Content-type application/json
Authorization Bearer example.jwttoken

The following parameters are required when creating a medication. To search for the medication and retrieve needed parameter values, reference medications - search.

Attribute Required Description
patient_id true MD Live ID for patient
Attribute Required Description
medication true Parent attribute for medication
↳ name true Name of the medication (string)
↳ current false Permitted values are true, false
↳ dosage false Dosage of the medication (string)
↳ frequency false Frequency of the medication (string)
↳ med_id false Unique ID of the medication
↳ ndc_id false NDC ID of the medication
Terminal window
curl -X POST {server_url}/api/v2/patients/{patient_id}/medications \
-H "Content-type: application/json" \
-H "Authorization: Bearer {jwt_token}" \
-H 'Accept: application/json' \
-d '{
"medication": {
"name": "Ibuprofen PM 200 mg-25 mg capsule",
"current": true,
"dosage": "1",
"frequency": "Once Daily",
"ndc_id": "00363061121"
}
}'
{
"medication": {
"id": 29,
"name": "Ibuprofen PM 200 mg-25 mg capsule",
"dosage": "1",
"frequency": "Once Daily",
"quantity": 1,
"source": "Self Reported",
"current": true,
"ndc_id": "00363061121"
}
}

To remove a medication from a patient’s list of medications, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/medications/{medication_id}

This request must include a valid User JWT token, please see our documentation.

Parameter Default
Content-type application/json
Authorization Bearer {jwt_token}
Terminal window
curl -X DELETE {server_url}/api/v1/patients/{patient_id}/medications/{medication_id} \
-H "Content-type: application/json" \
-H "Authorization: Bearer {jwt_token}"

To remove a medication from a patient’s list of medications using the NDC Id, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/medications/ndc/{ndc_id}

This request must include a valid User JWT token, please see our documentation.

Parameter Default
Content-type application/json
Authorization Bearer {jwt_token}

The following parameters are required when removing an allergy.

Attribute Required Description
patient_id true MD Live ID for patient
ndc_id true NDC Id of medication
Terminal window
curl -X DELETE {server_url}/api/v1/patients/{patient_id}/medications/ndc/{ndc_id} \
-H "Content-type: application/json" \
-H "Authorization: Bearer {jwt_token}"

To retrieve the list of patient’s current active medications, make a request to:

GET {server_url}/api/v1/patients/{patient_id}/medications

This request must include a valid User JWT token, please see our documentation.

Parameter Default
Content-type application/json
Authorization Bearer {jwt_token}
Terminal window
curl -X GET {server_url}/api/v1/patients/{patient_id}/medications \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-type: application/json' \
-H 'Accept: application/json' \
{
"medications": [
{
"id":2,
"name": "Ibuprofen PM 200 mg-25 mg capsule",
"dosage": "1",
"frequency": "Once Daily",
"quantity":1,
"source": "Self Reported",
"current":false,
"ndc_id": "00363061121"
}
]
}

Searches for medications starting with term. Results must not exceed limit.

POST {server_url}/api/v2/medications/search

This request must include a valid JWT token, please see our documentation.

Parameter Default
Content-type application/json
Authorization Bearer {jwt_token}

The following parameters can be used to search for a medication.

Attribute Required Description
search true Parent attribute for search criteria
↳ term true The term to match (string)
↳ limit false Limit size of the result set, default size is 10, max size is 50
Terminal window
curl -X POST {server_url}/api/v2/medications/search \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-type: application/json' \
-H 'Accept: application/json' \
-d '{
"search": {
"term": "ibuprofen 50",
"limit": 10
}
}'
{
"medications": [
{
"id": 82465,
"name": "ibuprofen 50 mg chewable tablet",
"description": "ibuprofen 50 mg chewable tablet",
"med_id": 82465
},
{
"id": 78829,
"name": "ibuprofen 50 mg/1.25 mL oral drops,suspension",
"description": "ibuprofen 50 mg/1.25 mL oral drops,suspension",
"med_id": 78829
}
]
}