SAS Input Statements
The Barell Injury Diagnosis Matrix: A Framework for Classifying Injuries by Body Region and Nature of the Injury
These SAS codes are all valid for data years 1998 and forward. Prior to 1998, some of the codes may have not had 5th or 4th digit specificity and hence could show up as missing, particularly for the site specific data. CODE CORRECTED 9/05/2002.
/* INPUT VARIABLES
DX13 [3 digit code for first-listed ICD-9 CM diagnosis]
DX14 [4 digit code for first-listed diagnosis]
DX15 [5 digit code for first-listed diagnosis]
D5 [5th digit of code]
OUTPUT VARIABLES
ISRCODE
ISRSITE
ISRSITE2
ISRSITE3
*/
DATA HDS99;
set MC.NEW;
IF (‘800’ <=DX13<= ‘829’) THEN ISRCODE=1;
IF DX13 GE ‘830’ AND DX13 LE ‘839’ THEN ISRCODE=2;
IF DX13 GE ‘840’ AND DX13 LE ‘848’ THEN ISRCODE=3;
IF (‘860′<=DX13<=’869’) OR (‘850′<=DX13<=’854′) OR DX13=’952′ OR DX15=’99555’ THEN ISRCODE=4;
IF (‘870’ <=DX13<= ‘884’) OR (‘890’ <=DX13<= ‘894’) THEN ISRCODE=5;
IF (‘885’ <=DX13<= ‘887’) OR (‘895’ <=DX13<= ‘897’) THEN ISRCODE=6;
IF DX13 GE ‘900’ AND DX13 LE ‘904’ THEN ISRCODE=7;
IF DX13 GE ‘910’ AND DX13 LE ‘924’ THEN ISRCODE=8;
IF DX13 GE ‘925’ AND DX13 LE ‘929’ THEN ISRCODE=9;
IF DX13 GE ‘940’ AND DX13 LE ‘949’ THEN ISRCODE=10;
IF (DX13 GE ‘950’ AND DX13 LE ‘951’) OR (‘953′<=DX13<=’957’) THEN ISRCODE=11;
IF DX13= ‘959’ THEN ISRCODE=12;
IF (‘930′<=DX13<=’939’) OR (‘960′<=DX13<=’994’) OR (‘905′<=DX13
<=’908′) OR (‘9090′<=DX14<=’9092′) OR DX13=’958’ OR
(‘99550′<=DX15<=’99554′) OR DX15=’99559’
OR DX14=’9094′ OR DX14=’9099′
OR (‘99580′<=DX15<=’99585’) THEN ISRCODE=13;
IF (‘8001′<=DX14<=’8004’) OR (‘8006′<=DX14<=’8009’) OR (‘80003′<=DX15<=’80005’) OR (‘80053′<=DX15<=’80055’) OR
(‘8011′<=DX14<=’8014’) OR (‘8016′<=DX14<=’8019’) OR (‘80103′<=DX15<=’80105’) OR (‘80153′<=DX15<=’80155’) OR
(‘8031′<=DX14<=’8034’) OR (‘8036′<=DX14<=’8039’) OR
(‘80303′<=DX15<=’80305’) OR (‘80353′<=DX15<=’80355’) OR
(‘8041′<=DX14<=’8044’) OR (‘8046′<=DX14<=’8049’) OR (‘80403′<=DX15<=’80405’) OR (‘80453′<=DX15<=’80455’) OR (‘8502′<=DX14<=’8504’) OR (‘851′<=DX13<=’854’) OR (‘9501′<=DX14<=’9503′) OR DX15=’99555’ THEN ISRSITE=1;
IF DX15=’80000′ OR DX15=’80002′ OR DX15=’80006′ OR DX15=’80009′ OR
DX15=’80100′ OR DX15=’80102′ OR DX15=’80106′ OR DX15=’80109′ OR
DX15=’80300′ OR DX15=’80302′ OR DX15=’80306′ OR DX15=’80309′ OR
DX15=’80400′ OR DX15=’80402′ OR DX15=’80406′ OR DX15=’80409′ OR
DX15=’80050′ OR DX15=’80052′ OR DX15=’80056′ OR DX15=’80059′ OR
DX15=’80150′ OR DX15=’80152′ OR DX15=’80156′ OR DX15=’80159′ OR
DX15=’80350′ OR DX15=’80352′ OR DX15=’80356′ OR DX15=’80359′ OR
DX15=’80450′ OR DX15=’80452′ OR DX15=’80456′ OR DX15=’80459′ OR
DX14=’8500′ OR DX14=’8501′ OR DX14=’8505′ OR DX14=’8509′ THEN ISRSITE=2;
IF DX15=’80001′ OR DX15=’80051′ OR
DX15=’80101′ OR DX15=’80151′ OR
DX15=’80301′ OR DX15=’80351′ OR
DX15=’80401′ OR DX15=’80451′ THEN ISRSITE=3;
IF (DX13=’951′) OR (DX14=’8730′ OR DX14=’8731′ OR DX14=’8738′
OR DX14=’8739′) OR (DX13=’941′ AND D5=’6′)
OR DX15=’95901′ THEN ISRSITE=4;
IF DX13=’802′ OR DX13=’830′ OR DX14=’8480′ OR DX14=’8481′ OR
DX13=’872′ OR (‘8732′<=DX14<=’8737’) OR
(DX13=’941′ AND D5=’1′) OR (DX13=’941′ AND ‘3’<=D5<=’5′) OR
(DX13=’941′ AND D5=’7′) THEN ISRSITE=5;
IF DX14=’9500′ OR DX14=’9509′ OR (‘870′<=DX13<=’871’) OR
DX13=’921′ OR DX13=’918′ OR DX13=’940′ OR (DX13=’941′
AND D5=’2′) THEN ISRSITE=6;
IF (‘8075′<=DX14<=’8076′) OR DX14=’8482′ OR DX14=’9252’
OR DX14=’9530′ OR DX14=’9540′ OR DX13=’874′ OR
(DX13=’941′ AND D5=’8′) THEN ISRSITE=7;
IF DX14=’9251′ OR DX13=’900′ OR DX14=’9570′ OR DX13=’910′
OR DX13=’920′ OR DX14=’9470′ OR DX15=’95909′ OR
(DX13=’941′ AND (D5=’0′ OR D5=’9′)) THEN ISRSITE=8;
IF (‘8060′<=DX14<=’8061′) OR (DX14=’9520’) THEN ISRSITE=9;
IF (‘8062′<=DX14<=’8063′) OR (DX14=’9521’) THEN ISRSITE=10;
IF (‘8064′<=DX14<=’8065′) OR (DX14=’9522’) THEN ISRSITE=11;
IF (‘8066′<=DX14<=’8067’) OR (‘9523′<=DX14<=’9524’) THEN ISRSITE=12;
IF (‘8068′<=DX14<=’8069’) OR (‘9528′<=DX14<=’9529’) THEN ISRSITE=13;
IF (‘8050′<=DX14<=’8051’) OR (‘8390′<=DX14<=’8391′) OR DX14=’8470’
THEN ISRSITE=14;
IF (‘8052′<=DX14<=’8053’) OR (‘83921’=DX15 OR ‘83931’=DX15) OR
DX14=’8471′ THEN ISRSITE=15;
IF (‘8054′<=DX14<=’8055’) OR (‘83920’=DX15 OR ‘83930’=DX15) OR
DX14=’8472′ THEN ISRSITE=16;
IF (‘8056′<=DX14<=’8057’) OR (‘83941’=DX15 OR ‘83942’=DX15)OR (‘83951′<=DX15<=’83952’) OR (‘8473′<=DX14<=’8474’) THEN ISRSITE=17;
IF (‘8058′<=DX14<=’8059’) OR (‘83940’=DX15 OR ‘83949’=DX15)
OR (‘83950’=DX15 OR DX15=’83959’) THEN ISRSITE=18;
IF (‘8070′<=DX14<=’8074′) OR DX15=’83961′ OR DX15=’83971’ OR
(‘8483′<=DX14<=’8484′) OR DX15=’92619’ OR (‘860′<=DX13<=’862’)
OR DX13=’901′ OR DX14=’9531′ OR DX13=’875′ OR DX14=’8790′ OR
DX14=’8791′ OR DX14=’9220′ OR DX14=’9221′ OR DX15=’92233′
OR (DX13=’942′ AND (D5=’1′ OR D5=’2′)) THEN ISRSITE=19;
IF (‘863′<=DX13<=’866′) OR DX13=’868’ OR (‘9020′<=DX14<=’9024’)
OR DX14=’9532′ OR DX14=’9535′ OR (‘8792′<=DX14<=’8795’) OR
DX14=’9222′ OR (DX13=’942′ AND D5=’3′) OR DX14=’9473′
THEN ISRSITE=20;
IF DX13=’808′ OR DX15=’83969′ OR DX15=’83979′ OR DX13=’846′ OR
DX14=’8485′ OR DX14=’9260′ OR DX15=’92612′ OR DX13=’867′ OR
DX14=’9025′ OR (‘90281′<=DX15<=’90282′) OR DX14=’9533’ OR (‘877’
<=DX13<=’878′) OR DX14=’9224′ OR (DX13=’942′ AND D5=’5′) OR
DX14=’9474′ THEN ISRSITE=21;
IF DX13=’809′ OR (‘9268′<=DX14<=’9269′) OR DX14=’9541’ OR
(‘9548′<=DX14<=’9549’) OR (‘8796′<=DX14<=’8797’) OR
(‘9228′<=DX14<=’9229′) OR DX13=’911′ OR (DX13=’942′ AND D5=’0’)
OR (DX13=’942′ AND D5=’9′) OR DX14=’9591′ THEN ISRSITE=22;
IF DX14=’8479′ OR DX15=’92611′ OR DX13=’876′ OR DX15=’92232′
OR DX15=’92231′ OR (DX13=’942′ AND D5=’4′) THEN ISRSITE=23;
IF (‘810′<=DX13<=’812′) OR DX13=’831′ OR DX13=’840′ OR DX13=’880’ OR ‘8872’<=DX14<=’8873′ OR (DX13=’943′ AND ‘3’<=D5<=’6′) OR DX13=’912′ OR DX14=’9230′ OR DX14=’9270′ OR DX14=’9592′ THEN ISRSITE=24;
IF DX13=’813′ OR DX13=’832′ OR DX13=’841′ OR (DX13=’881′ AND ‘0’<=D5<=’1′) OR (‘8870′<=DX14<=’8871′) OR DX14=’9231′ OR DX14=’9271′ OR (DX13=’943’ AND ‘1’<=D5<=’2′) THEN ISRSITE=25;
IF (‘814′<=DX13<=’817’) OR (‘833′<=DX13<=’834′) OR DX13=’842′ OR (DX13=’881′ AND D5=’2’) OR ‘882’<=DX13<=’883′ OR ‘885’<=DX13<=’886′ OR ‘914’<=DX13<=’915′ OR ‘9232’<=DX14<=’9233′ OR ‘9272’<=DX14<=’9273′ OR DX13=’944′ OR ‘9594’<=DX14<=’9595′ THEN ISRSITE=26;
IF DX13=’818′ OR DX13=’884′ OR ‘8874’<=DX14<=’8877′ OR DX13=’903′ OR DX13=’913′ OR DX14=’9593′ OR ‘9238’<=DX14<=’9239′ OR ‘9278’<=DX14<=’9279′ OR DX14=’9534′ OR DX13=’955′ OR (DX13=’943′ AND (D5=’0′ OR D5=’9′)) THEN ISRSITE=27;
IF DX13=’820′ OR DX13=’835′ OR DX13=’843′ OR DX15=’92401′ OR DX15=’92801′ THEN ISRSITE=28;
IF DX13=’821′ OR ‘8972’<=DX14<=’8973′ OR DX15=’92400′ OR DX15=’92800′ OR (DX13=’945′ AND D5=’6′) THEN ISRSITE=29;
IF DX13=’822′ OR DX13=’836′ OR ‘8440’<=DX14<=’8443′ OR DX15=’92411′ OR DX15=’92811′ OR (DX13=’945′ AND D5=’5′) THEN ISRSITE=30;
IF ‘823’<=DX13<=’824′ OR ‘8970’<=DX14<=’8971′ OR DX13=’837′ OR DX14=’8450′ OR DX15=’92410′ OR DX15=’92421′ OR DX15=’92810′ OR DX15=’92821′ OR (DX13=’945′ AND ‘3’<=D5<=’4′) THEN ISRSITE=31;
IF ‘825’<=DX13<=’826′ OR DX13=’838′ OR DX14=’8451′ OR ‘892’<=DX13<= ‘893’ OR ‘895’<=DX13<=’896′ OR DX13=’917′ OR DX15=’92420′ OR DX14= ‘9243’ OR DX15=’92820′ OR DX14=’9283′ OR (DX13=’945′ AND ‘1’<=D5<=’2′) THEN ISRSITE=32;
IF DX13=’827′ OR ‘8448’<=DX14<=’8449′ OR ‘890’<=DX13<=’891′ OR DX13=’894′ OR ‘8974’<=DX14<=’8977′ OR ‘9040’<=DX14<=’9048′ OR DX13=’916′ OR ‘9244’<=DX14<=’9245′ OR DX14=’9288′ OR DX14=’9289′ OR ‘9596’<=DX14<=’9597′ OR (DX13=’945′ AND (D5=’0′ OR D5=’9′)) THEN ISRSITE=33;
IF DX13=’828′ OR DX13=’819′ OR DX15=’90287′ OR DX15=’90289′ OR DX14=’9538′ OR ‘9471’<=DX14<=’9472′ OR DX13=’956′ THEN ISRSITE=34;
IF DX13=’829′ OR ‘8398’<=DX14<=’8399′ OR ‘8488’<=DX14<=’8489′ OR DX13=’869′ OR (‘8798′<=DX14<=’8799′) OR DX14=’9029′ OR DX14=’9049′ OR DX13=’919’ OR ‘9248’<=DX14<=’9249′ OR DX13=’929′ OR DX13=’946′ OR ‘9478’<=DX14<=’9479′ OR ‘948’<=DX13<=’949′ OR DX14=’9539′ OR DX14=’9571′ OR ‘9578’<=DX14<=’9579′ OR ‘9598’<=DX14<=’9599′ THEN ISRSITE=35;
IF (‘930′<=DX13<=’939’) OR (‘960′<=DX13<=’994’) OR (‘905′<=DX13 <=’908’) OR (‘9090′<=DX14<=’9092′) OR DX13=’958’ OR (‘99550′<=DX15 <=’99554′) OR DX15=’99559′ OR DX14=’9094′ OR DX14=’9099’ OR (‘99580′<=DX15<=’99585’) THEN ISRSITE=36;
IF ISRSITE >=1 AND ISRSITE <=3 THEN ISRSITE2=1;
IF ISRSITE >=4 AND ISRSITE <=8 THEN ISRSITE2=2;
IF ISRSITE >=9 AND ISRSITE <=13 THEN ISRSITE2=3;
IF ISRSITE >=14 AND ISRSITE <=18 THEN ISRSITE2=4;
IF ISRSITE >=19 AND ISRSITE <=23 THEN ISRSITE2=5;
IF ISRSITE >=24 AND ISRSITE <=27 THEN ISRSITE2=6;
IF ISRSITE >=28 AND ISRSITE <=33 THEN ISRSITE2=7;
IF ISRSITE >=34 AND ISRSITE <=35 THEN ISRSITE2=8;
IF ISRSITE = 36 THEN ISRSITE2 = 9;
IF ISRSITE >=1 AND ISRSITE <=8 THEN ISRSITE3=1;
IF ISRSITE >=9 AND ISRSITE <=18 THEN ISRSITE3=2;
IF ISRSITE >=19 AND ISRSITE <=23 THEN ISRSITE3=3;
IF ISRSITE >=24 AND ISRSITE <=33 THEN ISRSITE3=4;
IF ISRSITE >=34 AND ISRSITE <=36 THEN ISRSITE3 = 5;
PROC FORMAT;
VALUE ISM
1=’TYPE 1 TBI’
2=’TYPE 2 TBI’
3=’TYPE 3 TBI’
4=’OTHER HEAD’
5=’FACE’
6=’EYE’
7=’NECK’
8=’HEAD,FACE,NECK UNSPEC’
9=’CERVICAL SCI’
10=’THORACIC/DORSAL SCI’
11=’LUMBAR SCI’
12=’SACRUM COCCYX SCI’
13=’SPINE+BACK UNSPEC SCI’
14=’CERVICAL VCI’
15=’THORACIC/DORSAL VCI’
16=’LUMBAR VCI’
17=’SACRUM COCCYX VCI’
18=’SPINE,BACK UNSPEC VCI’
19=’CHEST’
20=’ABDOMEN’
21=’PELVIS+UROGENITAL’
22=’TRUNK’
23=’BACK+BUTTOCK’
24=’SHOULDER&UPPER ARM’
25=’FOREARM&ELBOW’
26=’HAND&WRIST&FINGERS’
27=’OTHER&UNSPEC UPPER EXTREM’
28=’HIP’
29=’UPPER LEG&THIGH’
30=’KNEE’
31=’LOWER LEG&ANKLE’
32=’FOOT&TOES’
33=’OTHER&UNSPEC LOWER EXTREM’
34=’OTHER,MULTIPLE,NEC’
35=’UNSPECIFIED’
36=’SYSTEM WIDE & LATE EFFECTS’;
VALUE I2M
1=’TBI’
2=’OTH HEAD,FACE,NECK’
3=’SCI’
4=’VCI ‘
5=’TORSO’
6=’UPPER EXTREMITY’
7=’LOWER EXTREMITY’
8=’OTHER & UNSPECIFIED’
9=’SYSTEM WIDE & LATE EFFECTS’;
VALUE I3M
1=’HEAD&NECK’
2=’SPINE&BACK’
3=’TORSO’
4=’EXTREMITIES’
5=’UNCLASSIFIABLE BY SITE’;
VALUE INM
1=’FRACTURES ‘
2=’DISLOCATION’
3=’SPRAINS&STRAINS’
4=’INTERNAL ORGAN ‘
5=’OPEN WOUNDS’
6=’AMPUTATIONS’
7=’BLOOD VESSELS’
8=’SUPERFIC/CONT’
9=’CRUSHING’
10=’BURNS’
11=’NERVES’
12=’UNSPECIFIED’
13=’SYSTEM WIDE & LATE EFFECTS’;
PROC FREQ ;
TABLES (ISRSITE ISRSITE2)*ISRCODE /LIST ;
TITLE DX MATRIX FOR ALL INJURIES;
FORMAT ISRCODE INM. ISRSITE2 I2M.
ISRSITE ISM. ;
RUN;
May 2002 Revision (CODE LAST CORRECTED 9/05/2002)