const { data: rx } = await clinik.prescriptions.create({
patientId: 'pt_abc123',
prescriberId: 'prac_def456',
encounterId: 'enc_xyz789',
medication: {
system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
code: '197361',
display: 'Lisinopril 10 MG Oral Tablet',
},
intent: 'order',
status: 'active',
priority: 'routine',
dosageText: 'Take 1 tablet by mouth once daily',
dosage: {
dose: { value: 10, unit: 'mg' },
frequency: 1,
period: 1,
periodUnit: 'd',
route: 'oral',
},
refills: 3,
quantity: { value: 30, unit: 'tablets' },
supplyDays: 30,
substitutionAllowed: true,
reason: 'Essential hypertension',
note: 'Monitor blood pressure weekly',
});