MyDigiTwinNL / CDF2Medmij-Mapping-tool

Tool for transforming Cohort-study Data (CDF) into FHIR/MedMij compliant resource bundles
Apache License 2.0
1 stars 0 forks source link

Vascular Disease - onset date/time given related Lifelines variables #4

Open hcadavid opened 1 year ago

hcadavid commented 1 year ago

Pairing rule issue

Description

Some variables have no question regarding onset of disease, which would lead to an imperfect description of 'onset'. In particular, it seems that the following variables do not have a related 'onset' age/date. @squareb Is this correct?

                                              [1A][1B][1C][2A][3A][3B]
           heartattack_followup_adu_q_1:      [  ][X ][X ][X ][X ][X ]    
           carotid_stenosis_adu_q_1:          [X ][  ][  ][  ][  ][  ]    
           claudication_followup_adu_q_1:     [  ][  ][  ][X ][X ][X ]    
           cvd_followup_adu_q_1:              [  ][X ][X ][X ][X ][X ]  

Only heartattack_startage_adu_q_1 and angioplasty_bypass_adu_q_1a would be considered for the onset date (otherwise, the onset date won't be included).

https://github.com/MyDigiTwinNL/Lifelines2Medmij-Mapping-tool/blob/6c17f756e86c952d80fb382c2fb043ce5e1fc745/src/lifelines/VascularDisease.ts#L143-L168

baukearends commented 1 year ago

_heartattack_followup_adu_q1: is the follow-up question related to heartattack_startage_adu_q_1, so if a person experiences a heart attack during follow-up we would take the mean between the date of follow-up (e.g. 1B) and the preceding wave (e.g. 1A)

_carotid_stenosis_adu_q1: no onset date indeed. This question is only asked during baseline, I think that _cvd_followup_adu_q1 asks about this disease during follow-up.

_claudication_followup_adu_q1: no onset date, but it is asked in all follow-up waves (except 2B). This means that only for patients who indicate on wave 1B that they have claudication, we do not have an onset date. For the remaining waves, we can take the mean between dates again.

_cvd_followup_adu_q1: @squareb which diseases are listed in this question? It seems te be a combination of diseases listed in separate questions during the baseline visit.

hcadavid commented 1 year ago

@baukearends, @squareb I'm also not sure how to interpret cvd_followup_adu_q_1 as it seems to be linked to other questions, but its name does not suggest which ones. However, according to the spreadsheets comments, a 'yes' value on cvd_followup_adu_q_1 would imply any (one or more?) of the following: Myocardial infarction, Stroke (both ischemic and hemorrhagic), Heart failure / cardiomyopathy and Intermittent claudication.

Bauke: cvd_followup_adu_q_1: is it possible to see the list of 'following conditions'?

Bas: Yes, these are:

  • heart infarction stroke (brain infarction, brain haemorrhage)
  • heart failure/heart muscle disorder
  • clogged arteries in the legs (intermittent claudication)

Should this variable be considered for the onset calculation, especially given that 'Stroke' is reported as a separate resource?

For the time being, the following would be the suggested specification. Please let me know if you agree.

/**
 *                                      [1A][1B][1C][2A][3A][3B]
 *   heartattack_presence_adu_q_1:      [X ][  ][  ][  ][  ][  ]    
 *   heartattack_startage_adu_q_1:      [X ][  ][  ][  ][  ][  ]    
 *   angioplasty_bypass_adu_q_1:        [X ][  ][  ][  ][X ][X ]  have you ever had a balloon angioplasty (stretching of artery with balloon) and/or bypass surgery? 
 *   angioplasty_bypass_adu_q_1a:       [X ][  ][  ][  ][X ][X ]  if so, how old were you when you had the (first) balloon angioplasty/bypass surgery?  
 * 
 *   heartattack_followup_adu_q_1:      [  ][X ][X ][X ][X ][X ]    
 *   carotid_stenosis_adu_q_1:          [X ][  ][  ][  ][  ][  ]    
 *   claudication_followup_adu_q_1:     [  ][X ][X ][X ][X ][X ]    
 *   cvd_followup_adu_q_1:              [  ][  ][  ][X ][X ][X ] did the health problems listed below start since the last time you filled in the lifelines questionnaire?   
 *    
 * @Precondition
 *  - Problem is 'active'
 *  - No missing values
 * 
 * @pairingrule
 * 
 *      if heartattack_presence_adu_q_1 in 1A = yes AND angioplasty_bypass_adu_q_1 in 1A = yes => earliest date calculated based on (heartattack_startage_adu_q_1, angioplasty_bypass_adu_q_1a)
 *      else
 *          if there is a 'yes' in any heartattack_followup_adu_q_1 => mean date between the date of the assessment 
 *              where heartattack_followup_adu_q_1 = yes, and the date of the preceding one.
 *          else if there is a 'yes' in any claudication_followup_adu_q_1 after 1B assessment => mean date between the date of the assessment 
 *              where claudication_followup_adu_q_1 = yes, and the date of the preceding one.
 *          else
 *              NaN (CVD would be reported as active, but with an undefined onset year
 * /
squareb commented 1 year ago

@baukearends @hcadavid The parent question for cvd_followup_adu_q_1 is "did the health problems listed below start since the last time you filled in the lifelines questionnaire? - cardiovascular disease", which has the following possible subanswers:

@hcadavid your interpretation of the question with the follow-up of the specific subanswers is correct.

baukearends commented 1 year ago

For vascular disease, I would only include the following subanswers from cvd_followup_adu_q_1:

Stroke is indeed already included in another variable as Hector mentioned (I'm unable to tag you).

hcadavid commented 1 month ago

Hello, @baukearends and @squareb. I'm resuming this thread now that we have more clues about issue #3. After revisiting the discussion of both issues (#3 and #4) and double-checking Lifelines' catalog and wiki, the conclusions are:

The rule for the condition status would be:

*  @pairingrule
 *     if any of the following variables (if collected on any of the assessments) has a 'yes' value, return 'active':
 *                  heartattack_presence_adu_q_1 
 *                  heartattack_followup_adu_q_1 
 *                  angioplasty_bypass_adu_q_1 
 *                  carotid_stenosis_adu_q_1 
 *                  claudication_followup_adu_q_1
 *     or  
 *                  cvd_followup_adu_q_1 has a 'yes' and it is related to 'heart infarction' or 'clogged arteries in the legs (intermittent claudication)'
 *     or 
 *                  atherosclerosis_presence_adu_q_1 == 'atherosclerosis' (not the other options: heart valve problems, thrombosis, pulmonary embolism)
 *     else
 *          Empty result (there is no such thing as an  inactive' CVD)

And the one for the onset-date would be:

 * @pairingrule
 * 
 *      if there is a 'yes' value in 'heartattack_presence_adu_q_1' @ 1A, or in 'angioplasty_bypass_adu_q_1' @ 1A or there is 'atheresclerosis' value on 'atherosclerosis_presence_adu_q_q' @ 1A => earliest date of the three      
 *      else
 *          if there is a 'yes' in any heartattack_followup_adu_q_1 => mean date between the date of the assessment 
 *              where heartattack_followup_adu_q_1 = yes, and the date of the preceding one.
 *          else if there is a 'yes' in any claudication_followup_adu_q_1 after 1B assessment => mean date between the date of the assessment 
 *              where claudication_followup_adu_q_1 = yes, and the date of the preceding one.
 *          else if there is a 'yes' on any cvd_followup_adu_q_1, and it is related to 'heart infarction' or 'clogged arteries in the legs (intermittent claudication)' => mean date between the date of the assessment where cvd_followup_adu_q_1 = yes, and the date of the proceeding one or the baseline assessment (if there is no proceeding assessment)
 *          else
 *              NaN (no onset year would be reported)

Would this interpretation be correct? However, as cvd_followup_adu_q_1 is a yes/no question, I'm still not sure how to check to which particular category it is linked to.