# Systems Perspective Description Language — Laboratory Information Systems (SPDL-LIMS) **Specification Document ID:** `SPDL-LIMS-SPEC-2026-v4.2` **Classification:** Open Epistemic Standard / Cryptographically Provable Analytical Lab Substrate **Principal Architect:** Asse van Nix | Systems Perspective Framework & Proof-Driven Architecture Group **Target Environment:** Zig 0.16.0 Freestanding · Microplate Automation Robots · ASTM E1394 / HL7 LIS Replacement **Applied Standards:** ISO/IEC 14977 EBNF · GBNF Maskable · 21 CFR Part 11 (Electronic Records) · ISO 17025 · ISO 15189 (Medical Laboratories) · ASTM E1394 Replacement --- ## 1. Epistemic Architecture: Why ASTM E1394 and HL7 v2 LIS Interfaces Must Be Replaced 1. **ASTM E1394 Serialization Aging:** Designed in the early 1990s, ASTM E1394 (and its RS-232 successor ASTM E1381) transmits clinical analyzer records using pipe-and-caret delimited flat streams (`H|\^&|||...`). It lacks cryptographic attestation, carries no formal sample integrity decay modeling, and has no native support for multi-well liquid handler robotics. 2. **21 CFR Part 11 Compliance Friction:** In regulated pharma/clinical testing, audit trails and chain-of-custody records are retroactively reconstructed in relational databases. Software bugs and race conditions result in data integrity warnings (FDA 483s) because the communication protocol cannot cryptographically prove that a specimen did not degrade before analysis. **SPDL-LIMS** integrates reagent decay physics and cryptographic sample chain-of-custody directly into the data transmission protocol. --- ## 2. Physical Invariants, DAEs & Mathematical Proof Gates ``` SPDL-LIMS INTEGRITY MANIFOLD ┌─────────────────────────────────────────────────────────────────────────────┐ │ SPECIMEN ANALYTE DECAY EQUATION (First-Order Degradation Kinetics) │ │ C_analyte(t) = C_0 * exp(-k_decay(T) * (t - t_draw)) │ ├─────────────────────────────────────────────────────────────────────────────┤ │ SAMPLE STABILITY INTEGRITY BARRIER │ │ h_sample(t) = delta_t_max_allowable - (t_current - t_draw) >= 0 │ ├─────────────────────────────────────────────────────────────────────────────┤ │ ROBOTIC PIPETTOR VOLUME CONSERVATION & CARRYOVER BARRIER │ │ h_pipette(V_asp, V_disp) = |V_aspirate - V_dispensed| <= V_tolerance │ └─────────────────────────────────────────────────────────────────────────────┘ ``` --- ## 3. Formal ISO/IEC 14977 EBNF Grammar ```ebnf LimsManifest = { Line } ; Line = [ Whitespace ] , ( Comment | LimsRecord ) , Newline ; Whitespace = { " " | "\t" | "\r" } ; Newline = "\n" | "\r\n" ; Comment = "#" , { AnyChar - Newline } ; LimsRecord = "(I) @LIMS_INVARIANT" , " " , InvariantFields | "(M) @SPECIMEN_SAMPLE" , " " , SampleFields | "(B) @SAMPLE_DECAY_BAR" , " " , DecayFields | "(B) @VOLUME_CONSERVE" , " " , PipetteFields | "(M) @ASSAY_EXECUTION" , " " , AssayFields | "(T) @ASSAY_RESULT" , " " , ResultFields ; InvariantFields = "id:" , Token , " standard:ISO_17025" , " part11_compliant:TRUE" , " alloc_policy:ZERO_HEAP" ; SampleFields = "id:" , Token , " container_type:" , ContainerType , " draw_timestamp_utc:" , Integer , " blake3_hash:" , HexString ; ContainerType = "VACUTAINER_K2EDTA" | "WELL_96_PCR" | "CRYO_VIAL_2ML" ; DecayFields = "id:" , Token , " max_transit_time_sec:" , Integer , " max_temp_c:" , Number ; PipetteFields = "id:" , Token , " max_carryover_ppm:" , Number , " vol_tol_ul:" , Number ; AssayFields = "id:" , Token , " instrument_id:" , Token , " test_code:" , Token , " reagent_lot:" , Token ; ResultFields = "id:" , Token , " sample_id:" , Token , " analyte:" , Token , " value:" , Number , " units:" , Token , " flag:" , ResultFlag ; ResultFlag = "NORMAL" | "HIGH_PANIC" | "LOW_PANIC" | "DELTA_CHECK_FAIL" ; HexString = QuotedStr ; QuotedStr = '"' , { AnyChar - ( '"' | Newline ) } , '"' ; Token = Letter , { Letter | Digit | "_" | "-" } ; Number = [ "-" ] , Digit , { Digit } , [ "." , { Digit } ] ; Integer = [ "-" ] , Digit , { Digit } ; Letter = "A".."Z" | "a".."z" ; Digit = "0".."9" ; AnyChar = ? Any valid Unicode code point ? ; ``` --- ## 4. GBNF Structured Sampling Grammar ```gbnf root ::= LimsRecord "\n" LimsRecord ::= "(I) @LIMS_INVARIANT" " " InvariantFields | "(M) @SPECIMEN_SAMPLE" " " SampleFields | "(B) @SAMPLE_DECAY_BAR" " " DecayFields | "(B) @VOLUME_CONSERVE" " " PipetteFields | "(M) @ASSAY_EXECUTION" " " AssayFields | "(T) @ASSAY_RESULT" " " ResultFields InvariantFields ::= "id:" [A-Za-z0-9_-]+ " standard:ISO_17025 part11_compliant:TRUE alloc_policy:ZERO_HEAP" SampleFields ::= "id:" [A-Za-z0-9_-]+ " container_type:" ("VACUTAINER_K2EDTA"|"WELL_96_PCR"|"CRYO_VIAL_2ML") " draw_timestamp_utc:" [0-9]+ " blake3_hash:\"" [A-Fa-f0-9]+ "\"" DecayFields ::= "id:" [A-Za-z0-9_-]+ " max_transit_time_sec:" [0-9]+ " max_temp_c:" [0-9.]+ PipetteFields ::= "id:" [A-Za-z0-9_-]+ " max_carryover_ppm:" [0-9.]+ " vol_tol_ul:" [0-9.]+ AssayFields ::= "id:" [A-Za-z0-9_-]+ " instrument_id:" [A-Za-z0-9_-]+ " test_code:" [A-Za-z0-9_-]+ " reagent_lot:" [A-Za-z0-9_-]+ ResultFields ::= "id:" [A-Za-z0-9_-]+ " sample_id:" [A-Za-z0-9_-]+ " analyte:" [A-Za-z0-9_-]+ " value:" [0-9.]+ " units:" [A-Za-z0-9_/%-]+ " flag:" ("NORMAL"|"HIGH_PANIC"|"LOW_PANIC"|"DELTA_CHECK_FAIL") ``` --- ## 5. Production SPDL-LIMS Manifest Exemplar ```spdl # ============================================================================== # SPDL-LIMS v4.2 MANIFEST: CLINICAL CHEMISTRY & IMMUNOASSAY AUTOMATION # Standard: 21 CFR Part 11 / ISO 15189 | Cryptographic Chain-of-Custody: Blake3 # ============================================================================== (I) @LIMS_INVARIANT id:INV-CENTRAL-LAB standard:ISO_17025 part11_compliant:TRUE alloc_policy:ZERO_HEAP # --- SPECIMEN CHAIN OF CUSTODY (CRYPTOGRAPHICALLY ATTESTED) --- (M) @SPECIMEN_SAMPLE id:SAMP_PLASMA_9941 container_type:VACUTAINER_K2EDTA draw_timestamp_utc:1774182000 blake3_hash:"4a8f9c1b3e2d..." # --- SAMPLE STABILITY & ROBOTIC PIPETTING INTEGRITY BARRIERS --- (B) @SAMPLE_DECAY_BAR id:BAR_TROPONIN_STABILITY max_transit_time_sec:7200 max_temp_c:4.0 (B) @VOLUME_CONSERVE id:BAR_PIPETTE_DISPENSE max_carryover_ppm:0.1 vol_tol_ul:0.05 # --- AUTOMATED ANALYZER RUN CONFIGURATION --- (M) @ASSAY_EXECUTION id:RUN_CARDIAC_PANEL instrument_id:ROCHE_COBAS_8000 test_code:HIGH_SENS_TROPONIN reagent_lot:LOT_2026_994B # --- CERTIFIED ANALYTICAL RESULT TELEMETRY --- (T) @ASSAY_RESULT id:RES_9941_TROPONIN sample_id:SAMP_PLASMA_9941 analyte:TROPONIN_I value:0.014 units:ng/mL flag:NORMAL ``` --- ## 6. Standards Compliance Matrix ``` ╔═════════════════════════════════╦══════════════════════╦═════════════════════════════════════════════════════╗ ║ Dimension │ Verification Standard│ Enforced Implementation Evidence ║ ╠═════════════════════════════════╬══════════════════════╬═════════════════════════════════════════════════════╣ ║ Cryptographic Audit Integrity │ 21 CFR Part 11 │ Blake3 cryptographic sample hashing on ingest. ║ ║ Specimen Degradation Bounding │ ISO 15189 / CAP │ Transit time and thermal decay barriers enforced. ║ ║ Pipetting Carryover Safety │ ISO 17025 (Testing) │ Volume conservation tolerance <= 0.05 uL CBF. ║ ║ Clinical Data Stream Density │ ASTM E1394 Repl. │ Eliminates pipe/caret unverified serial strings. ║ ╚═════════════════════════════════╩══════════════════════╩═════════════════════════════════════════════════════╝ ```