Field | Type | Description |
---|---|---|
patient_id | integer | Required. Id of patient returned from create patient API. |
patient_form_name | string | Required. Patient form name. |
form_responses | array | Required. Array of responses to the questionnaire. Questions are of type "single_option", "multiple_option", "dropdown", "dropdown_with_multiselect", "description", "table", "text", "numbers_only", "date" and "file". How to construct response of every question type is described below. |
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "single_option". |
text | string | Required. Question text. |
answer | array | Required. Contains answer text and "sub-question" (if any) of type "single_option", "description" or "date" |
{
"question_type": "single_option",
"text": "Have you seen us before?",
"answer": {
"text": "This is my first consult for depression or anxiety",
"subquestion": {
"question_type": "single_option",
"text": "Have you ever used prescription medicines to help treat cold sores? If yes, which one and what dose? Select all that apply to you.",
"answer": {
"text": "I have not taken any prescription medicine for cold sores",
"subquestion": {
"question_type": "description",
"text": "Please tell us more",
"answer": {
"text": "I have not taken any prescription medicine for cold sores"
}
}
}
}
}
}
{
"question_type": "single_option",
"text": "Have you ever used prescription medicines to help treat cold sores?",
"answer": {
"text": "Yes",
"subquestion": {
"question_type": "date",
"text": "Please specify the date you've used it",
"answer": {
"text": "2021-01-20"
}
}
}
}
{
"question_type": "single_option",
"text": "Have you ever used prescription medicines to help treat cold sores?",
"answer": {
"text": "Yes"
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "multiple_option". |
text | string | Required. Question text. |
answer | multi-dimentional array | Required. Contains array of answers. Answer can contain text and "sub-question" (if any) of type "single_option" or "description". |
{
"question_type": "multiple_option",
"text": "What is the reason you are using Doctodoor today?",
"answer": [
{
"text": "Want prescription medicine to take as needed when a cold sore outbreak happens (PRN)",
"subquestion": {
"question_type": "single_option",
"text": "When you have a cold sore outbreak and you don't take medicine, where are your cold sores located? Select all that apply to you.",
"answer": {
"text": "On the lips or the edge / border of the lips"
}
}
},
{
"text": "Other",
"subquestion": {
"question_type": "description",
"text": "Please tell us more.",
"answer": {
"text": "Some other text inserted by user"
}
}
}
]
}
{
"question_type": "multiple_option",
"text": "What is the reason you are using Doctodoor today?",
"answer": [
{
"text": "Want prescription medicine to take as needed when a cold sore outbreak happens (PRN)"
},
{
"text": "Other"
}
]
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "dropdown". |
text | string | Required. Question text. |
answer | array | Required. Contains only "text" element inside |
{
"question_type": "dropdown",
"text": "If you don’t take medicine, do you develop blisters with your cold sore?",
"answer": {
"text": "Stress"
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "dropdown_with_multiselect". |
text | string | Required. Question text. |
answer | multi-dimentional array | Required. Contains array of answers. Answer cannot contain any "sub-question" |
{
"question_type": "dropdown_with_multiselect",
"text": "Certain situations can trigger a cold sore outbreak. Which ones have you noticed? Select all that apply to you.",
"answer": [
{
"text": "Stress"
},
{
"text": "Fever"
}
]
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "description". |
text | string | Required. Question text. |
answer | array | Required. Contains only "text" element inside |
{
"question_type": "description",
"text": "Please specify side effect and which medicine",
"answer": {
"text": "Itching, burning with PCM"
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "table". |
text | string | Required. Title of the table. |
answer | array | Required. Must contain array of "columns" and multi-dimentional "data" (as table data) related to that columns. "data" must contain all columns (specified in "columns" element) as key for related value. |
{
"question_type": "table",
"text": "Vaccination History",
"answer": {
"columns": [
"Vaccine Name",
"Is Vaccinated",
"Taken Date"
],
"data": [
{
"Vaccine Name": "Flu",
"Is Vaccinated": "No",
"Taken Date": null
},
{
"Vaccine Name": "Shingles",
"Is Vaccinated": "Yes",
"Taken Date": "2020-03-21"
},
{
"Vaccine Name": "Pneumonia",
"Is Vaccinated": "No",
"Taken Date": null
},
{
"Vaccine Name": "Tetanus",
"Is Vaccinated": "Yes",
"Taken Date": "2020-03-01"
}
]
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "text". |
text | string | Required. Question text. |
answer | array | Required. Contains only "text" element inside |
{
"question_type": "text",
"text": "When you have a cold sore outbreak and you don't take medicine, where are your cold sores located?",
"answer": {
"text": "On the lips or the edge / border of the lips"
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "numbers_only". |
text | string | Required. Question text. |
answer | array | Required. Contains only "text" element inside, should be a number. |
{
"question_type": "numbers_only",
"text": "If you don’t take medicine, how many times a year do you get cold sore outbreak?",
"answer": {
"text": 5
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "date". |
text | string | Required. Question text. |
answer | array | Required. Contains only "text" element inside, must be a date in "YYYY-MM-DD" format. |
{
"question_type": "date",
"text": "Please specify your date of birth?",
"answer": {
"text": "1987-01-22"
}
}
Field | Type | Description |
---|---|---|
question_type | string | Required. Must be "file". |
text | string | Required. Question text. |
attachments | multi-dimentional array | Required. Contains elements with keys "file_name" and "uuid", that are returned from "Upload patient file" API. |
{
"question_type": "file",
"text": "Please upload your prescription",
"attachments": [
{
"file_name": "prescription1.jpg",
"uuid": "4405a28c-c4d7-44f1-9546-e59b02f02643"
},
{
"file_name": "prescription2.png",
"uuid": "b7141288-17db-49b6-ba86-262d99e8b685"
},
{
"file_name": "prescription3.pdf",
"uuid": "6fd0b2f3-2b0c-4822-9156-ea12803334f6"
}
]
}
{
"message": "Data posted successfully"
}
{
"error_message": "Request Failed. {{error_message}}"
}