Skip to main content

Vision Prescriptions

Vision prescriptions (FHIR VisionPrescription) represent optical prescriptions written by optometrists or ophthalmologists. They include detailed lens specifications for each eye — sphere, cylinder, axis, prism, and contact lens parameters.

Create a Vision Prescription

const { data: rx } = 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,
    },
  ],
});

Common Use Cases

Eyeglasses Prescription

const { data } = await clinik.visionPrescriptions.create({
  status: 'active',
  patientId: 'pt_abc123',
  dateWritten: '2025-03-15',
  prescriberId: 'prac_optometrist',
  lensSpecification: [
    {
      product: 'lens',
      eye: 'right',
      sphere: -3.50,
      cylinder: -1.00,
      axis: 90,
      add: 2.00,
    },
    {
      product: 'lens',
      eye: 'left',
      sphere: -3.25,
      cylinder: -0.75,
      axis: 85,
      add: 2.00,
    },
  ],
});

Contact Lens Prescription

const { data } = await clinik.visionPrescriptions.create({
  status: 'active',
  patientId: 'pt_abc123',
  dateWritten: '2025-03-15',
  prescriberId: 'prac_optometrist',
  lensSpecification: [
    {
      product: 'contact',
      eye: 'right',
      power: -2.50,
      backCurve: 8.6,
      diameter: 14.2,
      brand: 'Acuvue Oasys',
      color: 'clear',
      note: 'Daily wear, replace every 2 weeks',
    },
    {
      product: 'contact',
      eye: 'left',
      power: -2.25,
      backCurve: 8.6,
      diameter: 14.2,
      brand: 'Acuvue Oasys',
      color: 'clear',
    },
  ],
});

Prism Correction

const { data } = await clinik.visionPrescriptions.create({
  status: 'active',
  patientId: 'pt_abc123',
  dateWritten: '2025-03-15',
  prescriberId: 'prac_optometrist',
  lensSpecification: [
    {
      product: 'lens',
      eye: 'right',
      sphere: -1.50,
      prism: [
        { amount: 2.0, base: 'in' },
        { amount: 0.5, base: 'up' },
      ],
    },
    {
      product: 'lens',
      eye: 'left',
      sphere: -1.75,
      prism: [
        { amount: 2.0, base: 'out' },
        { amount: 0.5, base: 'down' },
      ],
    },
  ],
});

Search Vision Prescriptions

const { data } = await clinik.visionPrescriptions.search({
  patientId: 'pt_abc123',
  status: 'active',
  prescriberId: 'prac_optometrist',
});