Form Response
A form response is a collection of answers to a form.
The form response model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the form response.
- Name
object- Type
- string
- Description
Always 'form_response'.
- Name
form- Type
- string
- Description
Form this is a response to.
- Name
form_version- Type
- string
- Description
Form version this is a response to.
- Name
patient- Type
- string
- Description
Patient this form response is for.
- Name
sections- Type
- array of objects
- Description
All the contents in the form response.
- Name
score- Type
- number
- Description
Total score of the form response.
- Name
status_history- Type
- array of objects
- Description
- Status history of the form_response.
- Name
external_id- Type
- string
- Description
A client-specified unique ID to associate with this form response.
- Name
created_by- Type
- string
- Description
Creator of the form response.
- Name
created_at- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the form response was created.
- Name
last_updated_at- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the form response was last updated.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"external_id": "tS7xeDpGytFHKJK01ksjnfwwro",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Create a form response
Creates a new form response.
Required attributes
- Name
form- Type
- string
- Description
Form this is a response to.
- Name
patient- Type
- string
- Description
Patient this form response is for.
Optional attributes
- Name
external_id- Type
- string
- Description
A client-specified unique ID to associate with this form response.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"external_id": "tS7xeDpGytFHKJK01ksjnfwwro",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Retrieve a form response
Retrieves the specified form response.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"external_id": "tS7xeDpGytFHKJK01ksjnfwwro",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Retrieve a form response in PDF format
Returns a signed URL to the PDF version of the form response, which expires within 30 minutes.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"url": "https://....",
"expires_at": "2024-04-03T04:12:01.781Z"
}
Update a form response answer
Updates the specified form response answer object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
Optional attributes
- Name
response- Type
- string
- Description
Response to the question.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"response": "Sally Chen"
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"external_id": "tS7xeDpGytFHKJK01ksjnfwwro",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
List all form responses
Returns a list of all form responses.
Optional query parameters
- Name
id- Type
- string
- Description
Form response ID to filter by.
- Name
patient- Type
- string
- Description
Patient to filter by.
- Name
patients- Type
- string[]
- Description
List of patients to filter by.
- Name
form- Type
- string
- Description
Form to filter by.
- Name
forms- Type
- string[]
- Description
List of forms to filter by.
- Name
status- Type
- string
- Description
Latest status to filter by.
- Name
statuses- Type
- string[]
- Description
List of latest statuses to filter by.
- Name
medical_centers- Type
- string[]
- Description
List of medical centers to filter by patient membership.
- Name
search_from- Type
- string
- Description
Return form responses created at or after this date/time.
- Name
search_until- Type
- string
- Description
Return form responses created at or before this date/time.
- Name
is_entered_in_error- Type
- boolean
- Description
Filter by whether the form response is marked as entered in error. If false, returns records where this is false or null.
- Name
limit- Type
- number
- Description
Maximum number of form responses to return.
- Name
offset- Type
- number
- Description
Number of form responses to skip.
Request
curl https://{{base_subdomain}}.avonhealth.com/v2/form_responses?form={{form}}&form_version={{form_version}}&patient={{patient}} \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}"
Response
{
"object": "list",
"data": [
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
},
{
"status": "completed",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1753798303000
}
],
"external_id": "tS7xeDpGytFHKJK01ksjnfwwro",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
},
]
}