GasMixingRatioAndHypoxiaRiskChecker
Gas Mixing Ratio & Hypoxia Risk Checker
Utility description: Gas Mixing Ratio & Hypoxia Risk Checker
Gas Mixing Ratio & Hypoxia Risk Checker — Gas Mixing Ratio and Hypoxia Risk Analyzer
ℹ️ Utility controls breathing mixture safety:
• Oxygen level (≥19-21%)
• Xenon level (≤30% for conscious patients)
• Gas balance (100%)
• Hypoxia risk index
⚠️ CRITICAL: Xenon displaces oxygen!
Incorrect mixture leads to rapid loss of consciousness or hypoxia.
Usage:
GasMixingRatioAndHypoxiaRiskChecker.exe → demo mode (console output)
GasMixingRatioAndHypoxiaRiskChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,Xe_Conc_Percent,O2_Conc_Percent,N2_Conc_Percent,Min_O2_Level,Max_Xe_Level
Example:
XE-MIX-2026-001,HP-Xe-129 Mix,25.0,21.0,54.0,19.0,30.0
— WHY IS THIS NEEDED?
Gas mixture control is critical for patient safety in HP-MRI:
• Xenon is an inert gas but acts as an anesthetic at high concentrations
• Adding xenon to breathing mixture proportionally reduces oxygen share
• If O2 level drops below 19%, tissue hypoxia risk occurs
• If Xe level exceeds 30-35%, patient may lose consciousness directly in scanner
• Nitrogen (N2) is used as buffer gas to balance pressure and concentration
⚠️ CRITICAL:
• Oxygen ≥19-21% — mandatory condition for breathing without support
• Xenon ≤30% — limit for maintaining consciousness in adult patient
• Sum of all gases must equal 100% (gas analyzer integrity check)
• Automatic gas delivery lockout upon parameter deviation
Key features:
• Real-time hypoxia risk index calculation
• Xenon anesthetic threshold control
• Gas analyzer data integrity check (Mass Balance)
• Support for various mixing protocols (binary and ternary mixtures)
Critical parameters:
• O2 Level: ≥19%
• Xe Level: ≤30%
• Total Sum: 100% ± 1%
• Hypoxia Risk Score: < 5
💡 Usage tips:
1. Use certified medical gas analyzers
2. Calibrate oxygen sensors before each working day
3. Configure emergency alarm for O2 drop below 19%
4. Account for patient's physiological oxygen consumption when calculating session duration
5. For patients with pulmonary diseases, increase minimum O2 threshold to 23-25%
⚠️ Note: Unlike standard drugs where dose is measured in milligrams, here dose is percentage content in each breath. Mixer error of even 1-2% can have fatal consequences within minutes. The utility ensures continuous monitoring of this balance.input.csv
BatchNumber,ProductName,Xe_Conc_Percent,O2_Conc_Percent,N2_Conc_Percent,Min_O2_Level,Max_Xe_Level XE-MIX-2026-001,HP-Xe-129 Diagnostic Mix,25.0,21.0,54.0,19.0,30.0 XE-MIX-2026-002,HP-Xe-129 High-Conc,35.0,18.0,47.0,19.0,30.0 XE-MIX-2026-003,HP-Xe-129 Safe Mix,20.0,25.0,55.0,19.0,30.0
URS & FS — user requirements and functional specification
URS & FS — User Requirements and Functional Specification
This document defines the controlled interface and behaviour of GasMixingRatioAndHypoxiaRiskChecker for “Gas Mixing Ratio & Hypoxia Risk Checker”. 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
- O2 Level: ≥19%
- Xe Level: ≤30%
- Total Sum: 100% ± 1%
- Hypoxia Risk Score: < 5
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 “Gas Mixing Ratio & Hypoxia Risk Checker”. | 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: medical_devices. | 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 | XE-MIX-2026-001 | Batch/lot identifier for traceability. |
| 2 | ProductName | string | as specified | HP-Xe-129 Diagnostic Mix | Name of the controlled product, gas, procedure or equipment. |
| 3 | Xe_Conc_Percent | decimal | % | 25.0 | Xenon parameter: concentration, isotope fraction, activity, volume or purity depending on the field. |
| 4 | O2_Conc_Percent | decimal | % | 21.0 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
| 5 | N2_Conc_Percent | decimal | % | 54.0 | Controlled input.csv field: N2 Conc Percent. |
| 6 | Min_O2_Level | decimal | L | 19.0 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
| 7 | Max_Xe_Level | decimal | L | 30.0 | Xenon parameter: concentration, isotope fraction, activity, volume or purity depending on the field. |
BatchNumber,ProductName,Xe_Conc_Percent,O2_Conc_Percent,N2_Conc_Percent,Min_O2_Level,Max_Xe_Level XE-MIX-2026-001,HP-Xe-129 Diagnostic Mix,25.0,21.0,54.0,19.0,30.0 XE-MIX-2026-002,HP-Xe-129 High-Conc,35.0,18.0,47.0,19.0,30.0 XE-MIX-2026-003,HP-Xe-129 Safe Mix,20.0,25.0,55.0,19.0,30.0
FS — Functional Specification
| ID | Function | Implementation |
|---|---|---|
| FS-001 | CLI execution | GasMixingRatioAndHypoxiaRiskChecker.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 “Gas Mixing Ratio & Hypoxia Risk Checker” 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": "gas-mixing-ratio-and-hypoxia-risk-checker",
"primaryTag": "medical_devices",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"checks": [
{
"parameter": "BatchNumber",
"value": "XE-MIX-2026-001",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "ProductName",
"value": "HP-Xe-129 Diagnostic Mix",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Xe_Conc_Percent",
"value": "25.0",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "O2_Conc_Percent",
"value": "21.0",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "N2_Conc_Percent",
"value": "54.0",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Min_O2_Level",
"value": "19.0",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Max_Xe_Level",
"value": "30.0",
"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: hepatobiliary and GI
HIDA, mebrofenin, gallbladder, gastric emptying, GI transit, bleeding and liver/spleen imaging.
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.
Open