Ingesting FHIR orders with sample collection appointment date/time for phlebotomy workflow

We are using FHIR to send test orders placed in our EMR over to OpenELIS. We have a workflow where clinicians schedule sample collection appointments, and we would like phlebotomists to manage sample collection directly in OpenELIS.

However, we haven’t found a way to ingest external test orders in an AwaitingSpecimen status alongside a scheduled sample collection appointment timestamp. Our goal is for phlebotomists to see incoming external orders sorted by appointment date and time to organize their sample collections efficiently.

We need to create orders with an AwaitingSpecimen status that include a sample collection appointment date/time. Because the FHIR Appointment resource is not supported in the OpenELIS FHIR configuration, how can we pass collection schedule details with external orders so phlebotomists can view them sorted by appointment time?

Hi @Bhupesh_Gupta,

This is a great use case, but unfortunately this workflow isn’t natively supported out of the box in the current OpenELIS FHIR configuration.

Here’s a breakdown of why, based on the current FHIR ingestion logic:

  1. How AwaitingSpecimen is triggered: OpenELIS places an external order into the AwaitingSpecimen queue specifically when a ServiceRequest is received without a Specimen resource (and the LOINC code is specimen-ambiguous). If a Specimen resource is included, OpenELIS assumes the sample type is resolved and queues the order normally as Entered.
  2. The catch-22 for collection dates: OpenELIS currently only extracts collection dates from Specimen.collection.collectedDateTime. But since an order must omit the Specimen resource to trigger AwaitingSpecimen, there’s no Specimen object to extract a date from.
  3. Ignored FHIR fields: The OpenELIS FHIR ingestion engine currently doesn’t parse ServiceRequest.occurrenceDateTime or Task.executionPeriod which would otherwise be the standard FHIR fields for scheduled service times.

How to achieve this goal

Supporting your phlebotomy workflow would require a code change to the OpenELIS FHIR processing layer.

  • Option A: Parse ServiceRequest.occurrenceDateTime (Recommended) Update the ingestion logic in TaskInterpreterImpl.java to extract ServiceRequest.occurrenceDateTime (or occurrencePeriod.start) when processing an order. If the order is flagged as AwaitingSpecimen, this timestamp could be mapped to a scheduled date field or Sample.collectionDate for display and sorting in the phlebotomy queue.
  • Option B: Support “proposed” specimens Update the FHIR parser so that if a ServiceRequest includes a Specimen resource with status unavailable (or a custom extension indicating a “proposed/scheduled” collection), OpenELIS still queues the order as AwaitingSpecimen while extracting Specimen.collection.collectedDateTime to use as the appointment time.

Until one of these FHIR mapping enhancements is implemented in the core codebase, there isn’t a way to pass an appointment time for an AwaitingSpecimen order using the existing FHIR API.

CC: @caseyi @Moses_Mutesasira

We’ve decided to manage appointment scheduling for sample pickup in our EMR, while the actual sample processing happens in OpenELIS. The flow looks like this:

  • Clinician places a test order in the EMR.

  • The EMR creates a corresponding test order in OpenELIS and generates an accession number.

  • During collection, the phlebotomist generates the barcode in the EMR (with barcode creation handled in OpenELIS via the EMR–OpenELIS integration).

  • The phlebotomist collects the sample and marks it as Sample Collected in the EMR.

  • The sample is then sent to the Lab Unit, where the Lab Receptionist marks it as Received. From there, the rest of the lab workflow continues.