Explore documentation

MedicationKnowledge: the Medication Catalog

Using MedicationKnowledge for formulary and reference information

Set up the SDK server client to run the examples using esus. The REST examples use a session token. To run them with the SDK’s API key, send X-API-Key instead of Authorization.

What is MedicationKnowledge?

MedicationKnowledge is a reference resource containing information about a medication — essentially an entry in your organization’s medication catalog. It is not tied to a patient. Typical uses:

  • Formulary / catalog management
  • Dosing and administration guidelines
  • Cost information
  • Regulatory data (schedules, substitution rules)

Creating an Entry

REST
curl -X POST https://api.esus.health/fhir/MedicationKnowledge \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "active",
    "code": {
      "coding": [{
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "197361",
        "display": "Amoxicillin 500mg capsule"
      }]
    },
    "doseForm": { "text": "Capsule" },
    "synonym": ["Amoxil"],
    "intendedRoute": [{ "text": "Oral" }],
    "administrationGuidelines": [{
      "dosage": [{ "type": { "text": "Adult" }, "dosage": [{ "text": "500mg every 8 hours" }] }]
    }]
  }'
SDK
const created = await esus.fhir.create("MedicationKnowledge", {
  "status": "active",
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "197361",
        "display": "Amoxicillin 500mg capsule"
      }
    ]
  },
  "doseForm": {
    "text": "Capsule"
  },
  "synonym": [
    "Amoxil"
  ],
  "intendedRoute": [
    {
      "text": "Oral"
    }
  ],
  "administrationGuidelines": [
    {
      "dosage": [
        {
          "type": {
            "text": "Adult"
          },
          "dosage": [
            {
              "text": "500mg every 8 hours"
            }
          ]
        }
      ]
    }
  ]
});

No field is required. status is active (default), inactive or entered-in-error. Other R4 elements accepted: manufacturer, amount, ingredient[], cost[], monograph[], medicineClassification[], packaging, drugCharacteristic[], contraindication[], regulatory[], kinetics[], relatedMedicationKnowledge[], associatedMedication[], productType[], monitoringProgram[], preparationInstruction.

Searching MedicationKnowledge

REST
# Look up a medication by code (partial text match)
curl "https://api.esus.health/fhir/MedicationKnowledge?code=197361" \
  -H "Authorization: Bearer YOUR_TOKEN"
SDK
const { resources, total } = await esus.fhir.search("MedicationKnowledge", {
  "code": "197361"
});
ParameterMatching
statusExact code
code, doseform, ingredient, manufacturer, monitoring-program-namePartial text match

The search returns a Bundle of matching MedicationKnowledge resources.

Interactions and Contraindications

FHIR R4 MedicationKnowledge has no interaction element, and Esus does not provide a drug-interaction check endpoint. What you can store is contraindication[] — references to DetectedIssue resources describing known problems:

{
  "contraindication": [
    { "reference": "DetectedIssue/aa11bb22-cc33-dd44-ee55-ff6677889900" }
  ]
}

Any interaction checking (for example, comparing a new order against a patient’s active MedicationStatements) has to be implemented in your client or with an external drug database.