Document
A document is a catch-all term for a PDF uploaded, an image uploaded, or a custom document created from a document-template.
The document model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the document.
- Name
object
- Type
- string
- Description
Always 'document'.
- Name
type
- Type
- string
- Description
Type of document.
- Name
template
- Type
- string
- Description
Template this document is based on.
- Name
template_version
- Type
- string
- Description
Template version this document is based on.
- Name
name
- Type
- string
- Description
Name of the document.
- Name
filename
- Type
- string
- Description
Name of the document.
- Name
patient
- Type
- string
- Description
Patient this document is for.
- Name
share_with_patient
- Type
- boolean
- Description
Whether this document should be shared with the patient.
- Name
sections
- Type
- array of objects
- Description
All the sections and answers in the document.
- Name
comments
- Type
- array of strings
- Description
List of comments added to the document.
- Name
addendums
- Type
- array of strings
- Description
List of addendums appended to the document after the document has been signed and locked.
- Name
status_history
- Type
- array of objects
- Description
- Status history of the document.
- Name
reviews
- Type
- array of objects
- Description
- Review history of the document.
- Name
created_by
- Type
- string
- Description
Creator of the document.
- Name
created_at
- Type
- number
- Description
Timestamp (in Unix epoch time in milliseconds) of when the document was created.
- Name
last_updated_at
- Type
- number
- Description
Timestamp (in Unix epoch time in milliseconds) of when the document was last updated.
Response
{
"id": "document_2UxtAULYUrX7GVsTKePy",
"object": "document",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"template": "tmlt_NOIYLBGOBNhSwTWCUzfu",
"template_version": "tver_1JtjV1QEY84Fv395Hl7h",
"appointment": "appt_4BxtAULYUrX7GVsTKePy",
"name": "Group Meeting Notes — 9/18/22",
"share_with_patient": false,
"sections": [{
"id": "nsec_2UxtAULYUrX7GVsTKePy",
"object": "document_section",
"section": "tsec_YUrX7GUxt2LAUVsTKePy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"answers": [{
"id": "nans_ap0jVVAdR23DgkQPpdX8",
"object": "document_answer",
"question": "tqst_ap0jVVAdR23DgkQPpdX8",
"response": 646077022000
}]
}],
"comments": [
"cmmt_op0jVVAdR23DgkQPpdX8"
],
"addendums": [
"addm_pdX8op0jVVAdR23DgkQP"
],
"status_history": [
{
"status": "inProgress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1653798303
}
],
"reviews": [],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Create a document
Creates a new visit document.
Required attributes
- Name
patient
- Type
- string
- Description
Patient this document is for.
- Name
type
- Type
- string
- Description
Type of document.
- Name
template
- Type
- string
- Description
Template this document is based on.
- Name
template_version
- Type
- string
- Description
Template version this document is based on.
- Name
created_by
- Type
- string
- Description
Creator of the document.
Optional attributes
- Name
name
- Type
- string
- Description
Name of the document.
- Name
share_with_patient
- Type
- boolean
- Description
Whether this document should be shared with the patient. Defaults to whatever the default for this document template is. Only applies if the document template allows the default to be overridden.
Response
{
"id": "document_2UxtAULYUrX7GVsTKePy",
"object": "document",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"type": "template"
"template": "tmlt_NOIYLBGOBNhSwTWCUzfu",
"template_version": "tver_1JtjV1QEY84Fv395Hl7h",
"name": "Group Meeting Notes — 9/18/22",
"share_with_patient": false,
"sections": [{
"id": "nsec_2UxtAULYUrX7GVsTKePy",
"object": "document_section",
"section": "tsec_YUrX7GUxt2LAUVsTKePy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"answers": [{
"id": "nans_ap0jVVAdR23DgkQPpdX8",
"object": "document_answer",
"question": "tqst_ap0jVVAdR23DgkQPpdX8",
"response": 646077022000
}]
}],
"orders": [
"ordr_900jVVAdR23DgkQPpdX8"
],
"comments": [
"cmmt_op0jVVAdR23DgkQPpdX8"
],
"addendums": [
"addm_pdX8op0jVVAdR23DgkQP"
],
"status_history": [
{
"status": "inProgress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1653798303
}
],
"reviews": [],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Retrieve a document
Retrieves the specified document.
Response
{
"id": "document_2UxtAULYUrX7GVsTKePy",
"object": "document",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"type": "template",
"template": "tmlt_NOIYLBGOBNhSwTWCUzfu",
"template_version": "tver_1JtjV1QEY84Fv395Hl7h",
"name": "Group Meeting Notes — 9/18/22",
"share_with_patient": false,
"sections": [{
"id": "nsec_2UxtAULYUrX7GVsTKePy",
"object": "document_section",
"section": "tsec_YUrX7GUxt2LAUVsTKePy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"answers": [{
"id": "nans_ap0jVVAdR23DgkQPpdX8",
"object": "document_answer",
"question": "tqst_ap0jVVAdR23DgkQPpdX8",
"response": 646077022000
}]
}],
"orders": [
"ordr_900jVVAdR23DgkQPpdX8"
],
"comments": [
"cmmt_op0jVVAdR23DgkQPpdX8"
],
"addendums": [
"addm_pdX8op0jVVAdR23DgkQP"
],
"status_history": [
{
"status": "inProgress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1653798303
}
],
"reviews": [],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Update a document
Update the specified document object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
- Name
updated_by
- Type
- string
- Description
Updates to the document made by.
Optional attributes
- Name
signed_by
- Type
- boolean
- Description
Who the document is signed by. If the document is signed by a provider or a support team member (not a patient), the document is automatically locked and can no longer be edited.
- Name
share_with_patient
- Type
- boolean
- Description
Whether this document should be shared with the patient.
Response
{
"id": "document_2UxtAULYUrX7GVsTKePy",
"object": "document",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"template": "tmlt_NOIYLBGOBNhSwTWCUzfu",
"template_version": "tver_1JtjV1QEY84Fv395Hl7h",
"appointment": "appt_4BxtAULYUrX7GVsTKePy",
"name": "Annual Check-In Visit Note — 9/18/22",
"share_with_patient": false,
"sections": [{
"id": "nsec_2UxtAULYUrX7GVsTKePy",
"object": "document_section",
"section": "tsec_YUrX7GUxt2LAUVsTKePy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"answers": [{
"id": "nans_ap0jVVAdR23DgkQPpdX8",
"object": "document_answer",
"question": "tqst_ap0jVVAdR23DgkQPpdX8",
"response": 646077022000
}]
}],
"orders": [
"ordr_900jVVAdR23DgkQPpdX8"
],
"comments": [
"cmmt_op0jVVAdR23DgkQPpdX8"
],
"addendums": [
"addm_pdX8op0jVVAdR23DgkQP"
],
"status_history": [
{
"status": "inProgress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1653798303
}
],
"reviews": [],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
List all documents
Returns a list of all documents.
Response
{
"object": "list",
"data": [
{
"id": "document_2UxtAULYUrX7GVsTKePy",
"object": "document",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"type": "template",
"template": "tmlt_NOIYLBGOBNhSwTWCUzfu",
"template_version": "tver_1JtjV1QEY84Fv395Hl7h",
"appointment": "appt_4BxtAULYUrX7GVsTKePy",
"name": "Group Meeting Notes — 9/18/22",
"share_with_patient": false,
"sections": [{
"id": "nsec_2UxtAULYUrX7GVsTKePy",
"object": "document_section",
"section": "tsec_YUrX7GUxt2LAUVsTKePy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"answers": [{
"id": "nans_ap0jVVAdR23DgkQPpdX8",
"object": "document_answer",
"question": "tqst_ap0jVVAdR23DgkQPpdX8",
"response": 646077022000
}]
}],
"orders": [
"ordr_900jVVAdR23DgkQPpdX8"
],
"comments": [
"cmmt_op0jVVAdR23DgkQPpdX8"
],
"addendums": [
"addm_pdX8op0jVVAdR23DgkQP"
],
"status_history": [
{
"status": "inProgress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1653798303
}
],
"reviews": [],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
},
]
}