Skip to content

Accept per-microliter units for blood neutrophil counts - #706

Closed
TayaIntelligence wants to merge 1 commit into
OHDSI:developfrom
TayaIntelligence:fix/698-neutrophil-per-microliter
Closed

TayaIntelligence wants to merge 1 commit into
OHDSI:developfrom
TayaIntelligence:fix/698-neutrophil-per-microliter

Conversation

@TayaIntelligence

Copy link
Copy Markdown

Fixes #698.

Blood neutrophil count concept 3017732 (LOINC 26499-4) currently rejects unit concept 8647 (UCUM /uL, per microliter). Add 8647 to its plausible-unit list in the shared concept-level thresholds on develop, preserving the existing units and the 5% violation threshold. No other concepts or numeric plausibility bounds are changed.

Add SQLite-backed regression tests that load the packaged threshold data and execute the production plausibleUnitConceptIds SQL through SqlRender and DatabaseConnector. They cover /uL, existing units, an unrelated unit, zero/NULL units, unrelated measurements, and an empty table. Add RSQLite to Suggests and document the correction in NEWS.

Validation

  • Regression before the fix: two expected failures because /uL is counted as a violation; after the fix: 23 assertions pass, with no failures, errors, warnings, or skips.
  • Full develop test suite, including snapshots: 126 assertions pass; two cases are skipped (remote database and DuckDB).
  • PostgreSQL 16.15: seven synthetic scenarios pass through both the translated production SQL and executeDqChecks (14 scenario/path checks).
  • R CMD check (--no-manual --ignore-vignettes, built with --no-build-vignettes): 0 errors, 0 warnings, and 1 existing NEWS-format NOTE. The NEWS parser emits the identical message for the original and modified sources.
  • New test file passes lint; CSV scope audit confirms only the target row's unit list changes, with original line endings retained.

Tests used R 4.5.3, DatabaseConnector 8.0.0, SqlRender 1.19.7, CommonDataModel 1.0.1, and Eunomia 2.0.0. CommonDataModel/Eunomia are pinned to these official releases for this branch's CDM 5.3 test fixture. All validation data are synthetic; no production patient data or remote clinical database was used.

Terminology references

Allow unit concept 8647 for measurement concept 3017732 and add regression
coverage using the packaged thresholds and production SQL.

Fixes OHDSI#698.
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