StatusService
Extends:
Service handling Status calls.
Constructor Summary
Public Constructor | ||
public |
Update type to be statuses |
Method Summary
Public Methods | ||
public |
|
|
public |
getSections(resource: String, ownerType: String, owner: String): Promise Retrieves the status values for the sections. |
|
public |
this method was deprecated.
Retrieves an individual status value for the sections. |
|
public |
transition(transition: String, type: String, object: Object, ownerType: String, owner: String): Promise Explicitely applies an action to transition the object status from one status to another. |
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 Methods
public async check(obj: Helper, options: Object): Promise<Status> source
Throw:
If missing token or missing required parameters |
Example:
import { statusService } from 'clinical6';
// You can retrieve an object's status with the `check(obj)` method
statusService.check(user).then(status => console.log(status));
public getSections(resource: String, ownerType: String, owner: String): Promise source
Retrieves the status values for the sections.
Decorators:
- deprecate
Test:
- [unit] StatusService.getSections should throw an error when a no parameters are provided
- [unit] StatusService.getSections should throw an error when a ownerType and owner are not provided
- [unit] StatusService.getSections should throw an error when the owner is not provided
- [unit] StatusService.getSections should not throw an error when the owner is not provided but the ownerType is "mobile_user"
- [unit] StatusService.getSections should successfully return all status values
public async getStatus(type: String, object: Object, ownerType: String, owner: String): Promise source
Retrieves an individual status value for the sections.
Decorators:
- deprecate