/******************************************************************* * SASload_NIS_2002_SEVERITY.SAS: * THE SAS CODE SHOWN BELOW WILL LOAD THE ASCII NIS * INPATIENT STAY SEVERITY FILE INTO SAS *******************************************************************/ ***********************************************; * Create SAS informats for missing values ; ***********************************************; PROC FORMAT; INVALUE N2PF '-9' = . '-8' = .A '-6' = .C '-5' = .N OTHER = (|2.|) ; INVALUE N3PF '-99' = . '-88' = .A '-66' = .C OTHER = (|3.|) ; INVALUE N4PF '-999' = . '-888' = .A '-666' = .C OTHER = (|4.|) ; INVALUE N5PF '-9999' = . '-8888' = .A '-6666' = .C OTHER = (|5.|) ; INVALUE N5P2F '-9.99' = . '-8.88' = .A '-6.66' = .C OTHER = (|5.2|) ; INVALUE N6PF '-99999' = . '-88888' = .A '-66666' = .C OTHER = (|6.|) ; INVALUE N6P2F '-99.99' = . '-88.88' = .A '-66.66' = .C OTHER = (|6.2|) ; INVALUE N7P2F '-999.99' = . '-888.88' = .A '-666.66' = .C OTHER = (|7.2|) ; INVALUE N8PF '-9999999' = . '-8888888' = .A '-6666666' = .C OTHER = (|8.|) ; INVALUE N8P2F '-9999.99' = . '-8888.88' = .A '-6666.66' = .C OTHER = (|8.2|) ; INVALUE N8P4F '-99.9999' = . '-88.8888' = .A '-66.6666' = .C OTHER = (|8.4|) ; INVALUE N10PF '-999999999' = . '-888888888' = .A '-666666666' = .C OTHER = (|10.|) ; INVALUE N10P4F '-9999.9999' = . '-8888.8888' = .A '-6666.6666' = .C OTHER = (|10.4|) ; INVALUE N10P5F '-999.99999' = . '-888.88888' = .A '-666.66666' = .C OTHER = (|10.5|) ; INVALUE DATE10F '-999999999' = . '-888888888' = .A '-666666666' = .C OTHER = (|MMDDYY10.|) ; INVALUE N12P2F '-99999999.99' = . '-88888888.88' = .A '-66666666.66' = .C OTHER = (|12.2|) ; INVALUE N12P5F '-99999.99999' = . '-88888.88888' = .A '-66666.66666' = .C OTHER = (|12.5|) ; INVALUE N15P2F '-99999999999.99' = . '-88888888888.88' = .A '-66666666666.66' = .C OTHER = (|15.2|) ; RUN; *******************************; * Data Step *; *******************************; DATA NIS_2002_SEVERITY; INFILE 'NIS_2002_SEVERITY.ASC' LRECL = 172; *** Variable attribute ***; ATTRIB KEY LENGTH=8 FORMAT=Z14. LABEL="HCUP record identifier" APRDRG LENGTH=3 LABEL="All Patient Refined DRG" APRDRG_Risk_Mortality LENGTH=3 LABEL="All Patient Refined DRG: Risk of Mortality Subclass" APRDRG_Severity LENGTH=3 LABEL="All Patient Refined DRG: Severity of Illness Subclass" APSDRG LENGTH=4 LABEL="All-Payer Severity-adjusted DRG" APSDRG_Charge_Weight LENGTH=6 LABEL="All-Payer Severity-adjusted DRG: Charge Weight" APSDRG_LOS_Weight LENGTH=6 LABEL="All-Payer Severity-adjusted DRG: Length of Stay Weight" APSDRG_Mortality_Weight LENGTH=6 LABEL="All-Payer Severity-adjusted DRG: Mortality Weight" CM_AIDS LENGTH=3 LABEL="AHRQ comorbidity measure: Acquired immune deficiency syndrome" CM_ALCOHOL LENGTH=3 LABEL="AHRQ comorbidity measure: Alcohol abuse" CM_ANEMDEF LENGTH=3 LABEL="AHRQ comorbidity measure: Deficiency anemias" CM_ARTH LENGTH=3 LABEL="AHRQ comorbidity measure: Rheumatoid arthritis/collagen vascular diseases" CM_BLDLOSS LENGTH=3 LABEL="AHRQ comorbidity measure: Chronic blood loss anemia" CM_CHF LENGTH=3 LABEL="AHRQ comorbidity measure: Congestive heart failure" CM_CHRNLUNG LENGTH=3 LABEL="AHRQ comorbidity measure: Chronic pulmonary disease" CM_COAG LENGTH=3 LABEL="AHRQ comorbidity measure: Coagulopathy" CM_DEPRESS LENGTH=3 LABEL="AHRQ comorbidity measure: Depression" CM_DM LENGTH=3 LABEL="AHRQ comorbidity measure: Diabetes, uncomplicated" CM_DMCX LENGTH=3 LABEL="AHRQ comorbidity measure: Diabetes with chronic complications" CM_DRUG LENGTH=3 LABEL="AHRQ comorbidity measure: Drug abuse" CM_HTN_C LENGTH=3 LABEL="AHRQ comorbidity measure: Hypertension (combine uncomplicated and complicated)" CM_HYPOTHY LENGTH=3 LABEL="AHRQ comorbidity measure: Hypothyroidism" CM_LIVER LENGTH=3 LABEL="AHRQ comorbidity measure: Liver disease" CM_LYMPH LENGTH=3 LABEL="AHRQ comorbidity measure: Lymphoma" CM_LYTES LENGTH=3 LABEL="AHRQ comorbidity measure: Fluid and electrolyte disorders" CM_METS LENGTH=3 LABEL="AHRQ comorbidity measure: Metastatic cancer" CM_NEURO LENGTH=3 LABEL="AHRQ comorbidity measure: Other neurological disorders" CM_OBESE LENGTH=3 LABEL="AHRQ comorbidity measure: Obesity" CM_PARA LENGTH=3 LABEL="AHRQ comorbidity measure: Paralysis" CM_PERIVASC LENGTH=3 LABEL="AHRQ comorbidity measure: Peripheral vascular disorders" CM_PSYCH LENGTH=3 LABEL="AHRQ comorbidity measure: Psychoses" CM_PULMCIRC LENGTH=3 LABEL="AHRQ comorbidity measure: Pulmonary circulation disorders" CM_RENLFAIL LENGTH=3 LABEL="AHRQ comorbidity measure: Renal failure" CM_TUMOR LENGTH=3 LABEL="AHRQ comorbidity measure: Solid tumor without metastasis" CM_ULCER LENGTH=3 LABEL="AHRQ comorbidity measure: Peptic ulcer disease excluding bleeding" CM_VALVE LENGTH=3 LABEL="AHRQ comorbidity measure: Valvular disease" CM_WGHTLOSS LENGTH=3 LABEL="AHRQ comorbidity measure: Weight loss" DS_DX_Category1 LENGTH=$5 LABEL="Disease Staging: Principal Disease Category" DS_LOS_Level LENGTH=3 LABEL="Disease Staging: Length of Stay Level" DS_LOS_Scale LENGTH=8 LABEL="Disease Staging: Length of Stay Scale" DS_Mrt_Level LENGTH=3 LABEL="Disease Staging: Mortality Level" DS_Mrt_Scale LENGTH=8 LABEL="Disease Staging: Mortality Scale" DS_RD_Level LENGTH=3 LABEL="Disease Staging: Resource Demand Level" DS_RD_Scale LENGTH=8 LABEL="Disease Staging: Resource Demand Scale" DS_Stage1 LENGTH=5 FORMAT=4.2 LABEL="Disease Staging: Principal Stage" HOSPID LENGTH=4 FORMAT=Z5. LABEL="HCUP hospital identification number" ; *** Input the variables from the ASCII file ***; INPUT @1 KEY 14. @15 APRDRG N4PF. @19 APRDRG_Risk_Mortality N2PF. @21 APRDRG_Severity N2PF. @23 APSDRG N5PF. @28 APSDRG_Charge_Weight N10P5F. @38 APSDRG_LOS_Weight N10P5F. @48 APSDRG_Mortality_Weight N10P5F. @58 CM_AIDS N2PF. @60 CM_ALCOHOL N2PF. @62 CM_ANEMDEF N2PF. @64 CM_ARTH N2PF. @66 CM_BLDLOSS N2PF. @68 CM_CHF N2PF. @70 CM_CHRNLUNG N2PF. @72 CM_COAG N2PF. @74 CM_DEPRESS N2PF. @76 CM_DM N2PF. @78 CM_DMCX N2PF. @80 CM_DRUG N2PF. @82 CM_HTN_C N2PF. @84 CM_HYPOTHY N2PF. @86 CM_LIVER N2PF. @88 CM_LYMPH N2PF. @90 CM_LYTES N2PF. @92 CM_METS N2PF. @94 CM_NEURO N2PF. @96 CM_OBESE N2PF. @98 CM_PARA N2PF. @100 CM_PERIVASC N2PF. @102 CM_PSYCH N2PF. @104 CM_PULMCIRC N2PF. @106 CM_RENLFAIL N2PF. @108 CM_TUMOR N2PF. @110 CM_ULCER N2PF. @112 CM_VALVE N2PF. @114 CM_WGHTLOSS N2PF. @116 DS_DX_Category1 $CHAR5. @121 DS_LOS_Level N2PF. @123 DS_LOS_Scale N12P5F. @135 DS_Mrt_Level N2PF. @137 DS_Mrt_Scale N12P5F. @149 DS_RD_Level N2PF. @151 DS_RD_Scale N12P5F. @163 DS_Stage1 N5P2F. @168 HOSPID 5. ; RUN;