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
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

## [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).

### Changed — Map_to_OMOP

- `lbscat_nrbc` (line 2127, → 40761514) and its unit row `lbscat_nrbc_u` (line 2128, → 8554): `Map_to_OMOP` Yes → No and `transferred_to_fairhub_REDCap_dataset` Yes → No, so the transferred rows match the fields FAIRhub receives. The rows are kept (as for the superseded MoCA unit rows); the v1.7 note under *Added — NRBC* is superseded.

### Reviewed and not changed — CBC LOINC codes

The 9 CBC fields on the report map to the Labcorp test 028142 LOINC codes (v1.7), all standard Measurement concepts confirmed in `omop_vocab`, exactMatch 1; the report units match the unit rows (lines 2032–2040; the report writes "uL" for "µL").

| Line | Field | LOINC | Concept |
|---|---|---|---|
| 672 | `lbscat_wbc` WBC (x10E3/µL) | 6690-2 | 3000905 *Leukocytes [#/volume] in Blood by Automated count* |
| 673 | `lbscat_rbc` RBC (x10E6/µL) | 789-8 | 3020416 *Erythrocytes [#/volume] in Blood by Automated count* |
| 674 | `lbscat_a1c` Hemoglobin (g/dL) | 718-7 | 3000963 *Hemoglobin [Mass/volume] in Blood* |
| 675 | `lbscat_hct` Hematocrit (%) | 4544-3 | 3023314 *Hematocrit [Volume Fraction] of Blood by Automated count* |
| 676 | `lbscat_mcv` MCV (fL) | 787-2 | 3023599 *MCV [Entitic mean volume] in Red Blood Cells by Automated count* |
| 677 | `lbscat_mch` MCH (pg) | 785-6 | 3012030 *MCH [Entitic mass] by Automated count* |
| 678 | `lbscat_mchc` MCHC (g/dL) | 786-4 | 3009744 *MCHC [Entitic Mass/volume] in Red Blood Cells by Automated count* |
| 679 | `lbscat_rdw` RDW (%) | 788-0 | 3019897 *Erythrocyte [DistWidth] in Red Blood Cells by Automated count* |
| 680 | `lbscat_plt` Platelets (x10E3/µL) | 777-3 | 3024929 *Platelets [#/volume] in Blood by Automated count* |

### Changed — scripts

- `unit_concept_lookup.csv`: 114 rows (field 89, string 25); `lbscat_nrbc` removed.
- `01_create_unit_lookup.sql`: uses only `Map_to_OMOP` = Yes rows, so a switched-off unit row never enters the lookup (the result equals the CSV). Row counts updated in `01a_`, `02_`, the scripts' README and USAGE.
- `count_concept_map.sql`: the two NRBC rows are reported as designated-but-unmapped, "Not collected (NRBC)"; expected values updated to v1.8.1. `validate_concept_map_vocab.sql`: V0 comment (2,142 rows, unchanged).

### Changed — master REDCap data dictionary

- The two NRBC rows (master records 3138–3139) take the new values; `Origin` = Changed, `Date_of_Variable_Modification` 10/26/2026. Every concept map row still has a master row with the same values; 3,150 rows.

### 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.1 common file.
- Counts: standard 1,515 (399 concepts); custom 489 (342); mapped 2,004 (69.0%, 741 concepts); designated but unmapped 138 (+2 "Not collected (NRBC)"); not designated 764. LOINC 1,190/276; UCUM 132/40. Standard predicates: exact 1,255; close 258 (170 at 1, 88 at 0.75); related 2.

## [v1.8] - 2026-10-25

Corrections from the review of the concept map against the REDCap codebook (2026-10-25), checked against the delivered OMOP survey data, an ECG procedure row, four protected fields that had no row, and the master REDCap data dictionary brought in line with the concept map. 15 rows are appended at the end of the file (lines 2129–2143) and the other changes are in place, so every existing line number is the same as in v1.7. Concept IDs and names were confirmed in `omop_vocab`.
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"
date-released: "2026-10-25"
version: "v1.8.1"
date-released: "2026-10-26"
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",
"datePublished": "2026-10-25",
"version": "v1.8.1",
"datePublished": "2026-10-26",
"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-25",
"dateModified": "2026-10-26",
"applicationCategory": "Scientific",
"developmentStatus": "active",
"isPartOf": "https://aireadi.org/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45843,8 +45843,8 @@ mappings:
confidence: 1.0
modifier: fixed unit; no REDCap unit field
- mapping_record_id: AIREADI_MAPPING_2126
map_to_omop: 'Yes'
transferred_to_fairhub_redcap_dataset: 'Yes'
map_to_omop: 'No'
transferred_to_fairhub_redcap_dataset: 'No'
protected_or_open_source: open-source
extension_needed: 'No'
form_name: lab_results
Expand All @@ -45862,8 +45862,8 @@ mappings:
predicate_id: skos:exactMatch
confidence: 1.0
- mapping_record_id: AIREADI_MAPPING_2127
map_to_omop: 'Yes'
transferred_to_fairhub_redcap_dataset: 'Yes'
map_to_omop: 'No'
transferred_to_fairhub_redcap_dataset: 'No'
protected_or_open_source: open-source
extension_needed: 'No'
form_name: lab_results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3228,8 +3228,8 @@ Added,10/24/2026,Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm2,,Answ
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,,,,,,
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,,,,,
Added,10/24/2026,Yes,Yes,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,,,,,,
Added,10/24/2026,Yes,Yes,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,,,,,
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,,,,,
Added,10/25/2026,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,,,,,,
Added,10/25/2026,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,,,,,,
Added,10/25/2026,Yes,Yes,open-source,No,device_return,yesno,dvamwenyn,,Answer,1,dvamwenyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,,,,
Expand Down
22 changes: 13 additions & 9 deletions redCapDataDictionaryWithExtension/scripts/count_concept_map.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
-- * Unit rows switched off because a newer row replaces them (Map_to_OMOP = 'No',
-- the old MoCA *_time_unit / *_score_unit rows since v1.7) are reported as
-- designated-but-unmapped ("Superseded unit row").
-- * The NRBC rows (lbscat_nrbc, lbscat_nrbc_u; Map_to_OMOP = 'No' since v1.8.1: NRBC is not
-- collected) are reported as designated-but-unmapped ("Not collected (NRBC)").
-- * Answer rows switched off because the answer is not a REDCap choice (Map_to_OMOP = 'No',
-- answer 0 of susmkstoage, sualcage, suvptoyr since v1.8) are counted with
-- "Answer to an excluded question".
Expand Down Expand Up @@ -74,6 +76,8 @@ SELECT
THEN 'REDCap survey timestamp'
WHEN TRY_CAST(TARGET_CONCEPT_ID AS BIGINT) = 0 THEN 'No matching concept'
WHEN Map_to_OMOP <> 'Yes' AND SRC_CODE LIKE 'moca_paper%' THEN 'MoCA paper-administration flag'
WHEN Map_to_OMOP <> 'Yes' AND (SRC_CODE = 'lbscat_nrbc' OR FIELD_ID = 'lbscat_nrbc_u')
THEN 'Not collected (NRBC)'
WHEN Map_to_OMOP <> 'Yes' AND temp_Question_or_Answer = 'Answer'
THEN 'Answer to an excluded question'
WHEN Map_to_OMOP <> 'Yes' AND TARGET_DOMAIN_ID = 'Unit' THEN 'Superseded unit row'
Expand Down Expand Up @@ -117,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): Standard 1,517 (52.2%) / 400; Custom 489 (16.8%) / 342;
-- Mapped 2,006 (69.0%) / 742; Designated-unmapped 136 (4.7%);
-- 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%);
-- Not designated 764 (26.3%); Total 2,906.

-- 2. Elements and distinct concepts by vocabulary ----------------------------------
Expand All @@ -130,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): LOINC 1,191/277; SNOMED 171/74; UCUM 133/40; CPT4 12/1; PPI 5/5;
-- Expected (v1.8.1): LOINC 1,190/276; 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 @@ -139,9 +143,9 @@ FROM mapping_classified
WHERE mapping_category = 'Designated but unmapped'
GROUP BY unmapped_reason
ORDER BY n DESC;
-- Expected (v1.8): 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;
-- REDCap administrative 1; MoCA paper flag 1 (total 136).
-- Expected (v1.8.1): 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).

-- 4. Confidence and SKOS predicate distribution -----------------------------------------
SELECT mapping_category,
Expand All @@ -152,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, standard): exact 1,257; close 258 (170 at 1, 88 at 0.75); related 2;
-- confidence 1 = 1,427; 0.75 = 89; 0.5 = 1.
-- Expected (v1.8, custom): all 489 exact match at confidence 1.
-- Expected (v1.8.1, 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.

-- 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: 2,142)
-- 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)
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 @@ -2049,8 +2049,8 @@ AIREADI_REDCAP:retinal_imaging_v2.1.rttr_osm2_1 Yes skos:closeMatch OMOP:745759
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.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 Yes
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 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
AIREADI_REDCAP:current_medications.19.cmdosu_19 Milligram per Gram (mg/g) skos:exactMatch OMOP:8723 milligram per gram semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation current_medications dropdown cmdosu 19 cmdosu_19 Answer 8723 Unit UCUM Unit mg/g S No protected Yes
AIREADI_REDCAP:current_medications.20.cmdosu_20 Milligram per Milliliter (mg/mL) skos:exactMatch OMOP:8861 milligram per milliliter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation current_medications dropdown cmdosu 20 cmdosu_20 Answer 8861 Unit UCUM Unit mg/mL S No protected Yes
AIREADI_REDCAP:device_return.1.dvamwenyn_1 Yes skos:exactMatch OMOP:45877994 Yes semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation device_return yesno dvamwenyn 1 dvamwenyn_1 Answer 45877994 Meas Value LOINC Answer LA33-6 S No open-source Yes
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-25'
mapping_date: '2026-10-26'
Original file line number Diff line number Diff line change
Expand Up @@ -2124,8 +2124,8 @@ Yes,Yes,open-source,No,retinal_imaging_v2,yesno,rttr_osm2,,Answer,1,rttr_osm2_1,
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_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,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,,,,
Yes,Yes,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,,,
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,,,
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,,,,
Yes,Yes,open-source,No,device_return,yesno,dvamwenyn,,Answer,1,dvamwenyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,,
Expand Down
Loading
Loading