/***************************************************************************** * Stataload_KID_2009_Severity.Do * This program will load the 2009 KID ASCII Severity File into Stata. * Because Stata loads the entire file into memory, it may not be possible * to load every data element for large files. If necessary, edit this * program to change the memory size or to load only selected data elements. *****************************************************************************/ *** Set available memory size *** set mem 500m *** Read data elements from the ASCII file *** infix long HOSPID 1- 5 /// long RECNUM 6- 13 /// int APRDRG 14- 17 /// byte APRDRG_Risk_Mortality 18- 19 /// byte APRDRG_Severity 20- 21 /// long APSDRG 22- 26 /// double APSDRG_Charge_Weight 27- 36 /// double APSDRG_LOS_Weight 37- 46 /// double APSDRG_Mortality_Weight 47- 56 /// byte CM_AIDS 57- 58 /// byte CM_ALCOHOL 59- 60 /// byte CM_ANEMDEF 61- 62 /// byte CM_ARTH 63- 64 /// byte CM_BLDLOSS 65- 66 /// byte CM_CHF 67- 68 /// byte CM_CHRNLUNG 69- 70 /// byte CM_COAG 71- 72 /// byte CM_DEPRESS 73- 74 /// byte CM_DM 75- 76 /// byte CM_DMCX 77- 78 /// byte CM_DRUG 79- 80 /// byte CM_HTN_C 81- 82 /// byte CM_HYPOTHY 83- 84 /// byte CM_LIVER 85- 86 /// byte CM_LYMPH 87- 88 /// byte CM_LYTES 89- 90 /// byte CM_METS 91- 92 /// byte CM_NEURO 93- 94 /// byte CM_OBESE 95- 96 /// byte CM_PARA 97- 98 /// byte CM_PERIVASC 99-100 /// byte CM_PSYCH 101-102 /// byte CM_PULMCIRC 103-104 /// byte CM_RENLFAIL 105-106 /// byte CM_TUMOR 107-108 /// byte CM_ULCER 109-110 /// byte CM_VALVE 111-112 /// byte CM_WGHTLOSS 113-114 /// str DS_DX_Category1 115-119 /// float DS_Stage1 120-124 /// using "KID_2009_Severity.ASC" *** Assign labels to the data elements *** label var HOSPID "HCUP hospital identification number" label var RECNUM "HCUP record number" label var APRDRG "All Patient Refined DRG" label var APRDRG_Risk_Mortality "All Patient Refined DRG: Risk of Mortality Subclass" label var APRDRG_Severity "All Patient Refined DRG: Severity of Illness Subclass" label var APSDRG "All-Payer Severity-adjusted DRG" label var APSDRG_Charge_Weight "All-Payer Severity-adjusted DRG: Charge Weight" label var APSDRG_LOS_Weight "All-Payer Severity-adjusted DRG: Length of Stay Weight" label var APSDRG_Mortality_Weight "All-Payer Severity-adjusted DRG: Mortality Weight" label var CM_AIDS "AHRQ comorbidity measure: Acquired immune deficiency syndrome" label var CM_ALCOHOL "AHRQ comorbidity measure: Alcohol abuse" label var CM_ANEMDEF "AHRQ comorbidity measure: Deficiency anemias" label var CM_ARTH "AHRQ comorbidity measure: Rheumatoid arthritis/collagen vascular diseases" label var CM_BLDLOSS "AHRQ comorbidity measure: Chronic blood loss anemia" label var CM_CHF "AHRQ comorbidity measure: Congestive heart failure" label var CM_CHRNLUNG "AHRQ comorbidity measure: Chronic pulmonary disease" label var CM_COAG "AHRQ comorbidity measure: Coagulopathy" label var CM_DEPRESS "AHRQ comorbidity measure: Depression" label var CM_DM "AHRQ comorbidity measure: Diabetes, uncomplicated" label var CM_DMCX "AHRQ comorbidity measure: Diabetes with chronic complications" label var CM_DRUG "AHRQ comorbidity measure: Drug abuse" label var CM_HTN_C "AHRQ comorbidity measure: Hypertension (combine uncomplicated and complicated)" label var CM_HYPOTHY "AHRQ comorbidity measure: Hypothyroidism" label var CM_LIVER "AHRQ comorbidity measure: Liver disease" label var CM_LYMPH "AHRQ comorbidity measure: Lymphoma" label var CM_LYTES "AHRQ comorbidity measure: Fluid and electrolyte disorders" label var CM_METS "AHRQ comorbidity measure: Metastatic cancer" label var CM_NEURO "AHRQ comorbidity measure: Other neurological disorders" label var CM_OBESE "AHRQ comorbidity measure: Obesity" label var CM_PARA "AHRQ comorbidity measure: Paralysis" label var CM_PERIVASC "AHRQ comorbidity measure: Peripheral vascular disorders" label var CM_PSYCH "AHRQ comorbidity measure: Psychoses" label var CM_PULMCIRC "AHRQ comorbidity measure: Pulmonary circulation disorders" label var CM_RENLFAIL "AHRQ comorbidity measure: Renal failure" label var CM_TUMOR "AHRQ comorbidity measure: Solid tumor without metastasis" label var CM_ULCER "AHRQ comorbidity measure: Peptic ulcer disease excluding bleeding" label var CM_VALVE "AHRQ comorbidity measure: Valvular disease" label var CM_WGHTLOSS "AHRQ comorbidity measure: Weight loss" label var DS_DX_Category1 "Disease Staging: Principal Disease Category" label var DS_Stage1 "Disease Staging: Principal Stage" *** Convert special values to missing values *** recode RECNUM (-9999999 -8888888 -6666666=.) recode APRDRG (-999 -888 -666=.) recode APRDRG_Risk_Mortality (-9 -8 -6 -5=.) recode APRDRG_Severity (-9 -8 -6 -5=.) recode APSDRG (-9999 -8888 -6666=.) recode APSDRG_Charge_Weight (-999.99999 -888.88888 -666.66666=.) recode APSDRG_LOS_Weight (-999.99999 -888.88888 -666.66666=.) recode APSDRG_Mortality_Weight (-999.99999 -888.88888 -666.66666=.) recode CM_AIDS (-9 -8 -6 -5=.) recode CM_ALCOHOL (-9 -8 -6 -5=.) recode CM_ANEMDEF (-9 -8 -6 -5=.) recode CM_ARTH (-9 -8 -6 -5=.) recode CM_BLDLOSS (-9 -8 -6 -5=.) recode CM_CHF (-9 -8 -6 -5=.) recode CM_CHRNLUNG (-9 -8 -6 -5=.) recode CM_COAG (-9 -8 -6 -5=.) recode CM_DEPRESS (-9 -8 -6 -5=.) recode CM_DM (-9 -8 -6 -5=.) recode CM_DMCX (-9 -8 -6 -5=.) recode CM_DRUG (-9 -8 -6 -5=.) recode CM_HTN_C (-9 -8 -6 -5=.) recode CM_HYPOTHY (-9 -8 -6 -5=.) recode CM_LIVER (-9 -8 -6 -5=.) recode CM_LYMPH (-9 -8 -6 -5=.) recode CM_LYTES (-9 -8 -6 -5=.) recode CM_METS (-9 -8 -6 -5=.) recode CM_NEURO (-9 -8 -6 -5=.) recode CM_OBESE (-9 -8 -6 -5=.) recode CM_PARA (-9 -8 -6 -5=.) recode CM_PERIVASC (-9 -8 -6 -5=.) recode CM_PSYCH (-9 -8 -6 -5=.) recode CM_PULMCIRC (-9 -8 -6 -5=.) recode CM_RENLFAIL (-9 -8 -6 -5=.) recode CM_TUMOR (-9 -8 -6 -5=.) recode CM_ULCER (-9 -8 -6 -5=.) recode CM_VALVE (-9 -8 -6 -5=.) recode CM_WGHTLOSS (-9 -8 -6 -5=.) recode DS_Stage1 (-9.99 -8.88 -6.66=.) save "KID_2009_Severity.dta", replace