Health History
Create/Update
Section titled “Create/Update”Create or update the health history questions for a given patient.
HTTP Request
Section titled “HTTP Request”POST {server}/api/v2/patients/{patient_id}/health_history
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 |
| Accept | application/json |
| Authorization | Bearer {jwttoken} |
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Request Body Parameters
Section titled “Request Body Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| health_history | hash of objects | true | Parent attribute for hash of medical history and personal information objects |
| ↳ medical_history | hash of objects | true | Parent attribute for hash of medical history objects |
| ↳ allergies | boolean | true | True or False answer to if the patient has any allergies |
| ↳ medications | boolean | true | True or False answer to if the patient is taking any medications |
| ↳ surgeries | boolean | true | True or False answer to if the patient has had any surgeries |
| ↳ medical_conditions | boolean | true | True or False answer to if the patient has any medical conditions |
| ↳ personal_information | hash of objects | true | Parent attribute for hash of pcp questions |
| ↳ height_feet | integer | true | Height of patient in feet |
| ↳ height_inches | integer | true | Height of patient in inches |
| ↳ weight | integer | true | Weight of patient in pounds |
| ↳ is_breast_feeding | boolean | conditionally true | True or False answer to if the patient is currently breast feeding. Only required when patient: gender = female and age >= 13. |
| ↳ is_pregnant | boolean | conditionally true | True or False answer to if the patient is currently pregnant. Only required when patient: gender = female and age >= 13. |
| ↳ menstrual_cycle | date | false | Date of last menstrual cycle. Recommended to be collected if the patient is female and of the age of 13 or greater. |
| ↳ allergy | array of objects | conditionally true | Parent attribute for array of patient allergies Only required when the allergies flag under medical_history is true. |
| ↳ name | string | conditionally true | Description of allergy retrieved from search Only required when the allergies flag under medical_history is true. |
| ↳ severity | string | conditionally true | Description of severity should be one of:
Only required when the allergies flag under medical_history is true. |
| ↳ reaction | string | conditionally true | Description of reaction Only required when the allergies flag under medical_history is true. |
| ↳ medication | array of objects | conditionally true | Parent attribute for array of patient medications Only required when the medications flag under medical_history is true. |
| ↳ name | string | conditionally true | Description of medication Only required when the medications flag under medical_history is true. |
| ↳ current | boolean | false | Permitted values are true, false |
| ↳ frequency | string | false | Frequency of the medication |
| ↳ med_id | string | false | Unique ID of the medication |
| ↳ surgery | array of objects | conditionally true | Parent attribute for array of patient surgeries Only required when the surgeries flag under medical_history is true. |
| ↳ name | string | conditionally true | Name of the surgery/procedure Only required when the surgeries flag under medical_history is true. |
| ↳ surgery_year | integer | conditionally true | Year of surgery/procedure Only required when the surgeries flag under medical_history is true. |
| ↳ medical_condition | array of objects | conditionally true | Parent attribute for patient medical condition Only required when the medical_conditions flag under medical_history is true. |
| ↳ condition | string | conditionally true | Description of condition Only required when the medical_conditions flag under medical_history is true. |
| ↳ source | string | false | ‘Self Reported’ |
| ↳ concept_id | string | false | Concept ID returned in Clinical Concepts search |
| ↳ snomed | string | false | SNOMED returned in Clinical Concepts search |
| ↳ icd10 | string | false | ICD-10 code returned in Clinical Concepts search |
| ↳ pediatric_profile | hash of objects | conditionally true | Parent attribute for hash of pediatric profile objects Only required when patient: 0 < age < 13. |
| ↳ Birth complications | boolean | conditionally true | True or False answer to if patient had birth complications Only required when patient: 0 < age < 2. |
| ↳ Birth complications explanation | string | false | A description of the patient’s birth complications. Max length of 255 characters. |
| ↳ Bottle Fed | boolean | false | True of False answer to if patient was bottle fed |
| ↳ Breast Fed | boolean | false | True or False answer to if patient was breastfed |
| ↳ Breathing problems | boolean | false | True or False answer to if patient had breathing problems |
| ↳ Childcare outside home | boolean | conditionally true | True or False answer to if patient was cared for outside home Only required when patient: 0 < age < 13. |
| ↳ Colic | boolean | false | True or False answer to if patient had Colic |
| ↳ Current Diet | string | conditionally true | Description of patient’s current diet Only required when patient: 0 < age < 2. |
| ↳ Delivery Type | string | false | Description of delivery type |
| ↳ Feeding Problems | boolean | false | True or False answer to if patient had feeding problems |
| ↳ Immunization up to date? | boolean | conditionally true | True or False answer to if patient immunization is up to date Only required when patient: 0 < age < 13. |
| ↳ Infections | boolean | false | True or False answer to if patient had infections |
| ↳ Jaundice | boolean | false | True or False answer to if patient had jaundice |
| ↳ Last shot | string | conditionally true | When the patient’s last shot was. Max length of 255 characters. Only required when the Immunization up to date? flag is false. |
| ↳ Newborn complications | boolean | false | True or False answer to if patient had newborn complications |
| ↳ Newborn complications explanation | string | false | Description of patient’s newborn complications |
| ↳ Siblings | boolean | conditionally true | True or False answer if patient has siblings Only required when patient: 0 < age < 13. |
| ↳ Smoking exposure | boolean | conditionally true | True or False answer to if patient had smoking exposure Only required when patient: 0 < age < 13. |
| ↳ Current weight in lbs. | integer | conditionally true | The patient’s current weight in lb. Must be integer, no decimals allowed Only required when patient: 0 < age < 13. |
Example Request
Section titled “Example Request”curl -X POST {server_url}/api/v2/patients/{patient_id}/health_history \ -H "Content-type: application/json" \ -H "Authorization: Bearer {jwt_token}" \ -H "Accept: application/json" \ -d '{ "health_history": { "medical_history": { "allergies": true, "medications": true, "surgeries": true, "medical_conditions": true }, "personal_information": { "height_feet": 5, "height_inches": 4, "weight": 120, "is_breast_feeding": true, "is_pregnant": true, "menstrual_cycle": "9/19/2016" }, "allergy": [{ "name": "Bee Pollen", "severity": "Severe", "reaction": "Sneezing and Coughing" }], "medication": [{ "name": "Hydrocortisone Ace (Topical)", "current": true, "frequency": "twice daily" }], "surgery": [{ "name": "Hip Replacement", "surgery_year": 2015 }], "medical_condition": [{ "condition": "Ear Pain", "source": "Self Reported", "concept_id": "64", "snomed": "267102003", "icd10": "R07.0" }], "pediatric_profile": { "Birth complications": false, "Birth complications explanation": "Some explanation of birth complications", "Bottle Fed": false, "Breast Fed": false, "Breathing problems": false, "Childcare outside home": false, "Colic": false, "Current Diet": "null", "Delivery Type": "null", "Feeding Problems": false, "Immunization up to date?": false, "Infections": false, "Jaundice": false, "Last shot": "Yesterday", "Newborn complications": true, "Newborn complications explanation": "Some explanation of newborn complications", "Siblings": false, "Smoking exposure": false, "Current weight in lbs.": 11 } } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v2/patients/{patient_id}/health_history", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}", "Accept" => "application/json" }, :payload => { health_history: { medical_history: { allergies: false, medications: true, surgeries: false, medical_conditions: false }, personal_information: { height_feet: 5, height_inches: 4, weight: 120, is_breast_feeding: false, is_pregnant: false, menstrual_cycle: "9/19/2016" }, allergy: [{ name: "Bee Pollen", severity: "Severe", reaction: "Sneezing and Coughing" }], medication: [{ name: "Hydrocortisone Ace (Topical)", current: true, frequency: "twice daily" }], surgery: [{ name: "Hip Replacement", surgery_year: 2015 }], medical_condition: [{ condition: "Ear Pain", source: "Self Reported", concept_id: "64", snomed: "267102003", icd10: "R07.0" }], pediatric_profile: { birth_complications: false, birth_complications_explanation: "Some explanation of birth complications", bottle_fed: false, breast_fed: false, breathing_problems: false, childcare_outside_home: false, colic: false, current_diet: "null", delivery_type: "null", feeding_problems: false, immunization_up_to_date: false, infections: false, jaundice: false, last_shot: "Yesterday", newborn_complications: true, newborn_complications_explanation: "Some explanation of newborn complications", siblings: false, smoking_exposure: false, current_weight_in_lbs: 11 } } }).executeExample Response
Section titled “Example Response”{ "health_conditions": [ { "patient_id": 52, "medical_condition": { "id": 19, "condition": "Headaches", "source": "Self Reported", "concept_id": "128", "snomed": "25064002", "icd10": "R51", "date_reported": "2017-01-26T09:45:28.000-05:00", "last_updated_date": "2017-01-26T09:45:28.000-05:00", "active": true } }, { "patient_id": 52, "medical_condition": { "id": 28, "condition": "Ear Pain", "source": "Self Reported", "concept_id": 64, "snomed": 267102003, "icd10": "R07.0", "date_reported": "2017-11-13T15:47:40.000-05:00", "last_updated_date": "2017-11-13T15:47:40.000-05:00", "active": true } } ], "personal_info": { "id": 1, "user_id": 52, "access_code": "DTC 949D38 76", "blood_type": "A+", "organ_donor": false, "photo_file_name": "Screen_Shot_2016-06-28_at_5.07.36_PM.png", "photo_content_type": "image\/png", "photo_file_size": 270649, "height_feet": 5, "height_inches": 4, "weight": 120, "updated_at": "2018-01-18T16:23:44.000-05:00", "created_at": "2016-07-06T16:36:04.000-04:00", "status": null, "birth_height": null, "birth_weight": 12.1, "is_pregnant": false, "is_breast_feeding": false, "systolic_bp": null, "diastolic_bp": null, "head_circumference": null, "updated_by": 52, "menstrual_cycle": "two weeks", "alternate_visit_option": "Seen my provider in person", "do_you_have_primary_care_physician": false, "photo": { "url": "\/system\/photos\/1\/original\/Screen_Shot_2016-06-28_at_5.07.36_PM.png", "medium": { "url": "\/system\/photos\/1\/medium\/Screen_Shot_2016-06-28_at_5.07.36_PM.png" }, "small": { "url": "\/system\/photos\/1\/small\/Screen_Shot_2016-06-28_at_5.07.36_PM.png" }, "thumb": { "url": "\/system\/photos\/1\/thumb\/Screen_Shot_2016-06-28_at_5.07.36_PM.png" } } }, "evr_medications": [ { "id": 2, "name": "Vitamin C", "dosage": "", "frequency": "Once Daily", "quantity": 1, "source": "Self Reported", "current": false }, { "id": 1, "name": "Hydrocortisone Ace (Topical)", "dosage": "", "frequency": "Twice Daily", "quantity": 1, "source": "Self Reported", "current": true } ], "allergies": [ { "id": 1, "name": "Bee Pollen", "severity": "Severe", "active": true, "reaction": "Sneezing and Coughing", "source": "Self Reported", "current": true } ], "source_for_ccd": "DTC Physician Visit", "is_taking_medication": "Yes", "has_allergies": "Yes", "external_reported_surgeries": [ ], "surgeries_taken": [ { "id": 1, "name": "Hip Replacement", "year": "2015" } ], "had_surgeries": "Yes", "has_medical_conditions": "Yes", "pediatric_profile": { "Birth complications": "No", "Birth complications explanation": "Some explanation of birth complications", "Bottle Fed": "No", "Breast Fed": "No", "Breathing problems": "No", "Childcare outside home": "No", "Colic": "No", "Current Diet": "Null", "Delivery Type": "Null", "Feeding Problems": "No", "Immunization up to date?": "Yes", "Infections": "Yes", "Jaundice": "No", "Last shot": "Yesterday", "Newborn complications": "Yes", "Newborn complications explanation": "Some explanation of newborn complications", "Siblings": "Yes", "Smoking exposure": "No", "Current weight in lbs.": "11"}, "pediatric_profile_completed": true, "skip_health_history": false}