const { data: dispense } = await clinik.medicationDispenses.create({
status: 'completed',
medication: {
system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
code: '197361',
display: 'Lisinopril 10 MG Oral Tablet',
},
patientId: 'pt_abc123',
authorizingPrescriptionIds: ['rx_order456'],
quantity: { value: 30, unit: 'tablets' },
daysSupply: 30,
whenPrepared: '2024-03-15T10:00:00Z',
whenHandedOver: '2024-03-15T14:30:00Z',
dosageText: 'Take 1 tablet daily in the morning',
performer: [
{ function: 'dispenser', actorId: 'Practitioner/pharm_rph789' },
],
});