Document Template
A document template is a template for creating documents.
The document template model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the document template.
- Name
object
- Type
- string
- Description
Always 'document_template'.
- Name
name
- Type
- string
- Description
Name of document template.
- Name
description
- Type
- string
- Description
Description of deocument.
- Name
published_version
- Type
- string
- Description
Document template version that is currently published. This is the document template version that is shown to the provider when they use the document template.
- Name
latest_version
- Type
- string
- Description
The latest document template version. This is the document template version that the admin will be viewing when they go to the document template builder in the Avon EMR. When the "publish" button is pressed in the Avon EMR UI or the /publish endpoint is called in the Avon API, the latest version will become the published version.
- Name
has_unpublished_changes
- Type
- boolean
- Description
If there are any changes in the 'document_template.latest_version' that are not in 'document_template.published_version.' If false, the contents of 'document_template.published_version' and 'document_template.latest_version' are the same.
- Name
usable_by
- Type
- object
- Description
- Who can use this document template.
- Name
share_by_default
- Type
- boolean
- Description
If true, documents created from this document template will be shared with all patients by default.
- Name
allow_member_change_default
- Type
- boolean
- Description
If true, providers and support team members will be able to change the default sharing settings for documents created from this document template.
- Name
created_by
- Type
- string
- Description
Creator of the document template.
- Name
created_at
- Type
- number
- Description
Timestamp (in ISO 8601 format) of when the document template was created.
- Name
last_updated_at
- Type
- number
- Description
Timestamp (in ISO 8601 format) of when the document template was last updated.
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "dver_1JtjV1QEY84Fv395Hl7h",
"latest_version": "dver_93tjV1QEY84Fv395Hl7h",
"has_unpublished_changes": true,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Create a document template
Creates a new document template and an unpublished document template version.
Required attributes
- Name
name
- Type
- string
- Description
Name of document template.
Optional attributes
- Name
description
- Type
- string
- Description
Description of document template.
- Name
usable_by
- Type
- object
- Description
- Defaults to usable by all. Who can use this document_template.
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "",
"latest_version": "",
"has_unpublished_changes": false,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Retrieve a document template
Retrieves the specified document template.
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This document template allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "fver_1JtjV1QEY84Fv395Hl7h",
"latest_version": "fver_93tjV1QEY84Fv395Hl7h",
"has_unpublished_changes": true,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Update a document template
Updates the specified document template object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
Optional attributes
- Name
name
- Type
- string
- Description
Name of document template.
- Name
description
- Type
- string
- Description
Description of document template.
- Name
has_unpublished_changes
- Type
- boolean
- Description
If there are any changes in the 'form.latest_version' that are not in 'form.published_version.' If false, the contents of 'form.published_version' and 'form.latest_version' are the same.
- Name
usable_by
- Type
- object
- Description
- Who can use this document_template.
- Name
share_by_default
- Type
- boolean
- Description
If true, documents created from this document template will be shared with all patients by default.
- Name
allow_member_change_default
- Type
- boolean
- Description
If true, providers and support team members will be able to change the default sharing settings for documents created from this document template.
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "fver_1JtjV1QEY84Fv395Hl7h",
"latest_version": "fver_93tjV1QEY84Fv395Hl7h",
"has_unpublished_changes": true,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Publish a form
Publishs the latest version of the specified form by moving the form version in 'latest_version' to 'published_version' and creating a new form version in 'latest_version' that is a copy of the form version in 'published_version'.
Required attributes
Optional attributes
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "fver_93tjV1QEY84Fv395Hl7h",
"latest_version": "fver_009V1QEY84Fv395Hl7h",
"has_unpublished_changes": true,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
List all forms
Returns a list of all forms.
Response
{
"object": "list",
"data": [
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"name": "Release of Medical Information",
"description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
"published_version": "fver_1JtjV1QEY84Fv395Hl7h",
"latest_version": "fver_93tjV1QEY84Fv395Hl7h",
"has_unpublished_changes": true,
"usable_by": {
"usable_by_all": false,
"usable_by": {
"medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
"specializations": [],
"peer_groups": [],
"individuals": []
}
},
"share_by_default": false,
"allow_member_change_default": false,
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
},
]
}
Delete a document template
Deletes the specified document template.
Required attributes
Optional attributes
Response
{
"id": "dtmp_NOIYLBGOBNhSwTWCUzfu",
"object": "document_template",
"delete": true
}