Skip to content

Refactor schema: collapse category-specific slots into canonical slot…#6

Merged
diatomsRcool merged 1 commit intomainfrom
category-collapse
Feb 23, 2026
Merged

Refactor schema: collapse category-specific slots into canonical slot…#6
diatomsRcool merged 1 commit intomainfrom
category-collapse

Conversation

@diatomsRcool
Copy link
Collaborator

…s with modifiers

Apply category collapse design principle: when multiple variables represent the same quantitative construct differing only by a categorical qualifier, use ONE canonical slot with modifier axes instead of separate slots.

Changes:

  • Add SpO2ThresholdEnum and CO2ThresholdEnum modifier axes
  • Add spo2_threshold and co2_threshold modifier slots
  • Replace body position slots (supine_duration_min, etc.) with body_position_duration_min + body_position modifier
  • Replace apnea type slots (central_apnea_index, etc.) with apnea_index + apnea_type modifier
  • Replace SpO2 threshold slots (time_below_90_pct_min, etc.) with time_below_spo2_threshold_min + spo2_threshold modifier
  • Replace CO2 threshold slots (time_co2_above_50_pct, etc.) with time_above_co2_threshold_percent + co2_threshold modifier
  • Update BodyPositionMetric, OxygenSaturationMetric, CapnographyMetric classes
  • Document design principle in schema description

🤖 Generated with Claude Code

…s with modifiers

Apply category collapse design principle: when multiple variables represent
the same quantitative construct differing only by a categorical qualifier,
use ONE canonical slot with modifier axes instead of separate slots.

Changes:
- Add SpO2ThresholdEnum and CO2ThresholdEnum modifier axes
- Add spo2_threshold and co2_threshold modifier slots
- Replace body position slots (supine_duration_min, etc.) with
  body_position_duration_min + body_position modifier
- Replace apnea type slots (central_apnea_index, etc.) with
  apnea_index + apnea_type modifier
- Replace SpO2 threshold slots (time_below_90_pct_min, etc.) with
  time_below_spo2_threshold_min + spo2_threshold modifier
- Replace CO2 threshold slots (time_co2_above_50_pct, etc.) with
  time_above_co2_threshold_percent + co2_threshold modifier
- Update BodyPositionMetric, OxygenSaturationMetric, CapnographyMetric classes
- Document design principle in schema description

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@diatomsRcool diatomsRcool merged commit b90b3fb into main Feb 23, 2026
@diatomsRcool diatomsRcool deleted the category-collapse branch February 23, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant