@cosyte/hl7 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -4
- package/README.md +4 -3
- package/TRADEMARKS.md +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +28 -39
package/dist/index.d.cts
CHANGED
|
@@ -1445,7 +1445,7 @@ declare function parsePl(rep: RawRepetition, enc: EncodingCharacters): PL;
|
|
|
1445
1445
|
* Usage examples (the literal OBX-5 string ⇒ what this parses):
|
|
1446
1446
|
* `>^100` ⇒ greater-than 100 → { comparator: ">", num1: 100 }
|
|
1447
1447
|
* `<^10` ⇒ less-than 10 → { comparator: "<", num1: 10 }
|
|
1448
|
-
* `^100^-^200` ⇒ range 100
|
|
1448
|
+
* `^100^-^200` ⇒ range 100 to 200 → { num1: 100, separatorOrSuffix: "-", num2: 200 }
|
|
1449
1449
|
* `^1^:^128` ⇒ titer/ratio 1:128 → { num1: 1, separatorOrSuffix: ":", num2: 128 }
|
|
1450
1450
|
*
|
|
1451
1451
|
* Safety: `num1`/`num2` are parsed with the same strict `Number()` discipline
|
|
@@ -1599,7 +1599,7 @@ type DtmPrecision = "year" | "month" | "day" | "hour" | "minute" | "second" | "f
|
|
|
1599
1599
|
* shape of the `TS` composite (`field.asTs()`) and every helper datetime.
|
|
1600
1600
|
*
|
|
1601
1601
|
* The parts are only populated when `valid` is `true`. `month`/`day`/… are
|
|
1602
|
-
* **spec-native** (`month` is 1
|
|
1602
|
+
* **spec-native** (`month` is 1 to 12, NOT the JS `Date` 0 to 11). `offsetMinutes`
|
|
1603
1603
|
* is present iff `hasTimezone` is `true` and is signed minutes east of UTC
|
|
1604
1604
|
* (`+0500` → `300`, `-0430` → `-270`). A missing offset is **flagged**
|
|
1605
1605
|
* (`hasTimezone: false`), never resolved to UTC: the consumer decides how to
|
|
@@ -1628,15 +1628,15 @@ interface DtmParts {
|
|
|
1628
1628
|
readonly precision?: DtmPrecision;
|
|
1629
1629
|
/** Four-digit year. */
|
|
1630
1630
|
readonly year?: number;
|
|
1631
|
-
/** Month, 1
|
|
1631
|
+
/** Month, 1 to 12 (spec-native, NOT JS 0 to 11). */
|
|
1632
1632
|
readonly month?: number;
|
|
1633
|
-
/** Day of month, 1
|
|
1633
|
+
/** Day of month, 1 to 31. */
|
|
1634
1634
|
readonly day?: number;
|
|
1635
|
-
/** Hour, 0
|
|
1635
|
+
/** Hour, 0 to 23. */
|
|
1636
1636
|
readonly hour?: number;
|
|
1637
|
-
/** Minute, 0
|
|
1637
|
+
/** Minute, 0 to 59. */
|
|
1638
1638
|
readonly minute?: number;
|
|
1639
|
-
/** Second, 0
|
|
1639
|
+
/** Second, 0 to 59. */
|
|
1640
1640
|
readonly second?: number;
|
|
1641
1641
|
/**
|
|
1642
1642
|
* Fractional-second digits exactly as populated (no leading dot), e.g.
|
|
@@ -6156,7 +6156,7 @@ interface ProfiledMessage<P> extends Hl7Message {
|
|
|
6156
6156
|
|
|
6157
6157
|
/**
|
|
6158
6158
|
* Public entry point for the `@cosyte/hl7` parser: composes every
|
|
6159
|
-
* parser stage built across Plans 01
|
|
6159
|
+
* parser stage built across Plans 01 to 05 (normalize, strip MLLP, split
|
|
6160
6160
|
* segments, read delimiters, tokenize) and routes every Tier-2 warning
|
|
6161
6161
|
* through a single `emitWarning` chokepoint. The four Tier-3 fatal codes
|
|
6162
6162
|
* (`EMPTY_INPUT`, `NO_MSH_SEGMENT`, `MSH_TOO_SHORT`,
|
|
@@ -8723,7 +8723,7 @@ declare function supportsBuilderMessage(messageCode: string, triggerEvent: strin
|
|
|
8723
8723
|
* - **Table 0357** Message error condition codes: https://terminology.hl7.org/CodeSystem-v2-0357.html
|
|
8724
8724
|
* - **Table 0516** Error severity: HL7 v2 Chapter 2 §2.14.5 (ERR-4)
|
|
8725
8725
|
* - **Table 0155** Accept/application acknowledgment conditions (MSH-15/16),
|
|
8726
|
-
* HL7 v2 Chapter 2 §2.14.9.15
|
|
8726
|
+
* HL7 v2 Chapter 2 §2.14.9.15 to 16
|
|
8727
8727
|
*
|
|
8728
8728
|
* Zero runtime deps.
|
|
8729
8729
|
*/
|
|
@@ -8861,7 +8861,7 @@ type AckMode = "original" | "enhanced";
|
|
|
8861
8861
|
* inbound message that carries no MSH-10 correlation id.
|
|
8862
8862
|
*
|
|
8863
8863
|
* Spec traceability: HL7 v2 Chapter 2 §2.9 (ack model), §2.14.8 (MSA),
|
|
8864
|
-
* §2.14.5 (ERR), §2.14.9.15
|
|
8864
|
+
* §2.14.5 (ERR), §2.14.9.15 to 16 (MSH-15/16). Tables 0008 / 0357 / 0516 / 0155
|
|
8865
8865
|
* live in `ack-tables.ts`.
|
|
8866
8866
|
*
|
|
8867
8867
|
* Zero runtime deps.
|
|
@@ -9530,7 +9530,7 @@ declare const meditech: DefinedProfile<{
|
|
|
9530
9530
|
* - **`ZAV`**: Visit Filler: visit **additional details** (base64 XML).
|
|
9531
9531
|
*
|
|
9532
9532
|
* Grounded in the public **Vue PACS 12.2.8 HL7 Interface Specifications**
|
|
9533
|
-
* (Philips, document HA1669 Rev A), §§5.11
|
|
9533
|
+
* (Philips, document HA1669 Rev A), §§5.11 to 5.16: a publicly downloadable
|
|
9534
9534
|
* vendor interface spec, not an invented quirk. The spec's
|
|
9535
9535
|
* `TS` timestamps are the HL7-native `YYYYMMDDHHMMSS` form (§2.6), so this
|
|
9536
9536
|
* profile declares **no** custom `dateFormats`: only the Z-segments.
|
|
@@ -9716,7 +9716,7 @@ declare const va: DefinedProfile<{
|
|
|
9716
9716
|
* order with the DICOM study: the classic RIS/PACS ↔ HL7 bridge segment
|
|
9717
9717
|
* defined by the IHE Radiology Technical Framework. BIP-07.
|
|
9718
9718
|
*
|
|
9719
|
-
* Grounded in the public **Visage 7
|
|
9719
|
+
* Grounded in the public **Visage 7: HL7 Interface Specification**
|
|
9720
9720
|
* (V23.00, Jun 2026, Visage Imaging GmbH), §4.4 "ORM Messages" + the ZDS
|
|
9721
9721
|
* segment table ("Study Instance UID … contained in the first component of
|
|
9722
9722
|
* the first field of the ZDS Segment"): a publicly downloadable vendor
|
package/dist/index.d.ts
CHANGED
|
@@ -1445,7 +1445,7 @@ declare function parsePl(rep: RawRepetition, enc: EncodingCharacters): PL;
|
|
|
1445
1445
|
* Usage examples (the literal OBX-5 string ⇒ what this parses):
|
|
1446
1446
|
* `>^100` ⇒ greater-than 100 → { comparator: ">", num1: 100 }
|
|
1447
1447
|
* `<^10` ⇒ less-than 10 → { comparator: "<", num1: 10 }
|
|
1448
|
-
* `^100^-^200` ⇒ range 100
|
|
1448
|
+
* `^100^-^200` ⇒ range 100 to 200 → { num1: 100, separatorOrSuffix: "-", num2: 200 }
|
|
1449
1449
|
* `^1^:^128` ⇒ titer/ratio 1:128 → { num1: 1, separatorOrSuffix: ":", num2: 128 }
|
|
1450
1450
|
*
|
|
1451
1451
|
* Safety: `num1`/`num2` are parsed with the same strict `Number()` discipline
|
|
@@ -1599,7 +1599,7 @@ type DtmPrecision = "year" | "month" | "day" | "hour" | "minute" | "second" | "f
|
|
|
1599
1599
|
* shape of the `TS` composite (`field.asTs()`) and every helper datetime.
|
|
1600
1600
|
*
|
|
1601
1601
|
* The parts are only populated when `valid` is `true`. `month`/`day`/… are
|
|
1602
|
-
* **spec-native** (`month` is 1
|
|
1602
|
+
* **spec-native** (`month` is 1 to 12, NOT the JS `Date` 0 to 11). `offsetMinutes`
|
|
1603
1603
|
* is present iff `hasTimezone` is `true` and is signed minutes east of UTC
|
|
1604
1604
|
* (`+0500` → `300`, `-0430` → `-270`). A missing offset is **flagged**
|
|
1605
1605
|
* (`hasTimezone: false`), never resolved to UTC: the consumer decides how to
|
|
@@ -1628,15 +1628,15 @@ interface DtmParts {
|
|
|
1628
1628
|
readonly precision?: DtmPrecision;
|
|
1629
1629
|
/** Four-digit year. */
|
|
1630
1630
|
readonly year?: number;
|
|
1631
|
-
/** Month, 1
|
|
1631
|
+
/** Month, 1 to 12 (spec-native, NOT JS 0 to 11). */
|
|
1632
1632
|
readonly month?: number;
|
|
1633
|
-
/** Day of month, 1
|
|
1633
|
+
/** Day of month, 1 to 31. */
|
|
1634
1634
|
readonly day?: number;
|
|
1635
|
-
/** Hour, 0
|
|
1635
|
+
/** Hour, 0 to 23. */
|
|
1636
1636
|
readonly hour?: number;
|
|
1637
|
-
/** Minute, 0
|
|
1637
|
+
/** Minute, 0 to 59. */
|
|
1638
1638
|
readonly minute?: number;
|
|
1639
|
-
/** Second, 0
|
|
1639
|
+
/** Second, 0 to 59. */
|
|
1640
1640
|
readonly second?: number;
|
|
1641
1641
|
/**
|
|
1642
1642
|
* Fractional-second digits exactly as populated (no leading dot), e.g.
|
|
@@ -6156,7 +6156,7 @@ interface ProfiledMessage<P> extends Hl7Message {
|
|
|
6156
6156
|
|
|
6157
6157
|
/**
|
|
6158
6158
|
* Public entry point for the `@cosyte/hl7` parser: composes every
|
|
6159
|
-
* parser stage built across Plans 01
|
|
6159
|
+
* parser stage built across Plans 01 to 05 (normalize, strip MLLP, split
|
|
6160
6160
|
* segments, read delimiters, tokenize) and routes every Tier-2 warning
|
|
6161
6161
|
* through a single `emitWarning` chokepoint. The four Tier-3 fatal codes
|
|
6162
6162
|
* (`EMPTY_INPUT`, `NO_MSH_SEGMENT`, `MSH_TOO_SHORT`,
|
|
@@ -8723,7 +8723,7 @@ declare function supportsBuilderMessage(messageCode: string, triggerEvent: strin
|
|
|
8723
8723
|
* - **Table 0357** Message error condition codes: https://terminology.hl7.org/CodeSystem-v2-0357.html
|
|
8724
8724
|
* - **Table 0516** Error severity: HL7 v2 Chapter 2 §2.14.5 (ERR-4)
|
|
8725
8725
|
* - **Table 0155** Accept/application acknowledgment conditions (MSH-15/16),
|
|
8726
|
-
* HL7 v2 Chapter 2 §2.14.9.15
|
|
8726
|
+
* HL7 v2 Chapter 2 §2.14.9.15 to 16
|
|
8727
8727
|
*
|
|
8728
8728
|
* Zero runtime deps.
|
|
8729
8729
|
*/
|
|
@@ -8861,7 +8861,7 @@ type AckMode = "original" | "enhanced";
|
|
|
8861
8861
|
* inbound message that carries no MSH-10 correlation id.
|
|
8862
8862
|
*
|
|
8863
8863
|
* Spec traceability: HL7 v2 Chapter 2 §2.9 (ack model), §2.14.8 (MSA),
|
|
8864
|
-
* §2.14.5 (ERR), §2.14.9.15
|
|
8864
|
+
* §2.14.5 (ERR), §2.14.9.15 to 16 (MSH-15/16). Tables 0008 / 0357 / 0516 / 0155
|
|
8865
8865
|
* live in `ack-tables.ts`.
|
|
8866
8866
|
*
|
|
8867
8867
|
* Zero runtime deps.
|
|
@@ -9530,7 +9530,7 @@ declare const meditech: DefinedProfile<{
|
|
|
9530
9530
|
* - **`ZAV`**: Visit Filler: visit **additional details** (base64 XML).
|
|
9531
9531
|
*
|
|
9532
9532
|
* Grounded in the public **Vue PACS 12.2.8 HL7 Interface Specifications**
|
|
9533
|
-
* (Philips, document HA1669 Rev A), §§5.11
|
|
9533
|
+
* (Philips, document HA1669 Rev A), §§5.11 to 5.16: a publicly downloadable
|
|
9534
9534
|
* vendor interface spec, not an invented quirk. The spec's
|
|
9535
9535
|
* `TS` timestamps are the HL7-native `YYYYMMDDHHMMSS` form (§2.6), so this
|
|
9536
9536
|
* profile declares **no** custom `dateFormats`: only the Z-segments.
|
|
@@ -9716,7 +9716,7 @@ declare const va: DefinedProfile<{
|
|
|
9716
9716
|
* order with the DICOM study: the classic RIS/PACS ↔ HL7 bridge segment
|
|
9717
9717
|
* defined by the IHE Radiology Technical Framework. BIP-07.
|
|
9718
9718
|
*
|
|
9719
|
-
* Grounded in the public **Visage 7
|
|
9719
|
+
* Grounded in the public **Visage 7: HL7 Interface Specification**
|
|
9720
9720
|
* (V23.00, Jun 2026, Visage Imaging GmbH), §4.4 "ORM Messages" + the ZDS
|
|
9721
9721
|
* segment table ("Study Instance UID … contained in the first component of
|
|
9722
9722
|
* the first field of the ZDS Segment"): a publicly downloadable vendor
|
package/dist/index.mjs
CHANGED
|
@@ -101,7 +101,7 @@ function readDelimiters(firstSegment) {
|
|
|
101
101
|
if (chars.length !== 4 && chars.length !== 5) {
|
|
102
102
|
throw new Hl7ParseError(
|
|
103
103
|
FATAL_CODES.INVALID_ENCODING_CHARACTERS,
|
|
104
|
-
`MSH-2 encoding characters must be 4 (v2.1
|
|
104
|
+
`MSH-2 encoding characters must be 4 (v2.1 to v2.6) or 5 (v2.7+ adds truncation) characters (got ${String(chars.length)}).`,
|
|
105
105
|
fatalPosition,
|
|
106
106
|
snip
|
|
107
107
|
);
|
|
@@ -14899,7 +14899,7 @@ async function* parseStream(source, optionsOrProfile) {
|
|
|
14899
14899
|
}
|
|
14900
14900
|
|
|
14901
14901
|
// src/index.ts
|
|
14902
|
-
var VERSION = "0.1.
|
|
14902
|
+
var VERSION = "0.1.1";
|
|
14903
14903
|
|
|
14904
14904
|
export { ACK_CODES, ACK_CONDITIONS, AMBIGUOUS_DATE_ORDER, BUILTIN_DATE_FALLBACKS, DEFAULT_ENCODING_CHARACTERS, ERR_CONDITION_CODES, ERR_CONDITION_CODE_SYSTEM, ERR_SEVERITIES, FATAL_CODES, FINDING_CODES, Field, namespace_exports as HL7, Hl7Message, Hl7ParseError, JSON_SCHEMA_DIALECT, KNOWN_CODING_SYSTEMS, KNOWN_SEGMENTS, MESSAGE_STRUCTURE_DEFINITIONS, PREDICATE_CONNECTORS, PREDICATE_VERBS, PROFILE_LEVELS, ProfileDefinitionError, SCHEMA_EMIT_TARGETS, STRUCTURE_FINDING_CODES, STRUCTURE_NOT_VALIDATED_REASONS, STRUCTURE_REGISTRY_PROVENANCE, SUPPORTED_BUILDER_MESSAGES, SUPPORTED_DATE_TOKENS, SUPPORTED_OVERLAY_MESSAGES, SchemaTargetError, Segment, TYPED_BUILDER_COVERAGE, USAGE_CODES, VERSION, WARNING_CODES, ackNoCorrelationId, alternateCodingSystemOf, analyzeMessageStructure, batchCountMismatch, batchMissingTrailer, buildAck, buildAdt, buildDft, buildMdm, buildMessage, buildOrm, buildOru, buildSiu, buildVxu, canonicalCharset, codingSystem, codingSystemOf, conformance_exports as conformance, decodeText, defineConformanceProfile, defineProfile, detectAckMode, downgradePositiveAck, dtmToDate, duplicateRequiredSegment, emitMessageSchema, encodeCe, encodeComposite, encodeCompositeReps, encodeCwe, encodeCx, encodeHd, encodeNm, encodePl, encodeText, encodeTs, encodeXad, encodeXcn, encodeXpn, encodeXtn, encodingMismatch, extraFields, fieldWhitespaceTrimmed, findMessageStructureDefinition, formatDtm, getDefaultProfile, interpretAck, isPositiveAck, isSchemaEmitTarget, mergeMissingPriorOrSurvivor, messageJsonSchema, messageZodSource, missingExpectedGroup, missingRequiredField, missingRequiredSegment, mllpFramingStripped, outOfOrderSegment, parseCe, parseCwe, parseCx, parseDtm, parseHL7, parseHd, parseNm, parsePath, parsePl, parseSn, parseStream, parseTs, parseXad, parseXcn, parseXpn, parseXtn, pickMrn, profiles, reescape, renderText, resolveCharset, resolvePath, segmentCase, setDefaultProfile, splitBatch, supportsBuilderMessage, text_exports as text, timestampFallbackFormat, toDate, toISO, toObject, unescape, unknownCharset, unknownEscapeSequence, unknownSegment, unsupportedCharset, unterminatedEscapeSequence, unterminatedStreamMessage, usageOutcomes, validateAgainstProfile, validateMessageStructure, versionMismatch };
|
|
14905
14905
|
//# sourceMappingURL=index.mjs.map
|