Skip to content
LambogeniusDocs

HL7 v2 Schema Generator

Quick start

Generate schemas into a Logic App project from the Command Palette or the Explorer.

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

Generate the schemas

  1. 1
    Open your Logic App project,

    or any folder, in VS Code.

  2. 2
    Run HL7: Generate Schemas from v2.xml

    from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P). Or right-click a folder in the Explorer and choose HL7: Generate Schemas Here to write into that folder.

  3. 3
    Pick the v2.xml folder.

    The extension remembers it for next time.

  4. 4
    Choose the message structures.

    Type to filter (ADT_A0, ORU), tick the ones you need, and press Enter. Or tick All message structures to generate the whole version (about 200 files).

  5. 5
    Choose where to write them.

    Logic App projects in your workspace are listed with their Artifacts/Schemas folder; or choose Browse….

  6. 6
    Open the result.

    A notification shows the progress. When it finishes, choose Reveal in Explorer or Open First Schema. The HL7 Schema Generator output panel lists every file written.

The schemas go into a subfolder per HL7 version, for example Artifacts/Schemas/2.5.1/ADT_A01_251.xsd.

Message type vs. message structure

HL7 reuses one structure for several trigger events. For example, ADT^A04 and ADT^A08 both use the ADT_A01 structure, and ADT^A03 uses ADT_A03. MSH-9.3 of a message names its structure; the HL7 standard's “message structure” tables list them all.