Skip to content
LambogeniusDocs

HL7 v2 Schema Generator

Introduction

What the generator does and the typical reasons to use it.

VS Code extensionlambogenius.hl7-schemagenFree · MIT license. Works entirely locally.

One XML schema per HL7 message

HL7 v2 messages (MSH|^~\&|...) are text. To validate them, map them with XSLT, or pick fields with XPath in Azure Logic Apps or another XML tool, you need an XML schema for each message type: one that describes the segments, groups, fields and components of, say, an ADT^A01 admission or an ORU^R01 lab result.

HL7 International publishes the definitions as “v2.xml” schemas, but they are spread over several shared files and use names like PID.5 and XPN.1. This extension turns them into one standalone schema per message in the widely used BizTalk-style naming, in a few seconds, without leaving VS Code.

Typical uses

  • Migrating from BizTalk Server to Azure Logic Apps. Get schemas in the BizTalk HL7 2.X naming (PID_5_PatientName, XPN_0_FamilyName), so existing maps and XPaths keep working, without copying BizTalk's schema files.
  • New Logic Apps healthcare integrations. Get the schemas for exactly the messages you exchange (ADT, ORM, ORU, SIU, MDM, DFT, …) in the HL7 version your partners send.
  • Validating or documenting interfaces. Use one readable XSD per message structure, with the standard's required fields, repetitions and groups, in any XML editor or validator.