import ConsultationService from 'clinical6/src/services/ConsultationService.js'ConsultationService
Extends:
Service handling Consultation calls with specific endpoints.
Method Summary
| Public Methods | ||
| public |
async join(consultation: Consultation, participant: ConsultationParticipant, options: String): Promise Call a POST request on the main obj.type expecting JSON API information. |
|
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 Methods
public async join(consultation: Consultation, participant: ConsultationParticipant, options: String): Promise source
Call a POST request on the main obj.type expecting JSON API information.
Params:
| Name | Type | Attribute | Description |
| consultation | Consultation | Consultation to join |
|
| participant | ConsultationParticipant | Participant joining |
|
| 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 |
| options.meta | Object |
|
Pass and retrieve through reference meta data |
Example:
import { consultationService, Consultation, ConsultationParticipant } from 'clinical6';
const consultation = new Consultation({ ... });
const participant = new ConsultationParticipant({ ... });
// You can update an awarded badge using the `updateAwardedBadge` method
const meta = {};
consultationService.join(consultation, participant, { meta });
// You should use instead `consultation.join()`
consultation.join(); // join using the logged in user
// or
consultation.join(participant);
Manual
Reference
Source
Test
