PRSEED5 ;HISC/JH/MD-EMPLOYEE EDIT ATTENDANCE ;9/7/95 09:48
;;4.0;PAID;;Sep 21, 1995
EN1 ; ENTRY POINT FROM OPTION PRSE-IND-REG
S X=$G(^PRSE(452.7,1,"OFF")) I X=""!(X=1) D MSG6^PRSEMSG Q
S PRSESLF=1 S (PRDA,PRSEEMP)=+DUZ,PRSESSN=$P($G(^VA(200,+DUZ,1)),U,9),PRSENAM=$P($G(^VA(200,+DUZ,0)),U)
I (PRDA="") W !!,$C(7),"INCOMPLETE EMPLOYEE FILE DATA-CANNOT CONTINUE!" G ^PRSEKILL
I PRSESSN=""!(PRSENAM="") W !!,$C(7),"INCOMPLETE NEW PERSON DATA-CANNOT CONTINUE!" G ^PRSEKILL
D EN1^PRSEED6
G ^PRSEKILL
;
EN2 ; This entry point is for individual student self-attendence.
S VA200DA=DUZ,N1=$P($G(^VA(200,+DUZ,0)),U),PRSESSN=$P($G(^VA(200,DUZ,1)),U,9) ;S VA200="I +$$EN3^PRSEUTL3($G(PRDA))=PRSESER,^VA(200,DUZ,0)"
D EN2^PRSEUTL3($G(DUZ)) I PRSESER=""&'(DUZ(0)="@") D MSG3^PRSEMSG G ^PRSEKILL
;
S NOUT=0,DIR(0)="SO^M:Mandatory Training (MI);C:Continuing Education;O:Miscellaneous;W:Unit/Location Training",DIR("A")="Select a Training Type" D ^DIR K DIR G:$D(DTOUT)!($D(DUOUT))!(U[X)!(Y="") ^PRSEKILL S PRSETYP=Y
;
ASK W ! K Y S DIC="^PRSE(452.1,",DIC("A")="Select CLASS: ",DIC(0)="AEMZ",DIC("W")="S ZZ=$P(^(0),U,8) W ?($X+5),$P(^PRSP(454.1,ZZ,0),U)"
I PRSETYP="M" S DIC("S")="S YY=$O(^PRSE(452.8,""B"",+Y,0)) I $P(^PRSE(452.1,+Y,0),U,7)=""M"",($P(^(0),U,8)=PRSESER!($P(^(0),U,9)=0)&($D(^PRSPC(DUZ,6,""B"",+Y)))),$D(^PRSE(452.8,+YY,3,""C"")),(9999999-$O(^PRSE(452.8,+YY,3,""C"",0)))'>(DT_.24)"
E S DIC("S")="S YY=$O(^PRSE(452.8,""B"",+Y,0)) I $P(^PRSE(452.1,+Y,0),U,7)=PRSETYP,($P(^(0),U,8)=PRSESER!($P(^(0),U,9)=0)),$D(^PRSE(452.8,+YY,3,""C"")),(9999999-$O(^PRSE(452.8,+YY,3,""C"",0)))'>(DT_.24)"
D ^DIC K DIC I $D(DTOUT)!($D(DTOUT))!(U[X)!'(+Y>0) G ^PRSEKILL
S PRSEMI=+Y,X=$P(Y,U,2),DIC="^PRSE(452.8,",DIC(0)="ZE",DIC("S")="I $P(^(0),U)=PRSEMI" K Y D ^DIC K DIC I $D(DTOUT)!($D(DUOUT))!'(+Y>0)!(U[X) S POUT=1 G ^PRSEKILL
;
S PRDA(2)=+Y,PRSEY=Y(0),PRSENAM=Y(0,0),Y=$S($D(^PRSE(452.8,PRDA(2),3,"C")):9999999-$O(^PRSE(452.8,PRDA(2),3,"C",0)),1:"") D:+Y D^DIQ S:'(Y="") DIR("B")=Y
S DIR(0)="PAO^PRSE(452.8,PRDA(2),3,:EMQZ",DIR("A")="Select DATE: " K Y D ^DIR K DIR I $D(DTOUT)!($D(DUOUT))!("^"[X) G EN2
W ! S PRDA(1)=+Y,PRDAT=$P(Y,U,2),Y="" D ADD^PRSEED6
G ASK
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSEED5 2196 printed Dec 13, 2024@02:26:30 Page 2
PRSEED5 ;HISC/JH/MD-EMPLOYEE EDIT ATTENDANCE ;9/7/95 09:48
+1 ;;4.0;PAID;;Sep 21, 1995
EN1 ; ENTRY POINT FROM OPTION PRSE-IND-REG
+1 SET X=$GET(^PRSE(452.7,1,"OFF"))
IF X=""!(X=1)
DO MSG6^PRSEMSG
QUIT
+2 SET PRSESLF=1
SET (PRDA,PRSEEMP)=+DUZ
SET PRSESSN=$PIECE($GET(^VA(200,+DUZ,1)),U,9)
SET PRSENAM=$PIECE($GET(^VA(200,+DUZ,0)),U)
+3 IF (PRDA="")
WRITE !!,$CHAR(7),"INCOMPLETE EMPLOYEE FILE DATA-CANNOT CONTINUE!"
GOTO ^PRSEKILL
+4 IF PRSESSN=""!(PRSENAM="")
WRITE !!,$CHAR(7),"INCOMPLETE NEW PERSON DATA-CANNOT CONTINUE!"
GOTO ^PRSEKILL
+5 DO EN1^PRSEED6
+6 GOTO ^PRSEKILL
+7 ;
EN2 ; This entry point is for individual student self-attendence.
+1 ;S VA200="I +$$EN3^PRSEUTL3($G(PRDA))=PRSESER,^VA(200,DUZ,0)"
SET VA200DA=DUZ
SET N1=$PIECE($GET(^VA(200,+DUZ,0)),U)
SET PRSESSN=$PIECE($GET(^VA(200,DUZ,1)),U,9)
+2 DO EN2^PRSEUTL3($GET(DUZ))
IF PRSESER=""&'(DUZ(0)="@")
DO MSG3^PRSEMSG
GOTO ^PRSEKILL
+3 ;
+4 SET NOUT=0
SET DIR(0)="SO^M:Mandatory Training (MI);C:Continuing Education;O:Miscellaneous;W:Unit/Location Training"
SET DIR("A")="Select a Training Type"
DO ^DIR
KILL DIR
if $DATA(DTOUT)!($DATA(DUOUT))!(U[X)!(Y="")
GOTO ^PRSEKILL
SET PRSETYP=Y
+5 ;
ASK WRITE !
KILL Y
SET DIC="^PRSE(452.1,"
SET DIC("A")="Select CLASS: "
SET DIC(0)="AEMZ"
SET DIC("W")="S ZZ=$P(^(0),U,8) W ?($X+5),$P(^PRSP(454.1,ZZ,0),U)"
+1 IF PRSETYP="M"
SET DIC("S")="S YY=$O(^PRSE(452.8,""B"",+Y,0)) I $P(^PRSE(452.1,+Y,0),U,7)=""M"",($P(^(0),U,8)=PRSESER!($P(^(0),U,9)=0)&($D(^PRSPC(DUZ,6,""B"",+Y)))),$D(^PRSE(452.8,+YY,3,""C"")),(9999999-$O(^PRSE(452.8,+YY,3,""C"",0)))'>(DT_.24)"
+2 IF '$TEST
SET DIC("S")="S YY=$O(^PRSE(452.8,""B"",+Y,0)) I $P(^PRSE(452.1,+Y,0),U,7)=PRSETYP,($P(^(0),U,8)=PRSESER!($P(^(0),U,9)=0)),$D(^PRSE(452.8,+YY,3,""C"")),(9999999-$O(^PRSE(452.8,+YY,3,""C"",0)))'>(DT_.24)"
+3 DO ^DIC
KILL DIC
IF $DATA(DTOUT)!($DATA(DTOUT))!(U[X)!'(+Y>0)
GOTO ^PRSEKILL
+4 SET PRSEMI=+Y
SET X=$PIECE(Y,U,2)
SET DIC="^PRSE(452.8,"
SET DIC(0)="ZE"
SET DIC("S")="I $P(^(0),U)=PRSEMI"
KILL Y
DO ^DIC
KILL DIC
IF $DATA(DTOUT)!($DATA(DUOUT))!'(+Y>0)!(U[X)
SET POUT=1
GOTO ^PRSEKILL
+5 ;
+6 SET PRDA(2)=+Y
SET PRSEY=Y(0)
SET PRSENAM=Y(0,0)
SET Y=$SELECT($DATA(^PRSE(452.8,PRDA(2),3,"C")):9999999-$ORDER(^PRSE(452.8,PRDA(2),3,"C",0)),1:"")
if +Y
DO D^DIQ
if '(Y="")
SET DIR("B")=Y
+7 SET DIR(0)="PAO^PRSE(452.8,PRDA(2),3,:EMQZ"
SET DIR("A")="Select DATE: "
KILL Y
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!($DATA(DUOUT))!("^"[X)
GOTO EN2
+8 WRITE !
SET PRDA(1)=+Y
SET PRDAT=$PIECE(Y,U,2)
SET Y=""
DO ADD^PRSEED6
+9 GOTO ASK