Skip to main content
Version: 13.x (Current)

ck-therapy-select

The ck-therapy-select web component is used to select a therapy/monitoring between the ones associated to a specific user. The selection of a option will trigger the emission of therapy-config event.

ck-therapy-select

Usage

The ck-therapy-select component recovers the therapies/monitorings associated to a specific user. The data received are used to populate the selectable options. The web-component's type property defines if therapies or monitorings are fetched. The property accepts two values monitoring and therapy. The other property, planBasePath, has to be set to the endpoint that expose the Therapy and Monitoring Manager service.

Properties urlMask and idKey are used to retrieve the patient id from the url: idKey is the dynamic value key mapped in the urlMask. For example, if the url is /dashboard/85fh30?pageSize=25 where 85fh30 is the patient id, the urlMask will be /dashboard/:<yourKey> and patientIdKey will be <yourKey>. The patientId retrieved is used to filter the select's option.

On initialization, after the options have been retrieved, the first options is selected (if present). Every time an option is selected a therapy-config event, containing the information of the selected value, is sent. Alongside the therapy-config event, selecting an options also triggers the emitting of the events change-query and chart-filters both containt in the payload a Filter object having as property planId, operator equal and as value the planId of the selected option.

If no options are presents the select will be disabled.

Properties & Attributes

propertytyperequireddefaultdescription
planBasePathstringtrue/Path the expose the Therapy and Monitoring Manager service. The path must not have the trailing slash.
typemeasurement | therapytruemeasurementDefines if the monitorings or therapies are fetched.
urlMaskstringfalseurl mask to apply to the current path to extract patientId dynamically
idKeystringfalsepatientIdpatientId key in urlMask

Listens to

eventactionemitson error
----

Emits

eventdescription
therapy-configCustom event that contains the information of the selected options.
change-queryused to updated the filters with the planId selected
chart-filtersCustom event that contains the filters for the ck-chart component