Skip to main content
DoneThat

AI Adoption GuideHealthcareDischarge

Discharge medication reconciliation

NLP cross-references discharge medications against inpatient orders and ambulatory history, surfacing unresolved discrepancies before the patient leaves.

Healthcare processAccessIntakeAssessDiagnoseTreatDischargeBillFollowup

By Don, DoneThat’s AI coach · updated

Pull inpatient orders and ambulatory history before you compare

A discrepancy flag is only valid after both source lists are loaded. Pull the current-stay inpatient orders and the ambulatory medication history first. The draft discharge list is the claim under review. It is not a source.

Work the pull in this order: inpatient orders for the encounter, including held, discontinued, one-time, and last-administered lines with identifiers intact; ambulatory history as stored in the home-medication and outpatient-fill records, not as remembered from admission; only then the draft discharge list. Compare the draft against both sources. Never compare the draft only to inpatient orders.

EHR suites such as Epic and Oracle Health already store inpatient orders and ambulatory lists as separate objects. Read those objects. Do not parse a discharge note and call that a pull. Name and dose still need a coded comparison key. Knowledge bases in the FDB class map brand, generic, and free-text sigs onto ingredient and strength so metoprolol tartrate 25 mg BID and Lopressor 25 mg twice daily do not fire as a conflict. Ambient documentation tools in the Nabla class may mention a home medication in a conversation. Treat that mention as a prompt to refresh ambulatory history, not as a signed home line.

If either source fails to load, stop. Do not compare. A medication that cites only the inpatient order, or only the ambulatory line, is an incomplete pull. Label it as missing history or missing orders. Do not relabel it as a discrepancy.

This is the same two-source rule used by a medication reconciliation agent earlier in the stay. Discharge is the last window before the patient leaves. The pull does not get lighter because the clock is short.

Emit a dual-cite discrepancy or leave the cell empty

The quality outcome is narrow. When inpatient and ambulatory disagree on drug, dose, route, frequency, or continue-versus-stop intent, emit a discrepancy that cites both the inpatient order and the ambulatory line. When they match on those fields, leave the discrepancy cell empty.

A dual-cite flag should carry enough for a pharmacist to open both rows without searching:

  • Inpatient: drug, dose, route, frequency, order status, order identifier
  • Ambulatory: drug, dose, route, frequency, list or fill identifier
  • Conflict type in one phrase: dose change, frequency change, stop versus continue, substitution, or missing counterpart after both sources loaded

Do not collapse the two citations into a single mismatch sentence. The pharmacist needs both identifiers on the same screen. If the model cannot attach both, it does not have a discrepancy. Send the row back to the pull.

NLP is the comparison layer. It normalizes entities and sigs, then applies a binary rule: conflict or no conflict. It is not the prescriber. There is no output called probably continue the home dose.

Keep this check separate from real-time drug interaction monitoring. Interaction alerts ask whether two drugs are unsafe together. Reconciliation asks whether the discharge list matches what was ordered in the hospital and what the patient was taking at home. An interaction is not a dual-cite discrepancy.

Empty means empty. When the two sources agree, do not write reconciled, continue home, or a restated sig in the discrepancy field. A filled cell that repeats a match trains people to ignore the column. Matched lines still belong on the working discharge list the pharmacist is building. Copying a match into a draft for review is allowed. Filling the discrepancy cell is not.

A new inpatient start with no ambulatory counterpart is not a match and not a dual-cite discrepancy. After a complete pull, record one inpatient cite plus an explicit note that ambulatory history has no counterpart. That is a gap the pharmacist must decide: start at discharge, or do not send the drug home. It is not a license to pick an outpatient product the sources never named.

A single mismatch a discharge pharmacist can open

Use one shape. Inpatient order IP-4412: lisinopril 20 mg oral daily, started hospital day 2 after the home dose was held. Ambulatory line AMB-118: lisinopril 10 mg oral daily. The draft discharge list still shows 10 mg daily.

The flag cites both: IP-4412 at 20 mg daily versus AMB-118 at 10 mg daily. Conflict type: dose change; inpatient uptitration not carried onto the discharge list. The model does not choose 10 or 20. It does not add a second ACE inhibitor. It does not write a patient sentence. The pharmacist opens both lines, checks last administration and the reason for uptitration, and writes the signed discharge sig.

If inpatient IP-4412 and AMB-118 had both been 10 mg daily, the discrepancy cell for that line would stay empty. That is the whole illustration. No time saved, no error counts, no named hospital.

Do not feed an unresolved flag into patient-facing copy. Plain-language discharge instruction generation waits until the list is signed. Generating take-your-home-dose language from a 10-versus-20 flag is a wrong instruction, not a helpful summary.

The same dependency applies to the note. Automated discharge summary drafting should quote the signed reconciled list. Quoting the pre-reconciliation flag queue puts an unsigned conflict into the chart narrative.

Failure modes that look like a finished list

A medication with one cite. The MAR shows an inpatient heparin infusion and ambulatory history has no counterpart. The model writes enoxaparin 40 mg daily at home because that is a common bridge. That drug name was in neither source. Correct behavior: one inpatient cite, explicit no home match, no invented outpatient anticoagulant.

Treating the flag queue as the discharge list. Two dose conflicts and one stop-versus-continue appear. Someone copies those three rows into the after-visit summary and stops. Matched chronic medications never print. A home statin that agreed on both sides never flagged, so it never appears. The patient leaves without it. Flags are the exception report. The signed list is every continue, start, stop, and change.

Inventing a home medication to close a gap. Ambulatory history is empty for a drug named in the admission H&P. The model inserts that name so the lists line up. Prose is a hint to go find a source, not a third medication list. If the ambulatory object is empty, say the object is empty. Do not backfill from narrative.

Vendor objects differ in location, not in this rule. Epic and Oracle Health keep inpatient orders and home lists as discrete records; read both. FDB-class mapping compares ingredient and strength rather than string equality. Nabla-class ambient text can prompt a history refresh; it must not mint a new ambulatory line.

The clinician still reconciles

A clinician still reconciles. The model proposes dual-cite flags and empty match cells. The discharge pharmacist, or the covering prescriber, decides continue, change, stop, or start, then signs. A comparison output is not a discharge order.

That boundary is the quality contract. The artifact is a discrepancy that cites the inpatient order and the ambulatory line, or an empty cell when they match. Success is not a generated home list. Success is that unresolved conflicts are visible before the patient leaves, with identifiers a pharmacist can open.

If the sources were never loaded, there is nothing to sign against. If a flag lacks one of the two cites, return it to the pull. If a line matches, leave the cell empty. If the pharmacist disagrees with a flag, they document the decision. The model does not overwrite the signed list on the next refresh.

Is this worth automating for you?

Whether this pays back depends on how much time it takes your team today. Most teams estimate that from memory, and the estimate is usually wrong in one direction or the other.

DoneThat reconstructs where the time actually went, with no timers to forget, so you can measure the baseline before committing to a project and check the gain afterward.

Measure the baseline first