Skip to main content

Medications

Medications represent drug definitions — the medication itself, not a prescription. For medication orders, see Prescriptions.

Create a Medication

// Simple — free-text name
const { data: med } = await clinik.medications.create({
  code: 'Amoxicillin 500mg Capsule',
  status: 'active',
  form: 'capsule',
  manufacturer: 'Teva Pharmaceuticals',
});

// Coded — RxNorm with full details
const { data: coded } = await clinik.medications.create({
  code: {
    system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
    code: '308182',
    display: 'Amoxicillin 500 MG Oral Capsule',
  },
  status: 'active',
  form: 'capsule',
  manufacturer: 'Teva Pharmaceuticals',
  amount: {
    numerator: { value: 500, unit: 'mg' },
    denominator: { value: 1, unit: 'capsule' },
  },
  ingredient: [
    {
      item: {
        system: 'http://www.nlm.nih.gov/research/umls/rxnorm',
        code: '723',
        display: 'Amoxicillin',
      },
      isActive: true,
      strength: {
        numerator: { value: 500, unit: 'mg' },
        denominator: { value: 1, unit: 'capsule' },
      },
    },
  ],
  batch: {
    lotNumber: 'LOT-2025-A001',
    expirationDate: '2026-12-31',
  },
});

Manufacturer

Track the drug manufacturer:
const { data } = await clinik.medications.create({
  code: 'Metformin 500mg Tablet',
  form: 'tablet',
  manufacturer: 'Merck & Co.',
});
The manufacturer is returned in read responses and can be updated:
await clinik.medications.update('med_abc123', {
  manufacturer: 'Generic Pharma Inc.',
});

Amount

Specify the total amount of drug in the package using a ratio:
const { data } = await clinik.medications.create({
  code: 'Insulin Glargine',
  form: 'injection',
  manufacturer: 'Sanofi',
  amount: {
    numerator: { value: 100, unit: 'units' },
    denominator: { value: 1, unit: 'mL' },
  },
});

Coding Systems

SystemUse CaseExample
RxNormUS drug codes197361 (Lisinopril 10mg)
SNOMED CTClinical terms387207008 (Ibuprofen)
Free textWhen no code available"Custom compound cream"

Update a Medication

await clinik.medications.update('med_abc123', {
  status: 'inactive',
  manufacturer: 'Updated Pharma Corp.',
  batch: { expirationDate: '2025-06-30' },
});

Search Medications

const { data } = await clinik.medications.search({
  status: 'active',
  count: 50,
});

for (const med of data.data) {
  console.log(`${med.code}${med.form}`);
  console.log(`  Manufacturer: ${med.manufacturer}`);
  if (med.batch) {
    console.log(`  Lot: ${med.batch.lotNumber}, Expires: ${med.batch.expirationDate}`);
  }
}

Medications vs Prescriptions

ResourceFHIR TypePurpose
MedicationMedicationDrug definition (what the drug is)
PrescriptionMedicationRequestMedication order (prescribe it to a patient)
A prescription references a medication. You can create prescriptions with inline medication codes without creating a separate Medication resource first.

Complete Field Reference

FieldTypeRequiredDescription
codestring | CodeableConceptYesRxNorm, SNOMED CT, or free-text name
statusstringNoactive (default), inactive
formstringNoDosage form (tablet, capsule, injection, etc.)
manufacturerstringNoManufacturer name
amount{ numerator, denominator }NoTotal amount of drug in package
ingredientArrayNoActive and inactive ingredients with strength
batch{ lotNumber?, expirationDate? }NoBatch/lot tracking information