CPOE Integration Specifications

CPOE Integration Specifications

Integration Summary

ID Target System Direction Trigger Event Data Exchanged Protocol Frequency Auth
INT-CPOE-001 PIS (Pharmacy) Outbound Medication order signed Order details, patient demographics, allergies HL7 ORM^O01 + FHIR MedicationRequest Real-time mTLS
INT-CPOE-002 LIS (Laboratory) Bidirectional Lab order signed / result available Order → LIS; Result → CPOE HL7 ORM^O01 / ORU^R01 + FHIR ServiceRequest Real-time mTLS
INT-CPOE-003 RIS (Radiology) Bidirectional Imaging order signed / report signed Order → RIS; Report → CPOE; DICOM worklist HL7 ORM^O01 / ORU^R01 + DICOM MWL Real-time mTLS
INT-CPOE-004 CDS Engine Internal Medication/lab/imaging selected Patient context + order → CDS response FHIR CDS Hooks Synchronous Internal token
INT-CPOE-005 NABIDH (Dubai) Outbound Order signed / result available Medication orders (RDE^O11), lab/imaging orders (ORM^O01), results (ORU^R01) HL7 v2.5.1 over MLLP/TLS Real-time mTLS + OAuth 2.0
INT-CPOE-006 Malaffi (Abu Dhabi) Outbound Order signed / result available Same data set as NABIDH; DOH-specific profiles HL7 v2.5.1 over MLLP/TLS Real-time mTLS certificate
INT-CPOE-007 MOH UEP Bidirectional Controlled substance ordered / dispensed Prescription submission, validation, dispensing confirmation REST API (HTTPS) Real-time OAuth 2.0 + qualified cert
INT-CPOE-008 Insurance / Prior Auth Bidirectional Non-formulary or auth-required order Eligibility query, prior-auth request/response eClaimLink (Dubai) / DOH eClaims (Abu Dhabi) Real-time Certificate-based

INT-CPOE-001: Pharmacy Information System (PIS)

Business Context

When a physician signs a medication order, the CPOE module transmits the complete order to the Pharmacy Information System for pharmacist verification, dispensing, and medication administration record (MAR) management. This is the highest-volume CPOE integration — every medication order generates at least one outbound message.

What flows: Patient demographics, medication details (drug, dose, route, frequency, duration), allergies, provider information, clinical indication, formulary status, controlled substance metadata. When: Immediately upon order signing (< 1 second target). Why: Pharmacist verification is mandatory before dispensing; the pharmacy queue drives medication delivery timing.

HL7 v2.5.1 Technical Detail

Message Type: ORM^O01 (New Order)

HL7 v2
MSH|^~\&|HIS_CPOE|FACILITY01|PHARMACY|FACILITY01|20260207143215||ORM^O01|MSG202602071432150001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR~784-1985-1234567-1^^^UAE^EID||AL-MAKTOUM^AHMED^M||19850315|M|||PO BOX 12345^^DUBAI^^00000^AE||+971501234567|||M||||||||||AE
PV1|1|I|4B^412^01^FACILITY01||||KHAN^SARA^A^^^DR|||MED||||||||ENC2026020700456|||||||||||||||||||||||||20260207080000
AL1|1|DA|70618^Penicillin^RXNORM|SV|Anaphylaxis^Anaphylaxis|20230515
AL1|2|DA|763875^Sulfonamide^RXNORM|MO|Rash^Rash|20210110
ORC|NW|ORD-2026020700123|||||^^^^^R||20260207143215|||KHAN^SARA^A^^^DR^MD|||||FACILITY01^Al Noor Hospital^FACILITY01
RXO|314076^Lisinopril 10mg Tablet^RXNORM||10|mg|PO^Oral^HL70162|QD^Once daily^HL70335|||||90|d|||I10^Essential hypertension^ICD10AM
RXR|PO^Oral^HL70162
RXE|^QD^Once daily|314076^Lisinopril 10mg Tablet^RXNORM|10|mg|||||90|d||0|||||I10^Essential hypertension^ICD10AM
NTE|1||Take once daily in the morning. Monitor blood pressure.

Key Segments:

  • PID-3: Dual identifiers — facility MRN + Emirates ID
  • AL1 (repeating): All active allergies transmitted with each order
  • ORC-1: NW = New order; XO = Change order; CA = Cancel order
  • RXO: Pharmacy order segment — RxNorm coded medication
  • RXE: Pharmacy encoded order — dose, units, quantity, duration
  • NTE: Free-text notes / special instructions

FHIR R4 Technical Detail

Resource: MedicationRequest

JSON
{
  "resourceType": "MedicationRequest",
  "id": "ORD-2026020700123",
  "status": "active",
  "intent": "order",
  "priority": "routine",
  "medicationCodeableConcept": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "314076",
        "display": "Lisinopril 10 MG Oral Tablet"
      }
    ],
    "text": "Lisinopril 10mg Tablet"
  },
  "subject": {
    "reference": "Patient/2024001234",
    "display": "Ahmed Al-Maktoum"
  },
  "encounter": {
    "reference": "Encounter/ENC2026020700456"
  },
  "authoredOn": "2026-02-07T14:32:15+04:00",
  "requester": {
    "reference": "Practitioner/KHAN-SARA",
    "display": "Dr. Sara Khan"
  },
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/sid/icd-10-am",
          "code": "I10",
          "display": "Essential hypertension"
        }
      ]
    }
  ],
  "dosageInstruction": [
    {
      "text": "Take 10mg by mouth once daily in the morning",
      "timing": {
        "repeat": {
          "frequency": 1,
          "period": 1,
          "periodUnit": "d"
        },
        "code": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
              "code": "QD",
              "display": "Once daily"
            }
          ]
        }
      },
      "route": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "26643006",
            "display": "Oral route"
          }
        ]
      },
      "doseAndRate": [
        {
          "doseQuantity": {
            "value": 10,
            "unit": "mg",
            "system": "http://unitsofmeasure.org",
            "code": "mg"
          }
        }
      ]
    }
  ],
  "dispenseRequest": {
    "validityPeriod": {
      "start": "2026-02-07"
    },
    "numberOfRepeatsAllowed": 0,
    "quantity": {
      "value": 90,
      "unit": "tablets"
    },
    "expectedSupplyDuration": {
      "value": 90,
      "unit": "days",
      "system": "http://unitsofmeasure.org",
      "code": "d"
    }
  }
}

Error Handling

Error Condition Response Retry Strategy
Network timeout Queue locally; retry Exponential backoff: 30s, 1m, 2m, 5m; alert user after 4 failures
HL7 AE (Application Error) Parse error details; flag for interface team review No auto-retry; manual correction required
HL7 AR (Application Reject) Message rejected; log full message + rejection reason No auto-retry; manual investigation
FHIR 4xx (Client Error) Validation failure; parse OperationOutcome Fix payload and resubmit
FHIR 5xx (Server Error) Pharmacy system unavailable Exponential backoff; alert if > 10 min

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
Network timeout / 5xx Exponential backoff 30s, 1m, 2m, 5m, 10m 5
HL7 NAK (AE) No auto-retry N/A Flag for interface analyst
HL7 Reject (AR) No auto-retry N/A Log full message; manual investigation
FHIR 4xx No auto-retry N/A Parse OperationOutcome; fix payload
FHIR 5xx Exponential backoff 30s, 1m, 2m, 5m, 10m 5

Dead Letter Queue:

  • Messages exhausting all retries → integration_dlq table
  • Admin dashboard for manual review, correction, and requeue
  • Retention: 30 days active, then archive to cold storage
  • Alert: integration team notified on DLQ insertion

Idempotency:

  • Deduplication key: [order_id]_[ORM^O01]_[message_datetime]
  • PIS checks for duplicate MSH-10 (Message Control ID) before processing
  • Duplicate messages return AA ACK without reprocessing

Reconciliation:

  • Daily batch comparison: HIS medication_orders vs PIS acknowledged orders
  • Unmatched records flagged for pharmacist/interface analyst review
  • Reconciliation report available in admin module
  • Monthly trend reporting on message success rates

INT-CPOE-002: Laboratory Information System (LIS)

Business Context

CPOE transmits lab orders to the LIS for specimen collection, processing, and result reporting. This is a bidirectional integration: orders flow out, results flow back. Critical results trigger immediate notification to the ordering provider.

Outbound: Lab order details (test, priority, specimen type, clinical indication, collection requirements). Inbound: Test results with values, units, reference ranges, abnormal flags, performing lab details. Volume: High — typically 3–5x the number of medication orders.

HL7 v2.5.1 Technical Detail

Outbound — Lab Order: ORM^O01

HL7 v2
MSH|^~\&|HIS_CPOE|FACILITY01|LIS|FACILITY01|20260207150000||ORM^O01|MSG202602071500000001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR~784-1985-1234567-1^^^UAE^EID||AL-MAKTOUM^AHMED^M||19850315|M
PV1|1|I|4B^412^01^FACILITY01||||KHAN^SARA^A^^^DR|||MED||||||||ENC2026020700456
ORC|NW|LAB-2026020700456|||||^^^^^S||20260207150000|||KHAN^SARA^A^^^DR^MD
OBR|1|LAB-2026020700456||58410-2^Complete Blood Count^LOINC|||20260207150000||||||||KHAN^SARA^A^^^DR^MD||||||20260207150000|||F|||||||BLOOD^Blood (venous)^HL70070
OBR|2|LAB-2026020700457||51990-0^Basic Metabolic Panel^LOINC|||20260207150000||||||||KHAN^SARA^A^^^DR^MD||||||20260207150000|||F|||||||BLOOD^Blood (venous)^HL70070

Inbound — Lab Result: ORU^R01

HL7 v2
MSH|^~\&|LIS|FACILITY01|HIS_CPOE|FACILITY01|20260207163000||ORU^R01|MSG202602071630000001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR||AL-MAKTOUM^AHMED^M||19850315|M
PV1|1|I|4B^412^01^FACILITY01
ORC|RE|LAB-2026020700456
OBR|1|LAB-2026020700456||58410-2^Complete Blood Count^LOINC|||20260207150000||||||||KHAN^SARA^A^^^DR^MD||||||20260207163000|||F
OBX|1|NM|6690-2^Leukocytes^LOINC||7.2|10*3/uL^thousand per microliter^UCUM|4.5-11.0|N|||F|||20260207162500
OBX|2|NM|789-8^Erythrocytes^LOINC||4.8|10*6/uL^million per microliter^UCUM|4.5-5.5|N|||F|||20260207162500
OBX|3|NM|718-7^Hemoglobin^LOINC||14.2|g/dL^grams per deciliter^UCUM|13.5-17.5|N|||F|||20260207162500
OBX|4|NM|777-3^Platelets^LOINC||245|10*3/uL^thousand per microliter^UCUM|150-400|N|||F|||20260207162500

FHIR R4 Technical Detail

Outbound — Lab Order: ServiceRequest

JSON
{
  "resourceType": "ServiceRequest",
  "id": "LAB-2026020700456",
  "status": "active",
  "intent": "order",
  "priority": "stat",
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "58410-2",
        "display": "Complete Blood Count"
      }
    ]
  },
  "subject": {
    "reference": "Patient/2024001234"
  },
  "encounter": {
    "reference": "Encounter/ENC2026020700456"
  },
  "requester": {
    "reference": "Practitioner/KHAN-SARA"
  },
  "reasonCode": [
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/sid/icd-10-am",
          "code": "D64.9",
          "display": "Anaemia, unspecified"
        }
      ]
    }
  ],
  "specimen": [
    {
      "display": "Blood (venous)"
    }
  ]
}

Error Handling

Error Condition Response Action
LIS unavailable Queue order; retry with exponential backoff Alert user if > 5 min; fallback: print requisition
Specimen rejected by LIS Inbound rejection message Alert nurse for re-collection; new barcode generated
Critical result received System parses abnormal flag (H!, L!, C) Push notification to ordering provider; 30-min acknowledgement required
Duplicate order detected by LIS Informational response Display to user; user may confirm or cancel

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
Network timeout / LIS unavailable Exponential backoff 30s, 1m, 2m, 5m, 10m 5
HL7 NAK (AE) No auto-retry N/A Flag for interface analyst
HL7 Reject (AR) No auto-retry N/A Log full message; manual investigation
Inbound result delivery failure LIS retries to HIS Per LIS configuration N/A (LIS-initiated)

Dead Letter Queue:

  • Failed outbound orders → integration_dlq table with full HL7 message content
  • Failed inbound results → integration_dlq (LIS-side DLQ mirrors to HIS admin)
  • Admin dashboard for review, correction, and requeue
  • Retention: 30 days active, then archive

Idempotency:

  • Outbound deduplication key: [order_id]_[ORM^O01]_[message_datetime]
  • Inbound deduplication: LIS result OBR-2 (Placer Order Number) + OBR-25 (Result Status) checked against lab_results to prevent duplicate result posting
  • Duplicate inbound results acknowledged with AA but not reprocessed

Reconciliation:

  • Daily batch comparison: HIS laboratory_orders (status = 'active') vs LIS order acknowledgements
  • Hourly check: orders transmitted > 2 hours ago without LIS ACK flagged for review
  • Critical result reconciliation: all critical results cross-checked against provider acknowledgements
  • Monthly trend reporting on order-to-result turnaround times

INT-CPOE-003: Radiology Information System (RIS) / PACS

Business Context

CPOE transmits imaging orders to the RIS for scheduling, image acquisition, and reporting. The integration also populates DICOM modality worklists for imaging equipment and returns radiology reports to the patient chart.

Outbound: Imaging order (exam type, protocol, clinical indication, priority, pregnancy status, contrast requirements). Inbound: Radiology report (findings, impression, radiologist signature), exam status updates. Additional: DICOM Modality Worklist (MWL) populated for imaging equipment.

HL7 v2.5.1 Technical Detail

Outbound — Imaging Order: ORM^O01

HL7 v2
MSH|^~\&|HIS_CPOE|FACILITY01|RIS|FACILITY01|20260207154500||ORM^O01|MSG202602071545000001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR~784-1985-1234567-1^^^UAE^EID||AL-MAKTOUM^AHMED^M||19850315|M
PV1|1|I|4B^412^01^FACILITY01||||KHAN^SARA^A^^^DR|||MED||||||||ENC2026020700456
ORC|NW|IMG-2026020700789|||||^^^^^U||20260207154500|||KHAN^SARA^A^^^DR^MD
OBR|1|IMG-2026020700789||71046-1^Chest X-ray PA and Lateral^LOINC|||20260207154500||||||||KHAN^SARA^A^^^DR^MD|||||71020^Radiologic exam chest 2 views^CPT4|20260207154500|||1|||||||J18.9^Pneumonia unspecified^ICD10AM

Inbound — Radiology Report: ORU^R01

HL7 v2
MSH|^~\&|RIS|FACILITY01|HIS_CPOE|FACILITY01|20260207171500||ORU^R01|MSG202602071715000001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR||AL-MAKTOUM^AHMED^M||19850315|M
ORC|RE|IMG-2026020700789
OBR|1|IMG-2026020700789||71046-1^Chest X-ray PA and Lateral^LOINC|||20260207154500||||||||KHAN^SARA^A^^^DR^MD||||||20260207171500|||F
OBX|1|FT|71046-1^Chest X-ray PA and Lateral^LOINC||FINDINGS: PA and lateral chest radiograph obtained. Lungs are clear bilaterally without infiltrate, effusion, or pneumothorax. Cardiac silhouette is normal in size. Mediastinal contours are unremarkable. No bony abnormality identified.~IMPRESSION: Normal chest radiograph. No acute cardiopulmonary process.||||||F|||20260207171500|||AHMED^MOHAMMAD^R^^^DR^MD

Error Handling

Error Condition Response Action
RIS unavailable Queue order; retry with exponential backoff Alert user if > 5 min; DICOM worklist not updated until resolved
HL7 AE (Application Error) Parse error details Flag for interface analyst; no auto-retry
HL7 AR (Rejected) Log rejection with full message Manual investigation required
DICOM MWL update failure Exam missing from modality worklist Alert radiology tech; manual worklist entry as fallback
Inbound report delivery failure RIS retries to HIS Per RIS retry configuration

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
Network timeout / RIS unavailable Exponential backoff 30s, 1m, 2m, 5m, 10m 5
HL7 NAK (AE) No auto-retry N/A Flag for interface analyst
HL7 Reject (AR) No auto-retry N/A Log full message; manual investigation
DICOM MWL sync failure Retry on next scheduler cycle 60s intervals 10

Dead Letter Queue:

  • Failed outbound orders → integration_dlq table with full HL7 message
  • Failed DICOM worklist entries → separate DICOM DLQ with worklist attributes
  • Admin dashboard for review, correction, and requeue
  • Retention: 30 days active, then archive

Idempotency:

  • Outbound deduplication key: [order_id]_[ORM^O01]_[message_datetime]
  • Inbound deduplication: RIS report OBR-2 (Placer Order Number) + OBR-25 (Result Status) checked against radiology_reports to prevent duplicate report posting
  • DICOM MWL: worklist entries keyed by Accession Number — duplicates overwrite

Reconciliation:

  • Daily batch comparison: HIS imaging_orders (status = 'transmitted') vs RIS order acknowledgements
  • Hourly check: orders without RIS ACK after 1 hour flagged for review
  • DICOM worklist reconciliation: compare RIS scheduled exams vs PACS worklist entries
  • Monthly reporting on order-to-report turnaround times

INT-CPOE-004: Clinical Decision Support (CDS) Engine

Business Context

The CDS engine evaluates every order in real-time against the patient's clinical context (allergies, active medications, lab results, diagnoses, vital signs) and returns alerts, recommendations, and dosing adjustments. This is a synchronous, internal integration — the order form cannot proceed until the CDS response is received.

What flows: Patient context (allergies, active meds, recent labs, diagnoses) + proposed order details. Response: Zero or more alerts, each with severity, message, recommended action, and alternative suggestions.

FHIR CDS Hooks Technical Detail

Hook: order-sign

Request (Context):

JSON
{
  "hookInstance": "d1577c69-dfbe-44ad-bd63-3d136f0401a6",
  "hook": "order-sign",
  "context": {
    "userId": "Practitioner/KHAN-SARA",
    "patientId": "Patient/2024001234",
    "encounterId": "Encounter/ENC2026020700456",
    "draftOrders": {
      "resourceType": "Bundle",
      "entry": [
        {
          "resource": {
            "resourceType": "MedicationRequest",
            "medicationCodeableConcept": {
              "coding": [
                {
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "197517",
                  "display": "Clarithromycin 500 MG Oral Tablet"
                }
              ]
            },
            "dosageInstruction": [
              {
                "doseAndRate": [
                  {
                    "doseQuantity": {
                      "value": 500,
                      "unit": "mg"
                    }
                  }
                ],
                "timing": {
                  "repeat": {
                    "frequency": 2,
                    "period": 1,
                    "periodUnit": "d"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  },
  "prefetch": {
    "patient": { "resourceType": "Patient", "id": "2024001234" },
    "medications": {
      "resourceType": "Bundle",
      "entry": [
        {
          "resource": {
            "resourceType": "MedicationRequest",
            "status": "active",
            "medicationCodeableConcept": {
              "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "36567", "display": "Simvastatin 40 MG Oral Tablet" }]
            }
          }
        }
      ]
    },
    "allergies": {
      "resourceType": "Bundle",
      "entry": [
        {
          "resource": {
            "resourceType": "AllergyIntolerance",
            "code": { "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "70618", "display": "Penicillin" }] },
            "reaction": [{ "severity": "severe", "manifestation": [{ "text": "Anaphylaxis" }] }]
          }
        }
      ]
    }
  }
}

Response (CDS Card):

JSON
{
  "cards": [
    {
      "uuid": "alert-ddi-001",
      "summary": "Major Drug-Drug Interaction: Clarithromycin + Simvastatin",
      "detail": "CYP3A4 inhibition by clarithromycin significantly increases simvastatin levels, raising the risk of rhabdomyolysis.",
      "indicator": "critical",
      "source": {
        "label": "Drug Interaction Knowledge Base",
        "url": "https://cds.example.com/interactions/clarithromycin-simvastatin"
      },
      "suggestions": [
        {
          "label": "Switch to Azithromycin (no CYP3A4 interaction)",
          "actions": [
            {
              "type": "create",
              "description": "Replace Clarithromycin with Azithromycin 250mg PO daily x 5 days",
              "resource": {
                "resourceType": "MedicationRequest",
                "medicationCodeableConcept": {
                  "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "248656", "display": "Azithromycin 250 MG Oral Tablet" }]
                }
              }
            }
          ]
        },
        {
          "label": "Hold Simvastatin during antibiotic course",
          "actions": [
            {
              "type": "update",
              "description": "Discontinue Simvastatin temporarily"
            }
          ]
        }
      ],
      "overrideReasons": [
        { "code": "CLIN_NECESSITY", "display": "Clinical necessity despite risk" },
        { "code": "NO_ALTERNATIVE", "display": "No therapeutic alternative" }
      ]
    }
  ]
}

Retry and Recovery

Timeout and Circuit Breaker (synchronous integration — no DLQ/retry pattern):

Scenario Strategy Threshold Fallback
CDS response timeout Hard timeout per request 5 seconds Proceed without CDS; log cds_timeout event; alert provider "CDS unavailable"
Consecutive CDS failures Circuit breaker opens 5 failures in 60 seconds All orders bypass CDS for 30s; circuit half-opens to test recovery
CDS partially degraded Selective bypass Per-check timeout of 2s Skip timed-out check; run remaining checks; flag skipped checks in UI

Recovery:

  • Circuit breaker states: Closed (normal) → Open (bypassed) → Half-Open (testing recovery)
  • When circuit opens: all CDS checks bypassed with provider notification banner
  • When circuit half-opens: single test request sent; if successful, circuit closes
  • All bypassed orders flagged in order_audit_log with cds_bypassed = TRUE for post-recovery pharmacist review

Reconciliation:

  • Post-recovery: batch re-run of CDS checks on all orders placed during outage window
  • Pharmacist review queue populated with orders that would have triggered alerts
  • Daily CDS availability report: uptime percentage, average response time, timeout count

INT-CPOE-005: NABIDH (Dubai HIE)

Business Context

All medication orders, lab orders, imaging orders, and results from DHA-licensed facilities must be reported to NABIDH in real-time. This is a mandatory outbound integration per DHA Administrative Order No. 1/2019.

What flows: Medication orders (RDE^O11), lab/imaging orders (ORM^O01), lab/imaging results (ORU^R01). When: Real-time upon order signing (within 5 minutes per NABIDH SLA). Consent: Opt-in consent required per patient; break-the-glass for emergencies.

HL7 v2.5.1 Technical Detail

Medication Order to NABIDH: RDE^O11

HL7 v2
MSH|^~\&|HIS_CPOE|FACILITY01|NABIDH|DHA|20260207143300||RDE^O11|MSG202602071433000001|P|2.5.1|||AL|NE||UTF-8
PID|1||2024001234^^^FACILITY01^MR~784-1985-1234567-1^^^UAE^EID||AL-MAKTOUM^AHMED^M||19850315|M|||PO BOX 12345^^DUBAI^^00000^AE||+971501234567
PV1|1|I|4B^412^01^FACILITY01||||KHAN^SARA^A^^^DR|||MED||||||||ENC2026020700456
ORC|NW|ORD-2026020700123|||CM||||20260207143215|||KHAN^SARA^A^^^DR^MD|||||||FACILITY01^Al Noor Hospital
RXE|^QD^Once daily|314076^Lisinopril 10mg Tablet^RXNORM|10|mg|PO^Oral^SNOMED||||||90|d||0|||||I10^Essential hypertension^ICD10AM
RXR|PO^Oral^SNOMED

NABIDH-Specific Requirements:

  • Emirates ID mandatory in PID-3 (identifier type EID)
  • Patient name in Arabic + English (when available) in PID-5
  • SNOMED CT coding for routes, specimen types (85%+ mapping)
  • LOINC coding for all lab observations (85%+ mapping)
  • RxNorm coding for medications
  • ICD-10-AM for all diagnosis codes
  • Facility ID per NABIDH registration

Error Handling

ACK Code Meaning HIS Action
AA Accepted No action; confirm delivery
AE Application Error Queue for review; correct and resend
AR Rejected Log rejection; alert interface admin; manual resolution
  • Automatic retry for transient errors: 3 retries with exponential backoff
  • Daily reconciliation report: compare HIS events vs NABIDH confirmations
  • Failed messages retained with full content for audit

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
MLLP connection timeout Exponential backoff 30s, 1m, 2m, 5m, 10m 5
NABIDH ACK AE No auto-retry N/A Store ERR segment; flag for interface analyst
NABIDH ACK AR No auto-retry N/A Log rejection; manual correction required
TLS handshake failure Retry with backoff 1m, 5m, 15m 3 (then alert IT for cert check)

Dead Letter Queue:

  • Messages exhausting retries → integration_dlq with full HL7 content and NABIDH error response
  • Admin dashboard for review and resubmission
  • Retention: 90 days (per DHA audit requirements), then archive
  • Priority queue: medication orders (RDE^O11) prioritised over other message types

Idempotency:

  • Deduplication key: MSH-10 (Message Control ID) — unique per message
  • NABIDH rejects duplicate MSH-10; HIS generates new MSH-10 only for corrected resubmissions
  • Original message ID retained in integration_message_log for traceability

Reconciliation:

  • Daily batch: compare HIS order/result events vs NABIDH AA confirmations
  • Unmatched records flagged for interface analyst review
  • Weekly summary: NABIDH submission success rate, average latency, DLQ volume
  • Audit trail retained per DHA and UAE PDPL retention requirements

INT-CPOE-006: Malaffi (Abu Dhabi HIE)

Business Context

For DOH-licensed facilities in Abu Dhabi, the same data set flows to Malaffi (Abu Dhabi Health Information Exchange). The integration profile is nearly identical to NABIDH with Abu Dhabi-specific extensions.

Protocol: HL7 v2.5.1 over MLLP/TLS (primary); FHIR R4 expanding. Key differences from NABIDH: Malaffi uses Unified Health Identifier (UHID) linked to Emirates ID; DOH data quality metrics apply; ADHICS V2 security standards mandatory.

Message types: Same as INT-CPOE-005 (RDE^O11, ORM^O01, ORU^R01).

Configuration: The HIS must support parallel submission to NABIDH and/or Malaffi based on facility emirate registration. Multi-emirate organisations send to both.

Error Handling

ACK Code Meaning HIS Action
AA Accepted Confirm delivery; update integration_message_log
AE Application Error Queue for review; correct DOH-specific fields and resend
AR Rejected Log rejection with DOH error codes; alert interface admin

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
MLLP connection timeout Exponential backoff 30s, 1m, 2m, 5m, 10m 5
Malaffi ACK AE No auto-retry N/A Store ERR segment; flag for analyst
Malaffi ACK AR No auto-retry N/A Log rejection; manual correction
DOH certificate expiry No retry N/A Alert IT immediately; block submissions until cert renewed

Dead Letter Queue:

  • Failed messages → integration_dlq with full HL7 content and Malaffi error response
  • Admin dashboard for review and resubmission
  • Retention: 90 days (per DOH audit requirements), then archive
  • Separate DLQ partition for Malaffi vs NABIDH messages

Idempotency:

  • Deduplication key: MSH-10 (Message Control ID) — unique per message
  • Malaffi rejects duplicate MSH-10; HIS generates new MSH-10 for corrected resubmissions
  • UHID (Unified Health Identifier) used as patient key for Malaffi deduplication

Reconciliation:

  • Daily batch: compare HIS order/result events vs Malaffi AA confirmations
  • Unmatched records flagged for interface analyst review
  • DOH data quality scorecard: mapping completeness for SNOMED, LOINC, ICD-10-AM
  • Weekly summary: submission success rate, average latency, DLQ volume
  • ADHICS V2 compliance audit: monthly security review of Malaffi integration

INT-CPOE-007: MOH Unified Electronic Platform (UEP)

Business Context

All controlled substance prescriptions (CDa and CDb) must be submitted to the MOH Unified Electronic Platform per Ministerial Decree No. 379/2019. The UEP validates prescriber authorisation, checks for duplicate prescriptions across all UAE facilities, enforces quantity limits, and provides end-to-end tracking.

What flows: Prescription submission (CDa/CDb details, prescriber info, patient Emirates ID), dispensing confirmation. When: Real-time at order signing (before order can be transmitted to pharmacy for CDa). Direction: Bidirectional — submit prescription, receive approval/rejection, report dispensing.

REST API Technical Detail

Endpoint: POST /api/v1/prescriptions

Request:

JSON
{
  "prescriptionId": "ORD-2026020700999",
  "facilityId": "FACILITY01",
  "facilityLicenseNumber": "DHA-H-0012345",
  "prescriber": {
    "emiratesId": "784-1970-5678901-2",
    "mohLicenseNumber": "MOH-PHY-12345",
    "controlledSubstanceAuth": true,
    "speciality": "Internal Medicine"
  },
  "patient": {
    "emiratesId": "784-1985-1234567-1",
    "name": "Ahmed Al-Maktoum",
    "dateOfBirth": "1985-03-15",
    "gender": "M"
  },
  "medication": {
    "rxnormCode": "261106",
    "genericName": "Tramadol",
    "brandName": "Tramal",
    "strength": "50mg",
    "form": "Capsule",
    "controlledClass": "CDa-Narcotic",
    "uaeLegalSchedule": "Schedule 2"
  },
  "prescription": {
    "dose": 50,
    "doseUnit": "mg",
    "route": "PO",
    "frequency": "Q6H PRN",
    "duration": 7,
    "durationUnit": "days",
    "totalQuantity": 28,
    "quantityUnit": "capsules",
    "indication": "Post-operative pain management",
    "indicationCode": "G89.18"
  },
  "encounterType": "inpatient",
  "prescriptionDatetime": "2026-02-07T14:45:00+04:00",
  "specialPrescriptionNumber": "SPN-2026-FACILITY01-00456"
}

Response (Approved):

JSON
{
  "status": "approved",
  "uepPrescriptionId": "UEP-2026-0000012345",
  "validationResults": {
    "prescriberAuthorized": true,
    "patientEligible": true,
    "duplicateCheck": "pass",
    "quantityWithinLimits": true
  },
  "expiryDatetime": "2026-02-14T23:59:59+04:00",
  "instructions": "Dispensing facility must confirm via POST /api/v1/prescriptions/{id}/dispense"
}

Response (Rejected — Duplicate Detected):

JSON
{
  "status": "rejected",
  "uepPrescriptionId": null,
  "rejectionReason": "DUPLICATE_ACTIVE_PRESCRIPTION",
  "details": {
    "existingPrescription": {
      "prescribedBy": "Dr. Ali Hassan",
      "facility": "Rashid Hospital",
      "medication": "Tramadol 50mg",
      "prescribedDate": "2026-02-05",
      "remainingQuantity": 16
    }
  },
  "allowOverride": true,
  "overrideRequiresJustification": true
}

Dispensing Confirmation: POST /api/v1/prescriptions/{id}/dispense

JSON
{
  "uepPrescriptionId": "UEP-2026-0000012345",
  "dispensingFacility": "FACILITY01",
  "dispensedBy": {
    "emiratesId": "784-1975-9876543-1",
    "mohLicenseNumber": "MOH-PH-67890",
    "role": "Pharmacist"
  },
  "dispensedDatetime": "2026-02-07T15:30:00+04:00",
  "quantityDispensed": 28,
  "lotNumber": "LOT-2025-12345",
  "expiryDate": "2027-06-30"
}

Authentication

  • OAuth 2.0 client credentials grant for API access
  • Qualified electronic certificate for CDa prescriptions (Tier 3 e-signature)
  • TLS 1.2+ mandatory for all API communication

Error Handling

Error Action Fallback
UEP unavailable (timeout) Retry 3x with exponential backoff CDa: order cannot proceed; alert compliance. CDb: 72 h emergency supply per MOH regulation
Prescriber not authorised Hard block — order cannot be signed Provider must contact MOH to update authorisation
Duplicate prescription Display existing prescription details Provider may override with documented justification
Patient not found in UEP Check Emirates ID; retry Manual patient registration in UEP portal

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
UEP API timeout (HTTP 504/timeout) Exponential backoff 10s, 30s, 1m, 5m, 10m 5
UEP HTTP 5xx Exponential backoff 10s, 30s, 1m, 5m, 10m 5
UEP HTTP 4xx (validation error) No auto-retry N/A Parse error response; fix payload
OAuth token expired Auto-refresh token; retry original request Immediate 1 (then re-authenticate)
Certificate error No auto-retry N/A Alert IT immediately

Dead Letter Queue:

  • Prescription submissions exhausting retries → integration_dlq with full request payload and error response
  • Dispensing confirmations that fail → separate priority DLQ (dispensing already occurred)
  • Admin dashboard for manual review and resubmission
  • Retention: 1 year (per MOH controlled substance audit requirements)
  • CDa DLQ items trigger immediate compliance officer notification

Idempotency:

  • Deduplication key: [prescriptionId]_[facilityId]_[submission_datetime]
  • UEP returns same uep_prescription_id for duplicate submissions of same prescription
  • Dispensing confirmation: keyed by [uep_prescription_id]_[dispensed_datetime] — UEP rejects true duplicates

Reconciliation:

  • Daily: compare HIS controlled substance orders vs UEP approval confirmations
  • Daily: compare PIS dispensing records vs UEP dispensing confirmations
  • Discrepancies flagged for compliance officer and pharmacy director
  • Monthly: full inventory reconciliation — HIS controlled_substance_inventory vs physical count vs UEP records
  • Quarterly: MOH audit report generation from reconciliation data

INT-CPOE-008: Insurance / Prior Authorisation

Business Context

For non-formulary medications, high-cost tests, and specified imaging studies, the CPOE system checks insurance eligibility and submits prior authorisation requests. The integration differs by emirate: Dubai uses eClaimLink; Abu Dhabi uses DOH eClaims.

What flows: Eligibility queries (patient insurance status), prior-authorisation requests (diagnosis codes, procedure codes, clinical justification), approval/denial responses. When: Triggered during order entry when CDS identifies prior-auth requirement.

Technical Detail

Dubai — eClaimLink:

  • Protocol: XML-based web services over HTTPS
  • Transactions: Eligibility verification, pre-approval submission, pre-approval status query
  • Authentication: Certificate-based
  • Coding: ICD-10-AM (diagnosis), CPT (procedures)

Abu Dhabi — DOH eClaims:

  • Protocol: XML/REST API over HTTPS
  • Transactions: Eligibility, prior authorisation, claim submission
  • Authentication: Certificate-based
  • Additional: IR-DRG grouping for inpatient authorisations

Response Handling

Response HIS Action
Authorised Proceed with order; store authorisation number on order record
Denied Display denial reason; provider may modify order or appeal
Pending review Order placed with "pending auth" flag; pharmacy/lab/radiology notified
Patient not eligible Display insurance status; offer self-pay option

Retry and Recovery

Retry Strategy:

Scenario Strategy Intervals Max Attempts
eClaimLink / DOH eClaims timeout Exponential backoff 10s, 30s, 1m, 5m 4
HTTP 5xx from payer gateway Exponential backoff 10s, 30s, 1m, 5m 4
HTTP 4xx (validation error) No auto-retry N/A Parse error; fix request payload
Certificate authentication failure No auto-retry N/A Alert IT; check cert expiry
Payer system maintenance window Queue and hold N/A Retry after maintenance window (per payer schedule)

Dead Letter Queue:

  • Eligibility queries that fail → integration_dlq (low priority — provider can proceed with manual verification)
  • Prior-auth submissions that fail → integration_dlq (high priority — order may be held pending auth)
  • Admin dashboard for review and resubmission
  • Retention: 30 days active, then archive

Idempotency:

  • Eligibility queries: stateless — safe to retry (read-only)
  • Prior-auth requests: keyed by [order_id]_[payer_id]_[submission_datetime]
  • Payer gateway returns same authorisation number for duplicate submissions of same request

Reconciliation:

  • Daily: compare HIS prior-auth requests vs payer responses received
  • Pending authorisations > 48 hours flagged for case manager follow-up
  • Monthly: prior-auth approval/denial rate by payer, procedure type, and diagnosis
  • Quarterly: payer contract compliance review against authorisation patterns

Cross-Module Internal Integrations

Source Target Data Trigger Mechanism
CPOE EHR (Active Meds List) New/modified/discontinued medication orders Order status change Direct DB update
CPOE EHR (Active Orders List) All order types Order created/modified/cancelled Direct DB update
CPOE MAR Medication orders with scheduling Order signed MAR schedule generator
CPOE Billing & Claims Order details for charge capture Order signed Charge message to billing queue
EHR CPOE Patient demographics, allergy list, problem list, vital signs, recent labs Order entry initiated DB read (patient context)
Scheduling CPOE Encounter context (type, location, attending) Order entry initiated DB read (encounter context)
Policy & Contract Mgmt CPOE Formulary data, coverage rules, payer contracts CDS formulary check DB read / cache

Integration Architecture Summary

flowchart TB subgraph HIS["Healthcare Information System"] CPOE["CPOE Module"] CDS["CDS Engine"] EHR["EHR Module"] PIS["Pharmacy - PIS"] LIS["Lab - LIS"] RIS["Radiology - RIS"] BILL["Billing"] end subgraph UAE["UAE Government Systems"] NABIDH["NABIDH - Dubai HIE"] MALAFFI["Malaffi - Abu Dhabi HIE"] UEP["MOH UEP - Controlled Substances"] end subgraph INSUR["Insurance"] ECL["eClaimLink - Dubai"] DOH_EC["DOH eClaims - Abu Dhabi"] end CPOE -->|"HL7 ORM / FHIR MedReq"| PIS CPOE -->|"HL7 ORM / FHIR ServiceReq"| LIS CPOE -->|"HL7 ORM / DICOM MWL"| RIS CPOE <-->|"FHIR CDS Hooks"| CDS CPOE -->|"Charge capture"| BILL EHR -->|"Patient context"| CPOE LIS -->|"HL7 ORU / FHIR Observation"| CPOE RIS -->|"HL7 ORU / FHIR DiagReport"| CPOE CPOE -->|"HL7 RDE/ORM/ORU"| NABIDH CPOE -->|"HL7 RDE/ORM/ORU"| MALAFFI CPOE <-->|"REST API"| UEP CPOE <-->|"XML/REST"| ECL CPOE <-->|"XML/REST"| DOH_EC
content/clinical/cpoe/05-integrations.md Generated 2026-02-20 22:54