***********************************************************************************************; *** ***; *** PROGRAM: gen_MDS3_CHESS_yyyymmdd.sas ***; *** ***; *** PURPOSE: To generate the CHESS score (Changes in Health, End-stage disease and ***; *** Symptoms and Signs) as defined for MDS 3.0. ***; *** ***; *** CODERS: Adrita Boorah, Anyah Prasad, Bill Jesdale ***; *** ***; *** SOURCE: Jessica A. Ogarek, Ellen M. McCreedy, Kali S. Thomas, Joan M. Teno, Pedro ***; *** L. Gozalo. (2018) Minimum Data Set Changes in Health, End-stage disease ***; *** and Symptoms and Signs Scale: A revised measure to predict mortality in ***; *** nursing home residents. J Am Geriatr Soc 66(5):976-981. ***; *** doi:10.1111/jgs.15305 ***; *** ***; *** INPUTS: Many variables used to define CHESS (described in more detail below). ***; *** Also, requires constructed scales for: ***; *** >MDS3_ADL_long_Form, a 0-28 scale based on 7 ADL items, ***; *** >MDS3_CFS, a 0-4 scale combining several variables, and ***; *** >MDS3_ARBS, a 0-12 behavioral scale. ***; *** Validated SAS code for these scales can be found in the PHARE MDS Scale ***; *** Compendium: https://www.umassmed.edu/PHARE ***; *** ***; *** OUTPUTS: MDS3_CHESS, a 0-5 scale, where 0 is the least instability in health, and 5 ***; *** is the most highly unstable health. ***; *** ***; *** ATTRIBUTION: This code was developed under the auspices of the PHARE Study Group ***; *** (Pharmacy * Health sevices * Aging Research * Epidemiology) at the University of ***; *** Massachusetts Morningside Graduate School of Biomedical Sciences, Worcester. ***; *** The code is released for use under a Creative Commons CC-BY license ***; *** (https://creativecommons.org/licenses/by/4.0/) meaning that the code is available ***; *** to be shared and adapted for any purpose, including commerical uses, with the sole ***; *** restriction being that the PHARE Group must be acknowledged as the source from ***; *** which any direct or derived use is made. ***; *** ***; *** CITATION: Bill M. Jesdale, Adrita Boorah, Anyah Prasad, Kate L. Lapane, the PHARE ***; *** Study Group (2024) MDS3_CHESS_v20231228.sas [SAS Program]. ***; *** available at: http://umassmed.edu/PHARE ***; *** ***; ***********************************************************************************************; *** ***; *** S C A L E C O N S T R U C T I O N ***; *** ***; *** The CHESS Scale is fairly complex, and the original source does not describe how to ***; *** handle missing items. Below, we describe the scale construction, as well as how we ***; *** have approached missing values in constructing the scale. ***; *** ***; *** The CHESS Scale may be best considered as being constructed 4 domains, the first 3 of ***; *** which contribute 0 or 1 points, and the 4th of which contributes 0-2 points. ***; *** We decided that missing on ony of these 4 components should result in a missing ***; *** CHESS Scale value. ***; *** ***; *** As with all scales, we divide missing-ness into three components: .A = missing because ***; *** the assessment type does not collect (at least some) information needed to ***; *** calculate the scale, .P = missing because the scale is not defined for residents ***; *** in this population (e.g. those who are comatose are missing many variables), ***; *** and .I = missing because the resident is otherwise eligible to have a valid scale ***; *** measure, but one or more items is missing specific to that resident. ***; *** ***; *** 1) End-stage disease (J14 Prognosis "Does the resident have a condition or chronic ***; *** disease that may reslt in a life expectancy of less than 6 months? (Requires ***; *** physician documentation)) ***; *** 0 if unchecked (and not missing) | 1 if checked: missing otherwise ***; *** ***; *** 2) ADL score of 21 or greater (ADL scale is not specified in the manuscript, but it ***; *** presumably is the "long form" scale based on summing 7 ADLs as defined in Morris & ***; *** Fries, 1999 and updated to MDS3.0 by Wysocki et al., 2015) ***; ***; *** 0 if 0 to 20 | 1 if 21 to 28 | missing otherwise ***; *** ***; *** 3) Any of 4 indicators of cognitive impairment/instability: ***; *** CFS of 4 (MDS3_CFS=4) ***; *** acute mental status change (C16=1 or C16.1=1) ***; *** ARBS of 3 or greater (MDS3_ARBS>=3), or ***; *** at least moderate impairment in daily decision-making (C10>=2) ***; *** 0 if none of these | 1 if any of these ***; *** ***; *** 4) Signs and symptoms. 0 if none present, 1 if 1 present, 2 if 2 or more present. ***; *** Respiratory failure (I63) ***; *** Heart failure (I06) ***; *** Dehydration (J15.5c) ***; *** Swallowing disorder (K01a=1 or K01b=1 or K01c=1 or K01d=1) ***; *** Shortness of breath (J1la=1 oe J11b=1 or J11c=1) ***; *** Pressure ulcers (M03c1>0 or M03d1>0 or M03f1>0 or M03g1>0 or M07>=3) ***; *** 2 if any 2 or more symptoms present. ***; *** 1 if any 1 present, and non-missing for any symptom other than food uneaten. ***; *** 0 if none present, and non-missing for any symptom other than food uneaten. ***; *** missing otherwise (i.e. when any symptom other than food uneaten is missing) ***; *** Food uneaten is treated differently for the purposes of missing-ness because it is ***; *** only variable in the entire scale construction not collected routinely on ***; *** on quarterly assessments. ***; *** ***; ***********************************************************************************************; *** ***; *** NOTE: The CHESS scale is generally calculable for all "full", quarterly, or PPS ***; *** assessments. ***; *** It is never calculable for entry tracking or discharge due to resident death. ***; *** It is >sometimes< calculable on discharge records. There is no readily discernable ***; *** pattern (by state, or over time) to explain why it is sometimes present on ***; *** discharge forms, so analyses performed using the CHESS scale should NOT depend ***; *** on the availability of the score on discharge assessments. ***; *** ***; ***********************************************************************************************; ***********************************************************************************************; *** 1) End-Stage disease ***; ***********************************************************************************************; if J1400_Life_Prgns_Cd='0' then temp_EndStage=0; else if J1400_Life_Prgns_Cd='1' then temp_EndStage=1; ***********************************************************************************************; *** 2) ADL score of 21 or greater ***; ***********************************************************************************************; * Note: the variable >MDS3_ADL_Long_Form< must have previously been generated. Find code ***; * on the PHARE website. ***; if 0<=MDS3_ADL_Long_Form<21 then temp_ADL_21=0; else if 21<=MDS3_ADL_Long_Form then temp_ADL_21=1; ***********************************************************************************************; *** 3) Any of 4 indicators of Cognitive impairment and/or instability ***; ***********************************************************************************************; * Note: the variable >MDS3_CFS< must have previously been generated. Find code on the ***; * PHARE website. ***; if MDS3_CFS=4 then temp_CFS=1; else if 0<=MDS3_CFS<4 then temp_CFS=0; * Note: C16 and C13.1a measure the same characteristic, but just appear in an altered ***; * order for assessments before and after 10/1/2016. ***; if C1600_Chg_Mentl_Stus_Cd='1' or C1310a_Mentl_Stus_Chg_Cd='1' then temp_Change_Mental=1; else if C1600_Chg_Mentl_Stus_Cd='0' or C1310a_Mentl_Stus_Chg_Cd='0' then temp_Change_Mental=0; * Note: the variable >MDS3_ARBS< must have previously been generated. Find code on the ***; * PHARE website. ***; if MDS3_ARBS>=3 then temp_ARBS_3=1; else if 0<=MDS3_ARBS<3 then temp_ARBS_3=0; * Note: C10 (daily decision-making) is not asked of residents who complete the BIMS _and_ ***; * were able to complete the interview. We decided to include those who meet these ***; * criteria in the denominator. Although BIMS is not explicitly accounted for in this ***; * summary of cognitive impairment, it is incorporated into the CFS above. ***; if C1000_Dcsn_Mkng_Cd in('2','3') then temp_Decision=1; else if C1000_Dcsn_Mkng_Cd in('0','1') then temp_Decision=0; else if C1000_Dcsn_Mkng_Cd='^' and ('00'<=C0500_Bims_Scre_Num<='15' or C0600_Stf_Cndct_Mentl_Stus_Cd='0') then temp_Decision=0; if temp_CFS=1 or temp_Change_Mental=1 or temp_ARBS_3=1 or temp_Decision=1 then temp_Cognitive=1; else if temp_ARBS_3=0 and temp_Change_Mental=0 and temp_Decision=0 then temp_Cognitive=0; ***********************************************************************************************; *** 4) Signs and Symptoms ***; ***********************************************************************************************; if I6300_Rsprtry_Failr_Cd='1' then temp_Sx_Respiratory=1; else if I6300_Rsprtry_Failr_Cd='0' or I7900_No_Actv_Dease_Cd='1' then temp_Sx_Respiratory=0; if I0600_Hrt_Failr_Cd='1' then temp_Sx_HF=1; else if I0600_Hrt_Failr_Cd='0' or I7900_No_Actv_Dease_Cd='1' then temp_Sx_HF=0; if J1550c_Dhydrt_Cd='1' then temp_Sx_Dehydration=1; else if J1550c_Dhydrt_Cd='0' or J1550z_No_Prblm_Cond_Cd='1' then temp_Sx_Dehydration=0; if J1100a_SOB_Exrtn_Cd='1' or J1100b_SOB_Sitg_Cd='1' or J1100c_SOB_Lyg_Cd='1' then temp_Sx_SOB=1; else if J1100a_SOB_Exrtn_Cd='0' and J1100b_SOB_Sitg_Cd='0' and J1100c_SOB_Lyg_Cd='0' then temp_Sx_SOB=0; else if J1100z_No_SOB_Cd='1' then temp_Sx_SOB=0; if K0100a_Loss_Mouth_Eatg_Cd='1' or K0100b_Hld_Food_Mouth_Cd='1' or K0100c_Chok_Drng_Meal_Cd='1' or K0100d_Cmplnt_Swlwg_Cd='1' then temp_Sx_Swallowing=1; else if K0100a_Loss_Mouth_Eatg_Cd='0' and K0100b_Hld_Food_Mouth_Cd='0' and K0100c_Chok_Drng_Meal_Cd='0' and K0100d_Cmplnt_Swlwg_Cd='0' then temp_Sx_Swallowing=0; else if K0100z_No_Swlwg_Cd='1' then temp_Sx_Swallowing=0; * Note: Two types of unstageable ulcers (those because they are deep, and those because ***; * of eschar) can be presumed to be equivalent to a stage 3 or 4 ulcer, and are ***; * counted here as such. ***; if '1'<=M0300c1_Stg_3_Ulcr_Num<='9' or '1'<=M0300d1_Stg_4_Ulcr_Num<='9' or '1'<=M0300f1_Unstgbl_Ulcr_Esc_Num<='9' or '1'<=M0300g1_Unstgbl_Ulcr_Deep_Num<='9' or M0700_Ulcr_Tisue_Type_Cd in('3','4') then temp_Sx_PU3=1; else if M0210_Stg_1_Hghr_Ulcr_Cd='0' or M0700_Ulcr_Tisue_Type_Cd in('1','2') or (M0210_Stg_1_Hghr_Ulcr_Cd='1' and ('1'<=M0300a_Stg_1_Ulcr_Num<='9' or '1'<=M0300b1_Stg_2_Ulcr_Num<='9' or '1'<=M0300e1_Unstgbl_Ulcr_Drsng_Num<='9') and ( M0300c1_Stg_3_Ulcr_Num='0' and M0300d1_Stg_4_Ulcr_Num='0' and M0300f1_Unstgbl_Ulcr_Esc_Num='0' and M0300g1_Unstgbl_Ulcr_Deep_Num='0') ) then temp_Sx_PU3=0; if sum(temp_Sx_Respiratory,temp_Sx_HF,temp_Sx_Dehydration,temp_Sx_SOB,temp_Sx_Swallowing,temp_Sx_PU3)>=2 then temp_Symptoms=2; else if temp_Sx_Respiratory + temp_Sx_HF + temp_Sx_Dehydration + temp_Sx_SOB + temp_Sx_Swallowing + temp_Sx_PU3 in(0,1) then temp_Symptoms = temp_Sx_Respiratory + temp_Sx_HF + temp_Sx_Dehydration + temp_Sx_SOB + temp_Sx_Swallowing + temp_Sx_PU3; ***********************************************************************************************; *** Final scale ***; ***********************************************************************************************; MDS3_CHESS = temp_EndStage + temp_ADL_21 + temp_Cognitive + temp_Symptoms ; if MDS3_CHESS=. then do; if A0310f_Entry_Dschrg_Cd in('01','10','11','12') then MDS3_CHESS=.A; else if A0310a_Fed_OBRA_Cd='99' and A0310b_PPS_Cd in('07','99') and A0310f_Entry_Dschrg_Cd='99' then MDS3_CHESS=.A; else if B0100_Cmts_Cd='1' then MDS3_CHESS=.P; else if J1400_Life_Prgns_Cd='-' or MDS3_ADL_Long_Form in(.,.I) or C1600_Chg_Mentl_Stus_Cd='-' or C1310a_Mentl_Stus_Chg_Cd='-' or MDS3_ARBS in(.,.I) or I6300_Rsprtry_Failr_Cd='-' or I0600_Hrt_Failr_Cd='-' or J1550c_Dhydrt_Cd='-' or J1100z_No_SOB_Cd='-' or K0100z_No_Swlwg_Cd='-' or M0210_Stg_1_Hghr_Ulcr_Cd='-' then MDS3_CHESS=.I; else MDS3_CHESS=.I; end; label MDS3_CHESS = 'MDS3_CHESS|Minimum Data Set 3.0 Changes in Health, End-stage disease and Symptoms and Signs (CHESS) Score, defined by PHARE multiply validated algorithm' ; drop temp_EndStage temp_ADL_21 temp_CFS temp_Change_Mental temp_ARBS_3 temp_Decision temp_Cognitive temp_Sx_Respiratory temp_Sx_HF temp_Sx_Dehydration temp_Sx_SOB temp_Sx_Swallowing temp_Sx_PU3 temp_Symptoms ;