TriMixGasCompositionVerifier
TriMix Gas Composition Verifier
Utility description: TriMix Gas Composition Verifier
TriMix Gas Composition Verifier — TriMix (Xe/N2/O2) Gas Composition Verifier
ℹ️ Utility checks mixing accuracy of Xe / N2 / O2:
• Deviation of each component from target
• Absolute oxygen safety level
• Gas sum balance (100%)
⚠️ CRITICAL: N2/O2 balance error affects T1 and safety!
Nitrogen extends polarization but displaces oxygen.
Usage:
TriMixGasCompositionVerifier.exe → demo mode (console output)
TriMixGasCompositionVerifier.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,Target_Xe,Target_N2,Target_O2,Measured_Xe,Measured_N2,Measured_O2,Max_Dev,Min_Safe_O2
Example:
MIX-2026-001,TriMix,70,9,21,69.5,9.2,21.3,1.0,19.0
— WHY IS THIS NEEDED?
Mixture verification is critical for HP-MRI procedure optimization:
• Xenon (Xe) — active imaging agent
• Nitrogen (N2) — buffer gas increasing T1 relaxation time (diamagnetic)
• Oxygen (O2) — necessary for patient life but kills polarization (paramagnetic)
• Precise balance between N2 and O2 allows maximizing signal lifetime while maintaining safety
• Mass Flow Controller (MFC) errors can lead to dangerous hypoxia or signal loss
⚠️ CRITICAL:
• Component deviation ≤1% from target value
• Oxygen ≥19% (absolute safety minimum)
• Sum of all gases must equal 100% ±1% (data integrity check)
• MFC calibration check before each mixing series
Key features:
• Multi-component deviation analysis
• Priority oxygen safety check
• Mixture mass-balance control
• Support for various recipes (Standard, High-N2, Low-O2)
Critical parameters:
• Deviation: ≤1%
• O2 Level: ≥19%
• Balance Error: ≤1%
💡 Usage tips:
1. Use certified gas analyzers to verify mixer output
2. Perform test runs before launching expensive enriched xenon
3. Account for sensor response time during dynamic mixing
4. Maintain deviation log to detect MFC calibration drift
5. Configure emergency alarm for O2 drop below 19%
⚠️ Note: Unlike binary mixtures, here changing one component requires recalculating two others. The utility helps maintain this fragile three-way balance, ensuring both image quality and patient life.input.csv
BatchNumber,ProductName,Target_Xe,Target_N2,Target_O2,Measured_Xe,Measured_N2,Measured_O2,Max_Dev,Min_Safe_O2 MIX-2026-001,HP-Xe-129 TriMix (Standard),70,9,21,69.5,9.2,21.3,1.0,19.0 MIX-2026-002,HP-Xe-129 TriMix (High N2),60,19,21,58.0,20.5,21.5,1.0,19.0 MIX-2026-003,HP-Xe-129 TriMix (Failed O2),70,9,21,70.0,9.0,18.0,1.0,19.0
URS & FS — user requirements and functional specification
URS & FS — User Requirements and Functional Specification
This document defines the controlled interface and behaviour of TriMixGasCompositionVerifier for “TriMix Gas Composition Verifier”. Limits from the source description are an initial configuration and shall be reconciled with the approved specification, study protocol, equipment instructions and local SOPs before production use.
Domain constraints and critical parameters
- Deviation: ≤1%
- O2 Level: ≥19%
- Balance Error: ≤1%
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|---|---|---|
| URS-001 | The utility shall accept input.csv with the exact headers defined by the data contract. | High | The file is processed without manual header renaming. |
| URS-002 | The utility shall perform a deterministic assessment for “TriMix Gas Composition Verifier”. | High | PASS / WARNING / FAIL is produced for each row. |
| URS-003 | Required fields, types, ranges, units and data consistency shall be validated before domain rules. | High | Schema errors are separated from nonconformities. |
| URS-004 | Critical limits from the description and approved local configuration shall create a critical finding. | High | A critical rule violation results in FAIL. |
| URS-005 | The result shall be written to machine-readable output.json. | High | JSON contains source values, checks, warnings and failures. |
| URS-006 | The conformity decision shall not use machine learning. | Medium | The result is reproducible from explicit rules and inputs. |
| URS-007 | Traceability of batch, source file, rule version and final status shall be retained. | High | QA/QC can reproduce the decision. |
| URS-008 | The utility shall have exactly one primary portal tag: api. | Medium | The other api / instrumental / medical_devices tags are absent. |
| URS-009 | Documentation shall support IQ/OQ/PQ or equivalent CSA/CSV verification. | Medium | The contract, test scenarios and change-control rules are supplied with the utility. |
input.csv data contract
| # | Field | Type | Unit | Sample | Purpose |
|---|---|---|---|---|---|
| 1 | BatchNumber | string | as specified | MIX-2026-001 | Batch/lot identifier for traceability. |
| 2 | ProductName | string | as specified | HP-Xe-129 TriMix (Standard) | Name of the controlled product, gas, procedure or equipment. |
| 3 | Target_Xe | decimal | as specified | 70 | Xenon parameter: concentration, isotope fraction, activity, volume or purity depending on the field. |
| 4 | Target_N2 | decimal | as specified | 9 | Controlled input.csv field: Target N2. |
| 5 | Target_O2 | decimal | as specified | 21 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
| 6 | Measured_Xe | decimal | as specified | 69.5 | Xenon parameter: concentration, isotope fraction, activity, volume or purity depending on the field. |
| 7 | Measured_N2 | decimal | as specified | 9.2 | Controlled input.csv field: Measured N2. |
| 8 | Measured_O2 | decimal | as specified | 21.3 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
| 9 | Max_Dev | decimal | as specified | 1.0 | Controlled input.csv field: Max Dev. |
| 10 | Min_Safe_O2 | decimal | as specified | 19.0 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
BatchNumber,ProductName,Target_Xe,Target_N2,Target_O2,Measured_Xe,Measured_N2,Measured_O2,Max_Dev,Min_Safe_O2 MIX-2026-001,HP-Xe-129 TriMix (Standard),70,9,21,69.5,9.2,21.3,1.0,19.0 MIX-2026-002,HP-Xe-129 TriMix (High N2),60,19,21,58.0,20.5,21.5,1.0,19.0 MIX-2026-003,HP-Xe-129 TriMix (Failed O2),70,9,21,70.0,9.0,18.0,1.0,19.0
FS — Functional Specification
| ID | Function | Implementation |
|---|---|---|
| FS-001 | CLI execution | TriMixGasCompositionVerifier.exe supports demo mode and input.csv output.json mode. |
| FS-002 | CSV import | Read UTF-8 CSV and validate header, column count and order. |
| FS-003 | Schema validation | Validate required values, empties, types and basic plausibility. |
| FS-004 | Domain rule engine | Apply explicit rules for “TriMix Gas Composition Verifier” and locally approved limits. |
| FS-005 | Status aggregation | FAIL for a critical finding; WARNING for a non-critical deviation; PASS for conformity. |
| FS-006 | JSON export | Write source values, applied rules, statuses, warnings, failures and configuration version. |
| FS-007 | Audit support | Retain a result structure suitable for review, investigation, IQ/OQ and change control. |
| FS-008 | Integration contract | LIMS/ELN/MES or an instrument wrapper creates CSV; the utility returns JSON. |
output.json example
{
"utilityId": "tri-mix-gas-composition-verifier",
"primaryTag": "api",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"checks": [
{
"parameter": "BatchNumber",
"value": "MIX-2026-001",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "ProductName",
"value": "HP-Xe-129 TriMix (Standard)",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Target_Xe",
"value": "70",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Target_N2",
"value": "9",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Target_O2",
"value": "21",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Measured_Xe",
"value": "69.5",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Measured_N2",
"value": "9.2",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Measured_O2",
"value": "21.3",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
}
],
"warnings": [],
"criticalFindings": []
}
OQ/PQ test scenarios
| ID | Scenario | Expected result |
|---|---|---|
| OQ-001 | Valid example row | PASS or an allowed WARNING under local rules. |
| OQ-002 | Required column missing | Schema error; domain checks do not mask it. |
| OQ-003 | Non-numeric value in numeric field | Type-conversion error. |
| OQ-004 | Critical parameter outside its limit | FAIL and a critical finding. |
| OQ-005 | Boundary value | The result follows the configured ≤ / ≥ / < / > operator. |
| PQ-001 | Real site data | Agreed QA/QC review retaining CSV, JSON, version and checksum. |
QA/QC and change control
- Do not change column names without updating the validator, documentation and test set.
- Retain input.csv, output.json, executable version, rule version and checksums.
- Before production use, verify local limits and execute IQ/OQ/PQ or equivalent CSA.
- Changes affecting patient safety, dosimetry, gas composition, polarization or equipment require documented impact assessment.
Included in packages
Rph Hyperpolarized Xenon Lifecycle QC Suite
29 utilities for the hyperpolarized xenon lifecycle: isotope composition and gas purity, SEOP and polarization, T1/storage/transport, safe blending and delivery, MRI/SPECT QC, dosimetry, scavenging, recovery and recycling.
OpenRPH isotope family: xenon and gas tracers
Xe-127, Xe-129 and Xe-133 for ventilation, hyperpolarized imaging, gas QC and safety.
OpenRPH organ/system: pulmonary and ventilation
Lung perfusion, MAA, V/Q, aerosol, xenon ventilation, shunt and pulmonary dosimetry.
OpenRPH use case: xenon, ventilation and medical gases
Xe-129, Xe-133, Xe-127, hyperpolarization, SEOP, T1, mixing, scavenging, transport, recovery and ventilation imaging.
OpenRPH workflow: imaging QC and quantitative interpretation
Acquisition, uptake, clearance, perfusion, transit, ejection fraction, segmentation and quantitative imaging.
Open