0

The MedicationDispense resource of FHIR defines the attributes related to prescription, like request, dosage, quantity etc. The prescription number, a.k.a. the RxNumber is a pretty common attribute of dispensed record in pharmacy system. I'm wondering why this is not defined in MedicationDispense schema?

There are two identifiers in the schema, the id and identifier. As mentioned in another post, the identifier should be something across systems, like SSN of a patient. Meanwhile the id is ambiguous since it could be internal database identifier or anything that could uniquely identify this dispense record.

What's the difference between id and identifier for a FHIR resource?

mg0880gm
  • 65
  • 1
  • 5

1 Answers1

1

The MedicationDispense includes a reference to the 'authorizingPrescription' MedicationRequest. That's where all information about the prescription (identifier, prescriber, prescription date, prescribed drug, etc.) is captured. In FHIR we try hard to not combine information present in other resources into a referencing resource because doing so makes it hard to keep things in sync and doesn't work well for RESTful exchange. As a result, it's common to use the _include parameter when executing search to grab related resources (e.g. MedicationRequest, Organization, Medication, Practitioner, etc.) when searching against a base resource.

The 'id' is essentially the primary key for a resource as stored on a particular server. If you copy the resource onto a different server, that server will assign its own id/primary key. The 'identifier' on the other hand is a business identifier. For a dispense, this would typically be the "transaction" identifier that goes on the bottle/jar/box that uniquely identifies that particular dispense event. If the dispense information gets stored on multiple systems (e.g. it gets forwarded to the prescribing system, to a personal health record, to a centralized medication registry, etc.) it would have the same 'identifier' but would (usually) have a distinct 'id'. It's certainly possible for two closely linked systems to share the same 'id' for the equivalent records, but it requires careful coordination to avoid conflicts.

Note that the MedicationDispense.identifier is not the same as the MedicationRequest.identifier. The first is a unique identifier for a specific dispense event. The latter is a unique identifier for the overall order. There are often multiple MedicationDispense events (each with a distinct identifier) for a single MedicationRequest.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Thanks for your comments. Do you imply that the `MedicationRequest.identifier` is equivalent to the `RxNumber`? I think the `MedicationRequest` denotes to the prescription ordered by providers in EHR, while the `MediationDispense` is more like the prescription concept in Pharmacy system. The `RxNumber` is only available in Pharmacy side, and it makes more sense that EHR doesn't need to define this attribute. – mg0880gm May 17 '19 at 05:24
  • MedicationRequest is used to represent the prescription in both the order entry system *and* the pharmacy system. In the former, the MedicationRequest.intent is "original-order". For the pharmacy-created (encoded) order, it is "filler-order". The MedicationDispense does not represent an order at all. It represents a single supply action taken against a prescription. For some prescriptions there might only ever be a single dispense, but for many prescriptions there will be multiple dispenses for a single order. – Lloyd McKenzie May 17 '19 at 14:29
  • Note that both the placer system and pharmacy system assign identifiers to the "order". These are distinct from the identifier assigned to any dispense. Specifically, if a pharmacy dispenses a medication and later several refills, the Rx identifier (the one conveyed on MedicationRequest) will be the same on the original dispense and all refills. On the other hand the dispense identifier (appearing in MedicationDispense.identifier) will be different for each. – Lloyd McKenzie May 17 '19 at 14:42