Skip to main content
Version: v0.0.3

Interface: ConformanceProfile

A user-authored, declarative conformance profile. The consumer supplies this; hl7 ships none. It is a bounded subset of the HL7 v2 Message-Profile model: usage / cardinality / length / consumer-supplied value set: with no conditional-predicate language, no bundled code set, and no network binding (all deliberate scope boundaries).

Example

import type { ConformanceProfile } from "@cosyte/hl7";

// A minimal ADT profile the CONSUMER authors: example, NOT an attestation.
const profile: ConformanceProfile = {
name: "example-adt-min",
segments: [
{ segment: "MSH", usage: "R", fields: [{ field: 10, name: "Control ID", usage: "R" }] },
{ segment: "PID", usage: "R", cardinality: { min: 1, max: 1 }, fields: [
{ field: 3, name: "Patient Identifiers", usage: "R", cardinality: { min: 1, max: 1 } },
{ field: 8, name: "Administrative Sex", usage: "RE", valueSet: ["M", "F", "U"] },
] },
{ segment: "ZZZ", usage: "X" },
],
};

Properties

name

readonly name: string

A name for provenance: echoed into ConformanceResult.profileName.


segments

readonly segments: readonly SegmentRule[]

The segment rules, evaluated in array order (stable finding order).