Skip to content
MD Live logoMD Live logoMD Live Developer API

Allergies

To create an allergy for a patient, make a request to:

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

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 creating an allergy. To search for the allergy and retrieve needed parameter values, reference allergies - search.

Attribute Required Description
patient_id true MD Live ID for patient
Attribute Required Description
allergy true Parent attribute for allergy
↳ name true Description of allergy retrieved from search
↳ severity true Description of severity. Should be one of:
  • Not Sure
  • Mild
  • Moderate
  • Severe
↳ reaction true Description of reaction to allergen
Value can be a maximum of 80 characters
↳ fdb_allergy_id false FDB Allergy Id
Terminal window
curl -X POST {server_url}/api/v2/patients/{patient_id}/allergies
-H "Content-type: application/json"
-H "Authorization: Bearer {jwt_token}"
-d '{
"allergy": {
"name": "Peanut",
"severity": "Severe",
"reaction": "Throat closes",
"fdb_allergy_id": "568"
}
}'
{
"allergy": {
"id": 110751,
"name": "Peanut",
"severity": "Severe",
"active": true,
"reaction": "Throat closes",
"source": "Self Reported",
"current": null,
"fdb_allergy_id": "568"
}
}

Allergy Implementation

To remove an allergy from a patient’s list of allergies, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_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
allergy_id true ID of patient’s allergy
Terminal window
curl -X DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}
-H "Content-type: application/json"
-H "Authorization: Bearer {jwt_token}"

To remove an allergy from a patient’s list of allergies using the FDB Allergy Id, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy/{fdb_allergy_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
fdb_allergy_id true FDB Id of patient’s allergy
Terminal window
curl -X DELETE {server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy{fdb_allergy_id}
-H "Content-type: application/json"
-H "Authorization: Bearer {jwt_token}"

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

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

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 to retrieve the list of patient’s medical conditions.

Parameter Required Description
patient_id true MD Live ID for patient
Terminal window
curl -X GET {server_url}/api/v1/patients/{patient_id}/allergies
-H "Content-type: application/json"
-H "Authorization: Bearer {jwt_token}"
{
"allergies": [
{
"id": 110750,
"name": "Peanut",
"severity": "Severe",
"active": true,
"reaction": "Throat closes",
"source": "Self Reported",
"current": true,
"fdb_allergy_id": "568"
},
{
"id": 110749,
"name": "Ibuprofen",
"severity": "Moderate",
"active": true,
"reaction": "Rashes on skin",
"source": "Self Reported",
"current": true,
"fdb_allergy_id": "54222803"
}
]
}

MD Live offers the ability to search against allergies to be used for offering auto-complete suggestions as a patient is adding an allergy. To search, make a request to:

POST {server_url}/api/v1/allergies/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 are accepted when searching medical conditions.

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
Terminal window
curl -X POST {server_url}/api/v1/allergies/search
-H "Content-type: application/json"
-H "Authorization: Bearer {jwt_token}"
-d '{ "search": {
"term": "pen",
"limit": "2"
}
}'
{
"allergies": [
{
"id": 977,
"name": "Penicillins"
},
{
"id": 981,
"name": "Pentamidine"
}
]
}