1. Service scope and fitness for use
1.1 What is assessed
Sleep data quality assessment evaluates whether source recordings, derivatives, annotations and their links support a declared downstream task. The service locates defects and recommends recollection, re-export, rescoring, restricted use or exclusion. It does not by itself repair data, make a clinical diagnosis or certify model performance. A readable file may still contain unusable channels or inconsistent labels.[1][3]
The client should specify the question, output, time window, acquisition setting, critical channels, permitted missingness, scoring rules and decision owner before inspection begins. Conclusions are made at record, night, channel, interval, event and cohort levels. A single global score would hide localized failures. SHHS signal-quality variables depend on artifact-free usable sleep time, critical channels and the scoring task; their categories are specific to that study.[2]
1.2 Task-specific acceptance
The same night can be fit for one analysis and unfit for another. Sleep staging needs interpretable EEG, EOG and chin EMG with a stated scoring version. Respiratory-event work additionally needs usable airflow, effort and oxygen signals. Wearable trends depend strongly on wear state, clock stability, night boundaries and firmware or algorithm version. AASM's scoring manual identifies rule versions and tasks; licensed detailed rules and qualified scoring still govern the actual work.[5]
| Intended task | Critical input and check | Illustrative decision |
|---|---|---|
| Sleep staging | EEG, EOG, chin EMG, epoch timing and scoring version | If only sleep versus wake is supportable, do not treat detailed stage labels as reliable reference data. |
| Respiratory events | Airflow, effort, oxygen and event alignment | Missing critical signals can restrict event typing or invalidate affected intervals. |
| Wearable night trends | Wear state, clock drift, night boundary and firmware | Compare nights only where coverage and versions support comparison. |
| Multicentre model evaluation | Site strata, label provenance, independent test data and missingness | Report performance by relevant strata and define the supported population. |
2. File and signal integrity
2.1 Ingestion, parsing and timing
Preserve read-only originals, checksums, intake batch, inventory and conversion logs. Capture device model, channel names, units, sampling rates, gains, start time, time zone and any date shifts. Parse EDF/EDF+ headers, samples and annotations, then validate physical scaling and continuity. The EDF+ specification describes the format and annotation mechanism; it does not guarantee that a particular export is correct.[8] Test for duplicates, truncation, empty recordings, implausible time stamps, overlapping segments, time-zone mismatch and drift introduced by resampling. Retain both the original and any corrected time axis.
| Check layer | Reproducible evidence | Response to a defect |
|---|---|---|
| File identity | Original checksum, naming, night and participant keys | Review duplicates and mismatches before merging. |
| Structure and units | EDF header, channel list, rates, units and digital-to-physical scale | Quarantine unexplained channels and request export documentation. |
| Time continuity | Start and end, sample count, gaps, overlap and clock source | Flag affected intervals while preserving source timing. |
| Conversion lineage | Program version, parameters and input/output checksums | Replay a sample comparison between source and derivative. |
2.2 Channel interpretability
For each channel and relevant sleep window, measure missing data, saturation, flat lines, sensor detachment, movement artifact, noise and usable duration. State the denominator. Automated detectors are screening aids; people with the appropriate expertise should review consequential intervals. Register device- and task-specific thresholds and the human review standard rather than treating a generic signal-to-noise cutoff as a clinical pass mark. The SHHS Reading Center documented scorable, artifact-free duration by channel and an overall quality assessment.[3]
| Signal finding | Measure or evidence | Interpretive consequence |
|---|---|---|
| Missing or detached sensor | Start, end, duration and affected channels | Related stages or events cannot be confirmed from that signal. |
| Saturation, clipping or flat line | Amplitude range, interval and sample excerpt | A constant artifact must not be read as stable physiology. |
| Motion, electrode or ambient artifact | Location, detection rule and human review state | Avoid calling artifact an arousal, event or rhythm. |
| Channel misalignment | Relative delay, clock source and cross-channel event | Restrict or realign analyses that depend on timing. |
3. Labels and cross-file consistency
3.1 Annotation provenance and uncertainty
Record scorer, tool, rule set and version, review cycle, label unit, unknown values and dispute resolution. Manual labels are not automatically error-free ground truth. The PSG-IPA resource illustrates the need to account for differences between scorers and scoring approaches.[6] Sleep-EDF Expanded includes movement and unknown stage labels and reflects its original scoring conventions. Mapping labels across collections requires an explicit rule; do not silently recode unknown to a normal sleep stage.[4]
3.2 Aligning waveforms, events and cohort fields
Join EDF signals, EDF+/XML annotations, event tables and participant metadata with validated night keys and time bases. Check whether event intervals lie within usable recording, epochs match duration, and event counts survive conversion. SHHS documentation describes instances where core-data counts differ from annotation files and oxygen-desaturation annotations may be missing or misaligned. These are dataset-specific warnings, and file presence alone cannot establish completeness.[1] Inspect cohort missing-value codes, dictionary versions and join keys; NSRR documents SHHS versions and known issues.[7]
| Objects being linked | Validation question | Reported result |
|---|---|---|
| Waveforms and annotations | Do starts, relative time, epochs and event boundaries agree? | List displaced intervals and proposed rules without overwriting originals. |
| Export and scored source | Did counts, categories, unknown and unscored labels change? | Provide file-level differences and plausible causes. |
| Night and participant | Are keys, repeat visits, duplicate exports and night limits sound? | Preserve join evidence and quarantine uncertain links. |
| Cohort fields and versions | Are missing codes, units, dictionaries and release dates known? | Name the applicable dictionary and affected records. |
4. Assessment and disposition
4.1 Rules plus expert review
Freeze source material and the intended use, then run reproducible structural, timing, signal and label checks. Have consequential anomalies reviewed against original excerpts, recording the reviewer, evidence and disagreements. Version every rule and report its population, denominator, trigger count and review outcome. Sampling can support interpretive review but does not replace full-file structural checks. For model development, the FDA and partner agencies' GMLP principles call for representative data, independent testing and appropriate reference standards. Describe which populations, devices and settings were assessed without claiming regulatory endorsement.[9]
4.2 Decisions and reassessment
Issue fit, restricted, pending, quarantined or excluded decisions for each registered use, with reasons. Clock correction, re-export or rescoring requires source evidence, authorization and a version trail. Never silently impute a missing interval as an observed measurement. Rerun affected rules after a correction and compare counts and downstream outputs; reassess model performance where necessary. Acceptance thresholds belong in the project protocol and validation evidence. This guide supplies no universal pass rate.
| Disposition | Example condition | Required handoff |
|---|---|---|
| Fit | Critical inputs meet the registered task criteria | State use, time window and applicable version. |
| Restricted | A local defect leaves a narrower task supportable | Identify inferences, events or groups that remain unsupported. |
| Pending or quarantined | Identity, time or conversion discrepancy is unresolved | Pause inclusion and assign an investigation owner. |
| Excluded or recollect | Critical evidence is irrecoverable or the visit is invalid | Preserve exclusion denominators, reasons and recollection plan. |
5. Deliverables and change control
5.1 Quality manifest and version trail
Deliver file- and night-level findings, channel and interval flags, rule dictionary, anomaly examples, review log, dispositions, residual uncertainty and a machine-readable quality manifest. Every rate needs a numerator, denominator and missing count. Report participants, nights, channels and usable duration; distinguish not collected, collected but uninterpretable, and not assessed. Link checksums and versions for originals, exports, labels and reports, including before/after changes. A new device, scoring rule, converter or intended use triggers reassessment and an explicit statement on whether the old conclusion still applies.
6. Acceptance checklist, evidence and limits
6.1 Final review
The recipient should be able to identify the target use and critical evidence; locate file, clock, channel and label defects; reproduce thresholds and denominators; distinguish human review from unchecked material; explain restrictions and exclusions; trace version changes; and rebuild an analysis cohort from quality flags. Otherwise the disposition should remain pending. The sources below support methods and examples. They do not establish that this draft service has tested real records, been certified or met clinical deployment requirements.
[1] NSRR SHHS polysomnography introduction
[2] NSRR SHHS2 signal quality variables
[3] NSRR SHHS Reading Center data processing
[4] PhysioNet Sleep-EDF Expanded
[7] NSRR SHHS dataset introduction
[9] FDA Good Machine Learning Practice principles