Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

## [v1.8.2] - 2026-10-27

The new BUN/creatinine field holds BUN ÷ creatinine, so it moves to the BUN/creatinine LOINC code. The data team confirmed the values (for example BUN 15 mg/dL, creatinine 0.77 mg/dL → ratio 19.5; BUN 37, creatinine 1.01 → 36.6). One row is edited in place, so every line number is the same as in v1.8.1. The ETL must apply this change: the field's MEASUREMENT concept changes. Also added: an extended unit lookup that pairs each measurement field's concept with its unit concept.

### Changed — target concept

| Line | Field | v1.8.1 | v1.8.2 |
|---|---|---|---|
| 2125 | `import_bun_creatinine_ratio` | 3033837 *Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma* (LOINC 31045-8) | **3018311** *Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma* (LOINC 3097-3), exactMatch 1 |

- `SRC_CODE` 31045-8 → 3097-3 (the LOINC code, as for the other imported labs); `SRC_CODE_ID` and `SRC_CD_DESCRIPTION` "Creatinine/BUN ratio" → "BUN/Creatinine ratio".
- Unit row `import_bun_creatinine_ratio_u` (line 2126, 8523 *ratio*) unchanged; `unit_concept_lookup.csv` unchanged (114 rows).
- Not changed: line 554, `import_buncreatinineratio` (the original field), stays 3033837 *Creatinine/Urea nitrogen*: its stored values are creatinine ÷ BUN (all 3,981 current values; median 0.053). Its `MODIFIER` still says to remap it to 3018311 if that field's formula and values are corrected.
- This replaces the v1.7 decision that both fields map to creatinine ÷ BUN.

### Added — extended unit lookup

- `value-set-mapping-common/scripts/unit_concept_lookup_extended.csv` (89 rows): one row per field key of `unit_concept_lookup.csv`, with the field's measurement concept (`lab_concept_id`, name, vocabulary, code, from its question row) and unit concept (`unit_concept_id`, name, unit text, from its unit row), the REDCap form and label, and the concept map line numbers. Reference only: the ETL join still uses `unit_concept_lookup.csv`. `import_ldl_cholesterol` (key from the unit field `import_ldl_cholesterol_u`) carries the LDL calculation concept, with a note.
- `build_unit_concept_lookup_extended.py`: rebuilds it from the concept map and `unit_concept_lookup.csv` (checks that every unit matches the lookup and every concept is in the Measurement domain). Scripts README: file list and column definitions.

### Changed — master REDCap data dictionary

- The `import_bun_creatinine_ratio` row takes the new values; `Origin` = Changed, `Date_of_Variable_Modification` 10/27/2026. 3,150 rows; every concept map row has a master row with the same values.

### Regenerated

- map2omop (2,112 rows) and open-source public (1,997) versions, SSSOM (2,067 rows; 75 incomplete) and LinkML (2,142 records) from the v1.8.2 common file.
- Counts: standard 1,515 (400 concepts, +1: 3018311 is new and 3033837 is still used by line 554); custom 489 (342); mapped 2,004 (69.0%, 742 concepts); designated but unmapped 138; not designated 764. LOINC 1,190/277. `count_concept_map.sql` expected values updated to v1.8.2; `validate_concept_map_vocab.sql` V0 comment (2,142 rows).

## [v1.8.1] - 2026-10-26

NRBC is switched off: it is not collected. The data team confirmed that the Labcorp *CBC, Platelet, No Differential* reports returned to AI-READI do not include NRBC, and that no REDCap field will be added ("We do not collect data for NRBC. This value is not provided in the reports returned to us from LabCorp."). A redacted Labcorp report (UAB) lists exactly 9 results: WBC, RBC, hemoglobin, hematocrit, MCV, MCH, MCHC, RDW and platelets. Two rows are edited in place, so every line number is the same as in v1.8. No concept changes; the ETL is not affected (the field matches no data).
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ repository-code: "https://github.com/AI-READI/DataElementMaps"
repository-artifact: "https://github.com/AI-READI/DataElementMaps/blob/main/manuscript-tvst2026/ai_readi_redcap_value_set_mapping_common.csv"
url: "https://aireadi.org"
license: MIT
version: "v1.8.1"
date-released: "2026-10-26"
version: "v1.8.2"
date-released: "2026-10-27"
identifiers:
- type: doi
value: "10.5281/zenodo.23375723"
Expand Down
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"codeRepository": "https://github.com/AI-READI/DataElementMaps",
"downloadUrl": "https://github.com/AI-READI/DataElementMaps",
"issueTracker": "https://github.com/AI-READI/DataElementMaps/issues",
"version": "v1.8.1",
"datePublished": "2026-10-26",
"version": "v1.8.2",
"datePublished": "2026-10-27",
"releaseNotes": "Concept map v1.6: maps the A/G ratio, BUN/creatinine ratio (stored as creatinine/BUN), BMI and waist circumference to standard LOINC concepts, adds the unit ratio for the three ratio fields, and excludes the leftover answers of two removed questions. ETL re-run required. See CHANGELOG.md.",
"dateCreated": "2023-06-28",
"dateModified": "2026-10-26",
"dateModified": "2026-10-27",
"applicationCategory": "Scientific",
"developmentStatus": "active",
"isPartOf": "https://aireadi.org/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45808,15 +45808,15 @@ mappings:
field_type: text
field_id: import_bun_creatinine_ratio
question_or_answer: Question
src_code: 31045-8
src_code_id: Creatinine/BUN ratio
src_cd_description: Creatinine/BUN ratio
target_concept_id: 3033837
target_concept_name: Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma
src_code: 3097-3
src_code_id: BUN/Creatinine ratio
src_cd_description: BUN/Creatinine ratio
target_concept_id: 3018311
target_concept_name: Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma
target_domain_id: Measurement
target_vocabulary_id: LOINC
target_concept_class_id: Lab Test
target_concept_code: 31045-8
target_concept_code: 3097-3
target_standard_concept: S
predicate_id: skos:exactMatch
confidence: 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3226,7 +3226,7 @@ Added,10/24/2026,Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osr,,Answe
Added,10/24/2026,Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm1,,Answer,1,rttr_osm1_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye,,
Added,10/24/2026,Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm2,,Answer,1,rttr_osm2_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye,,
Added,10/24/2026,Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rtfl_os,,Answer,1,rtfl_os_1,Yes,4063911,,Ocular fundus photography,Procedure,SNOMED,Procedure,20067007,S,skos:closeMatch,0.75,left eye|45888270,,45888270,Left eye,,
Added,10/24/2026,Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,31045-8,Creatinine/BUN ratio,Creatinine/BUN ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,,,,,,
Changed,10/27/2026,Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,3097-3,BUN/Creatinine ratio,BUN/Creatinine ratio,3018311,,Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,3097-3,S,skos:exactMatch,1,,,,,,
Added,10/24/2026,Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio_u,,Unit,ratio,import_bun_creatinine_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,,,,
Changed,10/26/2026,No,No,open-source,No,lab_results,text,,,Question,lbscat_nrbc,,NRBC - %,40761514,,Nucleated erythrocytes/Leukocytes [Ratio] in Blood by Automated count,Measurement,LOINC,Lab Test,58413-6,S,skos:exactMatch,1,,,,,,
Changed,10/26/2026,No,No,open-source,No,lab_results,text,lbscat_nrbc_u,,Unit,%,lbscat_nrbc_u,percent,8554,,percent,Unit,UCUM,Unit,%,S,skos:exactMatch,1,fixed unit; no REDCap unit field,,,,,
Expand Down
12 changes: 6 additions & 6 deletions redCapDataDictionaryWithExtension/scripts/count_concept_map.sql
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ FROM rows
ORDER BY CASE category
WHEN 'Standard' THEN 1 WHEN 'Custom' THEN 2 WHEN 'Mapped total' THEN 3
WHEN 'Designated but unmapped' THEN 4 WHEN 'Not designated' THEN 5 ELSE 6 END;
-- Expected (v1.8.1): Standard 1,515 (52.1%) / 399; Custom 489 (16.8%) / 342;
-- Mapped 2,004 (69.0%) / 741; Designated-unmapped 138 (4.7%);
-- Expected (v1.8.2): Standard 1,515 (52.1%) / 400; Custom 489 (16.8%) / 342;
-- Mapped 2,004 (69.0%) / 742; Designated-unmapped 138 (4.7%);
-- Not designated 764 (26.3%); Total 2,906.

-- 2. Elements and distinct concepts by vocabulary ----------------------------------
Expand All @@ -134,7 +134,7 @@ FROM mapping_classified
WHERE mapping_category IN ('Standard','Custom')
GROUP BY mapping_category, TARGET_VOCABULARY_ID
ORDER BY mapping_category DESC, elements DESC;
-- Expected (v1.8.1): LOINC 1,190/276; SNOMED 171/74; UCUM 132/40; CPT4 12/1; PPI 5/5;
-- Expected (v1.8.2): LOINC 1,190/277; SNOMED 171/74; UCUM 132/40; CPT4 12/1; PPI 5/5;
-- Ethnicity 4/2; OMOP Extension 1/1; AIREADI 390/265; AIREADI-Vision 69/47; AIREADI-MOCA 30/30.

-- 3. Designated-but-unmapped breakdown -------------------------------------------------
Expand All @@ -143,7 +143,7 @@ FROM mapping_classified
WHERE mapping_category = 'Designated but unmapped'
GROUP BY unmapped_reason
ORDER BY n DESC;
-- Expected (v1.8.1): reference range 46; survey timestamp 34; superseded unit row 20; specimen handling 12;
-- Expected (v1.8.2): reference range 46; survey timestamp 34; superseded unit row 20; specimen handling 12;
-- BCVA 10; answer to an excluded question 7; no matching concept 5; not collected (NRBC) 2;
-- REDCap administrative 1; MoCA paper flag 1 (total 138).

Expand All @@ -156,9 +156,9 @@ FROM mapping_classified
WHERE mapping_category IN ('Standard','Custom')
GROUP BY mapping_category, PREDICATE_ID, CONFIDENCE
ORDER BY mapping_category DESC, PREDICATE_ID, CONFIDENCE DESC;
-- Expected (v1.8.1, standard): exact 1,255; close 258 (170 at 1, 88 at 0.75); related 2;
-- Expected (v1.8.2, standard): exact 1,255; close 258 (170 at 1, 88 at 0.75); related 2;
-- confidence 1 = 1,425; 0.75 = 89; 0.5 = 1.
-- Expected (v1.8.1, custom): all 489 exact match at confidence 1.
-- Expected (v1.8.2, custom): all 489 exact match at confidence 1.

-- 5. Laterality qualifiers ---------------------------------------------------------------
SELECT qualifier_concept_id, qualifier_source_value, COUNT(*) AS n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SELECT *,
TRY_CAST(TRIM(CAST(qualifier_concept_id AS STRING)) AS BIGINT) AS qid
FROM redcapsurveydb.ai_readi_redcap_value_set_mapping_common;

-- V0. Row count (v1.4 and v1.5: 2,076; v1.6: 2,079; v1.7: 2,127; v1.8 and v1.8.1: 2,142)
-- V0. Row count (v1.4 and v1.5: 2,076; v1.6: 2,079; v1.7: 2,127; v1.8 to v1.8.2: 2,142)
SELECT COUNT(*) AS n_rows FROM cmap;

-- V1. Standard (non-custom) targets missing from the vocabulary, not standard, or invalid. Expect 0 rows.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ AIREADI_REDCAP:retinal_imaging_v2.1.rttr_osr_1 Yes skos:exactMatch OMOP:1073298
AIREADI_REDCAP:retinal_imaging_v2.1.rttr_osm1_1 Yes skos:closeMatch OMOP:745759 Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography semapv:ManualMappingCuration 1 AI-READI REDCap CPT4 AI-READI manual_curation left eye|45888270 retinal_imaging_v2 yesno rttr_osm1 1 rttr_osm1_1 Answer 745759 Procedure CPT4 CPT4 92137 S No open-source Yes 45888270 Left eye
AIREADI_REDCAP:retinal_imaging_v2.1.rttr_osm2_1 Yes skos:closeMatch OMOP:745759 Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography semapv:ManualMappingCuration 1 AI-READI REDCap CPT4 AI-READI manual_curation left eye|45888270 retinal_imaging_v2 yesno rttr_osm2 1 rttr_osm2_1 Answer 745759 Procedure CPT4 CPT4 92137 S No open-source Yes 45888270 Left eye
AIREADI_REDCAP:retinal_imaging_v2.1.rtfl_os_1 Yes skos:closeMatch OMOP:4063911 Ocular fundus photography semapv:ManualMappingCuration 0.75 AI-READI REDCap SNOMED AI-READI manual_curation left eye|45888270 retinal_imaging_v2 yesno rtfl_os 1 rtfl_os_1 Answer 4063911 Procedure SNOMED Procedure 20067007 S No open-source Yes 45888270 Left eye
AIREADI_REDCAP:imported.31045-8.Creatinine_BUN_ratio Creatinine/BUN ratio skos:exactMatch OMOP:3033837 Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_bun_creatinine_ratio 31045-8 Creatinine/BUN ratio Question 3033837 Measurement LOINC Lab Test 31045-8 S No open-source Yes
AIREADI_REDCAP:imported.3097-3.BUN_Creatinine_ratio BUN/Creatinine ratio skos:exactMatch OMOP:3018311 Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_bun_creatinine_ratio 3097-3 BUN/Creatinine ratio Question 3018311 Measurement LOINC Lab Test 3097-3 S No open-source Yes
AIREADI_REDCAP:imported.ratio.import_bun_creatinine_ratio_u ratio skos:exactMatch OMOP:8523 ratio semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field imported text import_bun_creatinine_ratio_u ratio import_bun_creatinine_ratio_u Unit 8523 Unit UCUM Unit {ratio} S No open-source Yes
AIREADI_REDCAP:lab_results.lbscat_nrbc NRBC - % skos:exactMatch OMOP:40761514 Nucleated erythrocytes/Leukocytes [Ratio] in Blood by Automated count semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation lab_results text lbscat_nrbc Question 40761514 Measurement LOINC Lab Test 58413-6 S No open-source No
AIREADI_REDCAP:lab_results.missing.lbscat_nrbc_u percent skos:exactMatch OMOP:8554 percent semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field lab_results text lbscat_nrbc_u % lbscat_nrbc_u Unit 8554 Unit UCUM Unit % S No open-source No
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ curie_map:
semapv: https://w3id.org/semapv/vocab/
subject_source: AI-READI REDCap
object_source: OMOP Standardized Vocabularies
mapping_date: '2026-10-26'
mapping_date: '2026-10-27'
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osr,,Answer,1,rttr_osr_1,Ye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm1,,Answer,1,rttr_osm1_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm2,,Answer,1,rttr_osm2_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rtfl_os,,Answer,1,rtfl_os_1,Yes,4063911,,Ocular fundus photography,Procedure,SNOMED,Procedure,20067007,S,skos:closeMatch,0.75,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,31045-8,Creatinine/BUN ratio,Creatinine/BUN ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,,,,
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,3097-3,BUN/Creatinine ratio,BUN/Creatinine ratio,3018311,,Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,3097-3,S,skos:exactMatch,1,,,,
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio_u,,Unit,ratio,import_bun_creatinine_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,,
No,No,open-source,No,lab_results,text,,,Question,lbscat_nrbc,,NRBC - %,40761514,,Nucleated erythrocytes/Leukocytes [Ratio] in Blood by Automated count,Measurement,LOINC,Lab Test,58413-6,S,skos:exactMatch,1,,,,
No,No,open-source,No,lab_results,text,lbscat_nrbc_u,,Unit,%,lbscat_nrbc_u,percent,8554,,percent,Unit,UCUM,Unit,%,S,skos:exactMatch,1,fixed unit; no REDCap unit field,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,7 @@ Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osr,,Answer,1,rttr_osr_1,Ye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm1,,Answer,1,rttr_osm1_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm2,,Answer,1,rttr_osm2_1,Yes,745759,,"Computerized ophthalmic diagnostic imaging (eg, optical coherence tomography [OCT]), posterior segment, with interpretation and report, unilateral or bilateral; retina, including OCT angiography",Procedure,CPT4,CPT4,92137,S,skos:closeMatch,1,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rtfl_os,,Answer,1,rtfl_os_1,Yes,4063911,,Ocular fundus photography,Procedure,SNOMED,Procedure,20067007,S,skos:closeMatch,0.75,left eye|45888270,,45888270,Left eye
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,31045-8,Creatinine/BUN ratio,Creatinine/BUN ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,,,,
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio,,Question,3097-3,BUN/Creatinine ratio,BUN/Creatinine ratio,3018311,,Urea nitrogen/Creatinine [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,3097-3,S,skos:exactMatch,1,,,,
Yes,Yes,open-source,No,imported,text,import_bun_creatinine_ratio_u,,Unit,ratio,import_bun_creatinine_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,,
Yes,Yes,protected,No,current_medications,dropdown,cmdosu,,Answer,19,cmdosu_19,Milligram per Gram (mg/g),8723,,milligram per gram,Unit,UCUM,Unit,mg/g,S,skos:exactMatch,1,,,,
Yes,Yes,protected,No,current_medications,dropdown,cmdosu,,Answer,20,cmdosu_20,Milligram per Milliliter (mg/mL),8861,,milligram per milliliter,Unit,UCUM,Unit,mg/mL,S,skos:exactMatch,1,,,,
Expand Down
Loading
Loading