NHAMCS Count of Suicidal Kids


NHAMCS Count of Suicidal Kids


Below is the output of a script that counts the number of ED visits in the 2007-2015 NHAMCS sample data  by kids who were suicidal, meaning their NHAMCS records indicate suicide attempt (SA) or suicidal ideation (SI).  After the output the bash script is included.

===

Analysing NHAMCS sample data 2007-2015

Number of patients in each age group:

Age  5-11: 16895
Age 12-14: 7064
Age 15-17: 9415

Number of patients with SA/SI in any RVF/CAUSE/DIAG field:

Age 15-17:   217
Age 12-14:   125
Age  5-11:    27 (7.31% of total 369)

The Burstein paper reported finding 1613 pediatric SA/SI visits, 
of which 690 (43%) were age 5-11.

This analysis found 369 pediatric SA/SI visits, of which 27 (7.31%) 
were age 5-11.

Translating the counts to population estimates (not included here) 
produces similarly large gaps between my results and those of
Burstein et al. For example, their estimate was 3.16 million 
visits by suicidal kids age 5-11 while my estimate is 100 thousand. 

Note:  The Burstein et al. paper presumes ICD-9 codes E950-E959 mean
suicidal attempt and this analysis does too.  It is unclear to me, however,
if E950-E959 excludes intentional self-injuries (e.g cutting).  My inquiries 
so far failed to resolve this matter.

Note: In 2014 and 2015 there is also a 4th and a 5th column in the
RFV and DIAG fields (i.e. RFV4/RFV5 and DIAG4/DIAG5). 
These fields are seldom used and I found only 2 SA/SI visits by 
kids not counted otherwise.  Since both kids were 16 years old,
I added 2 to the age 15-17 count.

=====

#!/bin/bash

# BASH script to analyze NHAMCS data for suicidal children

# WARNING: do NOT run the script without understanding the code
# WARNING: intended as reference, run at your own risk
# WARNING: shell scripts can overwrite files and so on...

# Presumes existence of a file containing the following format
# from the 2007-2015 NHAMCS data fields:
#
# AGE:SEX:RFV1:RFV2:RFV3:CAUSE1:CAUSE2:CAUSE3:DIAG1:DIAG2:DIAG3:PATWT
#
# This file must contain all patients age 5-17.

# RFV means Reason-for-visit, CAUSE is Cause-of-injury, DIAG is Diagnosis.
#
# The script checks for the following codes:
# RFV: 5820, CAUSE: 95xxx, DIAG: V6284
#
# Note that CAUSE values presume implicit E prefix for ICD-9 codes.
# Therefore 950 means ICD-9 code E950. Suicide attempt is E950-E959.

DATA=nhamcs_data

# Count kids in a specific age group (5-11,12-14,15-17)

list_ag1() { awk -F: '$1 ~ /00[56789]|010|011/'
}
list_ag2() { awk -F: '$1 ~ /01[234]/'
}
list_ag3() { awk -F: '$1 ~ /01[567]/'
}

age_groups()
{
 echo "Number of patients in each age group:"
 echo
 printf "Age  5-11:\t%5d\n" $(cat $DATA | list_ag1 | wc -l)
 printf "Age 12-14:\t%5d\n" $(cat $DATA | list_ag2 | wc -l)
 printf "Age 15-17:\t%5d\n" $(cat $DATA | list_ag3 | wc -l)
 echo
}

# Check for SA/SI in any of the RFV/CODE/DIAG fields
sui()
{
 awk -F: -v r1='^5820' -v r2='^95' -v r3='^V6284' '
$3 ~ r1 || $4 ~ r1 || $5 ~ r1 || $6 ~ r2 || $7 ~ r2 || $8 ~ r2 || $9 ~ r3 || $10 ~ r3 || $11 ~ r3 {print}
 '
}

# Population estimate
population() {
 cut -d: -f 12 | paste -sd+ - |bc
}

# Start of main section

echo
echo "Analysing NHAMCS sample data 2007-2015"
echo

age_groups

echo "Number of patients with SA/SI in any RVF/CAUSE/DIAG field:"
echo

 n1=$(cat $DATA | sui | list_ag1 | wc -l)
 n2=$(cat $DATA | sui | list_ag2 | wc -l)
 n3=$(cat $DATA | sui | list_ag3 | wc -l)

let n3=n3+2 # See note below

p=$(bc<<< "scale=2; 100 * $n1 / $((n1+n2+n3))" )
n=$((n1+n2+n3))

 printf "Age 15-17:\t%5d\n" $n3
 printf "Age 12-14:\t%5d\n" $n2
 printf "Age  5-11:\t%5d\t(%.2f%% of total %d)\n" $n1 $p $n

cat <EOF

The Burstein paper reported finding 1613 pediatric SA/SI visits, 
of which 690 (43%) were age 5-11.

This analysis found $n pediatric SA/SI visits, of which $n1 ($p%) 
were age 5-11.

Translating the counts to population estimates (not included here) 
produces similarly large gaps between my results and those of
Burstein et al. For example, their estimate was 3.16 million 
visits by suicidal kids age 5-11 while my estimate is 100 thousand. 

Note:  The Burstein et al. paper presumes ICD-9 codes E950-E959 mean
suicidal attempt and this analysis does too.  It is unclear to me, however,
if E950-E959 excludes intentional self-injuries (e.g cutting).  My inquiries 
so far failed to resolve this matter.

Note: In 2014 and 2015 there is also a 4th and a 5th column in the 
RFV and DIAG fields (i.e. RFV4/RFV5 and DIAG4/DIAG5). 
These fields are seldom used and I found only 2 SA/SI visits by 
kids not counted otherwise.  Since both kids were 16 years old,
I added 2 to the age 15-17 count.

EOF

===





No comments:

Post a Comment

CDC and YRBS: Time for Transparency

   CDC and YRBS: Time for Transparency This post is related to the  Youth Suicide Rise  project CDC response to Washington Post questions re...