const { data: task } = await clinik.tasks.create({
status: 'requested',
intent: 'order',
priority: 'urgent',
code: 'lab-order',
description: 'Order CBC and CMP for pre-operative assessment',
patientId: 'pt_abc123',
encounterId: 'enc_xyz789',
requesterId: 'prac_surgeon',
ownerId: 'prac_lab_tech',
executionPeriod: {
start: '2025-02-01T08:00:00Z',
end: '2025-02-01T17:00:00Z',
},
input: [
{ type: 'lab-panel', valueString: 'CBC' },
{ type: 'lab-panel', valueString: 'CMP' },
{ type: 'fasting-required', valueBoolean: true },
],
note: 'Patient is NPO after midnight. Draw labs before 10am.',
});