#! /bin/bash
# file: ahemap		G. Moody	9 April 2009
#
# label AHEs in a MIMIC II record and map them
#
# For example, to make maps of AHEs in mimic2db/a44001/a44001, run:
#    ahemap a44001
# Outputs of this command are a44001.ps, a44001.png, a44001n.ps, a44001n.png

REC=$1
WREC=mimic2db/$REC/$REC
NREC=${WREC}n
shift

ahelabel $NREC
rdann -r $NREC -a ahe | wrann -r $WREC -a ahe 2>/dev/null
map-record $NREC -a ahe
map-record $WREC -a ahe
