Setting up Agreements

Agreements are vital documents within an organization that cover various essential topics such as patient consents, privacy policies, and other relevant legal agreements. These templates ensure that all necessary legal, procedural, and organizational information is communicated consistently and effectively.

Key Features of Agreement Templates

1. Diverse Types of Agreements

  • Privacy Policies: Outline how personal information is handled.

  • Patient Consents: Ensure informed decision-making by patients.

  • Organizational Agreements: Support smooth operations and compliance.

2. Admin-Only Access

  • The creation and modification of agreement templates are limited to administrators.

  • This restriction ensures that only authorized personnel can manage these critical documents, preserving their accuracy and compliance with regulations.

3. HTML-Based Content

  • The content of the templates is stored as HTML text.

  • Enables rich formatting, structured layouts, and diverse HTML elements for improved readability and presentation.

4. User-Action Associations

  • Agreement templates can be linked to specific user actions.

  • Ensures the right agreements are presented at relevant points in the user journey.

5. Field Definitions for Structured Content

  • Agreement templates support field definitions within their content.

  • Ensures information is structured clearly and is user-friendly.

Associated User Actions

  • Each agreement template can only be associated with one user action.

  • The association can be modified at the database level to maintain data integrity.

Examples of user actions defined through enumerations include:

  • PrivacyPolicy: Displays the privacy policy agreement.

  • ConsumerOnboarding: A series of onboarding steps (from ConsumerOnboarding1 to ConsumerOnboarding11).

  • AppointmentBooking: Agreements required during appointment booking.

Creating an Agreement Template

The platform provides an endpoint for administrators to create new agreement templates, which include essential details:

  • Field Definitions: Structured content fields enhance clarity and readability.

  • Associated User Action: Links a specific user action to the agreement.

  • HTML Content: Provides rich presentation of the agreement’s content.

  • Template Name: A unique identifier for the agreement.

By restricting the creation and modification of these templates to administrators, the platform ensures that all agreements are consistently managed, legally compliant, and appropriately assigned

Create agreement

post
Body
idintegerRequired

ID of the agreement template

Example: 1
organizationIdintegerOptional

ID of the organization

Example: 123
namestringRequired

Name of the agreement template

Example: Standard Agreement
userActionstring · enumRequired

User action associated with the template

Example: CREATEPossible values:
contentHtmlstringRequired

HTML content of the agreement template

Example: <p>Agreement content</p>
createdAtone ofRequired

Creation date of the agreement template

Example: 2023-01-01T00:00:00Z
string · dateOptional
or
string · date-timeOptional
updatedAtone ofRequired

Last update date of the agreement template

Example: 2023-01-02T00:00:00Z
string · dateOptional
or
string · date-timeOptional
Responses
200Success
application/json
post
/agreement-templates/
200Success

Get agreement templates

get
Query parameters
organizationIdanyRequired

ID of the organization

Example: 123
nameanyRequired

Name of the agreement template

Example: Standard Agreement
Responses
200Success
application/json
get
/agreement-templates/
200Success

Create agreement consent

post
Body
personIdintegerRequired

ID of the person

Example: 1
surveyResponseIdintegerOptional

ID of the survey response

Example: 123
agreementTemplateIdintegerOptional

ID of the agreement template

Example: 456
pdfResourceanyOptional

PDF resource as a buffer

Example: <Buffer>
pdfCloudIdstringOptional

Cloud ID of the PDF

Example: cloud-id-123
pdfMimeTypestringOptional

MIME type of the PDF

Example: application/pdf
userActionanyRequired

User action associated with the agreement

Example: CREATE
consumerEpisodeIntakeIdintegerRequired

ID of the consumer episode intake

Example: 789
attributesobjectOptional

Additional attributes

Example: {}
assessmentResponseanyOptional

Response to the assessment

Example: {}
updatedByobjectOptional

Information about who updated the agreement

Example: {}
Responses
200Success
application/json
post
/agreements/
200Success

Agreements from Surveys

Agreements can also be generated from surveys by adding a template to the survey, the final agreement can be generated by using the endpoint below

Create agreement consent from survey

post
Body
personIdintegerRequired

ID of the person

Example: 1
surveyResponseIdintegerOptional

ID of the survey response

Example: 123
agreementTemplateIdintegerOptional

ID of the agreement template

Example: 456
pdfResourceanyOptional

PDF resource as a buffer

Example: <Buffer>
pdfCloudIdstringOptional

Cloud ID of the PDF

Example: cloud-id-123
pdfMimeTypestringOptional

MIME type of the PDF

Example: application/pdf
userActionanyRequired

User action associated with the agreement

Example: CREATE
consumerEpisodeIntakeIdintegerRequired

ID of the consumer episode intake

Example: 789
attributesobjectOptional

Additional attributes

Example: {}
assessmentResponseanyOptional

Response to the assessment

Example: {}
updatedByobjectOptional

Information about who updated the agreement

Example: {}
Responses
200Success
application/json
post
/agreements/survey
200Success

Last updated