Skip to content
MD Live logoMD Live logoMD Live Developer API

Behavioral Health History

To create or update the behavioral health history for a patient, make a request to:

POST {server_url}/api/v1/patients/:patient_id/behavioral_histories

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 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.

Attribute Required Description
patient_id true MD Live ID for patient
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:
  • Emotional Problem
  • Substance Abuse
  • Relationship Issue
  • Other
      ↳ active true Patient’s answer for that condition. Should be either:
  • true
  • false
↳ 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:
  • Alcohol Dependence
  • Obsessive Compulsive Disorder (OCD)
  • “Bipolar Disorder
  • Schizophrenia
  • Depression
  • Substance Abuse
      ↳ active true Patient’s answer for that condition. Should be either:
  • true
  • false
↳ 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:
  • Alcohol Dependence
  • Obsessive Compulsive Disorder (OCD)
  • Bipolar Disorder
  • Schizophrenia
  • Depression
  • Substance Abuse
      ↳ active true Patient’s answer for that condition. Should be either:
  • true
  • false
↳ hospitalized true Has the patient ever been hospitalized for mental health or substance abuse treatment. Should be either:
  • true
  • false
↳ 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:
  • true
  • false
↳ counseling_preference true Patient’s prefence in provider. Should be one of:
  • No Preference
  • Male
  • Female
Terminal window
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
}
}'
{
"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.

GET {server_url}/api/v1/patients/:patient_id/behavioral_histories

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 a patient.

Attribute Required Description
patient_id true ID of the patient to be retrieved
Terminal window
curl {server_url}/api/v1/patients/:patient_id/behavioral_histories
-H "Content-type: application/json"
-H "Authorization: Bearer 34a2sample-user-token"
{
"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"
}
}