Nutrition Management Integration Specifications
Integration Summary
| ID | Target System | Direction | Trigger Event | Data Exchanged | Protocol | Frequency | Auth |
|---|---|---|---|---|---|---|---|
| INT-NUT-001 | CPOE | Inbound | Diet / EN / TPN order signed | Diet orders, enteral/parenteral nutrition orders, ordering provider, timing, special instructions | Internal API / HL7 ORM^O01 |
Real-time | mTLS (API) / mTLS (HL7) |
| INT-NUT-002 | Scheduling (ADT) | Inbound | ADT A01/A02/A03 event | Admission, transfer, discharge details, bed/ward, encounter IDs | Internal API / HL7 ADT (A01/A02/A03) | Real-time | mTLS |
| INT-NUT-003 | EHR (Patient Chart) | Bidirectional | Assessment completed, intake recorded, allergy updated | Outbound: nutrition assessments, intake; Inbound: allergies, weight, height | Internal REST API (FHIR-style) | Real-time | OAuth 2.0 + mTLS |
| INT-NUT-004 | PIS (TPN Compounding) | Outbound | TPN order placed / updated | TPN order details, patient demographics, labs reference, targets | Internal API (JSON) | Real-time | mTLS |
| INT-NUT-005 | LIS (Lab Information System) | Inbound | Relevant lab result finalized | Albumin, prealbumin, electrolytes, glucose, other nutritional markers | HL7 ORU^R01 / FHIR Observation |
Real-time | mTLS |
| INT-NUT-006 | Billing & Claims | Outbound | Service provided / day-end batch | Dietitian consult charges, EN/TPN charges, special supplement charges | Internal API / HL7 DFT^P03 |
Daily batch | mTLS |
| INT-NUT-007 | NABIDH / Malaffi (HIE) | Outbound | Nutrition assessment signed / EN/TPN started | Summary nutrition assessments, malnutrition diagnosis, EN/TPN therapy summary | HL7 v2.5.1 / FHIR R4 (profiles) | Near real-time (15 min batch) | mTLS + OAuth 2.0 |
INT-NUT-001: CPOE → Nutrition (Diet & EN/TPN Orders)
Business Context
What flows
- New and updated:
- Oral diet orders (diet type, texture, fluid restriction, supplements)
- Enteral nutrition (EN) orders
- Total parenteral nutrition (TPN) orders (clinical intent; detailed compounding goes to PIS)
- Patient demographics (MRN, Emirates ID, name, sex, DOB)
- Encounter context (inpatient location, attending physician)
- Special instructions (cultural/religious preferences, e.g., halal, vegetarian, diabetic)
When
- Immediately when a physician signs or modifies a diet/EN/TPN order in CPOE.
Why
- To:
- Generate accurate meal plans and kitchen production orders
- Ensure therapeutic diet compliance and allergy safety
- Initiate EN/TPN workflows and calorie tracking
How often
- Real-time, per order event.
Error impact
- If inbound order fails:
- Patient may not appear correctly on dietary census
- Wrong diet may be served or EN/TPN may not be initiated
- Requires urgent manual communication between ward and kitchen/dietitian
HL7 v2.5.1 Technical Detail
Message Type: ORM^O01 (Order message) from CPOE to Nutrition
Sample HL7 Message (Diet + EN order)
MSH|^~\&|HIS_CPOE|DUBAIHOSP|HIS_NUTRITION|DUBAIHOSP|20260207101530||ORM^O01|NUT-20260207101530-001|P|2.5.1|||AL|NE||UTF-8
PID|1||2026009876^^^DUBAIHOSP^MR~784-1980-1234567-3^^^UAE^EID||AL-NAHYAN^FATIMA^SAEED||19800612|F|||PO BOX 56789^^DUBAI^^00000^AE||+971501112233|||M||||||||||AE
PV1|1|I|5W^512^02^DUBAIHOSP||||ALI^OMAR^H^^^DR|||MED||||||||ENC-20260207-00045|||||||||||||||||||||||||20260207093000
AL1|1|FA|227493005^Peanut allergy^SCT|SV|Anaphylaxis|20190115
AL1|2|FA|91935009^Cow's milk protein allergy^SCT|MO|Rash|20200310
ORC|NW|DORD-20260207-0001||NUT-PLN-20260207-0001|CM||||20260207101530|||ALI^OMAR^H^^^DR^MBBS|||||DUBAIHOSP^Dubai General Hospital
OBR|1|DORD-20260207-0001||D001^Diet Order^L||20260207101530|||||||||ALI^OMAR^H^^^DR
ZDI|REG^Regular Diet^L|IDDSI-5^Minced & moist^IDDSI|1500|ml/24h|HALAL^Halal only^L|NO_PORK^No pork^L|NO_NUTS^No nuts^L|DIAB^Diabetic-friendly^L
ORC|NW|EN-20260207-0002||NUT-EN-20260207-0002|CM||||20260207102000|||ALI^OMAR^H^^^DR^MBBS
OBR|2|EN-20260207-0002||E001^Enteral Nutrition^L||20260207102000
ZTP|EN|FORM-ARAB-01^Isocaloric EN Formula^L|50|ml/h|1200|ml|24|h|NG^Nasogastric tube^L|CONT^Continuous^L|CAL1800^1800 kcal/day^L|PRO80^80 g protein/day^L
NTE|1||Please avoid spicy foods; patient prefers mild Emirati dishes.
Key segments
PID: Patient identifiers (MRN + Emirates ID), demographics.PV1: Inpatient encounter and bed location used for tray routing.AL1: Food-related allergies (typeFA).- First
ORC/OBR+ZDI: - Diet order:
ZDI-1: Diet type (maps todiet_type_definitions.diet_type_id)ZDI-2: Texture (maps todiet_orders.texture_modification)ZDI-3: Fluid restriction (maps todiet_orders.fluid_restriction_ml)ZDI-4..7: Cultural/religious and preference flags
- Second
ORC/OBR+ZTP: - EN order:
ZTP-1: Nutrition type (ENvsTPN)ZTP-2: Formula (maps toenteral_parenteral_orders.formula_name)ZTP-3..7: Rate and total volumeZTP-8..12: Route, schedule, calorie/protein targets
Field mapping to Nutrition tables
| HL7 Field | Nutrition Table | Column |
|---|---|---|
| PID-3 (MRN) | diet_orders / enteral_parenteral_orders |
patient_id (via MRN→patient_id resolution) |
| PV1-19 (Visit Number) | diet_orders |
encounter_id |
| ORC-2 (Placer Order Number) | diet_orders / enteral_parenteral_orders |
order_id |
| ZDI-1 (Diet type) | diet_orders |
diet_type_id |
| ZDI-2 (Texture) | diet_orders |
texture_modification |
| ZDI-3 (Fluid restriction) | diet_orders |
fluid_restriction_ml |
| ZDI-4..7 (Preferences) | diet_orders |
cultural_preference, supplements |
| AL1 (food allergies) | food_allergen_alerts |
allergen_type, allergen_detail, source_allergy_id |
| ZTP-1 (EN/TPN) | enteral_parenteral_orders |
nutrition_type |
| ZTP-2 (Formula) | enteral_parenteral_orders |
formula_name |
| ZTP-3 (Rate) | enteral_parenteral_orders |
rate_ml_hr |
| ZTP-4..5 (Total volume & unit) | enteral_parenteral_orders |
total_volume |
| ZTP-9 (Schedule) | enteral_parenteral_orders |
status / schedule fields |
| ZTP-10..11 (Targets) | enteral_parenteral_orders |
calorie_target, protein_target |
FHIR R4 Technical Detail
For internal API, Nutrition exposes a FHIR-style endpoint; CPOE may alternatively call it directly instead of HL7.
Resource Types
NutritionOrderfor oral diet and enteral ordersServiceRequestorNutritionOrderextension for TPN clinical order (compounding details go to PIS)
Sample FHIR NutritionOrder (Diet + EN)
{
"resourceType": "NutritionOrder",
"id": "DORD-20260207-0001",
"status": "active",
"intent": "order",
"patient": {
"reference": "Patient/2026009876",
"display": "Fatima Saeed Al-Nahyan"
},
"encounter": {
"reference": "Encounter/ENC-20260207-00045"
},
"dateTime": "2026-02-07T10:15:30+04:00",
"orderer": {
"reference": "Practitioner/ALI-OMAR",
"display": "Dr. Omar H. Ali"
},
"oralDiet": {
"type": [
{
"coding": [
{
"system": "http://gates-his.ae/codes/diet-type",
"code": "REG",
"display": "Regular Diet"
}
]
}
],
"texture": [
{
"modifier": {
"coding": [
{
"system": "http://www.iddsi.org",
"code": "5",
"display": "Minced & moist"
}
]
}
}
],
"fluidConsistencyType": [
{
"coding": [
{
"system": "http://gates-his.ae/codes/fluid-restriction",
"code": "FR1500",
"display": "1500 ml/24h"
}
]
}
],
"instruction": "Halal only, no pork, no nuts, diabetic-friendly. Avoid spicy food."
},
"enteralFormula": {
"baseFormulaProductName": "Isocaloric EN Formula",
"baseFormulaType": {
"coding": [
{
"system": "http://gates-his.ae/codes/enteral-formula",
"code": "FORM-ARAB-01",
"display": "Isocaloric EN Formula"
}
]
},
"administration": [
{
"schedule": {
"repeat": {
"boundsPeriod": {
"start": "2026-02-07T10:20:00+04:00"
}
}
},
"quantity": {
"value": 1200,
"unit": "mL",
"system": "http://unitsofmeasure.org",
"code": "mL"
},
"rateQuantity": {
"value": 50,
"unit": "mL/h",
"system": "http://unitsofmeasure.org",
"code": "mL/h"
}
}
]
},
"extension": [
{
"url": "http://gates-his.ae/fhir/StructureDefinition/calorie-target",
"valueQuantity": {
"value": 1800,
"unit": "kcal/d",
"system": "http://unitsofmeasure.org",
"code": "kcal/d"
}
},
{
"url": "http://gates-his.ae/fhir/StructureDefinition/protein-target",
"valueQuantity": {
"value": 80,
"unit": "g/d",
"system": "http://unitsofmeasure.org",
"code": "g/d"
}
}
]
}
Key element mappings
| FHIR Element | Nutrition Table | Column |
|---|---|---|
NutritionOrder.id |
diet_orders |
order_id |
patient.reference |
diet_orders |
patient_id |
encounter.reference |
diet_orders |
encounter_id |
oralDiet.type[0].coding[0].code |
diet_orders |
diet_type_id |
oralDiet.texture[0].modifier |
diet_orders |
texture_modification |
oralDiet.fluidConsistencyType |
diet_orders |
fluid_restriction_ml |
oralDiet.instruction |
diet_orders |
cultural_preference, supplements |
enteralFormula.baseFormulaType |
enteral_parenteral_orders |
formula_name |
enteralFormula.administration.rateQuantity |
enteral_parenteral_orders |
rate_ml_hr |
enteralFormula.administration.quantity |
enteral_parenteral_orders |
total_volume |
extension[calorie-target] |
enteral_parenteral_orders |
calorie_target |
extension[protein-target] |
enteral_parenteral_orders |
protein_target |
Search parameters (Nutrition API)
GET /NutritionOrder?patient={patientId}GET /NutritionOrder?encounter={encounterId}GET /NutritionOrder?status=active&patient={patientId}GET /NutritionOrder?date=ge2026-02-07&date=le2026-02-08
Error Handling
| Scenario | Handling |
|---|---|
| Network timeout / connection error | Queue message; retry with exponential backoff (30s, 1m, 2m, 5m, 10m). |
HL7 negative ACK (AE/AR) |
Log full message + error; no auto-retry; create integration incident for interface team. |
| FHIR 4xx validation error | Reject order; return OperationOutcome to CPOE; show error to ordering clinician. |
Duplicate order (same order_id) |
Treat as update; idempotent upsert based on order_id. |
| Persistent failure (> 30 min) | Move to dead-letter queue; alert dietitian supervisor + IT via email/SMS; manual re-entry. |
Manual recovery:
- Interface dashboard lists failed orders with patient, encounter, and error.
- Dietitian or IT can: - Reprocess message after correction, or - Manually create diet/EN/TPN order in Nutrition module and link to encounter.
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 validation error | No auto-retry | N/A | Parse OperationOutcome; return error to CPOE |
| FHIR 5xx | Exponential backoff | 30s, 1m, 2m, 5m, 10m | 5 |
Dead Letter Queue:
- Messages exhausting all retries →
integration_dlqtable - Admin dashboard for manual review, correction, and requeue
- Retention: 30 days active, then archive to cold storage
- Alert: dietitian supervisor + integration team notified on DLQ insertion
Idempotency:
- Deduplication key:
[order_id]_[ORM^O01]_[message_datetime] - Nutrition module checks for duplicate
order_idbefore processing; treats duplicates as updates (idempotent upsert) - Duplicate messages return
AAACK without reprocessing
Reconciliation:
- Daily batch comparison: CPOE
medication_orders(diet/EN/TPN subset) vs Nutritiondiet_orders+enteral_parenteral_orders - Unmatched records flagged for dietitian / interface analyst review
- Reconciliation report available in integration admin module
- Monthly trend reporting on message success rates
INT-NUT-002: Scheduling (ADT) → Nutrition (Census Management)
Business Context
What flows
- Admission (A01), transfer (A02), discharge (A03) events with:
- Patient identifiers
- Encounter/visit number
- Bed/ward/facility
- Admission/discharge timestamps
When
- Every time an inpatient is admitted, transferred, or discharged.
Why
- To maintain an accurate dietary census:
- Add new inpatients with default diet
- Update bed/ward for tray routing
- Remove discharged patients and cancel pending meals
How often
- Real-time, per ADT event.
Error impact
- If ADT messages fail:
- Kitchen may miss new patients or continue sending meals to discharged patients
- Tray routing may be wrong after transfers
- Requires manual phone calls and paper lists
HL7 v2.5.1 Technical Detail
Message Types: ADT^A01, ADT^A02, ADT^A03
Sample ADT^A01 (Admission)
MSH|^~\&|HIS_ADT|ABUDHABIHOSP|HIS_NUTRITION|ABUDHABIHOSP|20260207100000||ADT^A01|ADT-20260207-0001|P|2.5.1|||AL|NE||UTF-8
EVN|A01|20260207095500|||USER1^ADMIN^AHMED
PID|1||2026005432^^^ABUDHABIHOSP^MR~784-1975-7654321-8^^^UAE^EID||AL-MAKTOUM^AHMED^KHALID||19750620|M|||PO BOX 112233^^ABU DHABI^^00000^AE||+971502223344|||M||||||||||AE
PV1|1|I|7E^702^01^ABUDHABIHOSP||||HASSAN^LAILA^M^^^DR|||MED||||||||ENC-20260207-01001|||||||||||||||||||||||||20260207095000
Sample ADT^A02 (Transfer)
MSH|^~\&|HIS_ADT|ABUDHABIHOSP|HIS_NUTRITION|ABUDHABIHOSP|20260207140000||ADT^A02|ADT-20260207-0002|P|2.5.1
EVN|A02|20260207135500|||USER1^ADMIN^AHMED
PID|1||2026005432^^^ABUDHABIHOSP^MR
PV1|1|I|7E^702^01^ABUDHABIHOSP||||HASSAN^LAILA^M^^^DR|||MED||||||||ENC-20260207-01001|||||||||||||||||||||||||20260207095000
PV2|||^^^8ICU^803^02^ABUDHABIHOSP
Sample ADT^A03 (Discharge)
MSH|^~\&|HIS_ADT|ABUDHABIHOSP|HIS_NUTRITION|ABUDHABIHOSP|20260208110000||ADT^A03|ADT-20260208-0003|P|2.5.1
EVN|A03|20260208104500|||USER1^ADMIN^AHMED
PID|1||2026005432^^^ABUDHABIHOSP^MR
PV1|1|I|8ICU^803^02^ABUDHABIHOSP||||HASSAN^LAILA^M^^^DR|||MED||||||||ENC-20260207-01001||||||||||||||||||||01|||||20260208104500
Key segment usage
PID-3: MRN and Emirates ID for patient resolution.PV1-2: Patient class; Nutrition processes onlyI(inpatient) and optionallyE(ED obs).PV1-3: Current location (ward/room/bed).PV1-19: Visit/encounter number (maps toencounters.encounter_id).PV1-36&PV1-45(A03): Discharge disposition and time.
Field mapping
| HL7 Field | Nutrition Table | Column |
|---|---|---|
| PID-3 (MRN) | diet_orders, meal_plans, tray_tickets |
patient_id (via lookup) |
| PV1-19 | diet_orders, meal_plans |
encounter_id |
| PV1-3 | tray_tickets |
bed_location |
| PV1-44/45 | meal_plans |
used to stop future plans |
| EVN-1 (A01/A02/A03) | internal routing | event type |
On A01:
- Create census entry and default
diet_ordersrow (e.g., “NPO” or facility default). - Generate initial
meal_plansfor upcoming meals if diet is known.
On A02:
- Update
tray_tickets.bed_locationandmeal_plansrouting.
On A03:
- Cancel future
meal_plansandtray_tickets. - Mark
diet_orders.statusascompletedordiscontinued.
FHIR R4 Technical Detail
If Scheduling exposes FHIR:
EncounterandPatientresources drive census.
Sample Encounter
{
"resourceType": "Encounter",
"id": "ENC-20260207-01001",
"status": "in-progress",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "IMP",
"display": "inpatient encounter"
},
"subject": {
"reference": "Patient/2026005432",
"display": "Ahmed Khalid Al-Maktoum"
},
"period": {
"start": "2026-02-07T09:50:00+04:00"
},
"location": [
{
"location": {
"reference": "Location/7E-702-01",
"display": "Ward 7E, Room 702, Bed 01"
},
"status": "active"
}
],
"serviceProvider": {
"reference": "Organization/ABUDHABIHOSP",
"display": "Abu Dhabi General Hospital"
}
}
Search parameters
GET /Encounter?status=in-progress&class=IMPGET /Encounter?patient={patientId}&status=in-progress
Nutrition periodically (or via subscription) updates census from these.
Error Handling
| Scenario | Handling |
|---|---|
| Missing A01 (only A02/A03) | Log warning; attempt to create minimal census entry from A02/A03; flag for review. |
| Duplicate ADT messages | Idempotent processing using PV1-19 + event type; ignore if no change. |
| Network / interface failure | Queue ADT messages; retry (15s, 30s, 1m, 2m, 5m). |
| Inconsistent location data | Keep last known valid location; flag record for manual correction. |
| Persistent failure (> 1 hour) | Dead-letter queue; alert kitchen manager + IT; kitchen uses temporary manual census list. |
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| Network timeout / connection error | Exponential backoff | 15s, 30s, 1m, 2m, 5m | 5 |
| Missing A01 (orphan A02/A03) | Deferred processing | Retry matching every 5 min for 1 h | 12 |
| Duplicate ADT messages | No retry needed | N/A | Idempotent; ignored after first processing |
Dead Letter Queue:
- ADT messages exhausting all retries →
integration_dlqtable - Kitchen manager alerted to maintain temporary manual census until resolved
- Retention: 30 days active, then archive
- Alert: kitchen manager + IT notified on DLQ insertion
Idempotency:
- Deduplication key:
[PV1-19 (encounter_id)]_[EVN-1 (event_type)]_[MSH-10 (message_control_id)] - Duplicate events ignored if no state change detected
- ADT events processed in order; out-of-order events (e.g., A03 before A01) held in pending queue
Reconciliation:
- Hourly comparison: Scheduling active encounters vs Nutrition dietary census
- Patients in Scheduling but missing from census → auto-add with default diet and flag for review
- Patients in census but discharged in Scheduling → auto-cancel future meals and flag
- Daily reconciliation report for kitchen manager and dietitian lead
INT-NUT-003: Nutrition ↔ EHR (Patient Chart)
Business Context
What flows
- Inbound to Nutrition:
- Patient allergies (food and non-food)
- Anthropometrics: weight, height, BMI if calculated in EHR
- Outbound to EHR:
- Nutrition screening results
- Nutrition assessments and care plans
- Meal intake/consumption percentages
- Patient meal satisfaction scores (optional in chart)
When
- Inbound:
- On opening Nutrition screens (on-demand)
- When allergies/weight/height updated in EHR (event-driven)
- Outbound:
- When screening or assessment is saved
- When intake is recorded
Why
- To maintain a unified clinical record and avoid duplicate documentation.
- To support malnutrition coding and quality metrics.
How often
- Real-time, per event.
Error impact
- If inbound fails: dietitians may work with outdated allergy or weight data.
- If outbound fails: nutrition documentation may be missing from the main chart, affecting care and coding.
FHIR R4 Technical Detail (Internal API)
Inbound resources
AllergyIntolerance(food allergies)Observation(weight, height, BMI)
Outbound resources
Observation(screening scores, intake)CarePlan(nutrition care plan)CompositionorDocumentReference(full assessment note)
Sample inbound AllergyIntolerance (Peanut)
{
"resourceType": "AllergyIntolerance",
"id": "ALG-PEANUT-001",
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "active"
}
]
},
"verificationStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"code": "confirmed"
}
]
},
"type": "allergy",
"category": ["food"],
"criticality": "high",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "227493005",
"display": "Allergy to peanut"
}
],
"text": "Peanut allergy"
},
"patient": {
"reference": "Patient/2026009876",
"display": "Fatima Saeed Al-Nahyan"
},
"onsetDateTime": "2019-01-15",
"reaction": [
{
"manifestation": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "39579001",
"display": "Anaphylaxis"
}
]
}
],
"severity": "severe"
}
]
}
Mapping to food_allergen_alerts
| FHIR Element | Table | Column |
|---|---|---|
AllergyIntolerance.id |
food_allergen_alerts |
source_allergy_id |
patient.reference |
food_allergen_alerts |
patient_id |
code.coding[0].display |
food_allergen_alerts |
allergen_detail |
category[0] |
food_allergen_alerts |
allergen_type |
clinicalStatus |
food_allergen_alerts |
is_active |
Sample outbound Observation (Nutrition Screening)
{
"resourceType": "Observation",
"id": "NSCR-20260207-0001",
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "survey",
"display": "Survey"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "76458-9",
"display": "Nutritional risk screening tool"
}
],
"text": "NRS-2002 score"
},
"subject": {
"reference": "Patient/2026009876"
},
"encounter": {
"reference": "Encounter/ENC-20260207-00045"
},
"effectiveDateTime": "2026-02-07T11:00:00+04:00",
"valueQuantity": {
"value": 4,
"unit": "score"
},
"interpretation": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "H",
"display": "High"
}
]
}
],
"note": [
{
"text": "High risk; auto-referral to dietitian."
}
]
}
Mapping to nutrition_screening
| FHIR Element | Table | Column |
|---|---|---|
Observation.id |
nutrition_screening |
screening_id |
subject.reference |
nutrition_screening |
patient_id |
encounter.reference |
nutrition_screening |
encounter_id |
effectiveDateTime |
nutrition_screening |
screening_date |
valueQuantity.value |
nutrition_screening |
score |
interpretation |
nutrition_screening |
risk_level |
note[0].text |
nutrition_screening |
additional notes (JSON) |
Search parameters
GET /AllergyIntolerance?patient={patientId}&category=foodGET /Observation?patient={patientId}&code=76458-9(screening)GET /Observation?patient={patientId}&code=29463-7(weight)GET /CarePlan?patient={patientId}&category=nutrition
Error Handling
| Scenario | Handling |
|---|---|
| EHR API 401/403 | Stop calls; raise security alert; do not cache outdated data. |
| EHR API 5xx | Retry (30s, 1m, 2m, 5m); if > 15 min, show banner “Allergy/weight data may be outdated”. |
| Failed outbound documentation | Queue FHIR resources; retry; if still failing after 1 hour, dead-letter + alert dietitian lead. |
| Partial failures in bundle | Use FHIR OperationOutcome to identify failed entries; re-send only failed ones. |
Manual recovery:
- Dietitian can re-push a specific assessment or screening from Nutrition UI (“Resend to EHR”).
- IT can export failed payload from dead-letter queue and replay via admin tool.
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| EHR API 5xx (inbound allergy/weight fetch) | Exponential backoff | 30s, 1m, 2m, 5m | 4 |
| EHR API 401/403 | No auto-retry | N/A | Stop calls; raise security alert immediately |
| Outbound documentation failure (FHIR POST) | Exponential backoff | 30s, 1m, 2m, 5m, 10m | 5 |
| Partial bundle failure | Selective retry | 1m, 2m, 5m | 3 (failed entries only) |
Dead Letter Queue:
- Outbound FHIR resources exhausting all retries →
integration_dlqtable - Dietitian lead alerted; documentation may be missing from patient chart
- Retention: 30 days active, then archive
- Alert: dietitian lead + integration team notified on DLQ insertion
Idempotency:
- Deduplication key:
[resource_type]_[resource_id]_[effectiveDateTime] - EHR performs idempotent upsert on matching resource ID
- Duplicate submissions return HTTP 200 without reprocessing
Reconciliation:
- Daily comparison: Nutrition
nutrition_screening+nutrition_assessmentsvs EHR clinical documentation - Missing outbound documents flagged for re-push
- Stale inbound allergy/weight data flagged if not refreshed within 24 h
- Weekly reconciliation report for dietitian lead and IT
INT-NUT-004: Nutrition → PIS (TPN Compounding)
Business Context
What flows
- For TPN orders:
- Patient demographics and encounter
- Clinical targets (kcal/day, protein/day, fluid volume)
- High-level formulation parameters (e.g., “standard adult TPN”, glucose tolerance)
- Reference to ordering physician and dietitian
When
- When a TPN order is created or modified in Nutrition (or CPOE, depending on design) and marked “Ready for Pharmacy”.
Why
- Pharmacy needs structured TPN requirements to compound safely and efficiently.
- Supports TPN Order Accuracy KPI.
How often
- Real-time, per TPN order event.
Error impact
- If integration fails:
- Pharmacy may not see TPN orders; patient may miss critical nutrition.
- Requires manual phone/fax communication.
Technical Detail (Internal JSON API)
Endpoint
POST /api/pis/tpn-ordersPUT /api/pis/tpn-orders/{orderId}
Sample JSON payload
{
"tpnOrderId": "TPN-20260207-0005",
"patient": {
"mrn": "2026009876",
"emiratesId": "784-1980-1234567-3",
"name": "Fatima Saeed Al-Nahyan",
"dateOfBirth": "1980-06-12",
"sex": "F"
},
"encounterId": "ENC-20260207-00045",
"orderingPhysician": {
"id": "ALI-OMAR",
"name": "Dr. Omar H. Ali"
},
"dietitian": {
"id": "DIET-001",
"name": "Ms. Huda Al-Mansouri"
},
"clinicalTargets": {
"caloriesKcalPerDay": 1800,
"proteinGramsPerDay": 80,
"totalVolumeMlPerDay": 2000
},
"administration": {
"startDateTime": "2026-02-07T20:00:00+04:00",
"durationDays": 3,
"route": "central-line",
"infusionType": "continuous"
},
"formulationPreferences": {
"glucoseTolerance": "normal",
"lipidEmulsion": "soybean-oil-based",
"electrolyteRestrictions": "renal-adjusted",
"comments": "Monitor triglycerides and daily electrolytes."
},
"status": "active"
}
Mapping from enteral_parenteral_orders
| JSON Field | Table | Column |
|---|---|---|
tpnOrderId |
enteral_parenteral_orders |
order_id |
clinicalTargets.caloriesKcalPerDay |
enteral_parenteral_orders |
calorie_target |
clinicalTargets.proteinGramsPerDay |
enteral_parenteral_orders |
protein_target |
clinicalTargets.totalVolumeMlPerDay |
enteral_parenteral_orders |
total_volume |
administration.startDateTime |
enteral_parenteral_orders |
start_datetime |
administration.durationDays |
enteral_parenteral_orders |
end_datetime (derived) |
status |
enteral_parenteral_orders |
status |
Error Handling
| Scenario | Handling |
|---|---|
| PIS API unavailable (5xx) | Queue TPN order; retry (1m, 2m, 5m, 10m); show banner in Nutrition “TPN not yet sent to Pharmacy”. |
| Validation error (4xx) | Log error; show detailed message to dietitian; allow correction and re-send. |
Duplicate tpnOrderId |
Treat as update; PIS must be idempotent. |
| Partial update failure | Use transaction semantics; if PIS returns error, roll back local status to “Draft”. |
Manual recovery:
- Dietitian can print or export TPN summary and send to pharmacy if integration is down (temporary paper fallback).
- Once integration restored, orders can be re-sent with original timestamps for audit.
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| PIS API 5xx / unavailable | Exponential backoff | 1m, 2m, 5m, 10m | 4 |
| PIS API 4xx validation error | No auto-retry | N/A | Show error to dietitian; allow correction and re-send |
Duplicate tpnOrderId |
No retry needed | N/A | PIS treats as idempotent update |
| Partial update failure | Transaction rollback | Immediate | Roll back local status to Draft; re-send on correction |
Dead Letter Queue:
- TPN orders exhausting all retries →
integration_dlqtable - Pharmacy supervisor + dietitian alerted immediately (patient safety concern)
- Nutrition UI shows banner: "TPN not yet sent to Pharmacy — manual communication required"
- Retention: 30 days active, then archive
- Alert: pharmacy supervisor + dietitian + IT notified on DLQ insertion
Idempotency:
- Deduplication key:
[tpnOrderId] - PIS performs idempotent upsert based on
tpnOrderId; duplicate submissions update rather than create
Reconciliation:
- Every 4 hours: Nutrition
enteral_parenteral_orders(TPN, status =ACTIVE) vs PIS TPN compounding queue - Unmatched orders flagged for pharmacy and dietitian review
- Daily reconciliation report for pharmacy supervisor
INT-NUT-005: LIS → Nutrition (Nutritional Lab Markers)
Business Context
What flows
- Lab results relevant to nutrition:
- Serum albumin, prealbumin
- Electrolytes (Na, K, Mg, Phosphate)
- Glucose (fasting, random)
- Triglycerides (for TPN monitoring)
When
- When LIS finalizes relevant results.
Why
- Dietitians need up-to-date labs for assessment and EN/TPN monitoring.
- Supports malnutrition risk assessment and TPN safety.
How often
- Real-time, per result.
Error impact
- If results don’t reach Nutrition:
- Dietitians may work with outdated labs.
- TPN adjustments may be delayed.
HL7 v2.5.1 Technical Detail
Message Type: ORU^R01 (Observation Result)
Sample HL7 Message
MSH|^~\&|LIS|DUBAIHOSP|HIS_NUTRITION|DUBAIHOSP|20260207120000||ORU^R01|LAB-20260207-0001|P|2.5.1|||AL|NE||UTF-8
PID|1||2026009876^^^DUBAIHOSP^MR~784-1980-1234567-3^^^UAE^EID||AL-NAHYAN^FATIMA^SAEED||19800612|F
PV1|1|I|5W^512^02^DUBAIHOSP||||ALI^OMAR^H^^^DR|||MED||||||||ENC-20260207-00045
OBR|1|LAB-ORD-20260207-001||LABPANEL^Nutrition Panel^L||20260207113000|||||||20260207114500|||LABDOC^HASSAN^KHALID^^^DR
OBX|1|NM|1751-7^Albumin [Mass/volume] in Serum or Plasma^LN||32|g/L|35-50|L|||F|||20260207115900
OBX|2|NM|14338-8^Prealbumin [Mass/volume] in Serum or Plasma^LN||0.12|g/L|0.20-0.40|L|||F|||20260207115900
OBX|3|NM|2345-7^Glucose [Mass/volume] in Serum or Plasma^LN||9.8|mmol/L|3.9-7.8|H|||F|||20260207115900
Key segments
OBR: Nutrition-related panel.OBX:OBX-3: LOINC-coded test.OBX-5: Result value.OBX-7: Reference range.OBX-8: Abnormal flag (L,H).
Mapping
Nutrition may not persist all lab values but will:
- Cache latest relevant labs per patient/encounter for display in
nutrition_assessments. - Optionally store in a small
nutrition_lab_cachetable keyed by patient + test code.
| HL7 Field | Target |
|---|---|
| PID-3 | patient_id |
| PV1-19 | encounter_id |
| OBX-3.1 (code) | LOINC code used in UI mapping |
| OBX-5 | Latest value for that code |
| OBX-8 | Interpretation (H/L/N) |
FHIR R4 Technical Detail
If LIS exposes FHIR:
Resource: Observation
Sample Observation (Albumin)
{
"resourceType": "Observation",
"id": "LAB-ALB-20260207-0001",
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "1751-7",
"display": "Albumin [Mass/volume] in Serum or Plasma"
}
],
"text": "Serum albumin"
},
"subject": {
"reference": "Patient/2026009876"
},
"encounter": {
"reference": "Encounter/ENC-20260207-00045"
},
"effectiveDateTime": "2026-02-07T11:59:00+04:00",
"valueQuantity": {
"value": 32,
"unit": "g/L",
"system": "http://unitsofmeasure.org",
"code": "g/L"
},
"referenceRange": [
{
"low": { "value": 35, "unit": "g/L" },
"high": { "value": 50, "unit": "g/L" }
}
],
"interpretation": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "L",
"display": "Low"
}
]
}
]
}
Search parameters
GET /Observation?patient={patientId}&code=1751-7(albumin)GET /Observation?patient={patientId}&category=laboratory&date=ge2026-02-01
Error Handling
| Scenario | Handling |
|---|---|
| HL7 parsing error | Log message; send AE ACK to LIS; do not update cache; interface team investigates. |
| Missing patient/encounter match | Store in holding table; retry matching when ADT arrives; alert if unmatched > 24h. |
| FHIR API timeout | Retry (30s, 1m, 2m); if still failing, show banner “Latest labs may be delayed”. |
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| HL7 parsing error | No auto-retry | N/A | Send AE ACK to LIS; log for interface team investigation |
| Network timeout / connection error | Exponential backoff | 30s, 1m, 2m | 3 |
| FHIR API timeout | Exponential backoff | 30s, 1m, 2m | 3 |
| Missing patient/encounter match | Deferred processing | Retry matching every 15 min for 24 h | 96 |
Dead Letter Queue:
- Lab messages exhausting all retries →
integration_dlqtable - If unmatched for > 24 h, alert integration team
- Nutrition UI shows banner: “Latest labs may be delayed” when recent fetch fails
- Retention: 30 days active, then archive
Idempotency:
- Deduplication key:
[patient_id]_[LOINC_code]_[effectiveDateTime] - Nutrition lab cache performs upsert; duplicate results overwrite previous value for same test and timestamp
Reconciliation:
- Daily comparison: LIS finalized results (nutrition-relevant LOINC codes) vs Nutrition lab cache
- Missing results flagged for interface analyst review
- Stale cache entries (> 72 h without refresh for active patients) flagged for dietitian awareness
INT-NUT-006: Nutrition → Billing & Claims
Business Context
What flows
- Charge events for:
- Dietitian consultations (initial, follow-up)
- EN/TPN daily management
- Special supplements (e.g., oral nutritional supplements)
When
- Charges are accumulated during the day and sent in a nightly batch.
Why
- To ensure all nutrition-related services are billed correctly to payers (e.g., Daman, THIQA, Oman Insurance).
- Supports revenue capture and Malnutrition Documentation Rate KPI.
How often
- Daily batch (e.g., 23:30 UAE time).
Error impact
- If batch fails:
- Revenue loss or delayed billing.
- Requires manual reconciliation.
HL7 v2.5.1 Technical Detail
Message Type: DFT^P03 (Detailed Financial Transaction) – optional; some sites may use internal JSON only.
Sample HL7 DFT^P03
MSH|^~\&|HIS_NUTRITION|DUBAIHOSP|BILLING|DUBAIHOSP|20260207233000||DFT^P03|DFT-20260207-0001|P|2.5.1|||AL|NE||UTF-8
EVN|P03|20260207232900
PID|1||2026009876^^^DUBAIHOSP^MR~784-1980-1234567-3^^^UAE^EID||AL-NAHYAN^FATIMA^SAEED||19800612|F
PV1|1|I|5W^512^02^DUBAIHOSP||||ALI^OMAR^H^^^DR|||MED||||||||ENC-20260207-00045
FT1|1|20260207110000|20260207113000||99205^Initial nutrition assessment^CPT|1|EA|||DIET-001^AL-MANSOURI^HUDA|||20260207113000|||NUT-CHG-0001
FT1|2|20260207190000|20260207193000||97802^Medical nutrition therapy, follow-up^CPT|1|EA|||DIET-001^AL-MANSOURI^HUDA|||20260207193000|||NUT-CHG-0002
FT1|3|20260207120000|20260207120000||B4185^Parenteral nutrition; 10-50 liters^HCPCS|1|EA|||ALI^OMAR^H^^^DR|||20260207120000|||NUT-CHG-0003
Key segments
FT1-6: Procedure code (CPT/HCPCS or local code).FT1-7: Quantity.FT1-13: Performing provider (dietitian or physician).FT1-19: Internal charge ID.
Mapping from Nutrition
- Source tables:
nutrition_assessments,enteral_parenteral_orders,meal_service_records. - A charge engine in Nutrition aggregates these into
nutrition_charges(internal) before DFT generation.
Internal API (JSON)
If Billing prefers REST:
{
"batchId": "NUT-BILL-20260207",
"facilityId": "DUBAIHOSP",
"serviceDate": "2026-02-07",
"charges": [
{
"chargeId": "NUT-CHG-0001",
"patientMrn": "2026009876",
"encounterId": "ENC-20260207-00045",
"code": "99205",
"codeSystem": "CPT",
"description": "Initial nutrition assessment",
"quantity": 1,
"unit": "EA",
"performingProviderId": "DIET-001",
"serviceStart": "2026-02-07T11:00:00+04:00",
"serviceEnd": "2026-02-07T11:30:00+04:00"
}
]
}
Error Handling
| Scenario | Handling |
|---|---|
| Batch transmission failure | Retry batch (5m, 15m, 30m); if still failing, mark batch as “Failed” and alert finance. |
| Partial acceptance | Billing returns list of rejected charges; Nutrition marks them for review and correction. |
| Duplicate batch | Billing uses batchId + chargeId for idempotency; duplicates ignored. |
Manual recovery:
- Finance can request re-send of a specific batch.
- Nutrition can export charges as CSV for manual upload if integration is down.
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| Batch transmission failure | Exponential backoff | 5m, 15m, 30m | 3 |
| Partial acceptance (some charges rejected) | Selective retry | 15m, 30m | 2 (rejected charges only, after correction) |
| Duplicate batch | No retry needed | N/A | Billing uses batchId + chargeId for idempotency |
Dead Letter Queue:
- Failed batches →
integration_dlqtable - Finance team alerted; batch marked as
FAILEDin Nutrition - Retention: 90 days active (financial data retention requirement), then archive
- Alert: finance team + IT notified on DLQ insertion
Idempotency:
- Deduplication key:
[batchId]_[chargeId] - Billing performs idempotent processing; duplicate charges ignored
- Re-sent batches with same
batchIdare treated as retries, not new submissions
Reconciliation:
- Daily (morning after batch): Nutrition
nutrition_chargesvs Billing accepted charges - Rejected charges reviewed and corrected by finance; re-submitted in next batch
- Monthly revenue reconciliation: total nutrition charges vs billed amounts
- Quarterly audit of charge capture completeness
INT-NUT-007: Nutrition → NABIDH / Malaffi (HIE)
Business Context
What flows
- Outbound summary data to regional HIEs:
- Nutrition assessments (malnutrition risk, BMI, care plan summary)
- EN/TPN therapy summary (start/stop, type)
- Key observations (e.g., BMI, weight trends) – usually already sent by EHR, but Nutrition may contribute structured malnutrition assessments.
When
- When a nutrition assessment is signed or EN/TPN is started/ended.
- Sent in near real-time batches (e.g., every 15 minutes) to reduce overhead.
Why
- To support continuity of care across facilities in Dubai (NABIDH) and Abu Dhabi (Malaffi).
- To support public health and quality analytics.
How often
- Near real-time, small batches.
Error impact
- If HIE submission fails:
- External providers may not see latest nutrition data.
- No direct impact on internal care, but regulatory reporting may be incomplete.
NABIDH / Malaffi Technical Detail
Profiles are based on HL7 v2.5.1 and FHIR R4 with local constraints. Nutrition will typically piggyback on:
- FHIR
Observationfor BMI and malnutrition risk. - FHIR
CarePlanfor nutrition care plan. - HL7
ORU^R01for non-FHIR endpoints if required.
Sample FHIR Observation (Malnutrition risk for HIE)
{
"resourceType": "Observation",
"id": "HIE-MALNUTRISK-20260207-0001",
"meta": {
"profile": [
"http://nabidh.dha.gov.ae/fhir/StructureDefinition/nutrition-risk-observation"
]
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "survey"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "76458-9",
"display": "Nutritional risk screening tool"
}
],
"text": "NRS-2002 score"
},
"subject": {
"identifier": {
"system": "http://identity.ica.gov.ae/emirates-id",
"value": "784-1980-1234567-3"
}
},
"effectiveDateTime": "2026-02-07T11:00:00+04:00",
"valueQuantity": {
"value": 4,
"unit": "score"
}
}
Required fields (typical NABIDH/Malaffi expectations)
- Patient identifier (Emirates ID preferred).
- Encounter or episode reference.
- Observation code (LOINC).
- Status, effective date/time, value.
Acknowledgement handling
- For HL7: Expect
ACKwithMSA-1=AA/AE/AR. - For FHIR: Use
Bundletransactions; check HTTP 200/201 andOperationOutcomefor errors.
Error Handling
| Scenario | Handling |
|---|---|
| HIE endpoint unreachable | Queue outbound bundle; retry (5m, 15m, 30m, 1h); keep up to 7 days. |
| HIE validation error | Parse OperationOutcome; log; mark specific resources as “Rejected by HIE”; notify HIS compliance officer. |
| Authentication failure | Stop retries; alert integration security team; do not downgrade security. |
Retry and Recovery
Retry Strategy:
| Scenario | Strategy | Intervals | Max Attempts |
|---|---|---|---|
| HIE endpoint unreachable | Exponential backoff | 5m, 15m, 30m, 1h | 4 |
| HIE validation error | No auto-retry | N/A | Parse OperationOutcome; correct and re-submit |
| Authentication failure | No auto-retry | N/A | Stop all retries; alert security team immediately |
HL7 NAK (AE/AR) from HIE |
No auto-retry | N/A | Log full message; notify compliance officer |
Dead Letter Queue:
- Outbound HIE bundles exhausting all retries →
integration_dlqtable - Queued bundles retained for up to 7 days for re-submission when HIE recovers
- Compliance officer alerted; regulatory reporting may be incomplete
- Retention: 90 days active (regulatory data), then archive
- Alert: compliance officer + integration team notified on DLQ insertion
Idempotency:
- Deduplication key:
[Emirates_ID]_[resource_type]_[resource_id]_[effectiveDateTime] - HIE performs duplicate detection on submission; duplicate bundles acknowledged without reprocessing
Reconciliation:
- Daily comparison: Nutrition outbound HIE queue (submitted) vs HIE acknowledgements (accepted)
- Rejected resources flagged for compliance officer review and correction
- Weekly HIE submission success rate report
- Monthly audit of regulatory reporting completeness for DOH/DHA compliance
Authentication & Security
All integrations must comply with UAE PDPL, DOH ADHICS, and DHA/NABIDH security requirements, as well as TDRA/NESA cybersecurity standards.
Transport Security
- All external and cross-module traffic over HTTPS (TLS 1.2+).
- HL7 v2 over MLLP must be wrapped in TLS (mTLS where possible).
- Certificates:
- Issued by trusted CA or internal PKI.
- Separate certificates per environment (DEV/UAT/PROD).
Authentication
- Internal REST APIs (EHR, PIS, Billing):
- OAuth 2.0 client credentials flow.
- Nutrition module acts as confidential client with client_id/client_secret.
- Access tokens scoped (e.g.,
scope: nutrition.read nutrition.write). - HL7 interfaces:
- Mutual TLS at transport layer.
- Optional IP whitelisting between interface engines.
- HIE (NABIDH/Malaffi):
- mTLS with facility-specific certificates.
- OAuth 2.0 or JWT-based tokens as per HIE specification.
Authorization & Data Minimisation
- Nutrition module only requests and sends data necessary for its function (e.g., only nutrition-related labs).
- Role-based access control enforced within Nutrition (dietitian, nurse, kitchen staff).
- Outbound HIE payloads exclude unnecessary identifiers in line with PDPL minimisation principles.
Message Encryption & Integrity
- TLS provides encryption in transit.
- For batch files (if ever used), use AES-256 encryption at rest and during transfer (e.g., SFTP with SSH keys).
- Digital signatures or MACs may be used for high-sensitivity payloads (e.g., TPN orders) as per facility policy.
Logging & Audit
- All integration calls logged with:
- Timestamp, source, destination, patient identifier (pseudonymised where possible), operation type, outcome.
- Access to logs restricted to authorised IT and compliance staff.
- Audit trails retained according to MOH/DOH/DHA retention policies.
Error Monitoring & Alerting
- Central integration engine monitors:
- Queue lengths
- Error rates per interface
- ACK/NAK patterns
- Alerts:
- Email/SMS/ITSM ticket when:
- Consecutive failures > configurable threshold (e.g., 5).
- Queue delay > 10 minutes for real-time interfaces.
- HIE submissions fail for > 1 hour.
This specification covers all Nutrition Management integrations required for the UAE deployment and is intended to be directly consumable by development and integration teams.