From 71063b4a40c86c9a3a7f306152231d1cb1dac1ec Mon Sep 17 00:00:00 2001 From: Dmitry Dymshyts Date: Thu, 27 Jul 2023 11:59:51 -0400 Subject: [PATCH] JMDC/JMDC_Death.md - fixed the death definition using Diagnosis table CPRD/CPRD_Additional_STEM.md - set end_Date = NULL --- docs/CPRD/CPRD_Additional_STEM.md | 2 +- docs/JMDC/JMDC_Death.md | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/CPRD/CPRD_Additional_STEM.md b/docs/CPRD/CPRD_Additional_STEM.md index 6164c0a9..cf882f89 100644 --- a/docs/CPRD/CPRD_Additional_STEM.md +++ b/docs/CPRD/CPRD_Additional_STEM.md @@ -40,7 +40,7 @@ These concatenated source values will then be mapped to standard concepts using | unit_concept_id | | Look up add_int.unit_source_value in the CONCEPT table where vocabulary_id = 'UCUM' and standard_concept = 'S' and invalid_reason is NULL. | | | unit_source_value | add_int.unit_source_value | | | | start_date | add_int.eventdate | | For the additional table, the adid is used to link back to the clinical table to get the eventdate. | -| end_date | start_date | | | +| end_date | NULL | | | | value_as_number | add_int.value_as_number | | | | value_as_string | add_int.value_as_string | | | | value_as_concept_id | | | If the last part of the source value says 'Read code for condition' then map the code in add_int.value_as_string to a standard concept using the SOURCE_TO_STANDARD query with the filters:

WHERE source_vocabulary_id = 'Read' AND standard_concept = 'S' AND invalid_concept is NULL

If the last part of the source value says 'Drug code' then map the code in add_int.value_as_string to a standard concept using the SOURCE_TO_STANDARD query with the filters:

WHERE source_vocabulary_id = 'Gemscript' AND standard_concept = 'S' AND invalid_concept is NULL

Otherwise, if the value in add_int.qualifier_source_value is not null then lookup the values in add_int.qualifier_source_value in the CONCEPT table where domain_id=' Meas Value' and vocabulary_id=' LOINC' and standard_concept = 'S' and invalid_concept is NULL. | diff --git a/docs/JMDC/JMDC_Death.md b/docs/JMDC/JMDC_Death.md index b02361c4..34b67d1b 100644 --- a/docs/JMDC/JMDC_Death.md +++ b/docs/JMDC/JMDC_Death.md @@ -9,7 +9,7 @@ description: "Death mapping from JMDC enrollment and diagnosis tables" # CDM Table name: DEATH -There are two sources of death status: enrollment and the diagnosis table. Death is coded as ‘outcome = 3’ in the diagnosis table, and as ‘withdrawal_death_flag = true’ in the enrollment table. To make sure we have at most one death per person, when there are multiple death records per person, we will take the latest from diagnose if available, else the date from enrollment. The reason for this is that the date from diagnosis might be specific to date, whereas the information from enrollment status is always at the month level and therefore assumed to be at the end of the month. +There are two sources of death status: enrollment and the diagnosis table. Death is coded as ‘outcome = 3 when type_of_claim !='DPC' or outcome in (6,7) when type_of_claim ='DPC'’ in the diagnosis table, and as ‘withdrawal_death_flag = true’ in the enrollment table. To make sure we have at most one death per person, when there are multiple death records per person, we will take the latest from diagnose if available, else the date from enrollment. The reason for this is that the date from diagnosis might be specific to date, whereas the information from enrollment status is always at the month level and therefore assumed to be at the end of the month. ## Reading from JMDC.Enrollment @@ -37,4 +37,9 @@ There are two sources of death status: enrollment and the diagnosis table. Death | death_type_concept_id | | | From enrollment: `32815` (Death certificate) From diagnosis: `32812` (Claim discharge record) | | cause_concept_id | | | | | cause_source_value | | | | -| cause_source_concept_id | | | | \ No newline at end of file +| cause_source_concept_id | | | | + +## Change Log + +### July 27, 2023 +- Changed Death status logic: In Diagnosis table it's encoded not just as ‘outcome = 3’, but ‘outcome = 3 when type_of_claim !='DPC' or ‘outcome in (6,7) when type_of_claim ='DPC'’ \ No newline at end of file