// 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',
}],
});