Assessment Responses
Create
Section titled “Create”To create an assessment response for a patient, make a request to:
HTTP Request
Section titled “HTTP Request”POST {server_url}/api/v1/patients/{patient_id}/assessment_responses
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 assessment response.
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 |
|---|---|---|
| assessment | true | Parent attribute for assessment |
| ↳ assessment_key | true | Type of assessment. Must be of a type returned by assessments list |
| ↳ responses | true | Hash of response answer objects |
| ↳↳ key | true | response_answer_key value found in assessment show questions attribute |
| ↳↳ value | true | the selected option value found in assessment show questions:options attribute |
Example Request
Section titled “Example Request”curl -X POST {server_url}/api/v1/patients/{patient_id}/assessment_responses-H "Content-type: application/json"-H "Authorization: Bearer {jwt_token}"-d '{"assessment" : { "assessment_key": "PHQ-9", "responses": { "0": "0", "1": "0", "2": "0", "3": "1", "4": "1", "5": "1", "6": "2", "7": "2", "8": "0" } }}'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v1/patients/{patient_id}/assessment_responses", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer {jwt_token}" }, :payload => {"assessment"=> { "assessment_key"=> "PHQ-9", "responses"=> { "0"=> "0", "1"=> "0", "2"=> "0", "3"=> "1", "4"=> "1", "5"=> "1", "6"=> "2", "7"=> "2", "8"=> "0" }}}).executeExample Response
Section titled “Example Response”{ "assessment_response": { "id": 4, "patient_id": 4, "provider_id": 40, "numeric_score": 7, "text_score": "mild_depression_possible", "assessment_key": "PHQ-9", "responses": { "0": "0", "1": "0", "2": "0", "3": "1", "4": "1", "5": "1", "6": "2", "7": "2", "8": "0" }, "created_at": "2020-03-03T14:53:57.000-05:00", "updated_at": "2020-03-03T14:53:57.000-05:00", "results": { "summary": "Mild Depression Possible", "description": "Your screening results appear to indicate that you may be suffering from mild depression. Depression symptoms take many forms and each person’s experience can vary. Many people experience reduced energy and decreased activity. People who have answered in a similar way to you may note that their symptoms last longer than a day or two. While some people may be able to cope effectively with this level of depression in their daily life, others may need a helping hand.", "disclaimer": "The results of this quiz do not constitute a diagnosis or a recommendation for treatment. You may still choose to consult with a mental health professional to discuss any concerns or questions. For crisis situations, please call the National Suicide Prevention Lifeline at 1-800-273-8255. The call is free and help is available 24 hours per day, 7 days per week. If you are experiencing an emergency, call 911 or go to your nearest emergency room." } }}