Practitioners represent healthcare providers — physicians, nurses, therapists, and any other clinician in your system. The FHIR R4 Practitioner resource stores their personal and professional details: name, NPI, qualifications, specialties, and languages. Other clinical resources like encounters, prescriptions, and notes reference practitioners by ID.
Create a practitioner
const { data: doc } = await clinik.practitioners.create({
firstName: 'Sarah',
lastName: 'Chen',
prefix: ['Dr.'],
suffix: ['MD', 'FACC'],
email: '[email protected]',
phone: '+1-555-0100',
gender: 'female',
npi: '1234567890',
specialty: 'Cardiology',
qualifications: [
{
name: 'Doctor of Medicine',
issuer: 'Johns Hopkins University',
period: { start: '2010-05-15' },
},
{
name: 'Board Certified - Cardiovascular Disease',
issuer: 'American Board of Internal Medicine',
identifier: 'ABIM-12345',
period: { start: '2015-06-01', end: '2025-06-01' },
},
],
languages: ['en', 'zh'],
address: {
line: ['100 Medical Center Blvd'],
city: 'Austin',
state: 'TX',
postalCode: '78701',
},
});
The npi field stores the National Provider Identifier. NPI values must be 10 digits. ClinikAPI stores them as an identifier on the FHIR Practitioner resource.
Read a practitioner
const { data: practitioner } = await clinik.practitioners.read(doc.id!);
Update a practitioner
Send only the fields you want to change:
const { data: updated } = await clinik.practitioners.update(doc.id!, {
phone: '+1-555-0199',
specialty: 'Interventional Cardiology',
});
Deactivate a practitioner
Set active: false to deactivate a practitioner without deleting their record. Deactivated practitioners remain searchable with active: false but are excluded from default search results.
await clinik.practitioners.update(doc.id!, {
active: false,
});
Search practitioners
// Find cardiologists
const { data } = await clinik.practitioners.search({
specialty: 'Cardiology',
active: true,
});
// Look up by NPI
const { data: byNpi } = await clinik.practitioners.search({
npi: '1234567890',
});
Referencing practitioners
Most clinical resources accept a practitionerId field. Once you have a practitioner ID, use it when creating encounters, prescriptions, notes, and assessments:
// Encounter with a practitioner
await clinik.encounters.create({
status: 'in-progress',
class: 'AMB',
patientId: 'pt_abc123',
practitionerId: doc.id!,
type: 'Cardiology follow-up',
});
// Prescription written by a practitioner
await clinik.prescriptions.create({
patientId: 'pt_abc123',
prescriberId: doc.id!,
medication: 'Lisinopril 10mg',
intent: 'order',
});
// Clinical note authored by a practitioner
await clinik.notes.create({
patientId: 'pt_abc123',
authorId: doc.id!,
title: 'Cardiology Consultation',
content: 'Patient presents with well-controlled hypertension...',
type: 'consultation-note',
});
Practitioner roles
A practitioner can hold multiple roles at different organizations. Use clinik.practitionerRoles to define where and when they practice:
// Primary role at a clinic
await clinik.practitionerRoles.create({
practitionerId: doc.id!,
organizationName: 'Austin Heart Clinic',
role: 'doctor',
specialty: ['Cardiology', 'Interventional Cardiology'],
locationName: 'Main Campus',
availableDays: ['mon', 'tue', 'wed', 'thu', 'fri'],
availableStartTime: '08:00',
availableEndTime: '17:00',
});
// Consulting role at a hospital on Thursdays
await clinik.practitionerRoles.create({
practitionerId: doc.id!,
organizationName: "St. David's Medical Center",
role: 'consultant',
specialty: ['Cardiology'],
locationName: 'Cardiology Wing',
availableDays: ['thu'],
availableStartTime: '13:00',
availableEndTime: '17:00',
});
See the Practitioner Roles guide for the full role management API.