Skip to main content

clinik.serviceRequests

Service requests represent orders for clinical services — lab orders, imaging requests, referrals, procedures, and other clinical activities.

create

const { data, meta } = await clinik.serviceRequests.create(request): Promise<ApiResponse<ServiceRequest>>
FieldTypeRequiredDescription
statusstringYesdraft, active, on-hold, revoked, completed
intentstringYesproposal, plan, directive, order, etc.
patientIdstringYesPatient reference
encounterIdstringNoEncounter context
codestring | CodeableConceptNoWhat is being requested
categorystring[]NoClassification
prioritystringNoroutine, urgent, asap, stat
doNotPerformbooleanNoTrue if should NOT be performed
occurrenceDateTimestringNoWhen service should occur
occurrencePeriod{ start?, end? }NoTime window for service
asNeededbooleanNoAs-needed basis
authoredOnstringNoWhen authored (defaults to now)
requesterIdstringNoWho is requesting
performerTypestringNoDesired performer type
performerIdsstring[]NoSpecific performers
reasonCodestring[]NoReason for the request
bodySitestring[]NoBody site(s)
notestringNoAdditional notes
patientInstructionstringNoPatient instructions
basedOnstring[]NoRequest IDs this fulfills
replacesstring[]NoRequest IDs this replaces

Example

const { data } = await clinik.serviceRequests.create({
  status: 'active',
  intent: 'order',
  patientId: 'pt_abc123',
  encounterId: 'enc_xyz789',
  code: { system: 'http://loinc.org', code: '24323-8', display: 'CMP' },
  category: ['laboratory'],
  priority: 'urgent',
  requesterId: 'prac_def456',
  reasonCode: ['Pre-operative assessment'],
  note: 'Fasting required — draw before 10am',
  patientInstruction: 'Do not eat or drink after midnight',
});
Same pattern as other resources. Search supports patientId, status, priority, category, requesterId, performerId, code filters.