/***************************************************************************** * SASload_NIS_2008_DX_PR_GRPS.SAS * This program will load the 2008 NIS ASCII DX_PR_GRPS 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 N4P1F '-9.9' = . '-8.8' = .A '-6.6' = .C OTHER = (|4.1|) ; 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 N11P7F '-99.9999999' = . '-88.8888888' = .A '-66.6666666' = .C OTHER = (|11.7|) ; 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 N13PF '-999999999999' = . '-888888888888' = .A '-666666666666' = .C OTHER = (|13.|) ; INVALUE N15P2F '-99999999999.99' = . '-88888888888.88' = .A '-66666666666.66' = .C OTHER = (|15.2|) ; RUN; *** Data Step to load the file ***; DATA NIS_2008_DX_PR_GRPS; INFILE 'NIS_2008_DX_PR_GRPS.ASC' LRECL = 154; *** Define data element attributes ***; ATTRIB HOSPID LENGTH=4 FORMAT=Z5. LABEL="HCUP hospital identification number" KEY LENGTH=8 FORMAT=Z14. LABEL="HCUP record identifier" CHRON1 LENGTH=3 LABEL="Chronic condition indicator 1" CHRON2 LENGTH=3 LABEL="Chronic condition indicator 2" CHRON3 LENGTH=3 LABEL="Chronic condition indicator 3" CHRON4 LENGTH=3 LABEL="Chronic condition indicator 4" CHRON5 LENGTH=3 LABEL="Chronic condition indicator 5" CHRON6 LENGTH=3 LABEL="Chronic condition indicator 6" CHRON7 LENGTH=3 LABEL="Chronic condition indicator 7" CHRON8 LENGTH=3 LABEL="Chronic condition indicator 8" CHRON9 LENGTH=3 LABEL="Chronic condition indicator 9" CHRON10 LENGTH=3 LABEL="Chronic condition indicator 10" CHRON11 LENGTH=3 LABEL="Chronic condition indicator 11" CHRON12 LENGTH=3 LABEL="Chronic condition indicator 12" CHRON13 LENGTH=3 LABEL="Chronic condition indicator 13" CHRON14 LENGTH=3 LABEL="Chronic condition indicator 14" CHRON15 LENGTH=3 LABEL="Chronic condition indicator 15" CHRONB1 LENGTH=3 LABEL="Chronic condition body system 1" CHRONB2 LENGTH=3 LABEL="Chronic condition body system 2" CHRONB3 LENGTH=3 LABEL="Chronic condition body system 3" CHRONB4 LENGTH=3 LABEL="Chronic condition body system 4" CHRONB5 LENGTH=3 LABEL="Chronic condition body system 5" CHRONB6 LENGTH=3 LABEL="Chronic condition body system 6" CHRONB7 LENGTH=3 LABEL="Chronic condition body system 7" CHRONB8 LENGTH=3 LABEL="Chronic condition body system 8" CHRONB9 LENGTH=3 LABEL="Chronic condition body system 9" CHRONB10 LENGTH=3 LABEL="Chronic condition body system 10" CHRONB11 LENGTH=3 LABEL="Chronic condition body system 11" CHRONB12 LENGTH=3 LABEL="Chronic condition body system 12" CHRONB13 LENGTH=3 LABEL="Chronic condition body system 13" CHRONB14 LENGTH=3 LABEL="Chronic condition body system 14" CHRONB15 LENGTH=3 LABEL="Chronic condition body system 15" PCLASS1 LENGTH=3 LABEL="Procedure class 1" PCLASS2 LENGTH=3 LABEL="Procedure class 2" PCLASS3 LENGTH=3 LABEL="Procedure class 3" PCLASS4 LENGTH=3 LABEL="Procedure class 4" PCLASS5 LENGTH=3 LABEL="Procedure class 5" PCLASS6 LENGTH=3 LABEL="Procedure class 6" PCLASS7 LENGTH=3 LABEL="Procedure class 7" PCLASS8 LENGTH=3 LABEL="Procedure class 8" PCLASS9 LENGTH=3 LABEL="Procedure class 9" PCLASS10 LENGTH=3 LABEL="Procedure class 10" PCLASS11 LENGTH=3 LABEL="Procedure class 11" PCLASS12 LENGTH=3 LABEL="Procedure class 12" PCLASS13 LENGTH=3 LABEL="Procedure class 13" PCLASS14 LENGTH=3 LABEL="Procedure class 14" PCLASS15 LENGTH=3 LABEL="Procedure class 15" ; *** Read data elements from the ASCII file ***; INPUT @1 HOSPID 5. @6 KEY 14. @20 CHRON1 N3PF. @23 CHRON2 N3PF. @26 CHRON3 N3PF. @29 CHRON4 N3PF. @32 CHRON5 N3PF. @35 CHRON6 N3PF. @38 CHRON7 N3PF. @41 CHRON8 N3PF. @44 CHRON9 N3PF. @47 CHRON10 N3PF. @50 CHRON11 N3PF. @53 CHRON12 N3PF. @56 CHRON13 N3PF. @59 CHRON14 N3PF. @62 CHRON15 N3PF. @65 CHRONB1 N3PF. @68 CHRONB2 N3PF. @71 CHRONB3 N3PF. @74 CHRONB4 N3PF. @77 CHRONB5 N3PF. @80 CHRONB6 N3PF. @83 CHRONB7 N3PF. @86 CHRONB8 N3PF. @89 CHRONB9 N3PF. @92 CHRONB10 N3PF. @95 CHRONB11 N3PF. @98 CHRONB12 N3PF. @101 CHRONB13 N3PF. @104 CHRONB14 N3PF. @107 CHRONB15 N3PF. @110 PCLASS1 N3PF. @113 PCLASS2 N3PF. @116 PCLASS3 N3PF. @119 PCLASS4 N3PF. @122 PCLASS5 N3PF. @125 PCLASS6 N3PF. @128 PCLASS7 N3PF. @131 PCLASS8 N3PF. @134 PCLASS9 N3PF. @137 PCLASS10 N3PF. @140 PCLASS11 N3PF. @143 PCLASS12 N3PF. @146 PCLASS13 N3PF. @149 PCLASS14 N3PF. @152 PCLASS15 N3PF. ; RUN;