From c66c129c55ef0ac2671a998148f6a69518f8f910 Mon Sep 17 00:00:00 2001 From: "Stephanie S. Hong" Date: Thu, 22 Oct 2026 18:09:57 -0400 Subject: [PATCH] commit v1.6 labs and vitals to LOINC, ratio units, - Lines 584, 554, 858, 859: SNOMED -> LOINC (3020509, 3033837, 3038553, 3016258) - Line 554 mapped to creatinine/BUN as stored (REDCap calculation inverted) - Lines 2078-2080: ratio unit rows (8523); unit lookup now 113 rows; audit and count script updated; Lines 277-278, 730-731: Map_to_OMOP Yes -> No --- CHANGELOG.md | 39 ++++++ CITATION.cff | 4 +- codemeta.json | 8 +- ...i_readi_redcap_value_set_mapping_data.yaml | 118 ++++++++++++++---- ..._readi_redcap_value_set_mapping_summary.md | 18 +-- .../scripts/audit_concept_map.py | 7 +- .../scripts/count_concept_map.sql | 26 ++-- .../scripts/validate_concept_map_vocab.sql | 1 + ...i_readi_redcap_value_set_mapping.sssom.tsv | 11 +- ..._readi_redcap_value_set_mapping.sssom.yaml | 2 +- ...i_redcap_value_set_mapping_sssom_README.md | 4 +- ..._readi_redcap_value_set_mapping_common.csv | 19 +-- ...dcap_value_set_mapping_common_map2omop.csv | 15 ++- ...ng_map2omop_open_source_public_version.csv | 15 ++- .../scripts/01_create_unit_lookup.sql | 4 +- .../01a_load_unit_concept_lookup_csv.sql | 4 +- .../scripts/02_view_unit_lookup.sql | 4 +- .../scripts/README.md | 11 +- .../value-set-mapping-common/scripts/USAGE.md | 6 +- .../scripts/unit_concept_lookup.csv | 3 + 20 files changed, 221 insertions(+), 98 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f42e4c..944c954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [v1.6] - 2026-10-22 + +Lab and vital-sign measurements moved from SNOMED to standard LOINC concepts, unit rows added for the three ratio fields, and the leftover answers of two removed questions excluded. Target concepts change on 4 rows, `Map_to_OMOP` on 4 rows, and 3 unit rows are appended, so the ETL must be re-run to apply these changes. Edits to existing rows are in place and the new rows are appended at the end (lines 2078–2080), so every existing line number is the same as in v1.5. Concept IDs and names were confirmed in the deployed OMOP vocabulary (Databricks `omop_vocab`). + +### Changed — target concept (SNOMED → LOINC) + +- `import_ag_ratio` "A/G Ratio (calculated field)" (line 584): 4288601 *Albumin/Globulin ratio* (SNOMED 687005) → 3020509 *Albumin/Globulin [Mass Ratio] in Serum or Plasma* (LOINC 1759-0, Lab Test), exactMatch 1. Every other imported lab already maps to a LOINC lab test. Current OMOP data: 3,984 values, median 1.72. +- `import_buncreatinineratio` "BUN/Creatinine ratio" (line 554): 4112223 *BUN/Creatinine ratio* (SNOMED 18207002) → **3033837 *Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma*** (LOINC 31045-8, Lab Test), exactMatch 1. The REDCap calculated field stores **creatinine ÷ BUN**, the inverse of its label: compared with each person's own BUN and creatinine on the same date, all 3,981 values in the current OMOP data match creatinine ÷ BUN (median 0.053; BUN ÷ creatinine would be 18.75). The row is mapped to what is stored, with `MODIFIER` "Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 (LOINC 3097-3) when the REDCap formula and values are corrected". `SRC_CD_DESCRIPTION` keeps the REDCap label. The data team has been asked to correct the formula. +- `bmi_vsorres` "BMI" (line 858): 4245997 *Body mass index* (SNOMED 60621009) → 3038553 *Body mass index (BMI) [Ratio]* (LOINC 39156-5), exactMatch 1, the standard BMI concept used in OHDSI phenotypes. +- `waist_vsorres` "Waist Circumference (cm)" (line 859): 4172830 *Waist circumference* (SNOMED 276361009) → 3016258 *Waist Circumference at umbilicus by Tape measure* (LOINC 8280-0), closeMatch 1. Measurement at the umbilicus with a tape measure is accepted for AI-READI; closeMatch because the site is not stated on the form. +- Kept on SNOMED: hip circumference (line 860; LOINC has only a protocol term, 62409-8) and waist/hip ratio (line 861; no LOINC term). + +### Added — units + +- Fixed-unit rows for the three ratio fields, same format as the v1.4 fixed-unit rows (`MODIFIER` "fixed unit; no REDCap unit field"): `import_ag_ratio_u` (line 2078), `whr_vsorres_u` (line 2079) and `import_buncreatinineratio_u` (line 2080) → 8523 *ratio* (UCUM `{ratio}`). A ratio of two values in the same unit is dimensionless; the unit is the same whichever way the BUN/creatinine ratio is calculated. v1.4 had left these fields without a unit. +- `unit_concept_lookup.csv` (and `01_create_unit_lookup.sql`): 113 rows (field 88, string 25), up from 110; row counts updated in the scripts' README, USAGE and SQL comments. + +### Changed — Map_to_OMOP + +- `dri3` "Driver's License photocopied" answers (lines 277–278) and `cmotyn` "Are there any other medications that you are currently taking that are not included here?" answers (lines 730–731): `Map_to_OMOP` Yes → No. In the master REDCap dictionary the `dri3` question was deleted (6/27/2023) and the `cmotyn` question was excluded from mapping (4/25/2024), but their Yes/No answer rows had been left as Yes. Neither field appears in the current OMOP survey data. map2omop and the open-source public file each lose these 4 rows. + +### Changed — scripts + +- `count_concept_map.sql`: answer rows of an excluded question (`Map_to_OMOP` = No) are reported as designated-but-unmapped with the reason "Answer to an excluded question"; expected values updated to v1.6. +- `audit_concept_map.py` (check A8) and `validate_concept_map_vocab.sql` (check V9): answer rows already excluded (`Map_to_OMOP` = No) are no longer flagged. A8 now lists 3 rows (administrative BCVA "not done" and satisfaction-survey rows). + +### Regenerated + +- map2omop (2,074 rows) and open-source public (1,965) versions, SSSOM (2,003 rows; 76 incomplete) and LinkML (2,079 records) from the v1.6 common file. `medication_route_lookup.csv` checked against the map: unchanged. +- Counts (`run_counts.py`): standard 1,478 (392 concepts); custom 487 (342); mapped 1,965 (734 concepts); designated but unmapped 114. The 3 added unit rows lower "not designated" from 830 to 827 against the fixed total of 2,906. + +### Reviewed and not changed + +- LDL cholesterol (lines 537–538): the unit row `import_ldl_cholesterol_u` does not follow the `_u` pattern because the REDCap names differ: the data uses `import_ldl_cholesterol_calculation` (3,984 rows in the current OMOP data) and the REDCap unit field is `import_ldl_cholesterol_u`. The extra key in `unit_concept_lookup.csv` (and the UNION in `01_create_unit_lookup.sql`) is the documented exception. + +### Not yet included + +- CBC method codes: hematocrit (line 675) stays *by calculation* (20570-8, 3009542) unless the lab confirms it is measured directly (then 4544-3, 3023314); MCV, MCH, MCHC, RDW and platelets (676–680) may move to their "by Automated count" codes (3023599, 3012030, 3009744, 3019897, 3024929) once the lab confirms an automated analyzer. Waiting on the performing labs. + ## [v1.5] - 2026-10-19 - 10.5281/zenodo.23488128 Corrections from a full review of all 2,076 rows of v1.4 (the first review of the whole file; earlier releases reviewed only the rows in each batch of changes). Target concepts change on 10 rows, qualifier concepts on 2 rows and field names on 5 answer rows, so the ETL must be re-run to apply these changes. All edits are in place: no rows are added or removed, so every line number is the same as in v1.4. Concept IDs and names for the new standard concepts were confirmed in the deployed OMOP vocabulary (Databricks `omop_vocab`). diff --git a/CITATION.cff b/CITATION.cff index 238590e..7cc9d43 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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.5" -date-released: "2026-10-19" +version: "v1.6" +date-released: "2026-10-22" identifiers: - type: doi value: "10.5281/zenodo.23375723" diff --git a/codemeta.json b/codemeta.json index 068940b..5d441bc 100644 --- a/codemeta.json +++ b/codemeta.json @@ -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.5", - "datePublished": "2026-10-19", - "releaseNotes": "Concept map v1.5: maps stroke and kidney disease to standard SNOMED concepts, separates the 31-40 cigarettes-per-day answer from the LOINC \"31 or more\" answer (new custom concept 2005200636), maps \"less than once a week\" medication-use answers to LOINC LA27722-0, sets the medication route question to 0, cleans metadata, and adds release audit scripts. ETL re-run required. See CHANGELOG.md.", + "version": "v1.6", + "datePublished": "2026-10-22", + "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-19", + "dateModified": "2026-10-22", "applicationCategory": "Scientific", "developmentStatus": "active", "isPartOf": "https://aireadi.org/", diff --git a/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_data.yaml b/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_data.yaml index 00c7f9c..d1fc2a0 100644 --- a/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_data.yaml +++ b/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_data.yaml @@ -5827,7 +5827,7 @@ mappings: predicate_id: skos:exactMatch confidence: 1.0 - mapping_record_id: AIREADI_MAPPING_0276 - map_to_omop: 'Yes' + map_to_omop: 'No' transferred_to_fairhub_redcap_dataset: 'Yes' protected_or_open_source: open-source extension_needed: 'No' @@ -5849,7 +5849,7 @@ mappings: predicate_id: skos:exactMatch confidence: 1.0 - mapping_record_id: AIREADI_MAPPING_0277 - map_to_omop: 'Yes' + map_to_omop: 'No' transferred_to_fairhub_redcap_dataset: 'Yes' protected_or_open_source: open-source extension_needed: 'No' @@ -11627,15 +11627,17 @@ mappings: question_or_answer: Question src_code_id: BUN/Creatinine ratio src_cd_description: BUN/Creatinine ratio - target_concept_id: 4112223 - target_concept_name: BUN/Creatinine ratio + target_concept_id: 3033837 + target_concept_name: Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma target_domain_id: Measurement - target_vocabulary_id: SNOMED - target_concept_class_id: Procedure - target_concept_code: '18207002' + target_vocabulary_id: LOINC + target_concept_class_id: Lab Test + target_concept_code: 31045-8 target_standard_concept: S predicate_id: skos:exactMatch confidence: 1.0 + modifier: Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 + (LOINC 3097-3) when the REDCap formula and values are corrected - mapping_record_id: AIREADI_MAPPING_0554 map_to_omop: 'Yes' transferred_to_fairhub_redcap_dataset: 'Yes' @@ -12146,12 +12148,12 @@ mappings: question_or_answer: Question src_code_id: A/G Ratio (calculated field) src_cd_description: Albumin/Globulin ratio - target_concept_id: 4288601 - target_concept_name: Albumin/Globulin ratio + target_concept_id: 3020509 + target_concept_name: Albumin/Globulin [Mass Ratio] in Serum or Plasma target_domain_id: Measurement - target_vocabulary_id: SNOMED - target_concept_class_id: Procedure - target_concept_code: '687005' + target_vocabulary_id: LOINC + target_concept_class_id: Lab Test + target_concept_code: 1759-0 target_standard_concept: S predicate_id: skos:exactMatch confidence: 1.0 @@ -15019,7 +15021,7 @@ mappings: predicate_id: skos:exactMatch confidence: 1.0 - mapping_record_id: AIREADI_MAPPING_0729 - map_to_omop: 'Yes' + map_to_omop: 'No' transferred_to_fairhub_redcap_dataset: 'Yes' protected_or_open_source: open-source extension_needed: 'No' @@ -15041,7 +15043,7 @@ mappings: predicate_id: skos:exactMatch confidence: 1.0 - mapping_record_id: AIREADI_MAPPING_0730 - map_to_omop: 'Yes' + map_to_omop: 'No' transferred_to_fairhub_redcap_dataset: 'Yes' protected_or_open_source: open-source extension_needed: 'No' @@ -17856,12 +17858,12 @@ mappings: question_or_answer: Question src_code: bmi_vsorres src_cd_description: BMI - target_concept_id: 4245997 - target_concept_name: Body mass index + target_concept_id: 3038553 + target_concept_name: Body mass index (BMI) [Ratio] target_domain_id: Measurement - target_vocabulary_id: SNOMED - target_concept_class_id: Observable Entity - target_concept_code: '60621009' + target_vocabulary_id: LOINC + target_concept_class_id: Clinical Observation + target_concept_code: 39156-5 target_standard_concept: S predicate_id: skos:exactMatch confidence: 1.0 @@ -17876,14 +17878,14 @@ mappings: question_or_answer: Question src_code: waist_vsorres src_cd_description: Waist Circumference (cm) - target_concept_id: 4172830 - target_concept_name: Waist circumference + target_concept_id: 3016258 + target_concept_name: Waist Circumference at umbilicus by Tape measure target_domain_id: Measurement - target_vocabulary_id: SNOMED - target_concept_class_id: Observable Entity - target_concept_code: '276361009' + target_vocabulary_id: LOINC + target_concept_class_id: Clinical Observation + target_concept_code: 8280-0 target_standard_concept: S - predicate_id: skos:exactMatch + predicate_id: skos:closeMatch confidence: 1.0 - mapping_record_id: AIREADI_MAPPING_0859 map_to_omop: 'Yes' @@ -44604,3 +44606,69 @@ mappings: predicate_id: skos:exactMatch confidence: 1.0 modifier: fixed unit; no REDCap unit field +- mapping_record_id: AIREADI_MAPPING_2077 + map_to_omop: 'Yes' + transferred_to_fairhub_redcap_dataset: 'Yes' + protected_or_open_source: open-source + extension_needed: 'No' + form_name: imported + field_type: text + field_id: import_ag_ratio_u + question_or_answer: Unit + src_code: ratio + src_code_id: import_ag_ratio_u + src_cd_description: ratio + target_concept_id: 8523 + target_concept_name: ratio + target_domain_id: Unit + target_vocabulary_id: UCUM + target_concept_class_id: Unit + target_concept_code: '{ratio}' + target_standard_concept: S + predicate_id: skos:exactMatch + confidence: 1.0 + modifier: fixed unit; no REDCap unit field +- mapping_record_id: AIREADI_MAPPING_2078 + map_to_omop: 'Yes' + transferred_to_fairhub_redcap_dataset: 'Yes' + protected_or_open_source: open-source + extension_needed: 'No' + form_name: physical_assessment + field_type: text + field_id: whr_vsorres_u + question_or_answer: Unit + src_code: ratio + src_code_id: whr_vsorres_u + src_cd_description: ratio + target_concept_id: 8523 + target_concept_name: ratio + target_domain_id: Unit + target_vocabulary_id: UCUM + target_concept_class_id: Unit + target_concept_code: '{ratio}' + target_standard_concept: S + predicate_id: skos:exactMatch + confidence: 1.0 + modifier: fixed unit; no REDCap unit field +- mapping_record_id: AIREADI_MAPPING_2079 + map_to_omop: 'Yes' + transferred_to_fairhub_redcap_dataset: 'Yes' + protected_or_open_source: open-source + extension_needed: 'No' + form_name: imported + field_type: text + field_id: import_buncreatinineratio_u + question_or_answer: Unit + src_code: ratio + src_code_id: import_buncreatinineratio_u + src_cd_description: ratio + target_concept_id: 8523 + target_concept_name: ratio + target_domain_id: Unit + target_vocabulary_id: UCUM + target_concept_class_id: Unit + target_concept_code: '{ratio}' + target_standard_concept: S + predicate_id: skos:exactMatch + confidence: 1.0 + modifier: fixed unit; no REDCap unit field diff --git a/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_summary.md b/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_summary.md index d290279..2e15da6 100644 --- a/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_summary.md +++ b/redCapDataDictionaryWithExtension/linkml/ai_readi_redcap_value_set_mapping_summary.md @@ -1,7 +1,7 @@ # AI-READI REDCap Value Set Mapping LinkML Conversion Summary - Source file: `_ai_readi_redcap_value_set_mapping_common.csv` -- Rows converted: 2076 +- Rows converted: 2079 - Source columns: 26 ## Generated files @@ -12,7 +12,7 @@ ### FORM_NAME - px_racial_ethnic_discrimination_survey: 364 - px_sdoh_combined_survey: 267 -- imported: 203 +- imported: 205 - health_survey: 174 - retinal_imaging_v2: 133 - px_neighborhood_environment_survey: 126 @@ -24,7 +24,7 @@ ### TARGET_DOMAIN_ID - Meas Value: 1231 - Observation: 439 -- Unit: 145 +- Unit: 148 - Measurement: 114 - [blank]: 76 - Condition: 32 @@ -34,10 +34,10 @@ - Device: 1 ### TARGET_VOCABULARY_ID -- LOINC: 1183 +- LOINC: 1187 - AIREADI: 422 -- UCUM: 145 -- SNOMED: 141 +- UCUM: 148 +- SNOMED: 137 - [blank]: 76 - AIREADI-Vision: 69 - AIREADI-MOCA: 30 @@ -46,12 +46,12 @@ - OMOP Extension: 1 ### PREDICATE_ID -- skos:exactMatch: 1734 -- skos:closeMatch: 264 +- skos:exactMatch: 1736 +- skos:closeMatch: 265 - [blank]: 76 - skos:relatedMatch: 2 ### Extension_Needed -- No: 1554 +- No: 1557 - Yes: 521 - [blank]: 1 diff --git a/redCapDataDictionaryWithExtension/scripts/audit_concept_map.py b/redCapDataDictionaryWithExtension/scripts/audit_concept_map.py index 3ea1c8c..f10a2be 100644 --- a/redCapDataDictionaryWithExtension/scripts/audit_concept_map.py +++ b/redCapDataDictionaryWithExtension/scripts/audit_concept_map.py @@ -12,8 +12,8 @@ A6 Leading/trailing spaces or non-breaking spaces in key columns A7 Custom concept used as a Condition/answer target where a review is due (lists every custom Condition target; check whether a standard concept exists) - A8 Answer rows whose FIELD_ID matches no question row (a field-name typo stops the - ETL from linking the answers; e.g. pxne9_ and pxrd9 before v1.5) + A8 Answer rows (Map_to_OMOP = Yes) whose FIELD_ID matches no question row (a field-name + typo stops the ETL from linking the answers; e.g. pxne9_ and pxrd9 before v1.5) Part B - review lists (read every row; nothing here is automatically wrong): B1 Answer rows whose source text differs from the target concept name @@ -218,7 +218,8 @@ def audit(rows, cm, out, label): # A8 qcodes = {r["SRC_CODE"] for r in rows if r["temp_Question_or_Answer"] == "Question"} a8 = [(r["_ln"], r["FORM_NAME"], r["FIELD_ID"], r["SRC_CODE"], r["SRC_CD_DESCRIPTION"][:60], r["TARGET_CONCEPT_ID"]) - for r in rows if r["temp_Question_or_Answer"] == "Answer" and r["FIELD_ID"] not in qcodes] + for r in rows if r["temp_Question_or_Answer"] == "Answer" and r["FIELD_ID"] not in qcodes + and r.get("Map_to_OMOP", "Yes") == "Yes"] # rows already excluded (Map_to_OMOP = No) are not flagged sections.append(("A8 Answers whose FIELD_ID matches no question row (field-name typos; administrative fields expected)", ["Line", "Form", "FIELD_ID", "SRC_CODE", "Source text", "Concept"], a8, False)) diff --git a/redCapDataDictionaryWithExtension/scripts/count_concept_map.sql b/redCapDataDictionaryWithExtension/scripts/count_concept_map.sql index 76712f8..5b355ea 100644 --- a/redCapDataDictionaryWithExtension/scripts/count_concept_map.sql +++ b/redCapDataDictionaryWithExtension/scripts/count_concept_map.sql @@ -30,7 +30,9 @@ -- (custom concepts 2005200558 "Survey Started Timestamp" and -- 2005200559 "Survey Completed Timestamp"); these are REDCap system -- metadata, not survey content, and are reported as designated-but-unmapped. --- * Not designated (830) = REDCap data elements in the curated dictionary +-- * Answer rows whose question was excluded or deleted (Map_to_OMOP = 'No', +-- e.g. dri3, cmotyn since v1.6) are reported as designated-but-unmapped. +-- * Not designated (827 in v1.6) = REDCap data elements in the curated dictionary -- (2,906) that are not rows in this mapping file. -- ============================================================================= @@ -63,6 +65,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 temp_Question_or_Answer = 'Answer' + THEN 'Answer to an excluded question' WHEN NULLIF(TRIM(TARGET_CONCEPT_ID), '') IS NOT NULL THEN NULL WHEN FIELD_ID LIKE 'import\_%\_min%' ESCAPE '\' OR FIELD_ID LIKE 'import\_%\_max%' ESCAPE '\' THEN 'Laboratory reference range' @@ -103,9 +107,9 @@ 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.5): Standard 1,479 (50.9%) / 391; Custom 487 (16.8%) / 342; --- Mapped 1,966 (67.7%) / 733; Designated-unmapped 110 (3.8%); --- Not designated 830 (28.6%); Total 2,906. +-- Expected (v1.6): Standard 1,478 (50.9%) / 392; Custom 487 (16.8%) / 342; +-- Mapped 1,965 (67.6%) / 734; Designated-unmapped 114 (3.9%); +-- Not designated 827 (28.5%); Total 2,906. -- 2. Elements and distinct concepts by vocabulary ---------------------------------- SELECT mapping_category, @@ -116,7 +120,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.5): LOINC 1,183/271; UCUM 145/37; SNOMED 141/75; PPI 5/5; Ethnicity 4/2; +-- Expected (v1.6): LOINC 1,183/275; UCUM 148/38; SNOMED 137/71; PPI 5/5; Ethnicity 4/2; -- OMOP Extension 1/1; AIREADI 388/265; AIREADI-Vision 69/47; AIREADI-MOCA 30/30. -- 3. Designated-but-unmapped breakdown ------------------------------------------------- @@ -125,9 +129,9 @@ FROM mapping_classified WHERE mapping_category = 'Designated but unmapped' GROUP BY unmapped_reason ORDER BY n DESC; --- Expected (v1.5): reference range 46; survey timestamp 34; specimen handling 12; --- BCVA 10; no matching concept 6; REDCap administrative 1; MoCA paper flag 1 --- (total 110). +-- Expected (v1.6): reference range 46; survey timestamp 34; specimen handling 12; +-- BCVA 10; no matching concept 6; answer to an excluded question 4; +-- REDCap administrative 1; MoCA paper flag 1 (total 114). -- 4. Confidence and SKOS predicate distribution ----------------------------------------- SELECT mapping_category, @@ -138,9 +142,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.5, standard): exact 1,241; close 236 (155 at 1, 81 at 0.75); related 2; --- confidence 1 = 1,396; 0.75 = 82; 0.5 = 1. --- Expected (v1.5, custom): all 487 exact match at confidence 1. +-- Expected (v1.6, standard): exact 1,239; close 237 (156 at 1, 81 at 0.75); related 2; +-- confidence 1 = 1,395; 0.75 = 82; 0.5 = 1. +-- Expected (v1.6, custom): all 487 exact match at confidence 1. -- 5. Laterality qualifiers --------------------------------------------------------------- SELECT qualifier_concept_id, qualifier_source_value, COUNT(*) AS n diff --git a/redCapDataDictionaryWithExtension/scripts/validate_concept_map_vocab.sql b/redCapDataDictionaryWithExtension/scripts/validate_concept_map_vocab.sql index 132b9c9..920f51a 100644 --- a/redCapDataDictionaryWithExtension/scripts/validate_concept_map_vocab.sql +++ b/redCapDataDictionaryWithExtension/scripts/validate_concept_map_vocab.sql @@ -229,4 +229,5 @@ SELECT a.FORM_NAME, a.FIELD_ID, a.SRC_CODE, a.SRC_CD_DESCRIPTION, a.tid FROM cmap a LEFT JOIN cmap q ON TRIM(q.temp_Question_or_Answer) = 'Question' AND TRIM(CAST(q.SRC_CODE AS STRING)) = TRIM(a.FIELD_ID) WHERE TRIM(a.temp_Question_or_Answer) = 'Answer' AND q.SRC_CODE IS NULL + AND TRIM(CAST(a.Map_to_OMOP AS STRING)) = 'Yes' ORDER BY a.FIELD_ID, a.SRC_CODE; diff --git a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.tsv b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.tsv index 8d21465..c5315d9 100644 --- a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.tsv +++ b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.tsv @@ -509,7 +509,7 @@ AIREADI_REDCAP:imported.3094-0.BUN Urea nitrogen [Mass/volume] in Serum or Plasm AIREADI_REDCAP:imported.mg_dL.import_bun_u milligram per deciliter skos:exactMatch OMOP:8840 milligram per deciliter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation imported text import_bun_u 2953 mg/dL import_bun_u Unit 8840 Unit UCUM Unit mg/dL S No open-source Yes AIREADI_REDCAP:imported.2160-0.Creatinine Creatinine [Mass/volume] in Serum or Plasma skos:exactMatch OMOP:3016723 Creatinine [Mass/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_creatinine 2956 2160-0 Creatinine Question 3016723 Measurement LOINC Lab Test 2160-0 S No open-source Yes AIREADI_REDCAP:imported.mg_dL.import_creatinine_u milligram per deciliter skos:exactMatch OMOP:8840 milligram per deciliter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation imported text import_creatinine_u 2957 mg/dL import_creatinine_u Unit 8840 Unit UCUM Unit mg/dL S No open-source Yes -AIREADI_REDCAP:imported.import_buncreatinineratio.BUN_Creatinine_ratio BUN/Creatinine ratio skos:exactMatch OMOP:4112223 BUN/Creatinine ratio semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation imported text import_buncreatinineratio 2960 BUN/Creatinine ratio Question 4112223 Measurement SNOMED Procedure 18207002 S No open-source Yes +AIREADI_REDCAP:imported.import_buncreatinineratio.BUN_Creatinine_ratio BUN/Creatinine 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 Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 (LOINC 3097-3) when the REDCap formula and values are corrected imported text import_buncreatinineratio 2960 BUN/Creatinine ratio Question 3033837 Measurement LOINC Lab Test 31045-8 S No open-source Yes AIREADI_REDCAP:imported.2951-2.Sodium Sodium [Moles/volume] in Serum or Plasma skos:exactMatch OMOP:3019550 Sodium [Moles/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_sodium 2961 2951-2 Sodium Question 3019550 Measurement LOINC Lab Test 2951-2 S No open-source Yes AIREADI_REDCAP:imported.mEq_L.import_sodium_u milliequivalent per liter skos:exactMatch OMOP:9557 milliequivalent per liter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation imported text import_sodium_u 2962 mEq/L import_sodium_u Unit 9557 Unit UCUM Unit 10*-3.eq/L S No open-source Yes AIREADI_REDCAP:imported.2823-3.Potassium Potassium [Moles/volume] in Serum or Plasma skos:exactMatch OMOP:3023103 Potassium [Moles/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_potassium 2965 2823-3 Potassium Question 3023103 Measurement LOINC Lab Test 2823-3 S No open-source Yes @@ -525,7 +525,7 @@ AIREADI_REDCAP:imported.g_dL.import_protein_total_u gram per deciliter skos:exac AIREADI_REDCAP:imported.1751-7.Albumin Albumin [Mass/volume] in Serum or Plasma skos:exactMatch OMOP:3024561 Albumin [Mass/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_albumin 2985 1751-7 Albumin Question 3024561 Measurement LOINC Lab Test 1751-7 S No open-source Yes AIREADI_REDCAP:imported.g_dL.import_albumin_u gram per deciliter skos:exactMatch OMOP:8713 gram per deciliter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation imported text import_albumin_u 2986 g/dL import_albumin_u Unit 8713 Unit UCUM Unit g/dL S No open-source Yes AIREADI_REDCAP:imported.2336-6.Globulin_total_calculated_field Globulin [Mass/volume] in Serum skos:exactMatch OMOP:3021886 Globulin [Mass/volume] in Serum semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_globulin_total_norc 2989 2336-6 Globulin, total (calculated field) Question 3021886 Measurement LOINC Lab Test 2336-6 S No open-source Yes -AIREADI_REDCAP:imported.import_ag_ratio.A_G_Ratio_calculated_field Albumin/Globulin ratio skos:exactMatch OMOP:4288601 Albumin/Globulin ratio semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation imported text import_ag_ratio 2990 A/G Ratio (calculated field) Question 4288601 Measurement SNOMED Procedure 687005 S No open-source Yes +AIREADI_REDCAP:imported.import_ag_ratio.A_G_Ratio_calculated_field Albumin/Globulin ratio skos:exactMatch OMOP:3020509 Albumin/Globulin [Mass Ratio] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_ag_ratio 2990 A/G Ratio (calculated field) Question 3020509 Measurement LOINC Lab Test 1759-0 S No open-source Yes AIREADI_REDCAP:imported.1975-2.Bilirubin_Total Bilirubin.total [Mass/volume] in Serum or Plasma skos:exactMatch OMOP:3024128 Bilirubin.total [Mass/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_bilirubin_total 2991 1975-2 Bilirubin, Total Question 3024128 Measurement LOINC Lab Test 1975-2 S No open-source Yes AIREADI_REDCAP:imported.6768-6.Alkaline_Phosphatase Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma skos:exactMatch OMOP:3035995 Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation imported text import_alkaline_phosphatase 2992 6768-6 Alkaline Phosphatase Question 3035995 Measurement LOINC Lab Test 6768-6 S No open-source Yes AIREADI_REDCAP:imported.IU_L.import_alkaline_phosphatase_u international unit per liter skos:exactMatch OMOP:8923 international unit per liter semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation imported text import_alkaline_phosphatase_u 2993 IU/L import_alkaline_phosphatase_u Unit 8923 Unit UCUM Unit [iU]/L S No open-source Yes @@ -782,8 +782,8 @@ AIREADI_REDCAP:physical_assessment.pacmpdat Date Assessment Performed --- Popula AIREADI_REDCAP:physical_assessment.paate How many hours since you last ate? (number of hours) skos:exactMatch OMOP:2005200151 How many hours since you last ate? (number of hours) semapv:ManualMappingCuration 1 AI-READI REDCap AIREADI AI-READI manual_curation physical_assessment text 1481 paate Question 2005200151 2005200151 Observation AIREADI Survey S Yes open-source Yes AIREADI_REDCAP:physical_assessment.height_vsorres Height (cm) skos:exactMatch OMOP:3036277 Body height semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation physical_assessment text 1482 height_vsorres Question 3036277 Measurement LOINC Clinical Observation 8302-2 S No open-source Yes AIREADI_REDCAP:physical_assessment.weight_vsorres Weight (kilograms) skos:exactMatch OMOP:3025315 Body weight semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation physical_assessment text 1483 weight_vsorres Question 3025315 Measurement LOINC Clinical Observation 29463-7 S No open-source Yes -AIREADI_REDCAP:physical_assessment.bmi_vsorres BMI skos:exactMatch OMOP:4245997 Body mass index semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation physical_assessment calc 1484 bmi_vsorres Question 4245997 Measurement SNOMED Observable Entity 60621009 S No open-source Yes -AIREADI_REDCAP:physical_assessment.waist_vsorres Waist Circumference (cm) skos:exactMatch OMOP:4172830 Waist circumference semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation physical_assessment text 1485 waist_vsorres Question 4172830 Measurement SNOMED Observable Entity 276361009 S No open-source Yes +AIREADI_REDCAP:physical_assessment.bmi_vsorres BMI skos:exactMatch OMOP:3038553 Body mass index (BMI) [Ratio] semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation physical_assessment calc 1484 bmi_vsorres Question 3038553 Measurement LOINC Clinical Observation 39156-5 S No open-source Yes +AIREADI_REDCAP:physical_assessment.waist_vsorres Waist Circumference (cm) skos:closeMatch OMOP:3016258 Waist Circumference at umbilicus by Tape measure semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation physical_assessment text 1485 waist_vsorres Question 3016258 Measurement LOINC Clinical Observation 8280-0 S No open-source Yes AIREADI_REDCAP:physical_assessment.hip_vsorres Hip Circumference (cm) skos:exactMatch OMOP:4111665 Hip circumference semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation physical_assessment text 1486 hip_vsorres Question 4111665 Measurement SNOMED Observable Entity 284472007 S No open-source Yes AIREADI_REDCAP:physical_assessment.whr_vsorres Waist to Hip Ratio (WHR) skos:exactMatch OMOP:4087501 Waist/hip ratio semapv:ManualMappingCuration 1 AI-READI REDCap SNOMED AI-READI manual_curation physical_assessment calc 1487 whr_vsorres Question 4087501 Measurement SNOMED Observable Entity 248367009 S No open-source Yes AIREADI_REDCAP:physical_assessment.bp1_sysbp_vsorres Systolic (mmHg) skos:exactMatch OMOP:3004249 Systolic blood pressure semapv:ManualMappingCuration 1 AI-READI REDCap LOINC AI-READI manual_curation physical_assessment text 1488 bp1_sysbp_vsorres Question 3004249 Measurement LOINC Clinical Observation 8480-6 S No open-source Yes @@ -1999,3 +1999,6 @@ AIREADI_REDCAP:imported.score.moca_orientation_u score skos:exactMatch OMOP:4477 AIREADI_REDCAP:imported.s.moca_orientation_time_u second skos:exactMatch OMOP:8555 second semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field imported text moca_orientation_time_u s moca_orientation_time_u Unit 8555 Unit UCUM Unit s S No open-source Yes AIREADI_REDCAP:imported.score.moca_combined_mis_score_u score skos:exactMatch OMOP:44777566 score semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field imported text moca_combined_mis_score_u score moca_combined_mis_score_u Unit 44777566 Unit UCUM Unit [score] S No open-source Yes AIREADI_REDCAP:imported.score.moca_total_score_u score skos:exactMatch OMOP:44777566 score semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field imported text moca_total_score_u score moca_total_score_u Unit 44777566 Unit UCUM Unit [score] S No open-source Yes +AIREADI_REDCAP:imported.ratio.import_ag_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_ag_ratio_u ratio import_ag_ratio_u Unit 8523 Unit UCUM Unit {ratio} S No open-source Yes +AIREADI_REDCAP:physical_assessment.ratio.whr_vsorres_u ratio skos:exactMatch OMOP:8523 ratio semapv:ManualMappingCuration 1 AI-READI REDCap UCUM AI-READI manual_curation fixed unit; no REDCap unit field physical_assessment text whr_vsorres_u ratio whr_vsorres_u Unit 8523 Unit UCUM Unit {ratio} S No open-source Yes +AIREADI_REDCAP:imported.ratio.import_buncreatinineratio_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_buncreatinineratio_u ratio import_buncreatinineratio_u Unit 8523 Unit UCUM Unit {ratio} S No open-source Yes diff --git a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.yaml b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.yaml index 7201e59..875914b 100644 --- a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.yaml +++ b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping.sssom.yaml @@ -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-19' +mapping_date: '2026-10-22' diff --git a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping_sssom_README.md b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping_sssom_README.md index 2a76012..557835c 100644 --- a/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping_sssom_README.md +++ b/redCapDataDictionaryWithExtension/sssom/ai_readi_redcap_value_set_mapping_sssom_README.md @@ -10,8 +10,8 @@ Generated from `_ai_readi_redcap_value_set_mapping_common.csv` with `generate_li ## Row counts -- Source rows: 2,076 -- Rows included in SSSOM TSV: 2,000 +- Source rows: 2,079 +- Rows included in SSSOM TSV: 2,003 - Rows excluded as incomplete for SSSOM: 76 ## Identifier conventions diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common.csv b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common.csv index f1857c2..5223564 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common.csv +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common.csv @@ -274,8 +274,8 @@ Yes,Yes,open-source,Yes,driving_record,radio,dri2,2939,Answer,3,dri2_3,"10,001 t Yes,Yes,open-source,Yes,driving_record,radio,dri2,2940,Answer,4,dri2_4,"15,001 to 20,000 miles",2005200274,2005200274,"15,001 to 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,Yes,driving_record,radio,dri2,2941,Answer,5,dri2_5,"More than 20,000 miles",2005200275,2005200275,"More than 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,driving_record,radio,dri2,2942,Answer,99,dri2_99,Don't know,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2943,Answer,1,dri3_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2944,Answer,0,dri3_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, +No,Yes,open-source,No,driving_record,radio,dri3,2943,Answer,1,dri3_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, +No,Yes,open-source,No,driving_record,radio,dri3,2944,Answer,0,dri3_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,ecg,text,,1629,Question,rtfncmpdattim,,Date & time Fundus - Edion performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Edion performed,,2005200595,Fundus - Edion Yes,Yes,open-source,No,ecg,text,,1633,Question,rtfnocmpdattim,,Date & time Fundus - Optomed performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Optomed performed,,2005200596,Fundus - Optomed Yes,Yes,open-source,No,ecg,text,,1637,Question,rthracmpdattim,,Date & time OCT & OCTA - Spectralis HRA OCT performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time OCT & OCTA - Spectralis HRA OCT performed,,2005200597,OCT & OCTA - Spectralis HRA OCT @@ -551,7 +551,7 @@ Yes,Yes,open-source,No,imported,text,import_creatinine_min,2958,Question,,,COMP, Yes,Yes,open-source,No,imported,text,import_creatinine_min2,,Question,,,COMP,,,Creatinine min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max,2959,Question,,,COMP,,,Creatinine max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max2,,Question,,,COMP,,,Creatinine max,,,,,,,,,,, -Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,4112223,,BUN/Creatinine ratio,Measurement,SNOMED,Procedure,18207002,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 (LOINC 3097-3) when the REDCap formula and values are corrected,,, Yes,Yes,open-source,No,imported,text,import_sodium,2961,Question,2951-2,Sodium,Sodium [Moles/volume] in Serum or Plasma,3019550,,Sodium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,2951-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_u,2962,Unit,mEq/L,import_sodium_u,milliequivalent per liter,9557,,milliequivalent per liter,Unit,UCUM,Unit,10*-3.eq/L,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_min,2963,Question,,,COMP,,,Sodium min,,,,,,,,,,, @@ -581,7 +581,7 @@ Yes,Yes,open-source,No,imported,text,import_albumin_u,2986,Unit,g/dL,import_albu Yes,Yes,open-source,No,imported,text,import_albumin_min,2987,Question,,,COMP,,,Albumin min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_albumin_max,2988,Question,,,COMP,,,Albumin max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_globulin_total_norc,2989,Question,2336-6,"Globulin, total (calculated field)",Globulin [Mass/volume] in Serum,3021886,,Globulin [Mass/volume] in Serum,Measurement,LOINC,Lab Test,2336-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,4288601,,Albumin/Globulin ratio,Measurement,SNOMED,Procedure,687005,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,3020509,,Albumin/Globulin [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,1759-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_bilirubin_total,2991,Question,1975-2,"Bilirubin, Total",Bilirubin.total [Mass/volume] in Serum or Plasma,3024128,,Bilirubin.total [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,1975-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase,2992,Question,6768-6,Alkaline Phosphatase,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,3035995,,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,6768-6,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase_u,2993,Unit,IU/L,import_alkaline_phosphatase_u,international unit per liter,8923,,international unit per liter,Unit,UCUM,Unit,[iU]/L,S,skos:exactMatch,1,,,, @@ -727,8 +727,8 @@ Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2987,Answer,3,cm_slp_3,Some Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2988,Answer,4,cm_slp_4,Most days (3-4 days/week),1620862,,Most days (3-4 days),Meas Value,LOINC,Answer,LA31670-5,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2989,Answer,99,cm_slp_99,Don't know/not sure,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2990,Answer,777,cm_slp_777,Decline to answer,36311156,,Prefer not to say,Meas Value,LOINC,Answer,LA28803-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2991,Answer,1,cmotyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2992,Answer,0,cmotyn_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, +No,Yes,open-source,No,meds_assessment,radio,cmotyn,2991,Answer,1,cmotyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, +No,Yes,open-source,No,meds_assessment,radio,cmotyn,2992,Answer,0,cmotyn_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,mesopic_mars,text,,1557,Question,mlcscmpdat,,Date procedure performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date procedure performed,,4322976,Procedure Yes,Yes,open-source,Yes,mesopic_mars,text,,1570,Question,mlcsodfcl,,OD: Value of final correct letter,2005200486,2005200486,"OD: Value of final correct letter - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye Yes,Yes,open-source,Yes,mesopic_mars,text,,1571,Question,mlcsodmiss,,OD: Number of misses prior to stopping,2005200487,2005200487,"OD: Number of misses prior to stopping - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye @@ -855,8 +855,8 @@ Yes,Yes,open-source,No,physical_assessment,text,,1477,Question,pacmpdat,,Date As Yes,Yes,open-source,Yes,physical_assessment,text,,1481,Question,paate,,How many hours since you last ate? (number of hours),2005200151,2005200151,How many hours since you last ate? (number of hours),Observation,AIREADI,Survey,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1482,Question,height_vsorres,,Height (cm),3036277,,Body height,Measurement,LOINC,Clinical Observation,8302-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1483,Question,weight_vsorres,,Weight (kilograms),3025315,,Body weight,Measurement,LOINC,Clinical Observation,29463-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,4245997,,Body mass index,Measurement,SNOMED,Observable Entity,60621009,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),4172830,,Waist circumference,Measurement,SNOMED,Observable Entity,276361009,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,3038553,,Body mass index (BMI) [Ratio],Measurement,LOINC,Clinical Observation,39156-5,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),3016258,,Waist Circumference at umbilicus by Tape measure,Measurement,LOINC,Clinical Observation,8280-0,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1486,Question,hip_vsorres,,Hip Circumference (cm),4111665,,Hip circumference,Measurement,SNOMED,Observable Entity,284472007,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,calc,,1487,Question,whr_vsorres,,Waist to Hip Ratio (WHR),4087501,,Waist/hip ratio,Measurement,SNOMED,Observable Entity,248367009,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1488,Question,bp1_sysbp_vsorres,,Systolic (mmHg),3004249,,Systolic blood pressure,Measurement,LOINC,Clinical Observation,8480-6,S,skos:exactMatch,1,,,, @@ -2075,3 +2075,6 @@ Yes,Yes,open-source,No,imported,text,moca_orientation_u,,Unit,score,moca_orienta Yes,Yes,open-source,No,imported,text,moca_orientation_time_u,,Unit,s,moca_orientation_time_u,second,8555,,second,Unit,UCUM,Unit,s,S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_combined_mis_score_u,,Unit,score,moca_combined_mis_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_total_score_u,,Unit,score,moca_total_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio_u,,Unit,ratio,import_ag_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,physical_assessment,text,whr_vsorres_u,,Unit,ratio,whr_vsorres_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio_u,,Unit,ratio,import_buncreatinineratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common_map2omop.csv b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common_map2omop.csv index 7833c7b..7483d0f 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common_map2omop.csv +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_common_map2omop.csv @@ -274,8 +274,6 @@ Yes,Yes,open-source,Yes,driving_record,radio,dri2,2939,Answer,3,dri2_3,"10,001 t Yes,Yes,open-source,Yes,driving_record,radio,dri2,2940,Answer,4,dri2_4,"15,001 to 20,000 miles",2005200274,2005200274,"15,001 to 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,Yes,driving_record,radio,dri2,2941,Answer,5,dri2_5,"More than 20,000 miles",2005200275,2005200275,"More than 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,driving_record,radio,dri2,2942,Answer,99,dri2_99,Don't know,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2943,Answer,1,dri3_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2944,Answer,0,dri3_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,ecg,text,,1629,Question,rtfncmpdattim,,Date & time Fundus - Edion performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Edion performed,,2005200595,Fundus - Edion Yes,Yes,open-source,No,ecg,text,,1633,Question,rtfnocmpdattim,,Date & time Fundus - Optomed performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Optomed performed,,2005200596,Fundus - Optomed Yes,Yes,open-source,No,ecg,text,,1637,Question,rthracmpdattim,,Date & time OCT & OCTA - Spectralis HRA OCT performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time OCT & OCTA - Spectralis HRA OCT performed,,2005200597,OCT & OCTA - Spectralis HRA OCT @@ -551,7 +549,7 @@ Yes,Yes,open-source,No,imported,text,import_creatinine_min,2958,Question,,,COMP, Yes,Yes,open-source,No,imported,text,import_creatinine_min2,,Question,,,COMP,,,Creatinine min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max,2959,Question,,,COMP,,,Creatinine max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max2,,Question,,,COMP,,,Creatinine max,,,,,,,,,,, -Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,4112223,,BUN/Creatinine ratio,Measurement,SNOMED,Procedure,18207002,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 (LOINC 3097-3) when the REDCap formula and values are corrected,,, Yes,Yes,open-source,No,imported,text,import_sodium,2961,Question,2951-2,Sodium,Sodium [Moles/volume] in Serum or Plasma,3019550,,Sodium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,2951-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_u,2962,Unit,mEq/L,import_sodium_u,milliequivalent per liter,9557,,milliequivalent per liter,Unit,UCUM,Unit,10*-3.eq/L,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_min,2963,Question,,,COMP,,,Sodium min,,,,,,,,,,, @@ -581,7 +579,7 @@ Yes,Yes,open-source,No,imported,text,import_albumin_u,2986,Unit,g/dL,import_albu Yes,Yes,open-source,No,imported,text,import_albumin_min,2987,Question,,,COMP,,,Albumin min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_albumin_max,2988,Question,,,COMP,,,Albumin max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_globulin_total_norc,2989,Question,2336-6,"Globulin, total (calculated field)",Globulin [Mass/volume] in Serum,3021886,,Globulin [Mass/volume] in Serum,Measurement,LOINC,Lab Test,2336-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,4288601,,Albumin/Globulin ratio,Measurement,SNOMED,Procedure,687005,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,3020509,,Albumin/Globulin [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,1759-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_bilirubin_total,2991,Question,1975-2,"Bilirubin, Total",Bilirubin.total [Mass/volume] in Serum or Plasma,3024128,,Bilirubin.total [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,1975-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase,2992,Question,6768-6,Alkaline Phosphatase,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,3035995,,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,6768-6,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase_u,2993,Unit,IU/L,import_alkaline_phosphatase_u,international unit per liter,8923,,international unit per liter,Unit,UCUM,Unit,[iU]/L,S,skos:exactMatch,1,,,, @@ -727,8 +725,6 @@ Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2987,Answer,3,cm_slp_3,Some Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2988,Answer,4,cm_slp_4,Most days (3-4 days/week),1620862,,Most days (3-4 days),Meas Value,LOINC,Answer,LA31670-5,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2989,Answer,99,cm_slp_99,Don't know/not sure,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2990,Answer,777,cm_slp_777,Decline to answer,36311156,,Prefer not to say,Meas Value,LOINC,Answer,LA28803-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2991,Answer,1,cmotyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2992,Answer,0,cmotyn_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,mesopic_mars,text,,1557,Question,mlcscmpdat,,Date procedure performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date procedure performed,,4322976,Procedure Yes,Yes,open-source,Yes,mesopic_mars,text,,1570,Question,mlcsodfcl,,OD: Value of final correct letter,2005200486,2005200486,"OD: Value of final correct letter - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye Yes,Yes,open-source,Yes,mesopic_mars,text,,1571,Question,mlcsodmiss,,OD: Number of misses prior to stopping,2005200487,2005200487,"OD: Number of misses prior to stopping - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye @@ -854,8 +850,8 @@ Yes,Yes,open-source,No,physical_assessment,text,,1477,Question,pacmpdat,,Date As Yes,Yes,open-source,Yes,physical_assessment,text,,1481,Question,paate,,How many hours since you last ate? (number of hours),2005200151,2005200151,How many hours since you last ate? (number of hours),Observation,AIREADI,Survey,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1482,Question,height_vsorres,,Height (cm),3036277,,Body height,Measurement,LOINC,Clinical Observation,8302-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1483,Question,weight_vsorres,,Weight (kilograms),3025315,,Body weight,Measurement,LOINC,Clinical Observation,29463-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,4245997,,Body mass index,Measurement,SNOMED,Observable Entity,60621009,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),4172830,,Waist circumference,Measurement,SNOMED,Observable Entity,276361009,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,3038553,,Body mass index (BMI) [Ratio],Measurement,LOINC,Clinical Observation,39156-5,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),3016258,,Waist Circumference at umbilicus by Tape measure,Measurement,LOINC,Clinical Observation,8280-0,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1486,Question,hip_vsorres,,Hip Circumference (cm),4111665,,Hip circumference,Measurement,SNOMED,Observable Entity,284472007,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,calc,,1487,Question,whr_vsorres,,Waist to Hip Ratio (WHR),4087501,,Waist/hip ratio,Measurement,SNOMED,Observable Entity,248367009,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1488,Question,bp1_sysbp_vsorres,,Systolic (mmHg),3004249,,Systolic blood pressure,Measurement,LOINC,Clinical Observation,8480-6,S,skos:exactMatch,1,,,, @@ -2074,3 +2070,6 @@ Yes,Yes,open-source,No,imported,text,moca_orientation_u,,Unit,score,moca_orienta Yes,Yes,open-source,No,imported,text,moca_orientation_time_u,,Unit,s,moca_orientation_time_u,second,8555,,second,Unit,UCUM,Unit,s,S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_combined_mis_score_u,,Unit,score,moca_combined_mis_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_total_score_u,,Unit,score,moca_total_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio_u,,Unit,ratio,import_ag_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,physical_assessment,text,whr_vsorres_u,,Unit,ratio,whr_vsorres_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio_u,,Unit,ratio,import_buncreatinineratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_map2omop_open_source_public_version.csv b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_map2omop_open_source_public_version.csv index cbc3c16..ba01780 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_map2omop_open_source_public_version.csv +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/_ai_readi_redcap_value_set_mapping_map2omop_open_source_public_version.csv @@ -257,8 +257,6 @@ Yes,Yes,open-source,Yes,driving_record,radio,dri2,2939,Answer,3,dri2_3,"10,001 t Yes,Yes,open-source,Yes,driving_record,radio,dri2,2940,Answer,4,dri2_4,"15,001 to 20,000 miles",2005200274,2005200274,"15,001 to 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,Yes,driving_record,radio,dri2,2941,Answer,5,dri2_5,"More than 20,000 miles",2005200275,2005200275,"More than 20,000 miles",Meas Value,AIREADI,Answer,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,driving_record,radio,dri2,2942,Answer,99,dri2_99,Don't know,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2943,Answer,1,dri3_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,driving_record,radio,dri3,2944,Answer,0,dri3_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,ecg,text,,1629,Question,rtfncmpdattim,,Date & time Fundus - Edion performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Edion performed,,2005200595,Fundus - Edion Yes,Yes,open-source,No,ecg,text,,1633,Question,rtfnocmpdattim,,Date & time Fundus - Optomed performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time Fundus - Optomed performed,,2005200596,Fundus - Optomed Yes,Yes,open-source,No,ecg,text,,1637,Question,rthracmpdattim,,Date & time OCT & OCTA - Spectralis HRA OCT performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date & time OCT & OCTA - Spectralis HRA OCT performed,,2005200597,OCT & OCTA - Spectralis HRA OCT @@ -493,7 +491,7 @@ Yes,Yes,open-source,No,imported,text,import_creatinine_min,2958,Question,,,COMP, Yes,Yes,open-source,No,imported,text,import_creatinine_min2,,Question,,,COMP,,,Creatinine min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max,2959,Question,,,COMP,,,Creatinine max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_creatinine_max2,,Question,,,COMP,,,Creatinine max,,,,,,,,,,, -Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,4112223,,BUN/Creatinine ratio,Measurement,SNOMED,Procedure,18207002,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio,2960,Question,,BUN/Creatinine ratio,BUN/Creatinine ratio,3033837,,Creatinine/Urea nitrogen [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,31045-8,S,skos:exactMatch,1,Stored value is creatinine/BUN (REDCap calculation inverted; field label says BUN/Creatinine); remap to 3018311 (LOINC 3097-3) when the REDCap formula and values are corrected,,, Yes,Yes,open-source,No,imported,text,import_sodium,2961,Question,2951-2,Sodium,Sodium [Moles/volume] in Serum or Plasma,3019550,,Sodium [Moles/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,2951-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_u,2962,Unit,mEq/L,import_sodium_u,milliequivalent per liter,9557,,milliequivalent per liter,Unit,UCUM,Unit,10*-3.eq/L,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_sodium_min,2963,Question,,,COMP,,,Sodium min,,,,,,,,,,, @@ -523,7 +521,7 @@ Yes,Yes,open-source,No,imported,text,import_albumin_u,2986,Unit,g/dL,import_albu Yes,Yes,open-source,No,imported,text,import_albumin_min,2987,Question,,,COMP,,,Albumin min,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_albumin_max,2988,Question,,,COMP,,,Albumin max,,,,,,,,,,, Yes,Yes,open-source,No,imported,text,import_globulin_total_norc,2989,Question,2336-6,"Globulin, total (calculated field)",Globulin [Mass/volume] in Serum,3021886,,Globulin [Mass/volume] in Serum,Measurement,LOINC,Lab Test,2336-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,4288601,,Albumin/Globulin ratio,Measurement,SNOMED,Procedure,687005,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio,2990,Question,,A/G Ratio (calculated field),Albumin/Globulin ratio,3020509,,Albumin/Globulin [Mass Ratio] in Serum or Plasma,Measurement,LOINC,Lab Test,1759-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_bilirubin_total,2991,Question,1975-2,"Bilirubin, Total",Bilirubin.total [Mass/volume] in Serum or Plasma,3024128,,Bilirubin.total [Mass/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,1975-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase,2992,Question,6768-6,Alkaline Phosphatase,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,3035995,,Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma,Measurement,LOINC,Lab Test,6768-6,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,imported,text,import_alkaline_phosphatase_u,2993,Unit,IU/L,import_alkaline_phosphatase_u,international unit per liter,8923,,international unit per liter,Unit,UCUM,Unit,[iU]/L,S,skos:exactMatch,1,,,, @@ -669,8 +667,6 @@ Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2987,Answer,3,cm_slp_3,Some Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2988,Answer,4,cm_slp_4,Most days (3-4 days/week),1620862,,Most days (3-4 days),Meas Value,LOINC,Answer,LA31670-5,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2989,Answer,99,cm_slp_99,Don't know/not sure,45876636,,Don't know,Meas Value,LOINC,Answer,LA12688-0,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,meds_assessment,radio,cm_slp,2990,Answer,777,cm_slp_777,Decline to answer,36311156,,Prefer not to say,Meas Value,LOINC,Answer,LA28803-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2991,Answer,1,cmotyn_1,Yes,45877994,,Yes,Meas Value,LOINC,Answer,LA33-6,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,meds_assessment,radio,cmotyn,2992,Answer,0,cmotyn_0,No,45878245,,No,Meas Value,LOINC,Answer,LA32-8,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,mesopic_mars,text,,1557,Question,mlcscmpdat,,Date procedure performed,4160030,,Performed,Observation,SNOMED,Qualifier Value,398166005,S,skos:closeMatch,0.75,Date procedure performed,,4322976,Procedure Yes,Yes,open-source,Yes,mesopic_mars,text,,1570,Question,mlcsodfcl,,OD: Value of final correct letter,2005200486,2005200486,"OD: Value of final correct letter - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye Yes,Yes,open-source,Yes,mesopic_mars,text,,1571,Question,mlcsodmiss,,OD: Number of misses prior to stopping,2005200487,2005200487,"OD: Number of misses prior to stopping - Mesopic, right eye",Measurement,AIREADI-Vision,Measurement,,S,skos:exactMatch,1,right,,45876703,Right eye @@ -796,8 +792,8 @@ Yes,Yes,open-source,No,physical_assessment,text,,1477,Question,pacmpdat,,Date As Yes,Yes,open-source,Yes,physical_assessment,text,,1481,Question,paate,,How many hours since you last ate? (number of hours),2005200151,2005200151,How many hours since you last ate? (number of hours),Observation,AIREADI,Survey,,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1482,Question,height_vsorres,,Height (cm),3036277,,Body height,Measurement,LOINC,Clinical Observation,8302-2,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1483,Question,weight_vsorres,,Weight (kilograms),3025315,,Body weight,Measurement,LOINC,Clinical Observation,29463-7,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,4245997,,Body mass index,Measurement,SNOMED,Observable Entity,60621009,S,skos:exactMatch,1,,,, -Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),4172830,,Waist circumference,Measurement,SNOMED,Observable Entity,276361009,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,calc,,1484,Question,bmi_vsorres,,BMI,3038553,,Body mass index (BMI) [Ratio],Measurement,LOINC,Clinical Observation,39156-5,S,skos:exactMatch,1,,,, +Yes,Yes,open-source,No,physical_assessment,text,,1485,Question,waist_vsorres,,Waist Circumference (cm),3016258,,Waist Circumference at umbilicus by Tape measure,Measurement,LOINC,Clinical Observation,8280-0,S,skos:closeMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1486,Question,hip_vsorres,,Hip Circumference (cm),4111665,,Hip circumference,Measurement,SNOMED,Observable Entity,284472007,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,calc,,1487,Question,whr_vsorres,,Waist to Hip Ratio (WHR),4087501,,Waist/hip ratio,Measurement,SNOMED,Observable Entity,248367009,S,skos:exactMatch,1,,,, Yes,Yes,open-source,No,physical_assessment,text,,1488,Question,bp1_sysbp_vsorres,,Systolic (mmHg),3004249,,Systolic blood pressure,Measurement,LOINC,Clinical Observation,8480-6,S,skos:exactMatch,1,,,, @@ -1965,3 +1961,6 @@ Yes,Yes,open-source,No,imported,text,moca_orientation_u,,Unit,score,moca_orienta Yes,Yes,open-source,No,imported,text,moca_orientation_time_u,,Unit,s,moca_orientation_time_u,second,8555,,second,Unit,UCUM,Unit,s,S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_combined_mis_score_u,,Unit,score,moca_combined_mis_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, Yes,Yes,open-source,No,imported,text,moca_total_score_u,,Unit,score,moca_total_score_u,score,44777566,,score,Unit,UCUM,Unit,[score],S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_ag_ratio_u,,Unit,ratio,import_ag_ratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,physical_assessment,text,whr_vsorres_u,,Unit,ratio,whr_vsorres_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, +Yes,Yes,open-source,No,imported,text,import_buncreatinineratio_u,,Unit,ratio,import_buncreatinineratio_u,ratio,8523,,ratio,Unit,UCUM,Unit,{ratio},S,skos:exactMatch,1,fixed unit; no REDCap unit field,,, diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01_create_unit_lookup.sql b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01_create_unit_lookup.sql index 155fd9d..42b7b6d 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01_create_unit_lookup.sql +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01_create_unit_lookup.sql @@ -3,9 +3,9 @@ -- AI-READI concept map: create the unit_lookup table (one query) -- -- unit_lookup has one row per (key_type, lookup_key): --- key_type = 'field' : lookup_key = measurement field name (e.g. lbscat_rbc) -> 85 rows +-- key_type = 'field' : lookup_key = measurement field name (e.g. lbscat_rbc) -> 88 rows -- key_type = 'string' : lookup_key = unit text (e.g. 'mEq/L') -> 25 rows --- v1.4: 110 rows. Same content as unit_concept_lookup.csv (option A: 01a_load_unit_concept_lookup_csv.sql). +-- v1.6: 113 rows (v1.4 and v1.5: 110). Same content as unit_concept_lookup.csv (option A: 01a_load_unit_concept_lookup_csv.sql). -- -- Requires the concept map as a table or view named concept_map (see 00_load_concept_map.sql). -- Dialect: Databricks / Spark SQL. diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01a_load_unit_concept_lookup_csv.sql b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01a_load_unit_concept_lookup_csv.sql index ff36672..c9ab0ab 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01a_load_unit_concept_lookup_csv.sql +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/01a_load_unit_concept_lookup_csv.sql @@ -6,7 +6,7 @@ -- 01_create_unit_lookup.sql (option B), without loading the concept map. -- -- unit_concept_lookup.csv columns: key_type, lookup_key, unit_concept_id, unit_source_value --- v1.4: 110 rows (field 85, string 25), one row per (key_type, lookup_key). +-- v1.6: 113 rows (field 88, string 25), one row per (key_type, lookup_key). -- The file is UTF-8 (x10E3/µL and x10E6/µL use the micro sign U+00B5). -- -- Set the path to your copy of unit_concept_lookup.csv, then run. @@ -28,5 +28,5 @@ SELECT TRIM(key_type) AS key_type, TRIM(unit_source_value) AS unit_source_value FROM unit_concept_lookup_csv; --- Check: 110 rows; field 85, string 25. +-- Check: 113 rows; field 88, string 25. SELECT key_type, COUNT(*) AS n FROM unit_lookup GROUP BY key_type ORDER BY key_type; diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/02_view_unit_lookup.sql b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/02_view_unit_lookup.sql index 6e0276c..424ede9 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/02_view_unit_lookup.sql +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/02_view_unit_lookup.sql @@ -5,13 +5,13 @@ -- Requires unit_lookup (01_create_unit_lookup.sql). Dialect: Databricks / Spark SQL. -- ============================================================================= --- Row counts by key type. v1.4: field 85, string 25. +-- Row counts by key type. v1.6: field 88, string 25. SELECT key_type, COUNT(*) AS n FROM unit_lookup GROUP BY key_type ORDER BY key_type; --- Lookup by measurement field name (85 rows). +-- Lookup by measurement field name (88 rows). SELECT lookup_key AS field_name, unit_concept_id, unit_source_value FROM unit_lookup WHERE key_type = 'field' diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/README.md b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/README.md index 3c7a908..bd28053 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/README.md +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/README.md @@ -6,9 +6,9 @@ Scripts to fill `MEASUREMENT.unit_concept_id` from the AI-READI concept map (`.. |---|---| | `USAGE.md` | **Step-by-step usage** | | `00_load_concept_map.sql` | Loads the mapping file as `concept_map` (only needed for option B; set the file path) | -| `unit_concept_lookup.csv` | **The ready-made lookup table** (110 rows): load it and skip building it | +| `unit_concept_lookup.csv` | **The ready-made lookup table** (113 rows): load it and skip building it | | `01a_load_unit_concept_lookup_csv.sql` | Option A: creates `unit_lookup` from `unit_concept_lookup.csv` | -| `01_create_unit_lookup.sql` | Option B: **one query** that builds `unit_lookup` from the concept map (same 110 rows) | +| `01_create_unit_lookup.sql` | Option B: **one query** that builds `unit_lookup` from the concept map (same 113 rows) | | `02_view_unit_lookup.sql` | Review `unit_lookup`: counts, field and unit-text lists, duplicate check | | `03_left_join_unit_lookup_template.sql` | **The LEFT JOIN** to add to the ETL (replace the placeholders) | | `04_example_omop_survey_measurement.sql` | The same join, ready to run on `omop_survey.measurement` | @@ -38,7 +38,7 @@ LEFT JOIN unit_lookup u | key_type | lookup_key | Rows | Source in the concept map | |---|---|---|---| -| `field` | measurement field name | 85 | Unit rows named `_u`: the imported-lab unit fields (e.g. `import_potassium_u`) and the v1.4 fixed-unit rows for fields with no unit field (CBC, physical assessment, autorefractor, globulin, bilirubin, urine albumin/creatinine, MoCA scores and times). Plus `import_ldl_cholesterol_calculation`, whose unit field has a different name (`import_ldl_cholesterol_u`). | +| `field` | measurement field name | 88 | Unit rows named `_u`: the imported-lab unit fields (e.g. `import_potassium_u`) and the v1.4 fixed-unit rows for fields with no unit field (CBC, physical assessment, autorefractor, globulin, bilirubin, urine albumin/creatinine, MoCA scores and times; v1.6: the BUN/creatinine, A/G and waist/hip ratios). Plus `import_ldl_cholesterol_calculation`, whose unit field has a different name (`import_ldl_cholesterol_u`). | | `string` | unit text | 25 | Generic Unit rows (blank `FIELD_ID`) plus `s`, `second`, `score` | Notes: @@ -46,7 +46,7 @@ Notes: - MoCA: score fields → 44777566 (score), time fields → 8555 (second). - Do not join on all Unit rows of the concept map by `SRC_CODE`: the same text appears in several rows (e.g. `g/dL` in 6), which would multiply measurement rows. `unit_lookup` avoids this. -### key_type = 'field' (85 rows) +### key_type = 'field' (88 rows) | lookup_key | unit_concept_id | unit_source_value | |---|---|---| @@ -67,12 +67,14 @@ Notes: | `fluency_language_time` | 8555 | s | | `height_vsorres` | 8582 | cm | | `hip_vsorres` | 8582 | cm | +| `import_ag_ratio` | 8523 | ratio | | `import_albumin` | 8713 | g/dL | | `import_alkaline_phosphatase` | 8923 | IU/L | | `import_alt_got` | 8923 | IU/L | | `import_ast_got` | 8923 | IU/L | | `import_bilirubin_total` | 8840 | mg/dL | | `import_bun` | 8840 | mg/dL | +| `import_buncreatinineratio` | 8523 | ratio | | `import_c_peptide` | 8725 | ng/L | | `import_calcium` | 8840 | mg/dL | | `import_carbon_dioxide_total` | 9557 | mEq/L | @@ -135,6 +137,7 @@ Notes: | `viaossph` | 9291 | diopter | | `waist_vsorres` | 8582 | cm | | `weight_vsorres` | 9529 | kilograms | +| `whr_vsorres` | 8523 | ratio | ### key_type = 'string' (25 rows) diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/USAGE.md b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/USAGE.md index c3296ef..317569a 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/USAGE.md +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/USAGE.md @@ -4,7 +4,7 @@ How to fill `MEASUREMENT.unit_concept_id` from the AI-READI concept map: create ## Step 1. Create the unit_lookup table (choose one) -**Option A: load the ready-made file (simplest).** `unit_concept_lookup.csv` (in this folder) is the complete lookup table, 110 rows: +**Option A: load the ready-made file (simplest).** `unit_concept_lookup.csv` (in this folder) is the complete lookup table, 113 rows: | Column | Meaning | |---|---| @@ -19,7 +19,7 @@ Upload it, set the path in `01a_load_unit_concept_lookup_csv.sql`, and run it. T | key_type | lookup_key | Rows | Example | |---|---|---|---| -| `field` | measurement field name | 85 | `lbscat_rbc` → 8815 (`x10E6/µL`) | +| `field` | measurement field name | 88 | `lbscat_rbc` → 8815 (`x10E6/µL`) | | `string` | unit text | 25 | `mEq/L` → 9557 | Each key appears once. @@ -61,7 +61,7 @@ f.lookup_key = TRIM(SPLIT_PART(m.measurement_source_value, ',', 1)) | Script | Check | Expected | |---|---|---| | `05_check_no_fanout.sql` | Row count before and after the join; measurements that appear twice | Equal counts; 0 rows | -| `06_check_units_after_etl.sql` | After the ETL re-run: units on CBC, globulin, bilirubin, physical assessment, potassium; all measurements still without a unit | No `unit_concept_id` = 0 in the first list; only unitless vision scores and ratios in the second | +| `06_check_units_after_etl.sql` | After the ETL re-run: units on CBC, globulin, bilirubin, physical assessment, potassium; all measurements still without a unit | No `unit_concept_id` = 0 in the first list; only unitless vision scores in the second (since v1.6 the BUN/creatinine, A/G and waist/hip ratios have the unit 8523 *ratio*) | ## Example result diff --git a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/unit_concept_lookup.csv b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/unit_concept_lookup.csv index 2315490..f4d9530 100644 --- a/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/unit_concept_lookup.csv +++ b/redCapDataDictionaryWithExtension/value-set-mapping-common/scripts/unit_concept_lookup.csv @@ -16,12 +16,14 @@ field,fluency_language,44777566,score field,fluency_language_time,8555,s field,height_vsorres,8582,cm field,hip_vsorres,8582,cm +field,import_ag_ratio,8523,ratio field,import_albumin,8713,g/dL field,import_alkaline_phosphatase,8923,IU/L field,import_alt_got,8923,IU/L field,import_ast_got,8923,IU/L field,import_bilirubin_total,8840,mg/dL field,import_bun,8840,mg/dL +field,import_buncreatinineratio,8523,ratio field,import_c_peptide,8725,ng/L field,import_calcium,8840,mg/dL field,import_carbon_dioxide_total,9557,mEq/L @@ -84,6 +86,7 @@ field,viaoscyl,9291,diopter field,viaossph,9291,diopter field,waist_vsorres,8582,cm field,weight_vsorres,9529,kilograms +field,whr_vsorres,8523,ratio string,%,8554,% string,IU/L,8923,IU/L string,bpm,8541,bpm