APCLNJ23 ; IHS/CMI/LAB - INJURY REPORT COVER PAGE ;
;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
TOP ;ENTRY POINT
S APCLPAGE=0
D HEAD
VD W !!,"1. Visits from ",APCLBDD," through ",APCLEDD
LOC ;
W !!,"2. ",$S($D(APCLLOCT):"The following ",1:"All")," Locations of Encounter",$S($D(APCLLOCT):":",1:".") I $D(APCLLOCT) D
.S %=0 F S %=$O(APCLLOCT(%)) Q:%="" D:$Y>(IOSL-4) HEAD Q:$D(APCLQUIT) W !?10,$P(^DIC(4,%,0),U)
.K %
TYPE ;
W !!,"3. ",$S($D(APCLTYPT):"The following ",1:"All")," Visit Types",$S($D(APCLTYPT):":",1:".") I $D(APCLTYPT) D
.S %=0 F S %=$O(APCLTYPT(%)) Q:%="" S V=$$EXTSET^XBFUNC(9000010,.03,%) D:$Y>(IOSL-4) HEAD Q:$D(APCLQUIT) W !?10,V
K %,V
SC ;
W !!,"4. ",$S($D(APCLSCT):"The following ",1:"All")," Visit Service Categories",$S($D(APCLSCT):":",1:".") I $D(APCLSCT) D
.S %=0 F S %=$O(APCLSCT(%)) Q:%="" S V=$$EXTSET^XBFUNC(9000010,.07,%) D:$Y>(IOSL-4) HEAD Q:$D(APCLQUIT) W !?10,V
K %,V
CLN ;
W !!,"5. ",$S($D(APCLCLNT):"The following ",1:"All")," Clinics",$S($D(APCLCLNT):":",1:".") I $D(APCLCLNT) D
.S %=0 F S %=$O(APCLCLNT(%)) Q:%="" D:$Y>(IOSL-4) HEAD Q:$D(APCLQUIT) W !?10,$P(^DIC(40.7,%,0),U)
.K %
AGE ;
W !!,"6. ",$S($D(APCLAGET):"The following ",1:"All")," Ages",$S($D(APCLAGET):": "_APCLAGET,1:".")
ICD ;
W !!,"7. All vists with an ICD9 Diagnosis between 800 and 999 or ICD10 codes",!?5,"S00-T88 (injury codes)."
I $E(IOST)="C",IO=IO(0) W !! S DIR("A")="End of cover page - Hit return",DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S APCLQUIT="" Q
Q
HEAD ;
I 'APCLPAGE G HEAD1
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S APCLQUIT="" Q
;
HEAD1 ;
S APCLPAGE=APCLPAGE+1
W:$D(IOF) @IOF
S X=$P(^DIC(4,DUZ(2),0),"^")
W !!,$P(^VA(200,DUZ,0),"^",2),?(80-$L(X)/2),X,!
W !,"The Surveillance Injury Report is based on the following criteria:",!
Q
APCLNJ23 ; IHS/CMI/LAB - INJURY REPORT COVER PAGE ;
+1 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
TOP ;ENTRY POINT
+1 SET APCLPAGE=0
+2 DO HEAD
VD WRITE !!,"1. Visits from ",APCLBDD," through ",APCLEDD
LOC ;
+1 WRITE !!,"2. ",$SELECT($DATA(APCLLOCT):"The following ",1:"All")," Locations of Encounter",$SELECT($DATA(APCLLOCT):":",1:".")
IF $DATA(APCLLOCT)
Begin DoDot:1
+2 SET %=0
FOR
SET %=$ORDER(APCLLOCT(%))
IF %=""
QUIT
IF $Y>(IOSL-4)
DO HEAD
IF $DATA(APCLQUIT)
QUIT
WRITE !?10,$PIECE(^DIC(4,%,0),U)
+3 KILL %
End DoDot:1
TYPE ;
+1 WRITE !!,"3. ",$SELECT($DATA(APCLTYPT):"The following ",1:"All")," Visit Types",$SELECT($DATA(APCLTYPT):":",1:".")
IF $DATA(APCLTYPT)
Begin DoDot:1
+2 SET %=0
FOR
SET %=$ORDER(APCLTYPT(%))
IF %=""
QUIT
SET V=$$EXTSET^XBFUNC(9000010,.03,%)
IF $Y>(IOSL-4)
DO HEAD
IF $DATA(APCLQUIT)
QUIT
WRITE !?10,V
End DoDot:1
+3 KILL %,V
SC ;
+1 WRITE !!,"4. ",$SELECT($DATA(APCLSCT):"The following ",1:"All")," Visit Service Categories",$SELECT($DATA(APCLSCT):":",1:".")
IF $DATA(APCLSCT)
Begin DoDot:1
+2 SET %=0
FOR
SET %=$ORDER(APCLSCT(%))
IF %=""
QUIT
SET V=$$EXTSET^XBFUNC(9000010,.07,%)
IF $Y>(IOSL-4)
DO HEAD
IF $DATA(APCLQUIT)
QUIT
WRITE !?10,V
End DoDot:1
+3 KILL %,V
CLN ;
+1 WRITE !!,"5. ",$SELECT($DATA(APCLCLNT):"The following ",1:"All")," Clinics",$SELECT($DATA(APCLCLNT):":",1:".")
IF $DATA(APCLCLNT)
Begin DoDot:1
+2 SET %=0
FOR
SET %=$ORDER(APCLCLNT(%))
IF %=""
QUIT
IF $Y>(IOSL-4)
DO HEAD
IF $DATA(APCLQUIT)
QUIT
WRITE !?10,$PIECE(^DIC(40.7,%,0),U)
+3 KILL %
End DoDot:1
AGE ;
+1 WRITE !!,"6. ",$SELECT($DATA(APCLAGET):"The following ",1:"All")," Ages",$SELECT($DATA(APCLAGET):": "_APCLAGET,1:".")
ICD ;
+1 WRITE !!,"7. All vists with an ICD9 Diagnosis between 800 and 999 or ICD10 codes",!?5,"S00-T88 (injury codes)."
+2 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !!
SET DIR("A")="End of cover page - Hit return"
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET APCLQUIT=""
QUIT
+3 QUIT
HEAD ;
+1 IF 'APCLPAGE
GOTO HEAD1
+2 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET APCLQUIT=""
QUIT
+3 ;
HEAD1 ;
+1 SET APCLPAGE=APCLPAGE+1
+2 IF $DATA(IOF)
WRITE @IOF
+3 SET X=$PIECE(^DIC(4,DUZ(2),0),"^")
+4 WRITE !!,$PIECE(^VA(200,DUZ,0),"^",2),?(80-$LENGTH(X)/2),X,!
+5 WRITE !,"The Surveillance Injury Report is based on the following criteria:",!
+6 QUIT