Order Provider Matching Logic
CGM eMDs Order Provider Matching Logic
When a lab result is received, e-MDs determines the “ordering provider” using the following matching sequence:
- Match by NPI/UPIN (Primary Match)
- System attempts to match the NPI or UPIN in
-16.1 to a provider in e-MDs.
- System attempts to match the NPI or UPIN in
- Match by Provider Name (Secondary Match)
- If step 1 fails, the system attempts to match using:
- Last name from
-16.2, and
- First name from
-16.3.
- Last name from
- Both first and last names must match exactly.
- Example:
- “Smith, MD” vs. “Smith” → no match
- “Smith” vs. “Smith” → match
- Example:
- This exactness applies to both first and last names.
- If step 1 fails, the system attempts to match using:
- Match to Patient’s Primary Physician (Tertiary Match)
- If steps 1 and 2 fail, the system attempts to assign the result to the patient’s primary physician in e-MDs demographics.
- If the primary physician field is empty, this step fails.
- No Match Found
- If all matching attempts fail:
- The result appears in Order Tracking for all providers.
- Interface administrators are notified via e-MDs Taskman.
- Once the result is manually assigned to the correct provider:
- It is removed from other providers’ Order Tracking views.
- If all matching attempts fail:
Special Cases
- Inactive Provider
- If the identified provider is inactive, the system instead matches to the patient’s primary physician.
- Primary Physician Notifications
- When matching to the primary physician, Taskman notifications are sent to all users configured under that primary physician.
Use of Specific HL7 Segments
ORC-12
-12 may contain similar provider information to
-16.
- It is used only for notifications.
- It does not determine which provider is assigned as the ordering provider for the lab.
Taskman Notifications
Users who receive Taskman notifications (if they can be matched):
-16 – Ordering provider
-28 – Result copies to
-17 – Admitting doctor
-8 – Referring doctor
-9 – Consulting doctor
-7 – Attending doctor
All matched providers in these fields receive Taskman notifications, not just the first match.
If no matching provider is found:
- If the patient has a default provider, that provider is notified.
- If there is no default provider, the designated administrator (per implementation settings) is notified.
Users who do not receive Taskman notifications:
-52 – Other healthcare provider
Docman and Order Tracking Display Behavior
Docman – View
-28 (Result copies to):
- Displays as “copy to provider”.
- Supports multiple entries.
-16 (Ordering provider):
- Displays as “ordering provider”.
Docman – Column Display
-16 (Ordering provider) appears in the vertical column labeled “ordering provider”.
Order Tracking
-16 (Ordering provider) determines which provider’s Order Tracking view will show the result (after matching and assignment).

