AZXZSUP2 ;SUPPORT DATABASE PROGRAM [ 05/01/95 1:25 PM ]
;04/10/92 JOHN H. LYNCH
;
;THIS ROUTINE WILL ALLOW A USER TO UPDATE
;THE STATUS OF ALL SUPPORT CALLS CURRENTLY
;STORED IN THE SUBBDB DATABASE.
MAIN ;AZXZSUP2 PROGRAM CONTROL
;SET LOCAL VARIABLES
S DIC="^DIZ(1991012," ;SET LOOK-UP FILE NUMBER
D EDIT
K DIC,DIE("NO^"),DIE,INUM,SNUM,PIEC,DA,DR,YN
Q
EDIT ;EDIT SUPPORT CALLS STATUS
;SET LOCAL VARIABLES
S DIE("NO^")="NO JUMPING/EXIT" ;KEEP THEM FROM JUMPING OR EXITING
S DIE="1991012" ;1991012 = ^SUPPDB (DATABASE GLOBAL)
;CLEAR SCREEN
W @IOF
W !!!,"One moment please..."
W !!!! H 1
EDITNUM ;Select SUPPORT NUMBER to EDIT: SUB-ROUTINE
;SET LOCAL VARIABLES
S INUM=$P(^DIZ(DIE,0),U,3) ;INUM = CURRENT INTERNAL NUMBER
R !,"Select Support Number to Edit: ",SNUM
;IF "^" OR "" QUIT AND RETURN TO MAINMENU
I (SNUM="^")!(SNUM="") Q
;IF "?" GIVE HELP AND RETURN TO EDITNUM SUB-ROUTINE
I SNUM="?" W !!,"Please enter your Support Log Number to EDIT.",! G EDITNUM
;USER IS TRYING TO ENTER A NUMBER OUT OF SEQUENCE
I SNUM>INUM W !!,"Support Number, ",SNUM," does not exist" H 3 G EDIT
;CHECK TO SEE IF SUPPORT NUMBER HAS ALREADY BEEN DELETED
S PIEC=0
I '$O(^DIZ(DIE,"B",SNUM,PIEC)) W !!,"Support Number, ",SNUM,", has already been deleted!",! H 3 G EDITNUM
W @IOF ;CLEAR SCREEN
S DA=SNUM
S DR=".01;.05;1;4:7" ;SET SUBSCRIPTS TO BE VIEWED
L ^DIZ(DIE,DA):0 I '$T W !!,"Record has been locked, try again later!" H 3 G EDITNUM
D EN^DIQ ;DO DATA DISPLAY OF SUPPORT NUMBER
W !!,"Do you want to continue to edit Support Number, ",SNUM,"? N//"
R YN
I YN'="Y" L G MAIN ;IF NOT "Y" UNLOCK RECORD/GOTO EDIT
W @IOF ;CLEAR SCREEN
W !!,"Editing Support Number, ",DA,!!
S DR=".01///^S X=DA;4;6.5;7" ;DR - STUFF .01(SUPPORT NUMBER)
;CALL FILEMAN TO EDIT STATUS OF ^SUPPDB (DATABASE GLOBAL)
D ^DIE L
W !!!!
R !,"Do you want to continue with Enter/Edit? Y// ",YN
I (YN="Y")!(YN="") G EDIT ;STAY IN EDIT SUB-ROUNTINE
Q ;OTHERWISE RETURN TO MAINMENU
AZXZSUP2 ;SUPPORT DATABASE PROGRAM [ 05/01/95 1:25 PM ]
+1 ;04/10/92 JOHN H. LYNCH
+2 ;
+3 ;THIS ROUTINE WILL ALLOW A USER TO UPDATE
+4 ;THE STATUS OF ALL SUPPORT CALLS CURRENTLY
+5 ;STORED IN THE SUBBDB DATABASE.
+6 MAIN ;AZXZSUP2 PROGRAM CONTROL
+1 ;SET LOCAL VARIABLES
+2 ;SET LOOK-UP FILE NUMBER
SET DIC="^DIZ(1991012,"
+3 DO EDIT
+4 KILL DIC,DIE("NO^"),DIE,INUM,SNUM,PIEC,DA,DR,YN
+5 QUIT
+6 EDIT ;EDIT SUPPORT CALLS STATUS
+1 ;SET LOCAL VARIABLES
+2 ;KEEP THEM FROM JUMPING OR EXITING
SET DIE("NO^")="NO JUMPING/EXIT"
+3 ;1991012 = ^SUPPDB (DATABASE GLOBAL)
SET DIE="1991012"
+4 +5 ;CLEAR SCREEN
+6 WRITE @IOF
+7 +8 WRITE !!!,"One moment please..."
+9 WRITE !!!!
HANG 1
+10 EDITNUM ;Select SUPPORT NUMBER to EDIT: SUB-ROUTINE
+1 ;SET LOCAL VARIABLES
+2 ;INUM = CURRENT INTERNAL NUMBER
SET INUM=$PIECE(^DIZ(DIE,0),U,3)
+3 +4 READ !,"Select Support Number to Edit: ",SNUM
+5 +6 +7 ;IF "^" OR "" QUIT AND RETURN TO MAINMENU
+8 IF (SNUM="^")!(SNUM="")
QUIT
+9 +10 ;IF "?" GIVE HELP AND RETURN TO EDITNUM SUB-ROUTINE
+11 IF SNUM="?"
WRITE !!,"Please enter your Support Log Number to EDIT.",!
GOTO EDITNUM
+12 +13 ;USER IS TRYING TO ENTER A NUMBER OUT OF SEQUENCE
+14 IF SNUM>INUM
WRITE !!,"Support Number, ",SNUM," does not exist"
HANG 3
GOTO EDIT
+15 ;CHECK TO SEE IF SUPPORT NUMBER HAS ALREADY BEEN DELETED
+16 SET PIEC=0
+17 IF '$ORDER(^DIZ(DIE,"B",SNUM,PIEC))
WRITE !!,"Support Number, ",SNUM,", has already been deleted!",!
HANG 3
GOTO EDITNUM
+18 +19 ;CLEAR SCREEN
WRITE @IOF
+20 SET DA=SNUM
+21 ;SET SUBSCRIPTS TO BE VIEWED
SET DR=".01;.05;1;4:7"
+22 LOCK ^DIZ(DIE,DA):0
IF '$TEST
WRITE !!,"Record has been locked, try again later!"
HANG 3
GOTO EDITNUM
+23 ;DO DATA DISPLAY OF SUPPORT NUMBER
DO EN^DIQ
+24 +25 WRITE !!,"Do you want to continue to edit Support Number, ",SNUM,"? N//"
+26 READ YN
+27 +28 ;IF NOT "Y" UNLOCK RECORD/GOTO EDIT
IF YN'="Y"
LOCK
GOTO MAIN
+29 +30 ;CLEAR SCREEN
WRITE @IOF
+31 WRITE !!,"Editing Support Number, ",DA,!!
+32 ;DR - STUFF .01(SUPPORT NUMBER)
SET DR=".01///^S X=DA;4;6.5;7"
+33 ;CALL FILEMAN TO EDIT STATUS OF ^SUPPDB (DATABASE GLOBAL)
+34 DO ^DIE
LOCK
+35 +36 WRITE !!!!
+37 READ !,"Do you want to continue with Enter/Edit? Y// ",YN
+38 +39 ;STAY IN EDIT SUB-ROUNTINE
IF (YN="Y")!(YN="")
GOTO EDIT
+40 ;OTHERWISE RETURN TO MAINMENU
QUIT