Generate the schemas
- 1Open your Logic App project,
or any folder, in VS Code.
- 2Run 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. - 3Pick the v2.xml folder.
The extension remembers it for next time.
- 4Choose the message structures.
Type to filter (
ADT_A0,ORU), tick the ones you need, and pressEnter. Or tick All message structures to generate the whole version (about 200 files). - 5Choose where to write them.
Logic App projects in your workspace are listed with their
Artifacts/Schemasfolder; or choose Browse…. - 6Open 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.
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.