Repository navigation
build(deps): move to @cosyte/hl7, fhir and x12 0.2 - #167
Merged
Merged
Conversation
Bump the three parsers to 0.2, update every comparison to their prefixed codes, move transforms, examples, guides and tests from setField to withField, give the v2 XML example its own ORU_R01 groups now that the library ships none, and record the moved outputs in the equivalence files. C-CDA stays on 0.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves Pathways onto
@cosyte/hl70.2.0,@cosyte/fhir0.2.0 and@cosyte/x120.2.0 (dependencies and lockfile).@cosyte/ccdastays on 0.1.src/engine/worker-entry.ts: the structure finding codes areHL7_STRUCTURE_SEGMENT_CARDINALITYandHL7_STRUCTURE_SEGMENT_OUT_OF_ORDER, and the write refusal isHL7_ENCODE_UNENCODABLE_CHARACTER.writeHl7returnsUint8Array, astoBytesis now typed. The FHIR decode returnsparseResource's result itself, not its deprecated.resource(the same object).src/connectors/batch.ts: the envelope check writesHL7_BATCH_COUNT_MISMATCHandHL7_BATCH_MISSING_TRAILER, the names the library gives the same warnings, so one batch never reports both spellings.README.md,docs-content/and the regenerated API page name the new codes. EverysetFieldin the starter, the examples, the guides, the doc comments, the bench and the tests is nowwithField, its result returned.examples/vet-lab-to-v2-xml:XML_GROUP_TABLESis empty in 0.2, so the transform carries its ownORU_R01groups (REPORT,ORDER,RESULT), made up for the example as the library's own guide does, and fails a result that is not v2.5 as before. The expected outputs change in their group elements only; every field value is the same. The example's package ranges move to^0.2.0.test/equivalence/digests.jsonandpathways-test.jsonare written again for the outputs that moved (below).What a caller must change:paragraph, and a README "In the next release" bullet.Why
The 0.2 parsers prefix every code with their library's name, number a dot-path field repetition from 1, return new messages from edits, freeze their models, and ship no v2 XML group table. Pathways passes their codes through to logs, stored errors, ACK problems and
pathways test, so those move with them.Dot-paths: no field repetition index appears anywhere in
src/,test/,examples/,templates/ordocs-content/. The only bracketed paths are segment occurrences (OBX[i].3.1,OBX[i].11), which still count from 0.Proof
pnpm install(lockfile changes: hl7, fhir and x12 0.2.0, and their peers in mllp, synth and transform).pnpm typecheck,pnpm lint,pnpm format:check,pnpm phi-scan,pnpm build,SKIP_INSTALL_SIMPLE_GIT_HOOKS=1 pnpm attw,pnpm check:no-emdash,pnpm check:no-internal-refs,pnpm check:claude-card,pnpm check:docs-reference,pnpm exec cosyte-release-pr: all pass.pnpm test:coverage: 150 files pass, 4 skipped; 3077 tests pass; coverage 99.82 / 99.13 / 100 / 99.87.src/changes but the old tests, 32 tests in 11 files failed, each on an old code string, theXML_GROUP_TABLESlookup, or a moved digest. The updated test files run againstmainfail 82 tests in 19 files.mainand on this branch, and compared them field by field. The only differences: codes gainingHL7_orFHIR_, and the default ACK's ERR-3.2 for condition 207 reading "Application error" (hl7 0.2 took table 0357's text) where it read "Application internal error". The starter's edit throughwithFieldgives byte-identical outputs tosetField.pnpm bench(2000 messages, SQLite, a quiet machine):main563 msg/s encryption off, 511 on; this branch 555 and 565 off, 525 and 523 on.Left to CI: the database, Windows, macOS, SFTP, object store, compose and image jobs.
Choices
EnvelopeChecknow writes the library's prefixed names rather than keeping the unprefixed ones, so a batch's warnings use one spelling.withFieldtoo, thoughsetFieldstill works in 0.2.@cosyte/mllp(0.1.14 here, and 0.1.16, the latest) still declares@cosyte/hl7^0.1.5as an optional peer; Pathways does not import itsack-from-hl7entry, so pnpm only warns.