NURSEPCP ;HIRMFO/MD,FT-C.E.PROGRAM ATTENDANCE SUMMARY,PRINT ;8/12/96
;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; C.E PROGRAM ATTENDANCE SUMMARY
S X=$G(^PRSE(452.7,1,"OFF")) Q:X=""!(X=1)
S X=$G(^DIC(213.9,1,"OFF")) Q:X=""!(X=1)
S (NURQUEUE,NURSW1,NURPAGE,NUROUT)=0
D EN1^NURSAUTL G QUIT:NUROUT
I NURMDSW S DIC(0)="AEQMZ",NURPLSCR=0 D EN5^NURSAGSP G:$G(NUROUT) QUIT
I NURMDSW=0,NURPLSW=1 S NURPLSCR=1 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
; ENTRY POINT FOR CONTINIUING EDUCATION PROGRAM
W ! S NPGM=0,DIC("A")="Select CONTINUING EDUCATION PROGRAM (Press return for all Programs): ",DIC=452.1,DIC(0)="AFEQZ",DIC("S")="I $D(^PRSE(452.1,""C"",""C"",+Y))"
D ^DIC K DIC I $D(DUOUT)!($D(DTOUT))!(X["^") S NUROUT=1 G QUIT
I X="" S NPGM=1 G EN2
S NPGM1=$P(Y,U,2)
EN2 ;ENTRY FOR LOCATION OF PROGRAM
S NLOC=0 S DIR(0)="SO^L:Local CE Classes;N:Non-Local CE Classes",DIR("A")="Select Local or Non-Local CE PROGRAMS (Press Return for all classes)" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT)!(X["^") S NUROUT=1 G QUIT
I X="" S NLOC=1 G EN3
S NLOC1=Y
EN3 ; ENTRY POINT FOR CLASS DATE
W ! S X=U,NSP(1)=0,%DT("A")="Start With CLASS DATE (Press return for all dates): ",%DT="AE",X=U D ^%DT K %DT
I X="" S NSP(1)=1 G DEV
I Y'>0!(X=U) S NUROUT=1 G QUIT
S YRST=Y
W ! S X=U,NSPC(2)=0,%DT("A")="Go To CLASS DATE (Press return for all dates until present date): ",%DT="AE",X=U D ^%DT K %DT
I X="" S X="T" D ^%DT S YREND=Y G DEV
I Y'>0!(X=U) S NUROUT=1 G QUIT
S YREND=Y
DEV W ! S ZTRTN="START^NURSEPCP",NURS132=1 D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
K ^TMP("NURE",$J) S X="",(HOLD,HOLD1)=1,(CONTHRS,ACOUNT,LCOUNT,NCOUNT)=0
F NDA=0:0 S NDA=$O(^NURSF(211.8,"C",NDA)) Q:NDA'>0 F NURNODE4=0:0 S NURNODE4=$O(^NURSF(211.8,"C",NDA,NURNODE4)) Q:NURNODE4'>0 D
.F NURNODE5=0 F S NURNODE5=$O(^NURSF(211.8,"C",NDA,NURNODE4,NURNODE5)) Q:NURNODE5'>0 I $P($G(^NURSF(211.8,NURNODE4,1,NURNODE5,0)),U)'>DT&(('$P($G(^(0)),U,6))!($P($G(^(0)),U,6)'<DT)) D
..S DA=$O(^NURSF(210,"B",NDA,0)) I $P($G(^NURSF(210,+DA,0)),U,2)'="",$P($G(^(0)),U,2)'="R" W:$R(500)&($E(IOST)="C") "." D SORT1^NURSEPC0
..Q
.Q
S X=$O(^TMP("NURE",$J,"")),NWRD("F")=$O(NURSNLOC(""))
I X="" D
. S NURSW1="",NURPAGE=0,NURFAC(2)=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURPROG=$S($G(NURPROG)=0:$G(NURPROG(1)),1:"") D NHDR
. W !,"THERE IS NO DATA FOR "_$S($G(NURHOSP)=0&'$D(NURSNLOC)#2:$G(NWRD("F")),1:"THIS REPORT"),! D ENDPG^NURSUT1 S NUROUT=1
. Q
I 'NUROUT D NHDR,NPRINT^NURSEPC0
QUIT K ^TMP("NURE",$J),^TMP("NURDATA",$J),NCLASS,NURNAME,NDT D CLOSE^NURSUT1,^NURSKILL
Q
BRK ; ATTENDEE TOTALS ;Called by NURSEPC0
S NURLINE="",$P(NURLINE,"-",20)="" W ?15,NURLINE,?100,NURLINE,!,?15,"Total Presentation: "_NCOUNT(1),?100,"Total Attended: "_NCOUNT(2),! S (CONTHRS,ACOUNT)=0
W ! Q
BRK1 ; CLASS TOTAL Called by NURSEPC0
I ($Y>(IOSL-8)) D NHDR Q:NUROUT
S NURLINE="",$P(NURLINE,"-",30)="" W !,?11,"TOTAL "
I NCLASS("L")>0 W "LOCAL CLASSES: "_NCLASS("L") S NCLASS("L")=0
I NCLASS("N")>0 W "NON-LOCAL CLASSES: "_NCLASS("N") S NCLASS("N")=0
W ! Q
NHDR ; HEADINGS ;Called by NURSEPC0
I 'NURQUEUE,NURSW1 D ENDPG^NURSUT1 Q:NUROUT
S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
I NURMDSW,$G(NURFAC)'="" W !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
W !,"C.E. TRAINING ATTENDANCE SUMMARY REPORT" S X="T" D ^%DT D:+Y D^DIQ W ?60,Y,?121,"PAGE: ",NURPAGE,!,?76,"CLASS",?92,"CONTACT"
W !,?11,"CLASS",?57,"DATES",?76,"HRs",?85,"CEU's",?92,"HRs",?100,"NAME"
W !,$$REPEAT^XLFSTR("-",132)
I $G(NURPLSW),$G(NURPROG(2))'="" N Z S Z=$$PROD^NURSUT2(NURPROG(2)) W !,?$$CNTR^NURSUT2(NURPROG(2)),$G(Z),!?$$CNTR^NURSUT2(NURPROG(2)),$$REPEAT^XLFSTR("-",$L(Z)+1)
S (NURSW1,HOLD,HOLD1,HOLD2)=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURSEPCP 3717 printed Oct 16, 2024@18:22:49 Page 2
NURSEPCP ;HIRMFO/MD,FT-C.E.PROGRAM ATTENDANCE SUMMARY,PRINT ;8/12/96
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; C.E PROGRAM ATTENDANCE SUMMARY
+1 SET X=$GET(^PRSE(452.7,1,"OFF"))
if X=""!(X=1)
QUIT
+2 SET X=$GET(^DIC(213.9,1,"OFF"))
if X=""!(X=1)
QUIT
+3 SET (NURQUEUE,NURSW1,NURPAGE,NUROUT)=0
+4 DO EN1^NURSAUTL
if NUROUT
GOTO QUIT
+5 IF NURMDSW
SET DIC(0)="AEQMZ"
SET NURPLSCR=0
DO EN5^NURSAGSP
if $GET(NUROUT)
GOTO QUIT
+6 IF NURMDSW=0
IF NURPLSW=1
SET NURPLSCR=1
DO PRD^NURSAGSP
KILL NURPLSCR
IF $GET(NUROUT)
GOTO QUIT
+7 ; ENTRY POINT FOR CONTINIUING EDUCATION PROGRAM
+8 WRITE !
SET NPGM=0
SET DIC("A")="Select CONTINUING EDUCATION PROGRAM (Press return for all Programs): "
SET DIC=452.1
SET DIC(0)="AFEQZ"
SET DIC("S")="I $D(^PRSE(452.1,""C"",""C"",+Y))"
+9 DO ^DIC
KILL DIC
IF $DATA(DUOUT)!($DATA(DTOUT))!(X["^")
SET NUROUT=1
GOTO QUIT
+10 IF X=""
SET NPGM=1
GOTO EN2
+11 SET NPGM1=$PIECE(Y,U,2)
EN2 ;ENTRY FOR LOCATION OF PROGRAM
+1 SET NLOC=0
SET DIR(0)="SO^L:Local CE Classes;N:Non-Local CE Classes"
SET DIR("A")="Select Local or Non-Local CE PROGRAMS (Press Return for all classes)"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)!(X["^")
SET NUROUT=1
GOTO QUIT
+2 IF X=""
SET NLOC=1
GOTO EN3
+3 SET NLOC1=Y
EN3 ; ENTRY POINT FOR CLASS DATE
+1 WRITE !
SET X=U
SET NSP(1)=0
SET %DT("A")="Start With CLASS DATE (Press return for all dates): "
SET %DT="AE"
SET X=U
DO ^%DT
KILL %DT
+2 IF X=""
SET NSP(1)=1
GOTO DEV
+3 IF Y'>0!(X=U)
SET NUROUT=1
GOTO QUIT
+4 SET YRST=Y
+5 WRITE !
SET X=U
SET NSPC(2)=0
SET %DT("A")="Go To CLASS DATE (Press return for all dates until present date): "
SET %DT="AE"
SET X=U
DO ^%DT
KILL %DT
+6 IF X=""
SET X="T"
DO ^%DT
SET YREND=Y
GOTO DEV
+7 IF Y'>0!(X=U)
SET NUROUT=1
GOTO QUIT
+8 SET YREND=Y
DEV WRITE !
SET ZTRTN="START^NURSEPCP"
SET NURS132=1
DO EN7^NURSUT0
if POP!($DATA(ZTSK))
GOTO QUIT
START ;
+1 KILL ^TMP("NURE",$JOB)
SET X=""
SET (HOLD,HOLD1)=1
SET (CONTHRS,ACOUNT,LCOUNT,NCOUNT)=0
+2 FOR NDA=0:0
SET NDA=$ORDER(^NURSF(211.8,"C",NDA))
if NDA'>0
QUIT
FOR NURNODE4=0:0
SET NURNODE4=$ORDER(^NURSF(211.8,"C",NDA,NURNODE4))
if NURNODE4'>0
QUIT
Begin DoDot:1
+3 FOR NURNODE5=0
FOR
SET NURNODE5=$ORDER(^NURSF(211.8,"C",NDA,NURNODE4,NURNODE5))
if NURNODE5'>0
QUIT
IF $PIECE($GET(^NURSF(211.8,NURNODE4,1,NURNODE5,0)),U)'>DT&(('$PIECE($GET(^(0)),U,6))!($PIECE($GET(^(0)),U,6)'<DT))
Begin DoDot:2
+4 SET DA=$ORDER(^NURSF(210,"B",NDA,0))
IF $PIECE($GET(^NURSF(210,+DA,0)),U,2)'=""
IF $PIECE($GET(^(0)),U,2)'="R"
if $RANDOM(500)&($EXTRACT(IOST)="C")
WRITE "."
DO SORT1^NURSEPC0
+5 QUIT
End DoDot:2
+6 QUIT
End DoDot:1
+7 SET X=$ORDER(^TMP("NURE",$JOB,""))
SET NWRD("F")=$ORDER(NURSNLOC(""))
+8 IF X=""
Begin DoDot:1
+9 SET NURSW1=""
SET NURPAGE=0
SET NURFAC(2)=$SELECT($GET(NURFAC)=0:$GET(NURFAC(1)),1:"")
SET NURPROG=$SELECT($GET(NURPROG)=0:$GET(NURPROG(1)),1:"")
DO NHDR
+10 WRITE !,"THERE IS NO DATA FOR "_$SELECT($GET(NURHOSP)=0&'$DATA(NURSNLOC)#2:$GET(NWRD("F")),1:"THIS REPORT"),!
DO ENDPG^NURSUT1
SET NUROUT=1
+11 QUIT
End DoDot:1
+12 IF 'NUROUT
DO NHDR
DO NPRINT^NURSEPC0
QUIT KILL ^TMP("NURE",$JOB),^TMP("NURDATA",$JOB),NCLASS,NURNAME,NDT
DO CLOSE^NURSUT1
DO ^NURSKILL
+1 QUIT
BRK ; ATTENDEE TOTALS ;Called by NURSEPC0
+1 SET NURLINE=""
SET $PIECE(NURLINE,"-",20)=""
WRITE ?15,NURLINE,?100,NURLINE,!,?15,"Total Presentation: "_NCOUNT(1),?100,"Total Attended: "_NCOUNT(2),!
SET (CONTHRS,ACOUNT)=0
+2 WRITE !
QUIT
BRK1 ; CLASS TOTAL Called by NURSEPC0
+1 IF ($Y>(IOSL-8))
DO NHDR
if NUROUT
QUIT
+2 SET NURLINE=""
SET $PIECE(NURLINE,"-",30)=""
WRITE !,?11,"TOTAL "
+3 IF NCLASS("L")>0
WRITE "LOCAL CLASSES: "_NCLASS("L")
SET NCLASS("L")=0
+4 IF NCLASS("N")>0
WRITE "NON-LOCAL CLASSES: "_NCLASS("N")
SET NCLASS("N")=0
+5 WRITE !
QUIT
NHDR ; HEADINGS ;Called by NURSEPC0
+1 IF 'NURQUEUE
IF NURSW1
DO ENDPG^NURSUT1
if NUROUT
QUIT
+2 SET NURPAGE=NURPAGE+1
if $EXTRACT(IOST)="C"!(NURPAGE>1)
WRITE @IOF
+3 IF NURMDSW
IF $GET(NURFAC)'=""
WRITE !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
+4 WRITE !,"C.E. TRAINING ATTENDANCE SUMMARY REPORT"
SET X="T"
DO ^%DT
if +Y
DO D^DIQ
WRITE ?60,Y,?121,"PAGE: ",NURPAGE,!,?76,"CLASS",?92,"CONTACT"
+5 WRITE !,?11,"CLASS",?57,"DATES",?76,"HRs",?85,"CEU's",?92,"HRs",?100,"NAME"
+6 WRITE !,$$REPEAT^XLFSTR("-",132)
+7 IF $GET(NURPLSW)
IF $GET(NURPROG(2))'=""
NEW Z
SET Z=$$PROD^NURSUT2(NURPROG(2))
WRITE !,?$$CNTR^NURSUT2(NURPROG(2)),$GET(Z),!?$$CNTR^NURSUT2(NURPROG(2)),$$REPEAT^XLFSTR("-",$LENGTH(Z)+1)
+8 SET (NURSW1,HOLD,HOLD1,HOLD2)=1
+9 QUIT