import ConsentFormVersion from 'clinical6/src/helpers/consent/ConsentFormVersion.js'ConsentFormVersion
Mixin Extends:
Helper class representing a Consent Form Version.
Example:
// To get a list of ConsentFormVersions use clinical6.get
import { clinical6, ConsentFormVersion } from 'clinical6';
clinical6.get(ConsentFormVersion).then(c => console.log(c));
// To get a single ConsentFormVersion, you can also use clinical6
clinical6.get({ id: 5, type: 'consent_form_versions'});
// To save or insert, you can either use the .save() capability or clinical6
myConsentFormVersion.save(); // insert if no id, save if id
clinical6.insert(new ConsentFormVersion({...}));
clinical6.update(myConsentFormVersion);
Constructor Summary
| Public Constructor | ||
| public |
constructor(json: Object) Constructor for helper class representing a Consent Form Version |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public |
assignments: * |
|
| public set |
|
|
| public get |
|
|
| public |
formVersions: * |
|
| public set |
|
|
| public get |
|
|
| public get |
|
|
| public set |
|
|
| public get |
templatable: AgreementTemplate | PaperTemplate |
|
| public set |
templatable: AgreementTemplate | PaperTemplate |
|
Method Summary
| Public Methods | ||
| public |
async getApproverGroupAssignments(params: Object, options: String): Promise Gets the approver group assignment associated to this ConsentFormVersion. |
|
| public |
async save(): Promise<ConsentFormVersion> Saves a consent form version (insert if id doesn't exist, update if it does) |
|
Inherited Summary
| From class ConsentFormVersionModel | ||
| public |
|
|
| public |
|
|
Public Constructors
public constructor(json: Object) source
Constructor for helper class representing a Consent Form Version
Override:
ConsentFormVersionModel#constructorParams:
| Name | Type | Attribute | Description |
| json | Object | json api response from server |
Public Members
public get approverGroups: ApproverGroup[] source
public set approverGroups: ApproverGroup[] source
public assignments: * source
public set consentForm: ConsentForm source
public get consentForm: ConsentForm source
public formVersions: * source
public get templatable: AgreementTemplate | PaperTemplate source
public set templatable: AgreementTemplate | PaperTemplate source
Public Methods
public async getApproverGroupAssignments(params: Object, options: String): Promise source
Gets the approver group assignment associated to this ConsentFormVersion.
Params:
| Name | Type | Attribute | Description |
| params | Object |
|
Parameters used to get information from server |
| params.id | Number |
|
Id to get data from the server |
| params.type | String |
|
Type to be used for storage |
| params.filters | Object |
|
Filters to be used for get |
| options | String |
|
Modify the nature of the call and response |
| options.url | String |
|
Override the url for this call |
| options.cacheMode | String |
|
Override the caching method for this call |
Example:
import { ConsentFormVersion, clinical6 } from 'clinical6';
const consentFormVersion = new consentFormVersion({ id: 23 });
consentFormVersion.getApproverGroupAssignments({ id: 5 });
// Combined with clinical6.get
clinical6.get(ConsentFormVersion).then(consentFormVersions => { consentFormVersions[0].getApproverGroupAssignments() });
public async save(): Promise<ConsentFormVersion> source
Saves a consent form version (insert if id doesn't exist, update if it does)
Example:
import { ConsentFormVersion, clinical6 } from 'clinical6';
// Inserts new consentFormVersion (no existing id)
const consentFormVersion = new ConsentFormVersion(
"type": "consent__form_versions",
"attributes": {},
"relationships": {
"agreement_template": {
"data": {
"id": 8,
"type": "agreement__templates"
}
},
"site": {
"data": {
"id": 9,
"type": "trials__sites"
}
}
});
consentFormVersion.save();
// Updates existing consentFormVersion(has existing id)
clinical6.get(ConsentFormVersion).then(consentFormVersions => consentFormVersions[0].save());
Manual
Reference
Source
Test
