HealthcareElementApi
@icure/medical-device-sdk / HealthcareElementApi
SDK API: HealthcareElementApi
The HealthcareElementApi interface provides methods to manage conditions.
Table of contents
Methods
- createOrModifyHealthcareElement
- createOrModifyHealthcareElements
- deleteHealthcareElement
- filterHealthcareElement
- getHealthcareElement
- getHealthcareElementsForPatient
- giveAccessTo
- matchHealthcareElement
- subscribeToHealthcareElementEvents
Methods
createOrModifyHealthcareElement
▸ createOrModifyHealthcareElement(healthcareElement
, patientId?
): Promise
<HealthcareElement
>
A Healthcare Element is a data giving some medical context to a series of measures, symptoms, ... For example, if the observations are symptoms representing fever, cold feel, headache, ... the associated healthcare element could be a flue.
A healthcare Element can be linked to a patient and to a series of observations.
This service allows you to create a condition linked to a specific patient
Parameters
Name | Type | Description |
---|---|---|
healthcareElement | HealthcareElement | Condition to create in iCure Database |
patientId? | string | Id of the patient to which the condition is linked |
Returns
Promise
<HealthcareElement
>
Defined in
src/apis/HealthcareElementApi.ts:23
createOrModifyHealthcareElements
▸ createOrModifyHealthcareElements(healthcareElement
, patientId?
): Promise
<HealthcareElement
[]>
A Healthcare Element is a data giving some medical context to a series of measures, symptoms, ... For example, if the observations are symptoms representing fever, cold feel, headache, ... the associated healthcare element could be a flue.
A healthcare Element can be linked to a patient and to a series of observations.
This service permits you to create multiple conditions for a specific patient
Parameters
Name | Type | Description |
---|---|---|
healthcareElement | HealthcareElement [] | |
patientId? | string | Id of the patient to which the conditions are linked |
Returns
Promise
<HealthcareElement
[]>
Defined in
src/apis/HealthcareElementApi.ts:37
deleteHealthcareElement
▸ deleteHealthcareElement(id
): Promise
<string
>
Delete a Healthcare Element from the iCure database
Parameters
Name | Type | Description |
---|---|---|
id | string | Id of the condition to delete |
Returns
Promise
<string
>
Defined in
src/apis/HealthcareElementApi.ts:43
filterHealthcareElement
▸ filterHealthcareElement(filter
, nextHealthElementId?
, limit?
): Promise
<PaginatedListHealthcareElement
>
Filters are complex selectors that are built by combining basic building blocks. Examples of filters available for Conditions are :
- HealthcareElementByHealthcarePartyFilter;
- HealthcareElementByHealthcarePartyIdentifiersFilter;
- HealthcareElementByHealthcarePartyLabelCodeFilter;
- HealthcareElementByHealthcarePartyPatientFilter;
- and HealthcareElementByIdsFilter.
This method returns a paginated list of conditions (with a cursor that lets you query the following items). Load conditions from the database by filtering them using the provided Filter.
Parameters
Name | Type | Description |
---|---|---|
filter | Filter <HealthcareElement > | The Filter object that describes which condition(s) the elements whose the ids should be returned must fulfill |
nextHealthElementId? | string | The id of the first Practitioner in the next page |
limit? | number | The maximum number of conditions that should contain the returned page. By default, a page contains 1000 conditions |
Returns
Promise
<PaginatedListHealthcareElement
>
Defined in
src/apis/HealthcareElementApi.ts:59
getHealthcareElement
▸ getHealthcareElement(id
): Promise
<HealthcareElement
>
Retrieves the information of a specific Healthcare Element
Parameters
Name | Type | Description |
---|---|---|
id | string | Id of the condition to retrieve |
Returns
Promise
<HealthcareElement
>
Defined in
src/apis/HealthcareElementApi.ts:65
getHealthcareElementsForPatient
▸ getHealthcareElementsForPatient(patient
): Promise
<HealthcareElement
[]>
Gets all the Conditions associated to a Patient that the current dataOwner can access.
Parameters
Name | Type | Description |
---|---|---|
patient | Patient | the Patient associated to the Conditions to get |
Returns
Promise
<HealthcareElement
[]>
an array containing the Conditions
Defined in
src/apis/HealthcareElementApi.ts:91
giveAccessTo
▸ giveAccessTo(healthcareElement
, delegatedTo
): Promise
<HealthcareElement
>
Service where current user gives access to the healthcare Element information to another dataOwner (HCP, patient or device). For this, the current user data owner should be able to access the healthcare Element provided in argument in order to provide access to another data owner.
Parameters
Name | Type | Description |
---|---|---|
healthcareElement | HealthcareElement | Healthcare Element the current data owner would like to share with another data owner |
delegatedTo | string | ID of the data owner to which current user would like to give access |
Returns
Promise
<HealthcareElement
>
Defined in
src/apis/HealthcareElementApi.ts:83
matchHealthcareElement
▸ matchHealthcareElement(filter
): Promise
<string
[]>
Find which Conditions are matching a specific filter.
Parameters
Name | Type | Description |
---|---|---|
filter | Filter <HealthcareElement > | Filtering conditions that the returned condition ids are satisfying. |
Returns
Promise
<string
[]>
the ids of the conditions satisfying the provided filter
Defined in
src/apis/HealthcareElementApi.ts:74
subscribeToHealthcareElementEvents
▸ subscribeToHealthcareElementEvents(eventTypes
, filter
, eventFired
, options?
): Promise
<Connection
>
Opens a WebSocket Connection in order to receive all the Healthcare Element corresponding to specific filter criteria.
Parameters
Name | Type | Description |
---|---|---|
eventTypes | ("CREATE" | "UPDATE" | "DELETE" )[] | Type of event you would like to listen. It can be CREATE, UPDATE or DELETE |
filter | Filter <HealthcareElement > | Filter criteria to filter to the condition you would like to receive |
eventFired | (dataSample : HealthcareElement ) => Promise <void > | Action applied each time you receive a condition through the WebSocket |
options? | Object | Options to configure the WebSocket. - keepAlive : How long to keep connection alive (ms); - lifetime : How long to keep the WebSocket alive (ms); - connectionMaxRetry : how many time retrying to reconnect to the iCure WebSocket; - connectionRetryIntervalInMs : How long base interval will be between two retry. The retry attempt is exponential and using a random value (connectionRetryIntervalMs * (random between 1 and 2))^nbAttempts) |
options.connectionMaxRetry? | number | - |
options.connectionRetryIntervalMs? | number | - |
Returns
Promise
<Connection
>