Skip directly to local search Skip directly to A to Z list Skip directly to navigation Skip directly to site content Skip directly to page options
CDC Home

Injury Data and Resources

Instructions: Step-by-Step Guide to Accessing NHAMCS-ED Public Use Data Files and Programs to Select Injury Records and Calculate Rates

SAS Statements for Identifying Injury Records in NHAMCS-ED

 

The following SAS statements run in a SAS data step and identify which NHAMCS emergency department records were injuries based on the NCHS Injury Team's definition of injury (See Recommended definition of initial injury visits to emergency departments for use with the NHAMCS-ED data, available on the injury website, for more information.) The injury indicator field is called INJSPB. Records with "INJSPB=1" are injury records. In 2005, the way in which this field was derived changed due to a change in fields on the record. The data prior to 2001 do not include a variable to determine whether the visit was an initial one or not. Definition of an injury record beginning in 2001 includes initial visit status.

 

SAS Statements for 2005-06

 

/*CAUSE1 and DIAG1 are variable names used in our SAS input statement.
CAUSE1 is the variable for "Cause of injury #1"
DIAG1 is the variable for "Physician's diagnosis #1"
INITVIS is an imputed variable to indicate initial visit for problem
INITVIS=1 indicates initial visit*/

CAUSEDET=substr(left(CAUSE1),1,3);
DX13=substr(left(DIAG1),1,3);
DX14=substr(left(DIAG1),1,4);
DX15=substr(left(DIAG1),1,5);

 

/*defining external cause of injury*/

EXTINJ=0;
IF '800'<==CAUSEDET<='869' OR '880'<=CAUSEDET<='929' OR '950'<=CAUSEDET<='999' THEN EXTINJ=1;
IF ('870'<=CAUSEDET<='879') OR ('930'<=CAUSEDET<='949') THEN EXTINJ=2;

 

/*defining first listed injury diagnosis*/

NEWINJ=0;
IF ('8000'<= DX14<='9092') OR DX14='9094' OR ('9099'<=DX14<='9949') OR ('99550'<=DX15<='99559') OR ('99580'<=DX15<='99585') THEN NEWINJ=1;
IF DX13 < '800' or DX13 >'999' THEN NEWINJ=2;

 

/*defining injury records */

INJSPB=0;
IF INITVIS =1 AND ((NEWINJ=1 AND (EXTINJ = 1 OR EXTINJ=0)) OR (NEWINJ=2 AND EXTINJ=1))
THEN INJSPB=1;

 

SAS Statements for 2001-04, 2007

 

/*CAUSE1 and DIAG1 are variable names used in our SAS input statement.
CAUSE1 is the variable for "Cause of injury #1"
DIAG1 is the variable for "Physician's diagnosis #1"
EPISODE is the variable for "Episode of care"
EPISODE=1 indicates initial visit */

CAUSEDET=substr(left(CAUSE1),1,3);
DX13=substr(left(DIAG1),1,3);
DX14=substr(left(DIAG1),1,4);
DX15=substr(left(DIAG1),1,5);

 

/*defining external cause of injury*/

EXTINJ=0;
IF '800'<=CAUSEDET<='869' OR '880'<=CAUSEDET<='929' OR '950'<=CAUSEDET<='999' THEN EXTINJ=1;
IF ('870'<=CAUSEDET<='879') OR ('930'<=CAUSEDET<='949') THEN EXTINJ=2;

 

/*defining first listed injury diagnosis*/

NEWINJ=0;
IF ('8000'<= DX14<='9092') OR DX14='9094' OR ('9099'<=DX14<='9949') OR
('99550'<=DX15<='99559')OR ('99580'<=DX15<='99585') THEN NEWINJ=1;
IF DX13 < '800' or DX13 >'999' THEN NEWINJ=2;

 

/*defining injury records */

INJSPB=0;
IF EPISODE =1 AND ((NEWINJ=1 AND (EXTINJ = 1 OR EXTINJ=0)) OR (NEWINJ=2 AND EXTINJ=1)) THEN INJSPB=1;

 

SAS Statements for 1995-2000

 

/*CAUSE1 and DIAG1 are variable names used in our SAS input statement.
CAUSE1 is the variable for "Cause of injury #1"
DIAG1 is the variable for "Physician's diagnosis #1"
Variable "Episode" not available prior to 2001*/

CAUSEDET=substr(left(CAUSE1),1,3);
DX13=substr(left(DIAG1),1,3);
DX14=substr(left(DIAG1),1,4);
DX15=substr(left(DIAG1),1,5);

 

/*defining external cause of injury*/

EXTINJ=0;
IF '800'<=CAUSEDET<='869' OR '880'<=CAUSEDET<='929' OR '950'<=CAUSEDET<='999' THEN EXTINJ=1;
IF ('870'<=CAUSEDET<='879') OR ('930'<=CAUSEDET<='949') THEN EXTINJ=2;

 

/*defining first listed injury diagnosis*/

NEWINJ=0;
IF ('8000'<= DX14<='9092') OR DX14='9094' OR ('9099'<=DX14<='9949') OR DX14='9955'
OR ('99580'<=DX15<='99585') THEN NEWINJ=1;
IF DX13 < '800' or DX13 >'999' THEN NEWINJ=2;

 

/*defining injury records */

NJSPB=0;
IF ((NEWINJ=1 AND (EXTINJ = 1 OR EXTINJ=0)) OR (NEWINJ=2 AND EXTINJ=1)) THEN INJSPB=1;

 

 

 

Injury Data
Contact Us:
  • Office of Analysis and Epidemiology
    National Center for Health Statistics
    3311 Toledo Rd
    Hyattsville, MD 20782
  • 1 (800) 232-4636
  • nchsinjury@cdc.gov
USA.gov: The U.S. Government's Official Web PortalDepartment of Health and Human Services
Centers for Disease Control and Prevention   1600 Clifton Road Atlanta, GA 30329-4027, USA
800-CDC-INFO (800-232-4636) TTY: (888) 232-6348 - Contact CDC–INFO
A-Z Index
  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
  7. G
  8. H
  9. I
  10. J
  11. K
  12. L
  13. M
  14. N
  15. O
  16. P
  17. Q
  18. R
  19. S
  20. T
  21. U
  22. V
  23. W
  24. X
  25. Y
  26. Z
  27. #