Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURSEPCP

NURSEPCP.m

Go to the documentation of this file.
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