How does a lab receive an order from a doctor? Does the EHR take the same route to read its own database?

August 14, 2025

A doctor orders a complete blood count. After clicking Save, she sees the order in the medical record. A little later, the lab sees it too. Did the data take the same route both times?

Suppose the doctor charts in one application and the lab organizes blood collections and tests in another. When the doctor refreshes the page, the EHR retrieves the newly saved order from its own database. To deliver the order to the lab, the two applications can exchange messages directly, or the hospital can deploy software specifically to relay them. That software receives the order message, represents the test according to the agreed format the lab system understands, and forwards it. This software is called an integration engine.

In my April hospital AI presentation, I mentioned that US EHR vendor Epic uses database technology from InterSystems. Later I wanted to understand how lab, imaging, anesthesia, and intensive care systems work together in one hospital. The architecture diagram I received connected all the systems to a box labeled “integration middleware,” representing the integration engine. The diagram didn't show which operations actually went through it. Did the hospital information system (HIS) have to go through that box to read its own database? Was the engine usually supplied by the HIS vendor too? I asked for a diagram of the actual data flows.

One order, three routes: saving, sending to the lab, and querying

Let's call the order number 17. The sender is the electronic health record system (EHR) and the receiver the laboratory information system (LIS). Follow order 17 to see what each does when connected through an integration engine. Epic's public directory lists an interface that sends orders to external lab systems and also describes order cancellation.1

flowchart LR
    E["电子病历应用"] -->|"① 保存、读取 17 号申请"| D[("病历业务库")]
    E -->|"② 发申请"| I["集成引擎"]
    I -->|"转成检验科约定的消息"| L["检验系统"]
    L -->|"返回结果"| I
    I -->|"匹配原申请"| E
    A["获准读取结果的应用"] -->|"③ 查询已发布的结果"| E

In the diagram, path ① is the EHR application saving and reading order 17 in its operational database. Path ② takes the order to the integration engine, which converts it to the lab's agreed message and sends it to the LIS. The lab returns a result through the engine, which matches it to the original order. Path ③ is an authorized application querying an already published result from the EHR.

① is internal application work. The order remains visible after a refresh because the operational system has saved it. Internally there may be several service layers, grouped in the diagram as the “EHR application.” The EHR's operational database stores the order. The cross-system integration engine delivers it to the lab system. Even if the lab connection goes down, the order may already exist in the chart. If a doctor says, “I placed it, but the lab says they don't have it,” checking both sides by order number is more useful than placing it again.

② delivers order 17 to the lab. Suppose the ordering system uses CBC for a complete blood count and the lab uses XCG. They can agree to map those codes here while preserving order 17 and the patient identifier. If the lab assigns its own order number, the returning result must still be traceable to 17. Passing interface validation only means the message format is readable. Check both systems' test dictionaries to confirm the two codes actually refer to the same test.

③ is another application actively retrieving data later. FHIR is a healthcare exchange standard from HL7 International. It represents measurements, test orders, and other information as “resources” with defined fields. If the service exposes the capability, an application can query measurement results called Observation. It can also read a DiagnosticReport representing the whole report and follow its result references to individual measurements. The interface can serve stored results without sending a new order to the lab every time someone reads one.2

The lab calls the order L91; the EHR calls it 17. The result message segment OBR|1|17^EHR|L91^LAB carries both identifiers. Below is the exchange in time order. ORM carries an order and ORU a result. Bridges is Epic's interface for sending and receiving the messages. Follow the order number to the lab, then trace the result coming back. Once stored, it can be queried by an authorized application.13

sequenceDiagram
  autonumber
  participant Prov as 医生(在Epic中)
  participant Epic as Epic应用
  participant Bridges as Epic Bridges (HL7v2)
  participant Bus as 接口引擎(如Rhapsody)
  participant LIS as 检验系统(Sunquest/Beaker)
  participant EHR as Epic FHIR API

  Prov->>Epic: 开具检验医嘱(CPOE)
  Epic->>Bridges: 医嘱事件(ORM^O01)
  Bridges->>Bus: HL7v2 ORM (映射与验证)
  Bus->>LIS: HL7v2 ORM (机构特定映射)
  LIS-->>Bus: HL7v2 ORU (初步/最终结果)
  Bus-->>Bridges: HL7v2 ORU (结果返回Epic)
  Bridges-->>Epic: 结果写入病历

  Note over Epic,EHR: 下游应用可通过FHIR查询
  participant CDS as 临床决策支持微服务
  CDS->>EHR: GET /Observation?patient=... (FHIR)
  EHR-->>CDS: 200 OK (JSON结果)
  CDS-->>Epic: 通过院方约定接口交付建议,由临床端决定如何呈现

The doctor orders a lab test in Epic (CPOE). Epic sends an ORM^O01 order event to Epic Bridges. Bridges forwards the mapped and validated HL7 v2 ORM to an interface engine such as Rhapsody, which applies the institutional mapping for the LIS (Sunquest or Beaker in the example). Preliminary or final results return as HL7 v2 ORU through the engine and Bridges into the chart. A downstream clinical decision support service can then query Epic's FHIR API with GET /Observation?patient=..., receive 200 OK and JSON results, and return a suggestion through the hospital's agreed interface. The clinical application decides how to display it.

Who supplies the integration engine? Must it come from the HIS vendor?

Two systems can connect directly or route messages through a shared hospital engine. With only one stable pair of interfaces, a direct link saves one hop to maintain. If lab results also need to reach other systems, centralized routing, code mapping, and failure records make it easier to establish who owns the work. Ordering software, database technology, and the integration engine are three separate procurement and implementation questions. The hospital's contract scope tells you who is responsible for each.

The New York City public hospital system's 2013 board materials separately listed Epic's EHR, iSirona's device middleware, and InterSystems Ensemble as integration engine. The proposed integration concerned medical devices. First inventory the devices at each site and confirm which have an interface, then connect priority devices and test the entire path to the EHR. This was a proposed procurement and implementation scope. It shows the responsibilities of different suppliers.4

From placing an order to transfer to intensive care, which systems own which stages?

Start with an encounter. Registration records the patient and encounter, then the doctor places orders in the EHR. The lab receives “what to test.” Radiology receives “what to image.” At the operating room and ICU, handoff focuses on “which medication was just given and which infusion is still running.” The diagram shows responsibilities. A hospital can combine several in a single product.

flowchart LR
    A["病历应用(如 Epic)"] <-->|内部读写| DB[("病历业务库")]
    A <--> C["院方对外接口(如 Bridges、Interconnect / FHIR)"]
    C <-->|医嘱、结果、入转出消息| B["院内集成引擎"]
    B <--> L["检验 LIS"]
    B <--> R["放射排程和报告 RIS"]
    B <--> O["手术麻醉"]
    B <--> U["重症 ICU"]
    CT["影像设备"] -->|DICOM 原片| P["影像归档 PACS"]
    R <-->|检查标识| P
    B <-->|报告、检查索引| P
    B <-->|经授权共享文档或资源| H["院外医疗机构"]
    APP["医生或患者应用"] <-->|授权后读 FHIR| C
    B -->|业务事件| W[("分析库")]
    C -->|批量导出| W

In the overview, an EHR application such as Epic reads and writes its own database and connects to external-facing hospital interfaces such as Bridges or Interconnect/FHIR. Orders, results, and admission, transfer, and discharge messages pass between those interfaces and the hospital integration engine. The engine connects the LIS, radiology scheduling and reporting (RIS), anesthesia, and intensive care. Imaging devices send original DICOM images to PACS. RIS exchanges study identifiers with PACS, and the integration engine exchanges reports and study indexes with it. Outside providers can exchange authorized documents or resources. Clinician or patient apps can read FHIR after authorization. The analytics database can receive operational events from the engine or batch exports from the hospital interface.

HL7 v2 and FHIR both come from the healthcare information standards organization HL7. Here the former carries events such as admissions, orders, and released results. The latter represents patients, investigations, and results as addressable resources. DICOM specifies imaging identifiers, transfer, and retrieval. External exchange may use IHE (Integrating the Healthcare Enterprise) XDS to register and share documents, or XCA to query other exchange communities. Patient applications can access FHIR through SMART authorization. Analytics systems may consume near-real-time events or receive periodic bulk exports. The connections are possible interfaces. Actual deployment depends on products and hospital contracts.325

Consider a postoperative transfer. The surgical anesthesia system records surgery start and end, intraoperative medications, and monitor readings. Handoff must link the patient, this encounter, and this particular operation. ICU staff receive the handoff, then record observations, drug administration, and monitoring after transfer. If both systems have blood pressure values, preserve measurement time and source so the receiving clinician can distinguish “before leaving the operating room” from “just arrived at the bedside.” A document alone may be readable, but automatic population of a time-ordered monitoring chart depends on delivering the relevant fields. New York City's device integration plan explicitly listed inventory, interface confirmation, testing from priority devices to the EHR, and training. The anesthesia PDF example below shows the limits of document delivery.46

Imaging has three distinct completion times. RIS schedules the exam, the device sends the images to PACS after acquisition, and radiology sends a report back to the EHR after review and signature. The doctor may see that the study is archived before a formal report is available. To offer both “read report” and “open original images,” the EHR must retain the relationship between report and study.

sequenceDiagram
  autonumber
  participant Rad as 放射科技师
  participant Epic as Epic Radiant (医嘱)
  participant Bridges as Epic Bridges
  participant Bus as 接口引擎
  participant RIS as 放射信息系统
  participant Mod as 影像设备(CT/MR/X光)
  participant PACS as 影像归档系统
  participant VR as 语音报告系统

  Rad->>Epic: 预约影像检查
  Epic->>Bridges: HL7v2 ORM (放射医嘱)
  Bridges->>Bus: HL7v2 ORM
  Bus->>RIS: HL7v2 ORM (检查工作清单)

  Mod->>RIS: 查询今天待做的检查(DICOM 工作清单)
  RIS-->>Mod: 返回患者与检查申请标识
  Mod->>PACS: 影像存储 (DICOM C-STORE)
  VR->>RIS: 放射科医生审核签发的报告文本
  RIS-->>Bus: HL7v2 ORU (检查结果/报告)
  Bus-->>Bridges: HL7v2 ORU
  Bridges-->>Epic: 结果回传;影像链接(WADO/查看器启动)

The radiology technologist schedules the exam in Epic Radiant. The HL7 v2 ORM radiology order goes through Bridges and the interface engine to the RIS worklist. The modality (CT, MR, or X-ray) queries today's DICOM worklist, receives patient and order identifiers, and stores images in PACS via DICOM C-STORE. The voice reporting system sends the radiologist's reviewed, signed text to RIS. The result/report returns in an HL7 v2 ORU via the engine and Bridges to Epic, with an image link (WADO or viewer launch).

The hospital overview, lab flow, and imaging flow were translated and redrawn from the original discussion. I revised the imaging worklist step to show the device initiating the query. The two easily confused results are that report text can come back to the EHR, while a doctor opening the images still needs the study identifier to retrieve them from the imaging system.5

Who sends back the alert shown when a doctor signs an order?

Suppose order 17 already has a CBC result and the doctor is about to sign another order for the same test. The hospital wants the doctor to see the previous result at that moment. CDS Hooks defines how an EHR calls clinical decision support services at specific workflow steps. At the pre-signature order-sign hook, the EHR supplies the pending order to an authorized service. The service reads the previous result and uses hospital rules to decide whether to return an alert card. The doctor decides whether to proceed.78

If details won't fit on a card, the service can include an application link. When the doctor opens it, the EHR can use SMART on FHIR to give the authorized application the current patient context. The doctor needn't search for the patient again. If the aim is just a next-day report, a background fetch can be scheduled when the lab releases the result. The doctor doesn't need to wait for the report calculation the next time an order is signed.7

When both are called “EHR integration,” what can the next department actually do?

Cleveland Clinic's anesthesia department once developed its own surgical medication record system. After moving to Epic, those records entered patients' charts as PDF attachments. Amy Merlino, the hospital's information leader, described the result: “Although the records were saved, they weren’t really integrated with the patient record.”6 The ICU doctor receiving the patient could open the attachment and read the medication history. If the new requirement was to populate a handoff form with every drug name, dose, and administration time, engineers would need to trace who generated each field, how it traveled, and how it related to this operation. The two acceptance tests give different answers.

After looking at lab and imaging flows, I asked a more specific question. Radiology has sent the CT report back to the EHR. The doctor clicks “View original images.” Who does the browser contact next? This time we need to follow the report to the study in the imaging system. When a doctor opens original CT images, how does DICOMweb find and display the study?

What do two departments need to verify between first connecting an interface and going live? See Chinese hospital interface examples and estimating integration testing time.

Footnotes

  1. Epic Systems Corporation. (n.d.). Explore by interface type: HL7v2. open.epic. Outgoing Ancillary Orders, opening description of external lab systems and cancellations. The product interface catalog illustrates responsibilities; the deployment diagrams are teaching examples. ↩ ↩2

  2. Health Level Seven International. (2019). DiagnosticReport: Detailed descriptions. FHIR R4 v4.0.1. DiagnosticReport.result references to Observation. ↩ ↩2

  3. Health Level Seven International. (2007). HL7 messaging standard v2.5.1, Chapter 7: Observation reporting. HL7 Europe. §7.3.1 ORU, §7.4.1 OBX, and §7.4.2 OBR. ↩ ↩2

  4. New York City Health and Hospitals Corporation. (2013, December). Board of Directors meeting materials: Biomedical middleware software implementation. NYC.gov. Contract scope on PDF pp. 51–52; see also device inventory, testing scope, and data flow on pp. 63–65. ↩ ↩2

  5. National Electrical Manufacturers Association. (2025). DICOM PS3.4 2025a: Service class specifications. DICOM Standard. §K.6.1.1, device retrieval of scheduled steps and association with patient and images. ↩ ↩2

  6. Cleveland Clinic. (2019, December 6). How Cleveland Clinic’s EHR transformation ensures the delivery of world-class care everywhere. Consult QD. Quotation from the second paragraph of Merlino's answer to the first interview question. ↩ ↩2

  7. Health Level Seven International. (n.d.). SMART App Launch v2.2.0 and CDS Hooks 2.0. HL7. EHR app launch, authorization, and context · Cards returned by CDS services. ↩ ↩2

  8. Health Level Seven International. (n.d.). order-sign (STU1 release). CDS Hooks. Workflow and Context, pre-signature timing and pending orders. ↩

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-08-14). How does a lab receive an order from a doctor? Does the EHR take the same route to read its own database?. https://caiborui.com/blog/2025-08-14-zh-his-database-hl7-interface-engine-entrans

@misc{borui2025-9c4dfb87,
  author = {borui},
  title = {{How does a lab receive an order from a doctor? Does the EHR take the same route to read its own database?}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-08-14-zh-his-database-hl7-interface-engine-entrans}
}