Skip to content
LambogeniusDocs

HL7 v2 Codec for Azure Logic Apps

Samples

Four runnable Logic Apps: decode, encode and ACKs, JSON, maps, and batches and errors.

Service provider/serviceProviders/lamboHl7CodecLicensed together with the HL7 MLLP Connector. One token covers both.

lambogenius-hl7-v2-codec-samples

The samples repository has four Logic Apps. Each folder builds and runs on its own: ./run.ps1 starts Azurite and the Logic App; ./demo.ps1 calls every workflow, checks the results, and exits with 1 when a check fails. All test messages are made up.

SampleShows
01 · BasicsDecode to one XML document with MSH inside, plus the ACK; Encode with optional validation; Create acknowledgement; a round trip, also with custom delimiters; schemaless decode
02 · JSONDecode to JSON, encode JSON back to ER7, and change fields (a bed move sent on as an A08) before encoding with validation
03 · MapsDecode, then Transform XML with an XSLT patient summary, and xpath() on the decoded document
04 · Batches and errorsAn FHS/BHS batch and its batch ACK, AE with ERR segments, AR for an unknown type or version, a Z segment kept, and enhanced-mode CA/CE with an application ACK

Schemas

The repository has no schemas: HL7's terms don't allow them to be redistributed. Download HL7's v2.5 v2.xml schemas with your own free hl7.org account (see Getting schemas) and pass the folder to run.ps1 -V2XmlFolder. It generates ADT_A01_25.xsd into the sample's Artifacts/Schemas with a pinned copy of the free HL7 v2 Schema Generator. Without schemas the samples run in schemaless mode, and demo.ps1 skips the steps that need an XSD.

Run one

git clone https://github.com/lambogenius/lambogenius-hl7-v2-codec-samples C:\src\hl7-samples
cd C:\src\hl7-samples
# save Lambogenius.Hl7Codec.LogicApps.1.1.0.nupkg from Downloads in packages/
cd 01-basics
./run.ps1 -V2XmlFolder C:\hl7\v2xml\2.5    # window 1 (leave out -V2XmlFolder for schemaless)
./demo.ps1                                 # window 2

Prerequisites: Windows, the .NET 8 SDK, Azure Functions Core Tools 4, Azurite and PowerShell 7.2 or later. No license is needed under func start. Clone to a short path: the builds write files up to about 165 characters below the clone folder, and Windows limits paths to 260. To receive the messages over MLLP, see the MLLP Connector's sample 05.