Skip to main content

clinik.visionPrescriptions

Vision prescriptions (FHIR VisionPrescription) represent optical prescriptions for eyeglasses and contact lenses, including detailed lens specifications.

create

const { data, meta } = await clinik.visionPrescriptions.create(request): Promise<ApiResponse<VisionPrescription>>
FieldTypeRequiredDescription
statusstringYesactive, cancelled, draft
patientIdstringYesPatient reference
dateWrittenstringYesDate the prescription was written
prescriberIdstringYesPrescribing practitioner ID
lensSpecificationArray<object>YesLens specifications (min 1)
encounterIdstringNoEncounter context
createdstringNoWhen created (defaults to now)

lensSpecification

FieldTypeRequiredDescription
productstringYesProduct type (e.g. “lens”, “contact”)
eyestringYesright or left
spherenumberNoLens power (diopters)
cylindernumberNoCylinder power
axisnumberNoCylinder axis (degrees)
addnumberNoAdded power for multifocal
powernumberNoContact lens power
backCurvenumberNoContact lens back curve
diameternumberNoContact lens diameter
colorstringNoLens color
brandstringNoLens brand
notestringNoAdditional notes
prismArray<{ amount, base }>NoPrism corrections

Example

const { data } = await clinik.visionPrescriptions.create({
  status: 'active',
  patientId: 'pt_abc123',
  dateWritten: '2025-03-15',
  prescriberId: 'prac_optometrist',
  lensSpecification: [
    {
      product: 'lens',
      eye: 'right',
      sphere: -2.25,
      cylinder: -0.75,
      axis: 180,
      add: 1.75,
      prism: [{ amount: 0.5, base: 'down' }],
    },
    {
      product: 'lens',
      eye: 'left',
      sphere: -2.00,
      cylinder: -1.25,
      axis: 175,
      add: 1.75,
    },
  ],
});
Same pattern as other resources. Search supports patientId, status, prescriberId, dateFrom, dateTo filters.