Skip to content

Commit

Permalink
JMDC/JMDC_Death.md - fixed the death definition using Diagnosis table
Browse files Browse the repository at this point in the history
CPRD/CPRD_Additional_STEM.md - set end_Date = NULL
  • Loading branch information
Dmitry Dymshyts committed Jul 27, 2023
1 parent 141b93d commit 71063b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Additional_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br><br> WHERE source_vocabulary_id = 'Read' AND standard_concept = 'S' AND invalid_concept is NULL <br><br> 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: <br><br> WHERE source_vocabulary_id = 'Gemscript' AND standard_concept = 'S' AND invalid_concept is NULL <br><br> 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. |
Expand Down
9 changes: 7 additions & 2 deletions docs/JMDC/JMDC_Death.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 | | | |
| 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'’

0 comments on commit 71063b4

Please sign in to comment.