Behavioral Health History
Create
Section titled “Create”To create or update the behavioral health history for a patient, make a request to:
HTTP Request
Section titled “HTTP Request”POST {server_url}/api/v1/patients/:patient_id/behavioral_histories
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 permitted when creating or updating the behavorial health history of a patient. The payload can contain the entire patient behavioral health history with appropriate attribute values set, or it can contain the required items plus only the non-required items that have been modified.
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 |
|---|---|---|
| behavioral_history | true | Parent attribute for behavioral health history |
| ↳ behavioral_health_reasons | true | Parent attribute for the array of reasons a patient would seek behavioral care. (Include an item in the array for each reason with active set to true/false) |
| ↳ condition | true | Name of condition. Should be one of:
|
| ↳ active | true | Patient’s answer for that condition. Should be either:
|
| ↳ behavioral_health_description | false | Additional explanation for the reason for seeking behavioral care (required if behavioral health reasons contains condition ‘Other’ |
| ↳ behavioral_mconditions | true | Parent attribute for the array of behavioral medical conditions (Include an item in the array for each condition with active set to true/false) |
| ↳ condition | true | Name of condition. Should be one of:
|
| ↳ active | true | Patient’s answer for that condition. Should be either:
|
| ↳ behavioral_family_history | true | Parent attribute for the array of family behavioral health history (Include an item in the array for each condition with active set to true/false) |
| ↳ condition | true | Name of condition. Should be one of:
|
| ↳ active | true | Patient’s answer for that condition. Should be either:
|
| ↳ hospitalized | true | Has the patient ever been hospitalized for mental health or substance abuse treatment. Should be either:
|
| ↳ hospitalized_date | false | Date of patient hospitalization if true, in the format YYYY-MM-DD (required when ‘hospitalized’ is true) |
| ↳ hospitalized_duration | false | Description of length of stay in the hospital provided by the patient (required when ‘hospitalized’ is true) |
| ↳ family_hospitalized | false | Has a family member of the patient ever been hospitalized for mental health or substance abuse treatment. Should be either:
|
| ↳ counseling_preference | true | Patient’s prefence in provider. Should be one of:
|
Example Request
Section titled “Example Request”curl -X POST {server_url}/api/v1/patients/:patient_id/behavioral_histories-H "Content-type: application/json"-H "Authorization: Bearer {jwt_token}"-d '{ "behavioral_history": { "behavioral_health_reasons": [ { "condition": "Emotional Problem", "active": false }, { "condition": "Substance Abuse", "active": true }, { "condition": "Relationship Issue", "active": false }, { "condition": "Other", "active": true } ], "behavioral_health_description": "drinking to deal with stress", "behavioral_mconditions": [ { "condition": "Alcohol Dependence", "active": false }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Anxiety", "active": false }, { "condition": "Panic Attacks", "active": false }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": false }, { "condition": "Substance Abuse", "active": true } ], "behavioral_family_history": [ { "condition": "Alcohol Dependence", "active": false }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": false }, { "condition": "Substance Abuse", "active": true } ], "counseling_preference": "No Preference", "hospitalized": false } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v1/patients/:patient_id/behavioral_histories", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }, :payload => { "behavioral_history"=> { "behavioral_health_reasons"=> [ { "condition"=> "Emotional Problem", "active"=> false }, { "condition"=> "Substance Abuse", "active"=> true }, { "condition"=> "Relationship Issue", "active"=> false }, { "condition"=> "Other", "active"=> true } ], "behavioral_health_description"=> "drinking to deal with stress" "behavioral_mconditions"=> [ { "condition"=> "Alcohol Dependence", "active"=> false }, { "condition"=> "Obsessive Compulsive Disorder (OCD)", "active"=> false }, { "condition"=> "Anxiety", "active"=> false }, { "condition"=> "Panic Attacks", "active"=> false }, { "condition"=> "Bipolar Disorder", "active"=> false }, { "condition"=> "Schizophrenia", "active"=> false }, { "condition"=> "Depression", "active"=> false }, { "condition"=> "Substance Abuse", "active"=> true } ], "behavioral_family_history"=> [ { "condition"=> "Alcohol Dependence", "active"=> false }, { "condition"=> "Obsessive Compulsive Disorder (OCD)", "active"=> false }, { "condition"=> "Bipolar Disorder", "active"=> false }, { "condition"=> "Schizophrenia", "active"=> false }, { "condition"=> "Depression", "active"=> false }, { "condition"=> "Substance Abuse", "active"=> true } ], "counseling_preference"=> "No Preference", "hospitalized"=> false }, }).executeExample Response
Section titled “Example Response”{ "behavioral_history": { "behavioral_health_reasons": [ { "condition": "Emotional Problem", "active": false }, { "condition": "Substance Abuse", "active": true }, { "condition": "Relationship Issue", "active": false }, { "condition": "Other", "active": false } ], "behavioral_mconditions": [ { "condition": "Alcohol Dependence", "active": true }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Anxiety", "active": false }, { "condition": "Panic Attacks", "active": false }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": false }, { "condition":"Substance Abuse", "active": false } ], "behavioral_family_history": [ { "condition": "Alcohol Dependence", "active": true }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": false }, { "condition": "Substance Abuse", "active": false } ], "behavioral_health_description": "drinking to deal with stress", "hospitalized": false, "family_hospitalized": false, "hospitalized_date": null, "hospitalized_duration": null, "counseling_preference": "No Preference" }}Retrieve the behavioral health history of the patient. You need only supply the unique patient identifier that was returned upon patient registration.
HTTP Request
Section titled “HTTP Request”GET {server_url}/api/v1/patients/:patient_id/behavioral_histories
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} |
Request Body
Section titled “Request Body”The following parameters are required to retrieve a patient.
| Attribute | Required | Description |
|---|---|---|
| patient_id | true | ID of the patient to be retrieved |
Example Request
Section titled “Example Request”curl {server_url}/api/v1/patients/:patient_id/behavioral_histories-H "Content-type: application/json"-H "Authorization: Bearer 34a2sample-user-token"RestClient::Request.new( :method => :get, :url => "{server_url}/api/v1/patients/:patient_id/behavioral_histories", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer 34a2sample-user-token" }).executeExample Response
Section titled “Example Response”{ "behavioral_history": { "behavioral_health_reasons": [ { "condition": "Emotional Problem", "active": true }, { "condition": "Substance Abuse", "active": false }, { "condition": "Relationship Issue", "active": false }, { "condition": "Other", "active": false } ], "behavioral_mconditions": [ { "condition": "Alcohol Dependence", "active": false }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Anxiety", "active": false }, { "condition": "Panic Attacks", "active": true }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": true }, { "condition":"Substance Abuse", "active": false } ], "behavioral_family_history": [ { "condition": "Alcohol Dependence", "active": false }, { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false }, { "condition": "Bipolar Disorder", "active": false }, { "condition": "Schizophrenia", "active": false }, { "condition": "Depression", "active": true }, { "condition": "Substance Abuse", "active": false } ], "behavioral_health_description": "dealing with a lot of stress.", "hospitalized": true, "family_hospitalized": false, "hospitalized_date": "2016-04-15", "hospitalized_duration": "2 days", "counseling_preference":"No preference" }}