ORY40 ; SLC/PKS Remove Parameter Entries ; [2/10/00 1:40pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**40**;Dec 17, 1997
Q
;
EN ; Entry for removing old parameter and stuffing value into new one.
;
N ORMP
;
S ORMP="ORM TASKMAN QUEUE FREQUENCY"
D REM(ORMP) ; Remove parameter entries at PKG, SYS, & DIV levels.
;
S ORMP="ORM ORMTIME LAST RUN"
D STUF(ORMP) ; Put date/time in new parameter.
;
Q
;
REM(ORMP) ; Remove parameters.
;
N ORLST,ORERR,ORE,ORFILE,OROI,ORENT,ORFILE,ORDERR
;
D ENVAL^XPAR(.ORLST,ORMP,"",.ORERR)
Q:+$G(ORERR)>0
I 'ORERR,$G(ORLST)>0 D
.S ORE=""
.F S ORE=$O(ORLST(ORE)) Q:+$G(ORE)<1 D
..S ORFILE=$P(ORE,";",2)
..I ORFILE="DIC(4,"!(ORFILE="DIC(4.2,")!(ORFILE="DIC(9.4") D ; Institution, Domain, or Package.
...S OROI=0
...F S OROI=$O(ORLST(ORE,OROI)) Q:+$G(OROI)<1 D
....S ORFILE=+$P(ORE,"(",2)
....S ORENT=+ORE
....D DEL^XPAR(ORE,ORMP,"`"_OROI,.ORDERR)
;
Q
;
STUF(ORMP) ; Put current date/time at System level into new parameter.
;
N ORMERR
S ORMERR=""
;
D PUT^XPAR("SYS",ORMP,1,$$IDATE2^ORMTIME("NOW"),.ORMERR)
;
Q
;
ORY40 ; SLC/PKS Remove Parameter Entries ; [2/10/00 1:40pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**40**;Dec 17, 1997
+2 QUIT
+3 ;
EN ; Entry for removing old parameter and stuffing value into new one.
+1 ;
+2 NEW ORMP
+3 ;
+4 SET ORMP="ORM TASKMAN QUEUE FREQUENCY"
+5 ; Remove parameter entries at PKG, SYS, & DIV levels.
DO REM(ORMP)
+6 ;
+7 SET ORMP="ORM ORMTIME LAST RUN"
+8 ; Put date/time in new parameter.
DO STUF(ORMP)
+9 ;
+10 QUIT
+11 ;
REM(ORMP) ; Remove parameters.
+1 ;
+2 NEW ORLST,ORERR,ORE,ORFILE,OROI,ORENT,ORFILE,ORDERR
+3 ;
+4 DO ENVAL^XPAR(.ORLST,ORMP,"",.ORERR)
+5 IF +$GET(ORERR)>0
QUIT
+6 IF 'ORERR
IF $GET(ORLST)>0
Begin DoDot:1
+7 SET ORE=""
+8 FOR
SET ORE=$ORDER(ORLST(ORE))
IF +$GET(ORE)<1
QUIT
Begin DoDot:2
+9 SET ORFILE=$PIECE(ORE,";",2)
+10 ; Institution, Domain, or Package.
IF ORFILE="DIC(4,"!(ORFILE="DIC(4.2,")!(ORFILE="DIC(9.4")
Begin DoDot:3
+11 SET OROI=0
+12 FOR
SET OROI=$ORDER(ORLST(ORE,OROI))
IF +$GET(OROI)<1
QUIT
Begin DoDot:4
+13 SET ORFILE=+$PIECE(ORE,"(",2)
+14 SET ORENT=+ORE
+15 DO DEL^XPAR(ORE,ORMP,"`"_OROI,.ORDERR)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+16 ;
+17 QUIT
+18 ;
STUF(ORMP) ; Put current date/time at System level into new parameter.
+1 ;
+2 NEW ORMERR
+3 SET ORMERR=""
+4 ;
+5 DO PUT^XPAR("SYS",ORMP,1,$$IDATE2^ORMTIME("NOW"),.ORMERR)
+6 ;
+7 QUIT
+8 ;