CPIA Module 21, Section 1: Epic Architecture and Medication Build Process
MODULE 21: VENDOR-SPECIFIC LAB – EPIC WILLOW INPATIENT

Section 21.1: Epic Architecture and Medication Build Process

Looking under the hood of the Epic ecosystem. We’ll deconstruct the Chronicles database, the hierarchy of records (ERX, MED), and the step-by-step process of building a new medication from scratch.

SECTION 21.1

Epic Architecture and Medication Build Process

From Physical Shelves to Digital Records: Architecting the Foundation of Medication Safety.

21.1.1 The “Why”: The Digital Pharmacy’s Foundation

As an experienced pharmacist, your world is built upon tangible, physical objects. You can pick up a stock bottle, read its NDC, scan its barcode, and place it on a specific shelf. You understand the physical workflow of medication management with instinctual precision. You know that if a bottle is mislabeled or placed on the wrong shelf, a dispensing error is imminent. The entire system of pharmacy practice is designed to ensure the right drug, in the right package, is in the right place at the right time.

Welcome to the world of pharmacy informatics, where the physical pharmacy is replaced by a vast, intricate digital structure. In the Epic ecosystem, this structure is a database called Chronicles. The stock bottles, shelves, barcodes, and even the clinical knowledge in your head are all translated into digital records. The process of adding a new medication to the hospital’s formulary is no longer a simple act of stocking a shelf; it is a complex act of digital construction, known as a “medication build.”

Why must you master this process? Because an error here—a misplaced decimal point, a misconfigured link, an incorrect unit—is a thousand times more dangerous than a single misplaced bottle. A single error in a medication build can be replicated in every order, on every MAR, and for every patient who receives that drug. It can cause catastrophic patient harm, generate thousands of flawed billing charges, and bring clinical workflows to a halt. Conversely, a well-designed, meticulously built medication record is a force multiplier for safety. It embeds clinical intelligence, automates complex calculations, and guides every clinician—from the physician to the nurse to the pharmacist—toward the safest possible action.

This section is your architectural tour of the digital pharmacy. We will peel back the user-friendly interface of Epic and examine the raw girders and plumbing that hold it all together. You will learn to think not just like a pharmacist, but like a database architect, understanding how information is stored, linked, and retrieved. Mastering this foundational knowledge is the single most important step in transitioning from a clinical practitioner to a true informatics professional. It is the difference between simply using the system and being able to command it.

Retail Pharmacist Analogy: Architecting a New Super-Pharmacy

Imagine you have been given an unlimited budget and a massive, empty warehouse. Your task is not merely to stock a new pharmacy, but to design and build it from the ground up before the first customer arrives. You are the chief architect, and every decision you make will determine the safety and efficiency of the operation for years to come.

The warehouse itself, with its concrete foundation, steel beams, and utility hookups, is the Chronicles database. It’s the fundamental structure upon which everything else will be built. You can’t change the foundation, but you must understand its layout to build effectively.

Next, you create a series of master catalogs, or binders, for every single category of item that will exist in your pharmacy. These are your Master Files (INIs). You create a “Medication Catalog” (`MED`), an “NDC/Package Catalog” (`NDC`), a “Prescribable Drug Concepts Catalog” (`ERX`), a “Patient Roster” (`EPT`), and an “Employee File” (`EMP`). Each catalog has a unique three-letter code (its INI) and a strict format for how information is to be recorded.

Now, a new drug, “Cardioprotectavir 25mg,” is approved for use. The manufacturer’s truck backs up to your loading dock. You don’t just grab the bottle and throw it on a shelf. You begin a formal, meticulous build process:

  • The Package (`NDC` Record): You take one specific bottle of Cardioprotectavir. You open your “NDC/Package Catalog” (`NDC`) and create a brand-new page for this exact product from this exact manufacturer. You record its 11-digit NDC, its package size (e.g., 100 count), scan its barcode into the system, and log its acquisition cost. This page represents the physical bottle.
  • The Clinical Concept (`MED` Record): Next, you open the “Medication Catalog” (`MED`). You create a new page for the clinical idea of “Cardioprotectavir 25mg Tablet.” This page isn’t tied to a specific manufacturer. You record its generic name, its therapeutic class (e.g., “Beta-Blocker, Selective”), its dosage form (“Tablet”), and its strength (“25 mg”). You then link this page to the specific NDC page you just created, indicating, “When you need the clinical drug Cardioprotectavir 25mg, you can use this physical bottle to get it.”
  • The Prescriber’s View (`ERX` Record): Finally, you open the “Prescribable Drug Concepts Catalog” (`ERX`). You create a page called simply “Cardioprotectavir.” This is what the doctor will look for. On this page, you build the rules for ordering. You set the default starting dose to “25 mg,” the default route to “Oral,” and the default frequency to “daily.” Most importantly, you create a link that says, “When a doctor orders from this ‘Cardioprotectavir’ page and selects the 25mg strength, the system should automatically select the ‘Cardioprotectavir 25mg Tablet’ clinical concept (`MED` record) for the pharmacy to verify and dispense.”

You have just performed a medication build. You’ve taken a physical product and translated it into a series of interconnected, hierarchical records that will now drive ordering, verification, administration, billing, and inventory. The rigor and precision you applied to creating these catalog pages are exactly the skills required to build medications safely within Epic.

21.1.2 Deconstructing Chronicles: The Heart of the Epic Ecosystem

To truly master Willow, you must first understand the fundamental nature of the database that powers it and every other Epic application: Chronicles. It is not like the relational databases (like Microsoft SQL Server or Oracle) you may have encountered elsewhere, which organize data into neat tables with rows and columns. Chronicles is a non-relational, hierarchical database. This is a critical distinction that shapes how all data, including medication records, is structured and stored.

Think of it like a massive digital filing cabinet. The entire cabinet is Chronicles. Each drawer in the cabinet is a Master File, which holds information about a specific type of concept, like Patients, Medications, or Providers.

The Hierarchy of Data

All data in Chronicles follows a strict, five-level hierarchy. Understanding this structure is non-negotiable for an informatics pharmacist. Let’s build this concept from the top down, using our pharmacy analogy.

Level 1: Master File (INI)

The Filing Cabinet Drawer

Example: MED (Medications Master File)

Level 2: Record

A Single File Folder in the Drawer

Example: The folder for "Lisinopril 10mg Tablet"

Level 3: Contact

A Dated Version of the Documents in the Folder

Example: The contents of the folder as they existed on October 18, 2025

Level 4: Item (and Line)

A Specific Labeled Line on a Document

Example: The line labeled "Dosage Form" on the Lisinopril document

Level 5: Value

The Actual Information Written on that Line

Example: The word "Tablet"

Masterclass Deep Dive: Key Willow Master Files

As a Willow analyst, a specific set of master files will become your daily workspace. While there are hundreds of INIs in Epic, you must know these intimately. Each one serves a unique and critical function in the medication process.

INI Master File Name Core Function & Pharmacist Analogy Critical Importance
MED Medications The Clinical Drug Catalog. This is the binder containing the definitive clinical information for every unique medication entity (drug, strength, form). This is the “pharmacist’s brain” of the system. This is the foundation of all clinical use. It drives MAR display, allergy checking, therapeutic duplication warnings, and nursing administration instructions. An error in a MED record is a direct patient safety threat.
ERX e-Prescribing Medications The Prescriber’s Formulary View. This is the simplified, searchable catalog that physicians use to find and order medications. It’s the “menu” they order from. This record controls how medications are ordered. It determines default doses, frequencies, and what the provider sees in the Order Composer. A poorly built ERX leads to provider frustration and incorrect orders.
NDC National Drug Code The Physical Package Catalog. This is the logbook for every specific stock bottle or IV bag. It tracks manufacturer, package size, barcode, and cost. The NDC record is the linchpin for billing and inventory management. If an NDC is not linked to a MED record, the hospital cannot bill for the drug. It also drives barcode medication administration (BCMA).
OCM Order Composer Medications The ERX-to-MED Bridge. This is a complex but crucial set of rules that translates the doctor’s order from the `ERX` menu into a specific clinical drug (`MED`) for the pharmacy to process. If the OCM linkage is broken or misconfigured, a provider’s order will “fail,” meaning it won’t translate into a verifiable pharmacy order, causing significant delays in care.
DCS Dispense Checking The Clinical Decision Support Brain. This contains the rules and settings for drug-drug interactions, dose range checking, and other clinical warnings. It uses third-party data (like First Databank). This master file is the core of your automated safety net. You will configure settings here to determine the severity of alerts that fire during ordering and verification, balancing safety with alert fatigue.
ADC Automated Dispensing Cabinet The Pyxis/Omnicell Configuration File. This holds the records for each ADC in the hospital and defines which medications are stored in which pockets. This record ensures that when a nurse needs a medication, the system knows which cabinet and which drawer to unlock. It’s essential for nursing workflow and inventory control on the units.
CLP Clinical Products The IV Compounding Recipe Book. This master file holds the recipes for all compounded IV admixtures, defining the base solutions, additives, volumes, and stability data. Critical for IV room workflow and safety. A mistake in a CLP record could lead to the preparation of a dangerously incorrect IV product.

21.1.3 The Medication Build Masterclass: A Step-by-Step Construction

Now we move from theory to practice. This is the core skill of a Willow analyst. We will walk through the meticulous, step-by-step process of building a new medication from the moment of its approval by the Pharmacy & Therapeutics (P&T) Committee to its final validation in the system. To make this tangible, we will build a fictional new oral anticoagulant: “Antithrombex 10mg tablet.”

The Pre-Build Checklist: Your Mission Briefing

Before you log into Epic, your work begins. You are a detective gathering intelligence. A successful build is impossible without complete and accurate information. You must obtain:

  1. The Official P&T Formulary Approval: The formal documentation stating the drug is approved for use.
  2. The Package Insert: Your source of truth for clinical information, dosing, and administration.
  3. The Wholesaler Information: The exact product name, item number, and, most importantly, the 11-digit NDC you will be purchasing.
  4. Pricing Information: The Acquisition Cost (WAC or 340B) for the specific NDC.
  5. Barcode Data: A sample of the product barcode to ensure it can be scanned correctly for BCMA.
  6. Third-Party Data Verification: Confirmation that the new drug exists in your clinical decision support database (e.g., First Databank, Medispan) so that interaction and allergy checks will function.

Step 1: The Foundation – Building the NDC Record

We always start with the most granular, physical unit: the package. Every other record will be built upon this foundation. You will navigate to the NDC master file and begin creating a new record.

Master File: `NDC`
Action: Create new record.

Key Fields to Populate in the NDC Record:
Field (Item #) Description Example Value for Antithrombex Reasoning & Pitfalls
NDC (.1) The 11-digit National Drug Code. This is the record’s unique identifier. 12345-0678-90 CRITICAL: This must be 100% accurate. A typo here breaks billing and BCMA. Always use the 5-4-2 format.
Package Size The number of units (e.g., tablets, mL) in the package. 30 Essential for inventory. If the bottle contains 30 tablets but you enter 100, your inventory counts will be perpetually wrong.
Manufacturer The manufacturer of the product. This is a pointer to a record in the Manufacturer (MAN) master file. PharmaGlobal Inc. Important for purchasing reports and tracking product-specific recalls.
AWP / Acquisition Cost The cost fields used for billing calculations. AWP: $15.50, Acq Cost: $12.75 CRITICAL FOR REVENUE. Incorrect cost data leads to under- or over-billing, resulting in lost revenue or compliance issues.
Generic Product Identifier (GPI) A hierarchical therapeutic classification code from your third-party vendor. 54-20-00-10-15-00-00 This is a primary driver for therapeutic duplication checking. Epic uses the GPI to know that Antithrombex, Xarelto, and Eliquis are all in the same class.
Barcode(s) The UPC or other barcode values printed on the package. 312345678904 CRITICAL FOR BCMA SAFETY. If the barcode in this record does not match the barcode on the bottle, the nurse’s scan will fail at the bedside, causing delays and potential workarounds.

Step 2: The Clinical Heart – Building the MED Record

With the physical package defined, we now create the clinical concept. This record represents the drug itself, independent of who makes it or what size bottle it comes in. This record tells clinicians and the system what the drug *is* and how it behaves.

Master File: `MED`
Action: Create new record.

Key Fields to Populate in the MED Record:
Field Group Specific Field (Item #) Example Value for Antithrombex Reasoning & Pitfalls
Identifiers Name (.1) ANTITHROMBEX 10MG TAB The record name. Must follow your health system’s strict naming convention (e.g., GENERIC STRENGTH FORM). Consistency is key for clarity.
Generic Name antithrombex The official generic name. Used for sorting and grouping.
Description Antithrombex 10mg Tablet A more human-readable name that can be displayed in reports or on the MAR.
Therapeutic/Pharm Class Therapeutic: Anticoagulants
Pharm: Factor Xa Inhibitors
Pointer to the Class (CLA) master file. Drives reporting and some clinical decision support rules.
Dosing & Dispensing Dosage Form Tablet Pointer to the Dosage Form (EAF) master file. CRITICAL: This controls how the drug appears on the MAR and what administration instructions are available to the nurse. Choosing “Capsule” by mistake can cause confusion.
Route(s) Oral Pointer to the Route (EFW) master file. Restricts ordering and administration to only the routes specified here.
Strength / Unit Strength: 10
Unit: mg
CRITICAL: A typo here is a direct dosing error. Entering “g” instead of “mg” would create a 1000-fold overdose risk in any weight-based calculation.
Dispense Unit tablet The unit in which the pharmacy dispenses the medication. Must be logical (e.g., you dispense “tablets,” not “mg”). Affects inventory decrementation.
Linkages NDC Linkage Link to NDC 12345-0678-90 This connects the clinical concept to the physical package. You must also specify a “Default NDC” for purchasing.
Allergy Linkage Link to Allergy Class: Factor Xa Inhibitors This tells the system that if a patient has a listed allergy to “Xarelto,” an alert should fire if they are ordered “Antithrombex.”

Step 3: The Provider’s View – Building the ERX Record

Now we build the record that providers will actually interact with. This record is all about user experience, safety, and efficiency during the ordering process. It’s the “front-end” of the medication, built upon the “back-end” work we did in the MED and NDC records.

Master File: `ERX`
Action: Create new record.

Key Fields to Populate in the ERX Record:
Field (Item #) Description Example Value for Antithrombex Reasoning & Pitfalls
Name (.1) The primary name providers will search for. Antithrombex Often just the brand or generic name. Simplicity is key. Too much detail (strength, form) clutters the search.
Synonyms Alternative names or common misspellings to aid in searching. antithrombex; atx Think like a busy provider. What will they type? Adding synonyms dramatically improves findability and reduces frustration.
Order Composer Configuration (OCC) A pointer to a linked record that defines the layout of the ordering screen (dose, route, frequency, etc.). Link to the standard “Oral Solid” OCC. This is a massive and complex area. The OCC determines which fields are available, required, or defaulted during ordering. Using a standardized OCC ensures consistency across all oral meds.
Default Values Pre-populates fields in the Order Composer. Default Route: Oral Speeds up ordering for the most common use cases. You can set defaults for route, frequency, and more.
Linked Dispensable Medication (`OCM` link) The crucial link that connects this ERX to the MED record. Link to MED ANTITHROMBEX 10MG TAB CRITICAL: This is the bridge. This tells the system, “When ‘Antithrombex’ is ordered, and the strength is 10mg, select this specific MED record for the pharmacy.” Without this link, the order will fail.
The Most Common Build Failure: The Broken ERX-to-MED Link

A junior analyst builds the NDC, MED, and ERX records perfectly. They look beautiful in isolation. But when a provider tries to order the drug, they get a cryptic error: “No valid dispensable medication found.” The team is stumped. The problem, 99% of the time, is a misconfiguration of the `OCM` linkage that connects the ERX to the MED. Perhaps they forgot to create the link, or a rule is preventing it from being selected (e.g., the route in the order doesn’t match the route allowed in the MED record).

As an analyst, you must become an expert at troubleshooting this specific connection. It is the most frequent and frustrating point of failure in a new medication build. Always test this linkage first and foremost.

Step 4: The Final Check – Testing and Validation

Your build is not complete until it has been rigorously tested from every angle. This is the equivalent of your pharmacist final check, verifying the work of the “data entry technician” (which was you, in the previous steps). You must “walk the life of an order” in a dedicated test environment.

The Validation Gauntlet: A Multi-Disciplinary Test Plan
  • The Provider Test: Log in as a test provider. Can you find “Antithrombex” easily using its name and synonyms? Does the Order Composer appear correctly? Place an order for a test patient. Does it sign without errors?
  • The Pharmacist Test: Log in as a test pharmacist. Does the order appear in your verification queue? Is all the information correct (patient, drug, dose, route, freq)? Can you verify it? Does it decrement from the correct inventory? Does it bill correctly?
  • The Nurse Test: Log in as a test nurse. Does the verified order appear correctly on the test patient’s MAR? Are the administration instructions clear? Can you scan the barcode from the NDC record and have it be accepted by the system? Can you document the administration?
  • The ADC Test: Does the medication appear in the ADC profile for the test patient? Can you dispense it from the test cabinet? Does the count decrement correctly?

Only when the medication successfully passes every single one of these checkpoints is the build considered complete and safe for migration to the production environment. Skipping even one of these steps is a significant risk to patient safety and revenue integrity.