Skip to main content

Handling healthcare professionals

[Healthcare professionals](/sdks/glossary#Data owner) are either doctors, nurses, physiotherapists, etc. They are the people who are going to use the medical device to take care of patients.

Healthcare professionals can also in certain cases be a healthcare organization.

The healthcareProfessionalApi allows you to manage Healthcare professionals.

Create a healthcare professional

You first need to instantiate a Healthcare professional object. Pass the healthcareProfessional to the createHealthcareProfessional method of the healthcareProfessionalApi to create it in the database.

import { User } from '@icure/medical-device-sdk'

const healthcareProfessional: HealthcareProfessional = new HealthcareProfessional({
firstName: 'John',
lastName: 'Keats',
speciality: 'Psychiatrist',
codes: new Set([{ type: 'practitioner-specialty', code: healthcareProfessionalCode }]),
addresses: [
new Address({
telecoms: [
new Telecom({
telecomType: 'email',
telecomNumber: ``,

const createdHcp = await api.healthcareProfessionalApi.createOrModifyHealthcareProfessional(

Load a healthcare professional by id

The getHealthcareProfessional method of the healthcareProfessionalApi allows you to load a Healthcare professional by id.

const loadedHcp = await api.healthcareProfessionalApi.getHealthcareProfessional(

Filter healthcare professionals

You can build complex queries and use them to retrieve Healthcare professionals using the filterHealthcareProfessionals method of the healthcareProfessionalApi.

You can build filters by hand or use the DSL provided by the HealthcareProfessionalFilter class.

const hcps = await api.healthcareProfessionalApi.filterHealthcareProfessionalBy(
await new HealthcareProfessionalFilter()
.byLabelCodeFilter(undefined, undefined, 'practitioner-specialty', healthcareProfessionalCode)

Delete a healthcare professional

The deleteHealthcareProfessional method of the healthcareProfessionalApi allows you to delete a Healthcare professional by id.

await api.healthcareProfessionalApi.deleteHealthcareProfessional(