import AgreementTemplate from 'clinical6/src/helpers/agreement/AgreementTemplate.js'AgreementTemplate
Mixin Extends:
Helper class representing AgreementTemplate.
Constructor Summary
| Public Constructor | ||
| public |
constructor(json: Object) Constructor for helper class representing an Agreement Template |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
Method Summary
| Public Methods | ||
| public |
Saves an agreement template (insert if id doesn't exist, update if it does) |
|
Inherited Summary
| From class AgreementTemplateModel | ||
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
Public Constructors
public constructor(json: Object) source
Constructor for helper class representing an Agreement Template
Override:
AgreementTemplateModel#constructorParams:
| Name | Type | Attribute | Description |
| json | Object | json api response from server |
Public Members
public get consentFormVersions: ConsentFormVersion source
public set consentFormVersions: ConsentFormVersion source
Public Methods
public save(): Promise<AgreementTemplate> source
Saves an agreement template (insert if id doesn't exist, update if it does)
Example:
import { AgreementTemplate, clinical6 } from 'clinical6';
// Insert is different from other inserts.
const agreementTemplate = new AgreementTemplate({
"template_name": "name",
"permanent_link": "link",
"description": "description",
});
agreementTemplate.save();
// Updates existing agreementTemplate (has existing id)
clinical6.get(AgreementTemplate).then(templates => templates[0].save());
Manual
Reference
Source
Test
