{
  "version": "1.0.0",
  "exportedAt": "2026-09-03T09:39:58.062Z",
  "workflow": {
    "name": "FHIR Observation to HL7 ORU (Example)",
    "description": "Downloadable Academy example: receives a FHIR R4 Observation (vitals reading) and maps it to an HL7 v2 ORU^R01 results message using the bundled mapping project. Synthetic data only."
  },
  "flow": {
    "tab": {
      "id": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
      "type": "tab",
      "label": "FHIR Observation to HL7 ORU (Example)",
      "disabled": false,
      "info": "Downloadable Academy example: receives a FHIR R4 Observation (vitals reading) and maps it to an HL7 v2 ORU^R01 results message using the bundled mapping project. Synthetic data only.",
      "created": "2026-09-03T07:09:22.905Z"
    },
    "nodes": [
      {
        "id": "cmt2_entry",
        "type": "comment",
        "z": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
        "name": "Click Inject to test instantly with the built-in synthetic FHIR Observation (a vitals reading).",
        "info": "",
        "x": 810,
        "y": 660,
        "wires": []
      },
      {
        "id": "inj2_test",
        "type": "inject",
        "z": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
        "name": "Test with sample Observation",
        "props": [
          {
            "p": "payload"
          }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"resourceType\":\"Observation\",\"status\":\"final\",\"code\":{\"coding\":[{\"system\":\"http://loinc.org\",\"code\":\"8867-4\",\"display\":\"Heart rate\"}]},\"subject\":{\"reference\":\"Patient/example\",\"display\":\"Doe, John A\"},\"effectiveDateTime\":\"2026-01-15T14:30:00Z\",\"valueQuantity\":{\"value\":78,\"unit\":\"beats/minute\",\"system\":\"http://unitsofmeasure.org\",\"code\":\"/min\"},\"performer\":[{\"display\":\"Smith, Jane\"}],\"encounter\":{\"reference\":\"Encounter/VN12345\"}}",
        "payloadType": "json",
        "x": 650,
        "y": 740,
        "wires": [
          [
            "map2_run"
          ]
        ]
      },
      {
        "id": "cmt2_mapper",
        "type": "comment",
        "z": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
        "name": "Mapper runs the bundled \"FHIR Vitals to HL7 ORU Results\" mapping project, producing an HL7 v2 ORU^R01 results message.",
        "info": "",
        "x": 990,
        "y": 700,
        "wires": []
      },
      {
        "id": "map2_run",
        "type": "ec-mapper",
        "z": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
        "name": "",
        "projectId": "mapping_69ebfde6-2923-407a-9bcf-490f45963d35",
        "projectName": "FHIR Vitals to HL7 ORU Results",
        "templateId": "",
        "inputField": "payload",
        "inputFieldType": "msg",
        "outputField": "payload",
        "outputFieldType": "msg",
        "x": 970,
        "y": 760,
        "wires": [
          [
            "dbg2_output"
          ]
        ]
      },
      {
        "id": "dbg2_output",
        "type": "debug",
        "z": "workflow_8a3bfaa7-51ab-4316-950a-06e04fc544f5",
        "name": "HL7 ORU output",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1290,
        "y": 760,
        "wires": []
      }
    ]
  },
  "requirements": [],
  "mappingProjects": [
    {
      "schemaVersion": 1,
      "exportedAt": "2026-09-03T09:39:59.124Z",
      "project": {
        "id": "mapping_69ebfde6-2923-407a-9bcf-490f45963d35",
        "name": "FHIR Vitals to HL7 ORU Results",
        "description": "Example mapping: a FHIR R4 Observation (vitals reading) transformed into an HL7 v2 ORU^R01 results message, the format most legacy EHRs expect for inb",
        "templates": [
          {
            "id": "tmpl_215719c5-c703-4ce6-bd5f-9c3ad3612fa2",
            "triggerEvent": "fhir-observation-to-oru-r01",
            "label": "FHIR Observation to ORU_R01",
            "sourceType": "json",
            "targetType": "hl7v2",
            "mode": "fields",
            "mappings": [
              {
                "id": "d59e6ccb-2359-4225-bbd6-dba4494fa4ce",
                "targetPath": "OBX.3.1",
                "sourceRef": "code.coding[0].code",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "5dd757d8-dc03-4255-aead-dafbaec06e8e",
                "targetPath": "OBX.3.2",
                "sourceRef": "code.coding[0].display",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "97bbba09-7327-46fa-ad19-ca0e9a7525bc",
                "targetPath": "OBX.5",
                "sourceRef": "valueQuantity.value",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "61437f9f-b402-4ab1-a7da-d640f86c14bf",
                "targetPath": "OBX.6",
                "sourceRef": "valueQuantity.unit",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "0408fd33-c176-446e-8de5-629b9d62b9b5",
                "targetPath": "OBX.14",
                "sourceRef": "effectiveDateTime",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "33eaace5-b227-4bdf-8b86-f5563f0f3ab4",
                "targetPath": "OBR.7",
                "sourceRef": "effectiveDateTime",
                "filterRefs": [],
                "directives": []
              },
              {
                "id": "42376230-4499-42df-81ee-de420f082478",
                "targetPath": "OBR.4.1",
                "expression": "{{ jsonData.code.coding[0].code | hl7_escape }}",
                "filterRefs": [],
                "directives": []
              }
            ],
            "repeatingGroups": [],
            "targetSchema": [
              {
                "id": "MSH",
                "segment": "MSH",
                "suggestedName": "Message Header",
                "children": [
                  {
                    "id": "MSH.3",
                    "segment": "MSH",
                    "suggestedName": "Sending Application",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.4",
                    "segment": "MSH",
                    "suggestedName": "Sending Facility",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.5",
                    "segment": "MSH",
                    "suggestedName": "Receiving Application",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.6",
                    "segment": "MSH",
                    "suggestedName": "Receiving Facility",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.7",
                    "segment": "MSH",
                    "suggestedName": "Date/Time of Message",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.9",
                    "segment": "MSH",
                    "suggestedName": "Message Type",
                    "children": [
                      {
                        "id": "MSH.9.1",
                        "segment": "MSH",
                        "suggestedName": "Message Type",
                        "valueType": "string"
                      },
                      {
                        "id": "MSH.9.2",
                        "segment": "MSH",
                        "suggestedName": "Trigger Event",
                        "valueType": "string"
                      }
                    ]
                  },
                  {
                    "id": "MSH.10",
                    "segment": "MSH",
                    "suggestedName": "Message Control ID",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.11",
                    "segment": "MSH",
                    "suggestedName": "Processing ID",
                    "valueType": "string"
                  },
                  {
                    "id": "MSH.12",
                    "segment": "MSH",
                    "suggestedName": "Version ID",
                    "valueType": "string"
                  }
                ]
              },
              {
                "id": "PID",
                "segment": "PID",
                "suggestedName": "Patient Identification",
                "children": [
                  {
                    "id": "PID.1",
                    "segment": "PID",
                    "suggestedName": "Set ID - PID",
                    "valueType": "number"
                  },
                  {
                    "id": "PID.3",
                    "segment": "PID",
                    "suggestedName": "Patient Identifier List",
                    "children": [
                      {
                        "id": "PID.3.1",
                        "segment": "PID",
                        "suggestedName": "Patient ID",
                        "valueType": "string"
                      },
                      {
                        "id": "PID.3.4",
                        "segment": "PID",
                        "suggestedName": "Assigning Authority",
                        "valueType": "string"
                      },
                      {
                        "id": "PID.3.5",
                        "segment": "PID",
                        "suggestedName": "Identifier Type Code",
                        "valueType": "string"
                      }
                    ]
                  },
                  {
                    "id": "PID.5",
                    "segment": "PID",
                    "suggestedName": "Patient Name",
                    "children": [
                      {
                        "id": "PID.5.1",
                        "segment": "PID",
                        "suggestedName": "Family Name",
                        "valueType": "string"
                      },
                      {
                        "id": "PID.5.2",
                        "segment": "PID",
                        "suggestedName": "Given Name",
                        "valueType": "string"
                      },
                      {
                        "id": "PID.5.3",
                        "segment": "PID",
                        "suggestedName": "Middle Name/Initial",
                        "valueType": "string"
                      }
                    ]
                  },
                  {
                    "id": "PID.7",
                    "segment": "PID",
                    "suggestedName": "Date/Time of Birth",
                    "valueType": "string"
                  },
                  {
                    "id": "PID.8",
                    "segment": "PID",
                    "suggestedName": "Gender",
                    "valueType": "string"
                  }
                ]
              },
              {
                "id": "PV1",
                "segment": "PV1",
                "suggestedName": "Patient Visit",
                "children": [
                  {
                    "id": "PV1.1",
                    "segment": "PV1",
                    "suggestedName": "Set ID - PV1",
                    "valueType": "number"
                  },
                  {
                    "id": "PV1.2",
                    "segment": "PV1",
                    "suggestedName": "Patient Class",
                    "valueType": "string"
                  },
                  {
                    "id": "PV1.3",
                    "segment": "PV1",
                    "suggestedName": "Assigned Patient Location",
                    "children": [
                      {
                        "id": "PV1.3.1",
                        "segment": "PV1",
                        "valueType": "string"
                      },
                      {
                        "id": "PV1.3.2",
                        "segment": "PV1",
                        "valueType": "string"
                      },
                      {
                        "id": "PV1.3.3",
                        "segment": "PV1",
                        "valueType": "string"
                      },
                      {
                        "id": "PV1.3.4",
                        "segment": "PV1",
                        "valueType": "string"
                      }
                    ]
                  }
                ]
              },
              {
                "id": "OBR",
                "segment": "OBR",
                "suggestedName": "Observation Request",
                "children": [
                  {
                    "id": "OBR.1",
                    "segment": "OBR",
                    "suggestedName": "Set ID - OBR",
                    "valueType": "number"
                  },
                  {
                    "id": "OBR.2",
                    "segment": "OBR",
                    "suggestedName": "Placer Order Number",
                    "valueType": "string"
                  },
                  {
                    "id": "OBR.4",
                    "segment": "OBR",
                    "suggestedName": "Universal Service Identifier",
                    "children": [
                      {
                        "id": "OBR.4.1",
                        "segment": "OBR",
                        "valueType": "string"
                      },
                      {
                        "id": "OBR.4.2",
                        "segment": "OBR",
                        "valueType": "string"
                      },
                      {
                        "id": "OBR.4.3",
                        "segment": "OBR",
                        "valueType": "string"
                      }
                    ]
                  },
                  {
                    "id": "OBR.7",
                    "segment": "OBR",
                    "suggestedName": "Observation Date/Time",
                    "valueType": "string"
                  }
                ]
              },
              {
                "id": "OBX",
                "segment": "OBX",
                "suggestedName": "Observation/Result",
                "children": [
                  {
                    "id": "OBX.1",
                    "segment": "OBX",
                    "suggestedName": "Set ID - OBX",
                    "valueType": "number"
                  },
                  {
                    "id": "OBX.2",
                    "segment": "OBX",
                    "suggestedName": "Value Type",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.3",
                    "segment": "OBX",
                    "suggestedName": "Observation Identifier",
                    "children": [
                      {
                        "id": "OBX.3.1",
                        "segment": "OBX",
                        "valueType": "string"
                      },
                      {
                        "id": "OBX.3.2",
                        "segment": "OBX",
                        "valueType": "string"
                      },
                      {
                        "id": "OBX.3.3",
                        "segment": "OBX",
                        "valueType": "string"
                      }
                    ]
                  },
                  {
                    "id": "OBX.5",
                    "segment": "OBX",
                    "suggestedName": "Observation Value",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.6",
                    "segment": "OBX",
                    "suggestedName": "Units",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.7",
                    "segment": "OBX",
                    "suggestedName": "References Range",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.8",
                    "segment": "OBX",
                    "suggestedName": "Abnormal Flags",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.11",
                    "segment": "OBX",
                    "suggestedName": "Observation Result Status",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.14",
                    "segment": "OBX",
                    "suggestedName": "Date/Time of the Observation",
                    "valueType": "string"
                  },
                  {
                    "id": "OBX.16",
                    "segment": "OBX",
                    "children": [
                      {
                        "id": "OBX.16.1",
                        "segment": "OBX",
                        "valueType": "string"
                      },
                      {
                        "id": "OBX.16.2",
                        "segment": "OBX",
                        "valueType": "string"
                      }
                    ]
                  }
                ]
              }
            ],
            "sourceSchema": [
              {
                "id": "resourceType",
                "segment": "resourceType",
                "suggestedName": "Resource Type",
                "valueType": "string"
              },
              {
                "id": "status",
                "segment": "status",
                "suggestedName": "Status",
                "valueType": "string"
              },
              {
                "id": "code",
                "segment": "code",
                "suggestedName": "Code",
                "children": [
                  {
                    "id": "code.coding[0]",
                    "segment": "code",
                    "suggestedName": "Coding",
                    "children": [
                      {
                        "id": "code.coding[0].system",
                        "segment": "code",
                        "suggestedName": "System",
                        "valueType": "string"
                      },
                      {
                        "id": "code.coding[0].code",
                        "segment": "code",
                        "suggestedName": "Code",
                        "valueType": "string"
                      },
                      {
                        "id": "code.coding[0].display",
                        "segment": "code",
                        "suggestedName": "Display",
                        "valueType": "string"
                      }
                    ],
                    "occurrenceCount": 1
                  }
                ]
              },
              {
                "id": "subject",
                "segment": "subject",
                "suggestedName": "Subject",
                "children": [
                  {
                    "id": "subject.reference",
                    "segment": "subject",
                    "suggestedName": "Reference",
                    "valueType": "string"
                  },
                  {
                    "id": "subject.display",
                    "segment": "subject",
                    "suggestedName": "Display",
                    "valueType": "string"
                  }
                ]
              },
              {
                "id": "effectiveDateTime",
                "segment": "effectiveDateTime",
                "suggestedName": "Effective Date Time",
                "valueType": "string"
              },
              {
                "id": "valueQuantity",
                "segment": "valueQuantity",
                "suggestedName": "Value Quantity",
                "children": [
                  {
                    "id": "valueQuantity.value",
                    "segment": "valueQuantity",
                    "suggestedName": "Value",
                    "valueType": "number"
                  },
                  {
                    "id": "valueQuantity.unit",
                    "segment": "valueQuantity",
                    "suggestedName": "Unit",
                    "valueType": "string"
                  },
                  {
                    "id": "valueQuantity.system",
                    "segment": "valueQuantity",
                    "suggestedName": "System",
                    "valueType": "string"
                  },
                  {
                    "id": "valueQuantity.code",
                    "segment": "valueQuantity",
                    "suggestedName": "Code",
                    "valueType": "string"
                  }
                ]
              },
              {
                "id": "performer[0]",
                "segment": "performer",
                "suggestedName": "Performer",
                "children": [
                  {
                    "id": "performer[0].display",
                    "segment": "performer",
                    "suggestedName": "Display",
                    "valueType": "string"
                  }
                ],
                "occurrenceCount": 1
              },
              {
                "id": "encounter",
                "segment": "encounter",
                "suggestedName": "Encounter",
                "children": [
                  {
                    "id": "encounter.reference",
                    "segment": "encounter",
                    "suggestedName": "Reference",
                    "valueType": "string"
                  }
                ]
              }
            ],
            "createdAt": "2026-09-03T06:34:41.732Z",
            "updatedAt": "2026-09-03T06:56:06.104Z",
            "samplesAreSynthetic": true,
            "sourceSample": "{\n  \"resourceType\": \"Observation\",\n  \"status\": \"final\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8867-4\",\n        \"display\": \"Heart rate\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/example\",\n    \"display\": \"Doe, John A\"\n  },\n  \"effectiveDateTime\": \"2026-01-15T14:30:00Z\",\n  \"valueQuantity\": {\n    \"value\": 78,\n    \"unit\": \"beats/minute\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"/min\"\n  },\n  \"performer\": [\n    {\n      \"display\": \"Smith, Jane\"\n    }\n  ],\n  \"encounter\": {\n    \"reference\": \"Encounter/VN12345\"\n  }\n}",
            "targetSample": "MSH|^~\\&|EHR|HOSP|RECV|RCVFAC|20260115143000||ORU^R01|MSG0002|P|2.5\nPID|1||MRN12345^^^HOSP^MR||Doe^John^A||19800101|M\nPV1|1|I|WARD2^R5^B1^MAIN\nOBR|1|VN12345||8867-4^Heart Rate^LN|||20260115143000\nOBX|1|NM|8867-4^Heart Rate^LN||78|/min|60-100|N|||F|||20260115143000||Smith^Jane",
            "compiledLiquid": "OBX|||{{ jsonData.code.coding[0].code | hl7_escape }}^{{ jsonData.code.coding[0].display | hl7_escape }}||{{ jsonData.valueQuantity.value | hl7_escape }}|{{ jsonData.valueQuantity.unit | hl7_escape }}||||||||{{ jsonData.effectiveDateTime | hl7_escape }}\rOBR||||{{ jsonData.code.coding[0].code | hl7_escape }}|||{{ jsonData.effectiveDateTime | hl7_escape }}"
          }
        ],
        "filters": [],
        "resources": [],
        "fieldNames": {},
        "version": 4,
        "createdAt": "2026-09-03T06:33:39.017Z",
        "updatedAt": "2026-09-03T06:56:08.550Z"
      }
    }
  ]
}