Notes
Notes (FHIR DocumentReference) represent clinical documentation — progress notes, discharge summaries, consultation notes, operative notes, and other narrative records.Create a Note
const { data: note } = await clinik.notes.create({
patientId: 'pt_abc123',
authorId: 'prac_def456',
encounterId: 'enc_xyz789',
type: 'progress-note',
title: 'Follow-up Visit - Hypertension Management',
content: `## Subjective
Patient reports compliance with lisinopril 10mg daily. No dizziness, cough, or swelling.
## Objective
BP: 130/84 mmHg, HR: 72 bpm
## Assessment
Essential hypertension — improving but not at goal.
## Plan
- Increase lisinopril to 20mg daily
- Recheck BP in 4 weeks`,
contentType: 'text/markdown',
docStatus: 'final',
category: 'cardiology',
date: '2025-01-15',
practiceSetting: 'cardiology',
facilityType: 'outpatient-clinic',
});
Document Relationships
Link notes to other documents they replace, append to, or sign:// Amend a note by creating a replacement
const { data: amended } = await clinik.notes.create({
patientId: 'pt_abc123',
authorId: 'prac_def456',
type: 'progress-note',
title: 'Follow-up Visit - Amended',
content: '... corrected content ...',
docStatus: 'amended',
relatesTo: [{
code: 'replaces',
targetId: 'note_original_001',
}],
});
// Append an addendum
const { data: addendum } = await clinik.notes.create({
patientId: 'pt_abc123',
authorId: 'prac_def456',
type: 'progress-note',
title: 'Addendum - Follow-up Visit',
content: 'Patient called to report mild dizziness. Advised to take medication with food.',
relatesTo: [{
code: 'appends',
targetId: 'note_original_001',
}],
});
Security Labels
Tag notes with security classifications:const { data } = await clinik.notes.create({
patientId: 'pt_abc123',
type: 'progress-note',
title: 'Mental Health Assessment',
content: '...',
securityLabel: [
{ system: 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality', code: 'R', display: 'Restricted' },
{ code: 'mental-health', display: 'Mental Health' },
],
// ...
});
Authentication and Custody
Track who authenticated and who maintains the document:const { data } = await clinik.notes.create({
patientId: 'pt_abc123',
authorId: 'prac_resident',
authenticatorId: 'prac_attending', // Attending physician who co-signed
custodianId: 'org_hospital', // Hospital maintaining the record
type: 'discharge-summary',
title: 'Discharge Summary',
content: '...',
// ...
});
Service Context
Document the clinical context:const { data } = await clinik.notes.create({
patientId: 'pt_abc123',
type: 'consultation-note',
title: 'Cardiology Consultation',
content: '...',
servicePeriod: {
start: '2025-01-15T09:00:00Z',
end: '2025-01-15T09:45:00Z',
},
facilityType: 'outpatient-clinic',
practiceSetting: 'cardiology',
// ...
});
Note Types
| Type | Description |
|---|---|
progress-note | Standard visit documentation |
discharge-summary | Hospital discharge summary |
consultation-note | Specialist consultation |
history-and-physical | H&P documentation |
operative-note | Surgical procedure note |
procedure-note | Non-surgical procedure note |
referral-note | Referral documentation |
transfer-summary | Patient transfer summary |
other | Other note types |
Update a Note
await clinik.notes.update('note_abc123', {
docStatus: 'amended',
content: '... updated content with addendum ...',
relatesTo: [{
code: 'appends',
targetId: 'note_original_001',
}],
});
Search Notes
const { data } = await clinik.notes.search({
patientId: 'pt_abc123',
type: 'progress-note',
authorId: 'prac_def456',
sort: '-date',
});