PRSEED3 ;HISC/JH/MD-ATTENDENCE - CLASS COMPLETE ;3/1/92
;;4.0;PAID;;Sep 21, 1995
DEL ; DELETE STUDENT FROM REGISTRATION FILE
W !!,"Do you want to delete this record" S %=2 D YN^DICN I %=0 W $C(7),!!,"Answer YES or NO." G DEL
I '(%=1) S:'(+%>0) POUT=1 Q
S DIK="^PRSE(452.8,DA(2),3,DA(1),1," D ^DIK W !!,PRSENAM," **DELETED**"
Q
DEL1 ; DELETE STUDENT ATTENDANCE RECORD
W !!,"Do you want to delete this record" S %=2 D YN^DICN I %=0 W $C(7),!!,"Answer YES or NO." G DEL1
I '(%=1) S:'(+%>0) POUT=1 Q
S DIK="^PRSE(452," D ^DIK W !!,N1," **DELETED**"
Q
LOC ; LOCATION SELECTION
I X=U!($G(POUT)) S Y=0 Q
S PRSEDEF="",PRSEDEF=$P($G(^PRSE(452,DA,0)),U,15)
S PRSNAM=$P($G(^PRSE(452,DA,6)),U,2) I '(PRSNAM=""),$D(^VA(200,"B",PRSNAM)),$G(PRSEDEF)="" S PRSEDEF=$P(^PRSE(452.7,1,0),U,2)
I PRSEDEF="",'($D(VA(200,"B",PRSNAM))),'(PRSNAM=""),$D(^PRSE(452.2,"B",PRSNAM)) D
. S PRSEDA=$O(^PRSE(452.2,"B",PRSNAM,0)) I $D(^PRSE(452.2,+PRSEDA,0)) S PRSEZ=^(0) S:'($P(PRSEZ,U,3)="") PRSEDEF=$P(PRSEZ,U,3)_","_$S($D(^DIC(5,+$P(PRSEZ,U,4),0)):$P(^(0),U,2),1:"")
. Q
ASK W !,"LOCATION OF PRESENTATION: "_$S('(PRSEDEF=""):PRSEDEF_"//",1:"") R X:DTIME I '$T!(X="^") S Y=0 Q
I X="",'(PRSEDEF="") S X=PRSEDEF
I $S(X["?":1,1:0) W !!,$C(7),?3,"Answer must be 3-30 characters in length.",!,?2,"This field contains the location where the Program/Class is to be held.",! G ASK
S PRSELOC=$S('(X=""):X,X=""&'(PRSEDEF=""):PRSEDEF,1:"")
K PRSNAM
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSEED3 1456 printed Dec 13, 2024@02:26:28 Page 2
PRSEED3 ;HISC/JH/MD-ATTENDENCE - CLASS COMPLETE ;3/1/92
+1 ;;4.0;PAID;;Sep 21, 1995
DEL ; DELETE STUDENT FROM REGISTRATION FILE
+1 WRITE !!,"Do you want to delete this record"
SET %=2
DO YN^DICN
IF %=0
WRITE $CHAR(7),!!,"Answer YES or NO."
GOTO DEL
+2 IF '(%=1)
if '(+%>0)
SET POUT=1
QUIT
+3 SET DIK="^PRSE(452.8,DA(2),3,DA(1),1,"
DO ^DIK
WRITE !!,PRSENAM," **DELETED**"
+4 QUIT
DEL1 ; DELETE STUDENT ATTENDANCE RECORD
+1 WRITE !!,"Do you want to delete this record"
SET %=2
DO YN^DICN
IF %=0
WRITE $CHAR(7),!!,"Answer YES or NO."
GOTO DEL1
+2 IF '(%=1)
if '(+%>0)
SET POUT=1
QUIT
+3 SET DIK="^PRSE(452,"
DO ^DIK
WRITE !!,N1," **DELETED**"
+4 QUIT
LOC ; LOCATION SELECTION
+1 IF X=U!($GET(POUT))
SET Y=0
QUIT
+2 SET PRSEDEF=""
SET PRSEDEF=$PIECE($GET(^PRSE(452,DA,0)),U,15)
+3 SET PRSNAM=$PIECE($GET(^PRSE(452,DA,6)),U,2)
IF '(PRSNAM="")
IF $DATA(^VA(200,"B",PRSNAM))
IF $GET(PRSEDEF)=""
SET PRSEDEF=$PIECE(^PRSE(452.7,1,0),U,2)
+4 IF PRSEDEF=""
IF '($DATA(VA(200,"B",PRSNAM)))
IF '(PRSNAM="")
IF $DATA(^PRSE(452.2,"B",PRSNAM))
Begin DoDot:1
+5 SET PRSEDA=$ORDER(^PRSE(452.2,"B",PRSNAM,0))
IF $DATA(^PRSE(452.2,+PRSEDA,0))
SET PRSEZ=^(0)
if '($PIECE(PRSEZ,U,3)="")
SET PRSEDEF=$PIECE(PRSEZ,U,3)_","_$SELECT($DATA(^DIC(5,+$PIECE(PRSEZ,U,4),0)):$PIECE(^(0),U,2),1:"")
+6 QUIT
End DoDot:1
ASK WRITE !,"LOCATION OF PRESENTATION: "_$SELECT('(PRSEDEF=""):PRSEDEF_"//",1:"")
READ X:DTIME
IF '$TEST!(X="^")
SET Y=0
QUIT
+1 IF X=""
IF '(PRSEDEF="")
SET X=PRSEDEF
+2 IF $SELECT(X["?":1,1:0)
WRITE !!,$CHAR(7),?3,"Answer must be 3-30 characters in length.",!,?2,"This field contains the location where the Program/Class is to be held.",!
GOTO ASK
+3 SET PRSELOC=$SELECT('(X=""):X,X=""&'(PRSEDEF=""):PRSEDEF,1:"")
+4 KILL PRSNAM
+5 QUIT