EDiaryService
Extends:
Service handling EDiary (Entries, Groups, and Templates) calls with specific endpoints.
Constructor Summary
Public Constructor | ||
public |
Update type to be ediary__entry_groups |
Method Summary
Public Methods | ||
public |
|
|
public |
async get(cacheMode: String): Promise<EntryGroup[]|EntryGroup> |
|
public |
async getTemplates(entryGroup: Object, filters: Object, cacheMode: String): Promise<EntryTemplate[]|EntryTemplate> Get eDiary entry templates |
|
public |
async insert(object: Object, cacheMode: String): Promise<EntryGroup> |
|
public |
async update(object: Object, cacheMode: String): Promise<EntryGroup> |
Inherited Summary
From class AbstractService | ||
public get |
|
|
public set |
|
|
public |
|
|
private |
|
From class JsonApiService | ||
public |
options: * |
|
public |
Call a DELETE request on the main obj.type expecting JSON API information. |
|
public |
Call a GET request expecting JSON API information. |
|
public |
async getChildren(parent: Object, child: Object, options: String): Promise Call a GET request expecting JSON API information for children given a parent. |
|
public |
Call a POST request on the main obj.type expecting JSON API information. |
|
public |
Call a PATCH request on the main obj.type expecting JSON API information. |
Public Constructors
public constructor() source
Update type to be ediary__entry_groups
Override:
JsonApiService#constructorPublic Methods
public async delete(object: Object, cacheMode: String): Promise source
Call a DELETE request on the main obj.type expecting JSON API information.
Override:
JsonApiService#deletepublic async get(cacheMode: String): Promise<EntryGroup[]|EntryGroup> source
Call a GET request expecting JSON API information.
Override:
JsonApiService#getParams:
Name | Type | Attribute | Description |
cacheMode | String |
|
Override the caching method for this call |
Throw:
If missing token or missing required parameters |
Example:
import { eDiaryService } from 'clinical6';
// You will be able to access these entry groups using the `get` method.
eDiaryService.get().then(entryGroups => console.log(entryGroups));
public async getTemplates(entryGroup: Object, filters: Object, cacheMode: String): Promise<EntryTemplate[]|EntryTemplate> source
Get eDiary entry templates
Throw:
If missing token or missing required parameters |
Example:
import { eDiaryService } from 'clinical6';
// You will be able to access these entry groups using the `get` method.
eDiaryService.getTemplates({ id: 15 }).then(templates => console.log(templates));
// You can also use the filter for automatic or manual
eDiaryService.getTemplates({ id: 15 }, { category: 'automatic' })
.then(templates => console.log(templates));
public async insert(object: Object, cacheMode: String): Promise<EntryGroup> source
Call a POST request on the main obj.type expecting JSON API information.
Override:
JsonApiService#insertpublic async update(object: Object, cacheMode: String): Promise<EntryGroup> source
Call a PATCH request on the main obj.type expecting JSON API information.