Allergies
Create
Section titled “Create”To create an allergy for a patient, make a request to:
HTTP Request
Section titled “HTTP Request”POST {server_url}/api/v2/patients/{patient_id}/allergies
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| 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.
URL Parameter
Section titled “URL Parameter”| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Request Body Parameters
Section titled “Request Body Parameters”| 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:
|
| ↳ reaction | true | Description of reaction to allergen Value can be a maximum of 80 characters |
| ↳ fdb_allergy_id | false | FDB Allergy Id |
Example Request
Section titled “Example Request”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" } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v2/patients/{patient_id}/allergies", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }, :payload => { "allergy"=> { "name"=> "Peanut", "severity"=> "Severe", "reaction"=> "Throat closes", "fdb_allergy_id"=> "568" } }).executeExample Response
Section titled “Example Response”{ "allergy": { "id": 110751, "name": "Peanut", "severity": "Severe", "active": true, "reaction": "Throat closes", "source": "Self Reported", "current": null, "fdb_allergy_id": "568" }}Implementation
Section titled “Implementation”
Delete
Section titled “Delete”To remove an allergy from a patient’s list of allergies, make a request to:
HTTP Request
Section titled “HTTP Request”DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Authorization | Bearer {jwt_token} |
The following parameters are required when removing an allergy.
URL Parameter
Section titled “URL Parameter”| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
| allergy_id | true | ID of patient’s allergy |
Example Request
Section titled “Example Request”curl -X DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}-H "Content-type: application/json"-H "Authorization: Bearer {jwt_token}"RestClient::Request.new( :method => :delete, :url => "{server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }).executeDelete Using FDB
Section titled “Delete Using FDB”To remove an allergy from a patient’s list of allergies using the FDB Allergy Id, make a request to:
HTTP Request
Section titled “HTTP Request”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
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Authorization | Bearer {jwt_token} |
The following parameters are required when removing an allergy.
URL Parameter
Section titled “URL Parameter”| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
| fdb_allergy_id | true | FDB Id of patient’s allergy |
Example Request
Section titled “Example Request”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}"RestClient::Request.new( :method => :delete, :url => "{server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy/{fdb_allergy_id}", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }).executeTo retrieve the list of a patient’s current list of allergies, make a request to:
HTTP Request
Section titled “HTTP Request”GET {server_url}/api/v1/patients/{patient_id}/allergies
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Authorization | Bearer {jwt_token} |
The following parameters are required to retrieve the list of patient’s medical conditions.
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Example Request
Section titled “Example Request”curl -X GET {server_url}/api/v1/patients/{patient_id}/allergies-H "Content-type: application/json"-H "Authorization: Bearer {jwt_token}"RestClient::Request.new( :method => :get, :url => "{server_url}/api/v1/patients/{patient_id}/allergies", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }).executeExample Response
Section titled “Example Response”{
"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" } ]}Search
Section titled “Search”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:
HTTP Request
Section titled “HTTP Request”POST {server_url}/api/v1/allergies/search
This request must include a valid JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Authorization | Bearer {jwt_token} |
The following parameters are accepted when searching medical conditions.
Request Body Parameter
Section titled “Request Body Parameter”| 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 |
Example Request
Section titled “Example Request”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" } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v1/allergies/search", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }, :payload => { "search"=> { "term"=> "pen", "limit"=> "2" } }).executeExample Response
Section titled “Example Response”{ "allergies": [ { "id": 977, "name": "Penicillins" }, { "id": 981, "name": "Pentamidine" } ]}