Capability · FHIR R4 Medication

Any drug as a FHIR R4 Medication.

Add ?format=fhir to a drug fetch and get a standards-valid FHIR R4 Medication — codes split correctly between coding[] and identifier[], Swiss fields as typed extensions.

GET /api/v1/drugs/{id}?format=fhir

What you get

Built for production drug data

Add ?format=fhir to a drug fetch and the API returns a FHIR R4 Medication resource instead of the native shape — ready to drop into an EHR, a CDS-Hooks service or any HL7-aware pipeline. No mapping layer on your side.

Every market identifier is mapped to its correct FHIR home: codes with a recognised codesystem (ATC, GTIN, NDC, PZN, CIP13, dm+d AMPP-ID) become code.coding[] entries; jurisdiction-internal codes like Pharmacode and Swissmedic-No become identifier[] entries. Swiss dispensing category and BAG-SL reimbursement ride along as typed extensions.

Standard

Valid R4 Medication

Declares the base http://hl7.org/fhir/StructureDefinition/Medication profile and validates as a standard Medication — no proprietary resourceType.
Mapping

Correct code / identifier split

Public codesystems land in code.coding[] with their system URIs; jurisdiction-internal codes land in identifier[] — no codes stuffed into the wrong field.
Swiss

Swiss fields as extensions

Swissmedic dispensing category (A–E) and BAG-SL reimbursement status are carried as typed FHIR extensions, so they round-trip without polluting core fields.
Drop-in

One query param

The same id that serves the native shape serves FHIR with ?format=fhir — no separate endpoint, no second auth path.

Try it

A real call, end to end

Append ?format=fhir to any drug fetch and receive a Medication resource with codes and identifiers in their correct FHIR homes.

GET /api/v1/drugs/{id}?format=fhir
curl 'https://drug-database.com/api/v1/drugs/\
3f8a1c2d-1b4e-4c7a-9d2f-0a1b2c3d4e5f?format=fhir' \
  -H 'Authorization: Bearer dd_live_…'
response
{
  "resourceType": "Medication",
  "id": "3f8a1c2d-1b4e-4c7a-9d2f-0a1b2c3d4e5f",
  "meta": {
    "profile": ["http://hl7.org/fhir/StructureDefinition/Medication"]
  },
  "status": "active",
  "code": {
    "text": "Aspirin Cardio 100 mg",
    "coding": [
      { "system": "http://www.whocc.no/atc", "code": "B01AC06" },
      { "system": "https://www.gs1.org/gtin", "code": "7680651870019" }
    ]
  },
  "identifier": [
    { "system": "https://swissmedic.ch/swissmedic-no", "value": "65187" },
    { "system": "https://www.refdata.ch/pharmacode", "value": "1234567" }
  ],
  "manufacturer": { "display": "Bayer (Schweiz) AG" },
  "extension": [
    { "url": "…/swissmedic-dispensing-category", "valueCode": "B" },
    { "url": "…/bag-sl-reimbursed", "valueBoolean": true }
  ]
}

Standards & freshness

  • FHIR R4, base HL7 Medication profile — validates with standard tooling.
  • code.coding[] covers ATC, GTIN, NDC, PZN, CIP13 and dm+d AMPP-ID, each with its system URI.
  • Swiss-specific data (dispensing category, BAG-SL reimbursement) is carried as typed extensions.
  • The FHIR view is ETag-cached and revalidatable via the changes feed.
Good to know
  • · FHIR fetches need the drugs:read scope.
  • · See the docs for the full coding-system URI table.

FAQ

Common questions

FHIR R4. The resource declares the base http://hl7.org/fhir/StructureDefinition/Medication profile and validates as a standard Medication resource.
Codes with a recognised public codesystem URI — ATC, GTIN, NDC, PZN, CIP13, dm+d AMPP-ID — go into code.coding[]. Jurisdiction-internal identifiers like Pharmacode and Swissmedic-No go into identifier[] with their de-facto system URIs.
Swissmedic dispensing category (A–E) and BAG-SL reimbursement status are carried as typed FHIR extensions, so they round-trip without polluting the standard fields.
No. It is the same GET /api/v1/drugs/{id} with ?format=fhir appended — same id, same auth, a different representation.

Ready when you are

Put fhir medication in production this afternoon.

Spin up a key in minutes. The free tier covers prototyping and low-volume production.

Free tier · 100 requests/day · No card required