Skip to main content
Version: v0.1.7

Quirk catalog

Every quirk below changes the structure of an otherwise clean fixture so that a parse with no profile raises exactly the listed warning code. Where a built-in, public parser profile claims the deviation, a parse under that profile either drops the warning (suppressed) or replaces it with PROFILE_QUIRK_APPLIED (re-badged). A quirk with no tolerating profile is bare.

The registries are exported: HL7_QUIRKS from @cosyte/synth/hl7, CCDA_QUIRKS from @cosyte/synth/ccda, and ASTM_QUIRKS from @cosyte/synth/astm. Each entry carries the same facts as a row here, with its grounding in full.

HL7 v2​

QuirkBare parse raisesTolerated byUnder the profileGrounding
unknown-zsegmentUNKNOWN_SEGMENTvisagesuppressedSite-defined Z segments; @cosyte/hl7's public imaging profiles declare the ZDS segment
unknown-escapeUNKNOWN_ESCAPE_SEQUENCEnonebareA locally defined \Z..\ escape, kept verbatim and flagged; no HL7 v2 profile re-badges it

C-CDA​

QuirkBare parse raisesTolerated byUnder the profileGrounding
template-extension-absentTEMPLATE_EXTENSION_ABSENTlegacyR11re-badgedOlder documents omit the R2.1 extension version stamp on a template ID
deprecated-loincDEPRECATED_LOINCsmartScorecardre-badgedReal documents carry deprecated LOINC codes, as the SMART C-CDA Scorecard found
deprecated-code-systemDEPRECATED_CODE_SYSTEMsmartScorecardre-badgedOlder problem lists code diagnoses in ICD-9-CM, as the SMART C-CDA Scorecard found

ASTM​

QuirkBare parse raisesTolerated byUnder the profileGrounding
unknown-escapeASTM_UNKNOWN_ESCAPE_SEQUENCEreferenceCorpusre-badgedA non-standard &Z& escape, kept verbatim and flagged; the profile is grounded in public open-source corpora
unknown-record-typeASTM_RECORD_UNKNOWN_TYPEnonebareE1394 allows manufacturer and site record types; a Z record is flagged. A profile you write can re-badge it

Read a registry entry​

import { CCDA_QUIRKS } from "@cosyte/synth/ccda";

const quirk = CCDA_QUIRKS["deprecated-loinc"];
quirk.intendedWarnings; // => ["DEPRECATED_LOINC"]
quirk.toleratingProfile; // => "smartScorecard"
quirk.disposition; // => "rebadged"

Not in the catalog​

  • Quirks for FHIR, X12, and NCPDP.
  • Any quirk that would need a private, vendor-attributed corpus to ground it.
  • ASTM frame-layer faults (a wrong checksum, framing dropped over TCP): they raise diagnostics no parser profile tolerates.