Skip to content

feat(domination): read and write HL7 v2 timestamps (HLTH-93, #401) - #494

Merged
craig-o-curtis merged 8 commits into
mainfrom
feature/401-hlth-93-hl7-v2-timestamps
Nov 10, 2026
Merged

craig-o-curtis merged 8 commits into
mainfrom
feature/401-hlth-93-hl7-v2-timestamps

Conversation

@baldurpan

Copy link
Copy Markdown
Contributor

Closes #401 (HLTH-93).

Summary

This adds a healthcare namespace that reads and writes HL7 v2 date-times (DTM, and the older TS). HL7 says a time with no offset is the sender's local time. A parser that reads it as UTC moves every event by the sender's offset. Here that value comes back as kind: 'local' with no instant, so the caller supplies the sender's zone to resolveLocal. The Dox site gains the HL7 Timestamp Reader and a clinical timestamps guide.

What Changed

1. Library: @northguild/gmt/healthcare

  • parseHL7(value) returns an instant, a local time, a partial value or the HL7 null value. A value coarser than a minute is partial and has no instant. A TS degree of precision only lowers the precision, so 199904011200^L is April 1999, not 12:00.
  • formatHL7(isoString, { precision }) writes a DTM, cut to the precision and never rounded. It never writes TS, which HL7 withdrew in v2.6.
  • isValidHL7(value) is true exactly when parseHL7 reads the value.
  • Subpaths /parse, /format and /validate. Types Hl7DateTime, Hl7Precision and Hl7FormatOptions. Sentinels are null, an empty string and false. Nothing throws.
  • context/coding-standards.md gains a scoped exception for the HL7 grammar regex in internal/hl7DateTime.ts. Its fields are always handed to Temporal.

2. Dox

  • The HL7 Timestamp Reader at /tools/hl7-timestamp-reader/, with a chat tool and a starter.
  • The guide Healthcare: Clinical Timestamps, two scenarios, and /mistakes/healthcare/.
  • The Healthcare industry: hub text, glyph and example area.
  • The timeline kit gained an optional reference mark. The DTM Decoder and X12 Time Reader pass none, and their visual diffs are 0.000% against main.
  • namespace-summary.ts gained a healthcare line. The spec did not name it.

3. Agent skill

  • A gmt-healthcare TanStack Intent skill, in skill_tree.yaml and domain_map.yaml, listed in the skills and install docs and in the worker vocabulary.

4. Merge with main

  • main gained SPA-47 (feat(domination): Terrestrial Time and TCG labels (SPA-47, #228) #489) while this was open. Both chat tools are kept: showTerrestrialTimeStack is DOX_TOOL_DOCS[43] and showHl7TimestampReader is DOX_TOOL_DOCS[44].
  • Stats and both READMEs were regenerated with pnpm stats:sync on the merged tree. They now count 745 functions.
  • The root bundle budget was measured again on the merged tree. See question 3.

Why

  • HL7 v2 messages such as ADT, orders and results carry their times as DTM or TS. Reading a time with no offset as UTC is a silent error: nothing fails, and the event moves by the sender's offset.
  • No Temporal.*.from reads a DTM or a TS.

Validation

All on the tree after the merge with main:

  • pnpm validate ran all 23 checks. 21 passed. test:dox failed on one timeout: billing-deadlines-mount.test.tsx, orders dates across year 9999, ran past 20 s while that file took 113 s under full-suite load. That file passes alone (62 of 62 in 18.7 s), and this branch does not touch it or what it imports.
  • test:dox and test:gmt (the step that had not run yet) were run again with node scripts/affected.mjs run --only test:dox,test:gmt. Both passed.
    • Dox: 18,715 tests in 538 files.
    • gmt: 72,439 tests in 957 files.
  • node scripts/bundle-size.mjs check passes with the root budget at 581300.
  • Before the merge, the Reader page passed the grow, contrast, axe, tab-walk, media and table-fit gates. The DTM Decoder and X12 Time Reader visual diffs were 0.000% against main.

Risk / Impact

Low. The new namespace adds subpaths and changes no existing function. The Dox timeline kit change is opt-in, and the two tools that use the kit render the same as before.

Release

One changeset, .changeset/hl7-v2-timestamps.md, minor for @northguild/gmt. No changeset for the Dox part. Merging publishes nothing.

For the reviewer: four open questions

These are not decided. They are recorded in context/domination/issues/HLTH-93/decisions.md.

  1. 20240615^D^ returns null because a third TS component is refused. Chapter 2 §2.6.2 suggests it could read as 20240615^D. Should it?
  2. '""^' returns null, not the HL7 null value. Should it read as the null value?
  3. The root bundle budget in scripts/bundle-size.budgets.json rises from 570400 (main after SPA-47) to 581300 B. That is the 575497 B measured with both stories in, plus 1%, rounded up to the next 100 as bundle-size.mjs --update does. Is the raise approved?
  4. The phrase most of their records in INDUSTRY_OVERVIEWS.healthcare.about and the guide intro has no source. Keep, source or cut?

Checklist

  • Each What Changed section has a matching entry
  • Type-check passed
  • No secrets committed
  • Changeset present with the correct bump

Add the healthcare namespace with parseHL7, formatHL7 and isValidHL7.

An HL7 time with no offset is the sender's local time, not UTC.
parseHL7 returns it as a local kind with no instant, so the caller
supplies the sender's zone to resolveLocal. A value coarser than a
minute is partial and has no instant. A TS degree of precision only
lowers the precision, so 199904011200^L is April 1999, not 12:00.
formatHL7 writes a DTM, cut to the precision and never rounded.

On the Dox site, add the HL7 Timestamp Reader tool, a clinical
timestamps guide, two scenarios, a mistakes page and the Healthcare
industry. Add the gmt-healthcare agent skill.
…l7-v2-timestamps

# Conflicts:
#	README.md
#	apps/dox/src/data/gmt-stats.json
#	apps/dox/src/lib/dox-tools.ts
#	packages/gmt/README.md
#	scripts/bundle-size.budgets.json
@baldurpan baldurpan added this to the Domination milestone Nov 10, 2026
@baldurpan baldurpan added documentation Improvements or additions to documentation enhancement New feature or request gmt skills labels Nov 10, 2026
@craig-o-curtis

Copy link
Copy Markdown
Contributor

/craig-review

@craigs-reviewer craigs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-reviewer: minor issues

This adds the healthcare namespace (parseHL7, formatHL7, isValidHL7), its types, subpaths, a changeset and an agent skill. On the Dox side it adds the HL7 Timestamp Reader, a guide, scenarios, a mistakes page, and an optional reference mark on the shared timeline kit. The library code is careful: every field goes through Temporal with overflow: "reject", the code never throws, a degree of precision only lowers, and the tables check the edge cases well. I found no defects in the library. The three findings are a factual error on the tool page, an "As sent" ladder column in the Reader that drops fraction digits that were sent, and a scoped exception in the coding standards that does not describe the second regex the formatter relies on.


Reviewed c3f1cfb for craig-o-curtis · claude-opus-5-5 · 81 files · $0.94

Comment thread context/coding-standards.md Resolved
The writer ladder built its source from fromOffsetInstant, which drops
trailing zeros from a fraction, so 20240615103000.1000+0000 wrote .1 in
the fraction row and .0000 wrote no result. A value sent to the minute
also got a seconds row the sender never sent.

The ladder now writes from parseHL7's local at the precision sent, with
the offset for an instant. The UTC column and zone 1's column put the
sent fraction back and cut a minute value to the minute. New tests
cover .1000, .0000, a minute value and a local value in zone 1.

Review wording fixes:
- The Reader page's four kinds now match the guide's table.
- The coding-standards exception names isoHl7Form and what it may
  read, and no longer says formatHL7 uses fromOffsetInstant. The same
  claim is corrected in decisions.md and the hl7DateTime.ts header.
@craig-o-curtis

Copy link
Copy Markdown
Contributor

Answers to the four open questions:

  1. Yes. Read 20240615^D^ as 20240615^D. Ch. 2 §2.6.2 treats an empty trailing component as not present, and splitHl7Ts already does this for 20240615^. Add rows for it to the parse and validate tables.
  2. Yes. Read ""^ as { kind: "null" }, for the same reason.
  3. The root budget raise to 581300 is approved. feat(domination): finance namespace and FIX UTCTimestamp (FIN-95, #403) #493 changes the same line, so whichever PR merges second merges main, measures again and sets the figure the formula gives.
  4. Replace "most of their records" in INDUSTRY_OVERVIEWS.healthcare.about and in the guide intro with HL7 International's own claim: version 2 is "one of the most widely implemented standards for healthcare information in the world" (HL7 TSC product list). Move all four from "Open owner questions" to the settled list in decisions.md.

Answers the four owner questions settled in review of #494.

A sender writes ^ only before another populated component (ch. 2
2.6.1.1), and a recipient treats a component not sent as not present
(2.6.2). splitHl7Ts now drops every trailing ^ before it splits, so
20240615^D^ reads as 20240615^D and the null value followed by an
empty degree reads as kind null. A third component that is not empty
(20240615^D^X) still returns null, and so does a degree after the
null value. New rows cover both sides in the parse, validate and
split tables.

The HL7 Timestamp Reader drops the same empty components before it
picks the reason under NO SIGNAL, so a third component that is not
empty now gets the picture reason, not the degree reason.

The hub text and the guide intro now give HL7 International's own
claim for version 2, from the HL7 TSC product list, in place of the
unsourced most of their records.

decisions.md moves the four questions to the settled list, records
the approved 581300 B root budget and the rule for #493, and opens
one new question: 2.6.2 also says to ignore a component that was not
expected, which would read 20240615^D^X as 20240615^D.
@baldurpan

Copy link
Copy Markdown
Contributor Author

Thanks. All four are in 8e3daea.

  1. 20240615^D^ reads as 20240615^D. splitHl7Ts now drops every trailing ^ before it splits, as §2.6.1.1 and §2.6.2 describe. That includes the one 20240615^ already dropped. New rows:

    • parse table: 20240615^D^, 20240615^^, 20240615^Y^ and 20240615103000+0000^S^;
    • validate table: 20240615^D^ is true and 20240615^D^X is false;
    • split table: 20240615^D^^ and ^^.

    A third component that is not empty is still refused. 20240615^D^X, 20240615^^D and 20240615^D^X^ all return null.

  2. ""^ reads as { kind: "null" }, and so does ""^^. A degree after the null value (""^D, ""^D^) still returns null, because there are no digits for the degree to lower.

  3. The budget. decisions.md records the approval of 581300 B. It also records the rule for feat(domination): finance namespace and FIX UTCTimestamp (FIN-95, #403) #493: whichever PR merges second merges main, measures again and sets the figure the formula gives. The root now measures 575576 B, 79 B more because of the new loop in splitHl7Ts. That is still under 581300, so I left the approved figure alone. The formula on that size would give 581400, so whichever PR merges second will pick it up when it measures again.

  4. The phrase. The guide intro now quotes HL7 International and links the TSC product list. The hub text gives the same quote, with two limits from industry-overview.test.ts:

    • it says "version two", because that test refuses a digit in the hub text;
    • it has no link, because the hub text is plain.

    tscwiki.hl7.org refused the connection from here, so I checked the quote against HL7's wiki through a search instead. It is worth one click to confirm.

I made one change you did not ask for. The HL7 Timestamp Reader chooses the sentence it shows under NO SIGNAL by parsing the text before the first ^. For 20240615^D^X it therefore said the degree was wrong, when the third component is the problem. It now drops empty trailing components first, and shows the picture sentence whenever a third component is left.

One new question, recorded as open question (e) in decisions.md. §2.6.2 has a first bullet as well as the one we used:

ignore segments, fields, components, subcomponents, and extra repetitions of a field that are present but were not expected.

Read that way, a recipient would read 20240615^D^X as 20240615^D rather than refuse it. I have kept it refused, as you decided. Do you want it read instead? If so, the change is small: splitHl7Ts keeps the first two components, and the rows above move from the null table to the parse table.

@craig-o-curtis

Copy link
Copy Markdown
Contributor

/craig-review

@craigs-reviewer craigs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-reviewer follow-up: minor issues

Since c3f1cfb, the branch settles the open TS questions. Empty trailing ^ components are now dropped before a TS is split, so 20240615^D^ reads as 20240615^D and '""^' reads as the null value, while a third component that is not empty still returns null. The Reader's writer ladder now keeps the digits as sent (no made-up seconds, trailing fraction zeros kept), and the hub text and guide intro cite HL7 International instead of the unsourced claim. The new splitting, null-value handling, NO SIGNAL reason and ladder logic check out against the updated tests and docs. My one note is that the new loops are while loops, which the coding standards ask new code to avoid.


Reviewed 8e3daea (changes since c3f1cfb) for craig-o-curtis · claude-opus-5-5 · 16 files · $0.32

The coding standards ask new code to avoid while loops (Loop Style).
This branch added three: the trailing ^ trim in splitHl7Ts, the
trailing empty component trim in the Reader's sentinelText, and the
fraction digit scan in the Reader's inSentForm. The first two are now
bounded for loops over one pass of the input. The scan is an anchored
regex for a dot and its digits, which cannot backtrack. No change in
behaviour; the existing rows cover all three.
craig-o-curtis
craig-o-curtis previously approved these changes Nov 10, 2026

@craig-o-curtis craig-o-curtis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. parseHL7, formatHL7 and isValidHL7 read the DTM and TS rules correctly, and the for loops in ccf40ac give the same results as the while loops did. Please make these changes before you merge.

1. The open question: 20240615^D^X reads as 20240615^D. HL7 v2.5.1 chapter 2, §2.6.2, rule 1, tells a recipient to ignore segments, fields, components, subcomponents, and extra repetitions of a field that are present but were not expected. §2.8.1 and §2.8.2 say new components are added at the end of a data type, so a reader that refuses them breaks on a later version. The PR already uses rule 3 of the same section to drop empty trailing components.

  • splitHl7Ts (internal/hl7DateTime.ts:211-213) keeps the first two components and ignores the rest.
  • 20240615^D^X, 20240615^^D and 20240615^D^X^ move from the null rows to the read rows. ^^D and ""^D stay null.
  • The JSDoc of splitHl7Ts, parseHL7 and isValidHL7, decisions.md and the skill cite §2.6.2 instead of a GMT rule.

2. Subcomponents are ignored by the same rule. Read each component only up to its first &, so 2024&X reads as 2024, and 2024^D&X and 2024&X^D read as 2024 with degree D. An empty part before the & means the component is not present, so &X stays null. A lone field carries no MSH-2, so the JSDoc should say the reader assumes the separators Figure 2-1 recommends, ^ and & (§2.5.4). The code already assumes ^. Add rows for each case, and keep isValidHL7 equal to parseHL7 !== null.

3. Narrow the precision types (types/hl7.ts:53, :66, :85). Each kind accepts all seven precisions, but parseHL7 returns only 10 of the 21 pairs. For example, { kind: "partial", precision: "fraction" } type-checks but can never come back. Suggest Hl7MomentPrecision = "minute" | "second" | "fraction" for instant and local, and Hl7PartialPrecision = "year" | "month" | "day" | "hour" for partial, with Hl7Precision as their union for Hl7FormatOptions.

4. Smaller fixes:

  • context/coding-standards.md:176 says the extracted fields go to Temporal.PlainYearMonth.from. formatHL7 passes it a string (formatHL7.ts:190), and it reads the day with isValidDate and then PlainDate.from (:198). Please describe what the code does.
  • context/domination/issues/HLTH-93.md:178 still says four open owner questions.
  • decisions.md:23 gives the root as 575497 B. It measures 575594 B at ccf40ac, and the formula gives 581400. Whichever PR merges second sets the figure, so please record the current measurement.

@craig-o-curtis

Copy link
Copy Markdown
Contributor

@baldurpan #493 is merged, so this branch now conflicts with main in 16 files. Please merge main in and resolve them. The conflicts are in the READMEs, gmt-stats.json, industries.json, the industries and skills guides, chat-constants.ts, dox-tools.ts, the industry and namespace lists, tracker.md, built.md, the skill artifacts and bundle-size.budgets.json.

This PR now merges second, so after the merge please measure the root again. Set entries.root.minified to the figure --update gives, and record the measured size in decisions.md.

I'll approve again once CI is green on the merged branch. The notes in my approval are still wanted before you merge.

@craig-o-curtis
craig-o-curtis enabled auto-merge (squash) November 10, 2026 16:19
@baldurpan

Copy link
Copy Markdown
Contributor Author

main is merged in at 147cb72, as a merge commit. All 16 conflicts came from two industries arriving at once: finance from #493 and healthcare from here. Each one is resolved as the union of both sides, finance first and then healthcare, in the order industries.json declares them. stats.mjs checks that order on the "By industry:" line.

  • Both READMEs, skills.mdx, industries.json, industries/index.mdx, chat-constants.ts, industry-tags.ts, namespace-summary.ts, industry-overview.ts, domain_map.yaml, skill_spec.md and built.md: both entries, finance then healthcare.
  • dox-tools.ts: both tools. The FIX Timestamp Reader is DOX_TOOL_DOCS[44] and the HL7 Timestamp Reader is [45]. The tool map and the name list follow that order.
  • tracker.md: FIN-95 and HLTH-93 are both Done. deps:sync made no further change.
  • bundle-size.budgets.json: with both namespaces in, the root measures 578178 B. Plus 1%, rounded up to the next 100 as --update does, that is 584000, and decisions.md records it.
  • stats:sync refreshed the figures in both READMEs and in gmt-stats.json.

The notes from your approval come next, in one push.

craig-o-curtis
craig-o-curtis previously approved these changes Nov 10, 2026

@craig-o-curtis craig-o-curtis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🇭🇳

Review of #494 asked for four changes.

A TS read on its own carries no MSH-2, so ^ separates its components
and & their subcomponents, as Figure 2-1 recommends (ch. 2 2.5.4). A
receiver ignores what is present but not expected (2.6.2), and a later
version adds components at the end (2.8.1, 2.8.2). splitHl7Ts now
reads two components, each up to its first &: 20240615^D^X reads as
20240615^D and 2024&X as 2024. An empty DTM, as in ^D and &X, still
returns null. isValidHL7 stays parseHL7 !== null.

Hl7DateTime narrows its precision by kind: Hl7PartialPrecision (year
to hour) for partial values, Hl7MomentPrecision (minute to fraction)
for instant and local ones. Hl7Precision is their union.

The HL7 Timestamp Reader draws ignored parts as their own dashed box
and probes the first component cut at & for its NO SIGNAL reason. The
guide, the skill, decisions.md, coding-standards.md and built.md say
the new rule; the open owner question is settled. The root bundle
measures 578210 B, inside the 584000 budget.
@baldurpan

Copy link
Copy Markdown
Contributor Author

All four are in affd826.

1. What is not expected is ignored (§2.6.2, §2.8.1, §2.8.2). splitHl7Ts now splits with value.split("^", 2), so everything after the second component is never read. 20240615^D^X, 20240615^^D and 20240615^D^X^ are read rows and all give 20240615 at day precision. ^^D and ""^D stay null. The JSDoc of splitHl7Ts, parseHL7 and isValidHL7, decisions.md, the skill and the guide now cite §2.6.2 instead of a GMT rule.

2. Subcomponents. Each component is read up to its first &, and the JSDoc says the reader assumes the separators Figure 2-1 recommends, ^ and & (§2.5.4). 2024&X reads as 2024, and &X is null because the part before the & is empty. isValidHL7 is still parseHL7(value) !== null. There are rows for each case in the parse, split and validator tables.

One difference from your list: 2024^D&X and 2024&X^D do split to 2024 with degree D, and the split table says so. But they parse to null, because D is finer than a year, and a degree finer than the digits sent returns null under the existing degree rule. So the parse rows use 20240615^D&X and 20240615&X^D, which read as 20240615 at day precision.

3. Narrower types. Hl7MomentPrecision ("minute" | "second" | "fraction") types precision on instant and local. Hl7PartialPrecision ("year" | "month" | "day" | "hour") types it on partial. Hl7Precision is their union, for Hl7FormatOptions. Two functions now use each of the new types, so the reference generator gives each one its own page. Only formatHL7 uses Hl7Precision now, so the generator moves it to an anchor on that function's page. The guide links follow those moves.

4. Smaller fixes.

  • coding-standards.md now says what formatHL7 actually does at each precision. A year goes through PlainDate.from with fields. A month goes to PlainYearMonth.from as a string. A day goes through isValidDate and then PlainDate.from. An hour goes through PlainDateTime.from with fields. A local minute or finer goes through isValidDateTime and then PlainDateTime.from, and an offset form through toOffsetInstant.
  • HLTH-93.md:178 no longer mentions open owner questions, and the section of open questions in decisions.md is gone.
  • With main merged and these changes in, the root measures 578210 B. The budget stays at 584000, and decisions.md records both figures.

Run locally: the HL7 tests (418), the gmt internal, healthcare and types suites (7343), the Dox tests for HL7, the reference corpus, head tags and content (116), tsc, astro check, oxlint and oxfmt. The full validate runs all 24 checks on this branch, so CI is running it.

@craig-o-curtis craig-o-curtis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚁

@craig-o-curtis
craig-o-curtis merged commit 51275d6 into main Nov 10, 2026
41 checks passed
@craig-o-curtis
craig-o-curtis deleted the feature/401-hlth-93-hl7-v2-timestamps branch November 10, 2026 17:17
craig-o-curtis pushed a commit that referenced this pull request Nov 11, 2026
Closes #405 (AV-97).

## Summary

This adds an `aviation` namespace that reads, writes and checks the date
in IATA SSIM airline schedule files. An SSIM date is `DDMMMYY`, such as
`01JAN26`. It is not ISO 8601, and no `Temporal.*.from` reads it. Two
mistakes are common with it. Code that reads the month through the
platform's language breaks on a machine that is not set to English. Code
that picks the century itself is wrong for either an archive or a
forward schedule. Here the month letters are a fixed code, and the
caller states the century. The Dox site gains the SSIM Date Reader and
an aviation guide.

## What Changed

### 1. Library: `@northguild/gmt/aviation`

- `parseSsimDate(value, options)` reads an SSIM date and returns an ISO
date.
- `formatSsimDate(value, options)` writes an ISO date as an SSIM date.
It returns `""` for a year outside the window, because written as two
digits that year would read back as another century. It takes only an
ISO calendar date.
- `isValidSsimDate(value, options)` calls the parser, so the two cannot
disagree.
- **The month is a fixed English code.** The letters `JAN` to `DEC` are
a constant table, never read through `Intl` and never case-folded.
`01jan26`, `01ENE26` and `01JANV26` are refused, and the answer is the
same under every locale in the matrix.
- **The century is the caller's.** `options.yearWindow` is required,
with no default (INT-15's `TwoDigitYearOptions`). Without it the parser
and formatter return `""` and the validator returns `false`.
- **A day that does not exist is refused** by Temporal with `overflow:
"reject"`. Examples are `29FEB25` and `31APR26`.
- Subpaths `/parse`, `/format` and `/validate`. Sentinels are `""` and
`false`. Nothing throws.
- The grammar is one regex in `internal/ssimDate.ts`, and
`context/coding-standards.md` gains a scoped exception for it. Nothing
is added to `regex/`: a value is a date only once its century is known,
so no pattern can say whether it is valid.

### 2. Dox

- The SSIM Date Reader at `/tools/ssim-date-reader/`, with the chat tool
`showSsimDateReader`, a starter and the permalink `ssim`. It reads a
date with the window you state, beside `parseDateWithPattern` under a
locale you pick, so the reader sees why a locale parser gets the month
wrong. It also writes an ISO date back. It opens on a French-locale
preset so the difference shows straight away.
- The guide Aviation: Message Times, `/mistakes/aviation/`, and the
scenario An SSIM Month Read in the Wrong Language.
- The Aviation industry: hub text, a control tower glyph and an example
area.
- The gate scripts (contrast, grow, HTML diff, readout-still, visual
snapshot) list the new tool page.

### 3. Agent skill

- A `gmt-aviation` TanStack Intent skill. It is in `skill_tree.yaml` and
`domain_map.yaml`, in the skills install command, and in the worker
vocabulary.

### 4. Merge with main

- main gained HLTH-93 (#494) while this branch was open. Both
industries, namespaces, skills and chat tools are kept, with main's
first: `showHl7TimestampReader` is `DOX_TOOL_DOCS[45]` and
`showSsimDateReader` is `DOX_TOOL_DOCS[46]`.
- On the merged tree, the gmt build and `pnpm dox:generate` were run
again, and the corpus holds both stories' functions. Stats and both
READMEs were regenerated with `pnpm stats:sync`, and `stats check` and
`api-surface check` pass. The root bundle is 579,106 bytes, under its
584,000 budget.

## Why

- Airlines exchange schedules in SSIM files. Their dates are a code, not
a sentence in a language, and their two-digit years say nothing about
the century.
- Both mistakes are silent: nothing fails, and the date comes out wrong.

## Sources

- IATA does not publish SSIM openly, and the Chapter 7 text was not
reached. The JSDoc says so in one line.
- EUROCONTROL's CSST Users Guide (§3.2, Figure 1) shows the
seven-character form. ACL (UK) shows the day and the month letters, and
Avinor shows the two-digit year. The owner accepted these sources as
meeting the story's bar. The full table is in
`context/domination/issues/AV-97.md`.

## Validation

All on the tree after the merge with main:

- `pnpm validate` ran all 23 checks. 21 passed before it stopped at
`test:dox`, which failed one test: `head-tags.test.ts` found no
`dateModified` on the HL7 guide `healthcare-clinical-timestamps`. That
date comes from `git log`, and the merge was not yet committed, so no
commit that HEAD could reach had the HL7 guide.
- After the merge commit, `node scripts/affected.mjs run --only
dox-pages,build:dox,test:dox,test:gmt` rebuilt the site and ran both
suites. All 4 checks passed: `test:dox` 19,053 of 19,053 tests and
`test:gmt` 73,261 of 73,261.
- `node scripts/stats.mjs check` and `node scripts/api-surface.mjs
check` pass on the merged tree.

## Risk / Impact

Low. The namespace is new, and nothing existing changes behaviour. The
Dox changes add one tool, one guide and one industry.

## Release

`.changeset/aviation-ssim-dates.md`: `@northguild/gmt` minor, for the
new namespace. Merging publishes nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request gmt skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HLTH-93: HL7 v2 timestamps

2 participants