Skip to main content

clinik.medications

Medications represent drug definitions — the medication itself, not a prescription or administration. Use clinik.prescriptions for medication orders.

create

const { data, meta } = await clinik.medications.create(request: MedicationCreateRequest): Promise<ApiResponse<Medication>>
FieldTypeRequiredDescription
codestring | { system?, code, display? }YesRxNorm, SNOMED CT, or free-text name
status'active' | 'inactive'NoMedication status (default: active)
formstringNoDosage form (e.g. “tablet”, “capsule”, “injection”)
manufacturerstringNoManufacturer name
amount{ numerator: { value, unit }, denominator: { value, unit } }NoTotal amount in package
ingredientArrayNoActive and inactive ingredients
batch{ lotNumber?, expirationDate? }NoBatch/lot information

Examples

// Simple — free-text name
const { data } = await clinik.medications.create({
  code: 'Lisinopril 10mg Oral Tablet',
  status: 'active',
  form: 'tablet',
});

// Coded — RxNorm
const { data: coded } = await clinik.medications.create({
  code: {
    system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
    code: '197361',
    display: 'Lisinopril 10 MG Oral Tablet',
  },
  status: 'active',
  form: 'tablet',
  ingredient: [
    {
      item: {
        system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
        code: '29046',
        display: 'Lisinopril',
      },
      isActive: true,
      strength: {
        numerator: { value: 10, unit: 'mg' },
        denominator: { value: 1, unit: 'tablet' },
      },
    },
  ],
  batch: {
    lotNumber: 'LOT-2025-001',
    expirationDate: '2026-12-31',
  },
});

read

const { data, meta } = await clinik.medications.read(id: string): Promise<ApiResponse<Medication>>

update

const { data, meta } = await clinik.medications.update(id: string, request: MedicationUpdateRequest): Promise<ApiResponse<Medication>>
await clinik.medications.update('med_abc123', {
  status: 'inactive',
  batch: { expirationDate: '2025-06-30' },
});

delete

const { data, meta } = await clinik.medications.delete(id: string): Promise<ApiResponse<void>>
const { data, meta } = await clinik.medications.search(params?: ResourceSearchParams): Promise<ApiResponse<PaginatedResponse<Medication>>>
ParameterTypeDescription
statusstringFilter by active/inactive
countnumberResults per page (max: 100)
cursorstringPagination cursor