XQOPED ;SEA/Luke - Option Editor ;04/27/98 12:26
;;8.0;KERNEL;**46**;Jul 10, 1995
;
IN ;Called from the Pre Action of the XQEDTOPT form
K ^TMP($J,"XQOPED")
;I $D(XQDICNEW) S ^TMP($J,"XQOPED","NEW")=XQDICNEW
Q
;
OUT ;Called from the Post Action of the XQEDTOPT form
I $D(XQDICNEW),$P(XQDICNEW,U,3) D CMPLT
I $D(DDSCHANG),DDSCHANG D PUT^DDSVAL(DIE,.DA,3.6,DUZ,"","I")
;I $D(DDSCHANG),DDSCHANG S ^TMP($J,"XQOPED","CHANGED")=DA
K DDSCHANG,XQDICNEW ;,DDSPAGE,DDSPARM
Q
;
CHECK() ;See if this person should have programmer access to the
;EXECUTABLES subfile containing the ENTRY ACTION, etc.
;
;Returns a 1 if the user has a key or an @-sign, 0 if not.
;
;Called by the branching logic of the EXECUTABLES form-only field
;on Page 1 (Main) of the XQEDTOPT ScreenMan form.
;
N XQYES S XQYES=0
;
Q:'$D(DUZ) XQYES
I $D(^XUSEC("XUMGR",DUZ)) S XQYES=1
I $D(^XUSEC("XUPROG",DUZ)) S XQYES=1
;I $D(^XUSEC("XUPROGMODE",DUZ)) S XQYES=1
;I $D(^XUSEC("XQSMDFM",DUZ)) S XQYES=1
;
;
Q:'$D(DUZ(0)) XQYES
I DUZ(0)="@" S XQYES=1
;I DUZ(0)="#" S XQYES=1
;
Q XQYES
;
;
EA ;ENTRY ACTION for the option XQOPED, the screen-based option editor
K ^TMP($J,"XQOPED")
I $$CHECK() S DLAYGO=19
Q
;
XA ;EXIT ACTION for the option XQOPED, the screen based Option Editor
;Repoint the CREATOR field for the modified options
;
I $D(^TMP($J,"XQOPED","CHANGED")) D
.N % S %=0
.F Q:%="" D
..S %=$O(^TMP($J,"XQOPED","CHANGED")) Q:%=""
..I $D(^DIC(19,%,0))#2 S $P(^(0),U,5)=DUZ
..Q
.Q
K ^TMP($J,"XQOPED")
Q
;
CMPLT ;Check to make sure that the option is complete enough to leave
;it in the Option File.
I $D(XQDICNEW) D
.N %
.S %=$P(^DIC(19,+XQDICNEW,0),U,4) ;Check the TYPE field
.I %']"" S DA=+XQDICNEW,DIK="^DIC(19," D ^DIK K DIK,DA
.Q
Q
;
;This code was graciously provided by David LaLiberte
;AUHBHLP
;692/DCL-TMT PLAN SCREEN HELP PROCESSOR;OCT 07, 1997@13:34
;;1.0;WHITE CITY TMT PLAN PKG;;6-17-97
H(XQIEN) ;Process Help for ScreenMan form
Q:$G(XQIEN)'>0
Q:$D(^DIC(19.8,XQIEN,1))'>9
N XQA,XQI
F XQI=1:1:5 Q:'$D(^DIC(19.8,XQIEN,1,XQI,0)) S XQA(XQI)=^(0)
D HLP^DDSUTL(.XQA)
K XQIEN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXQOPED 2194 printed Dec 13, 2024@02:05:53 Page 2
XQOPED ;SEA/Luke - Option Editor ;04/27/98 12:26
+1 ;;8.0;KERNEL;**46**;Jul 10, 1995
+2 ;
IN ;Called from the Pre Action of the XQEDTOPT form
+1 KILL ^TMP($JOB,"XQOPED")
+2 ;I $D(XQDICNEW) S ^TMP($J,"XQOPED","NEW")=XQDICNEW
+3 QUIT
+4 ;
OUT ;Called from the Post Action of the XQEDTOPT form
+1 IF $DATA(XQDICNEW)
IF $PIECE(XQDICNEW,U,3)
DO CMPLT
+2 IF $DATA(DDSCHANG)
IF DDSCHANG
DO PUT^DDSVAL(DIE,.DA,3.6,DUZ,"","I")
+3 ;I $D(DDSCHANG),DDSCHANG S ^TMP($J,"XQOPED","CHANGED")=DA
+4 ;,DDSPAGE,DDSPARM
KILL DDSCHANG,XQDICNEW
+5 QUIT
+6 ;
CHECK() ;See if this person should have programmer access to the
+1 ;EXECUTABLES subfile containing the ENTRY ACTION, etc.
+2 ;
+3 ;Returns a 1 if the user has a key or an @-sign, 0 if not.
+4 ;
+5 ;Called by the branching logic of the EXECUTABLES form-only field
+6 ;on Page 1 (Main) of the XQEDTOPT ScreenMan form.
+7 ;
+8 NEW XQYES
SET XQYES=0
+9 ;
+10 if '$DATA(DUZ)
QUIT XQYES
+11 IF $DATA(^XUSEC("XUMGR",DUZ))
SET XQYES=1
+12 IF $DATA(^XUSEC("XUPROG",DUZ))
SET XQYES=1
+13 ;I $D(^XUSEC("XUPROGMODE",DUZ)) S XQYES=1
+14 ;I $D(^XUSEC("XQSMDFM",DUZ)) S XQYES=1
+15 ;
+16 ;
+17 if '$DATA(DUZ(0))
QUIT XQYES
+18 IF DUZ(0)="@"
SET XQYES=1
+19 ;I DUZ(0)="#" S XQYES=1
+20 ;
+21 QUIT XQYES
+22 ;
+23 ;
EA ;ENTRY ACTION for the option XQOPED, the screen-based option editor
+1 KILL ^TMP($JOB,"XQOPED")
+2 IF $$CHECK()
SET DLAYGO=19
+3 QUIT
+4 ;
XA ;EXIT ACTION for the option XQOPED, the screen based Option Editor
+1 ;Repoint the CREATOR field for the modified options
+2 ;
+3 IF $DATA(^TMP($JOB,"XQOPED","CHANGED"))
Begin DoDot:1
+4 NEW %
SET %=0
+5 FOR
if %=""
QUIT
Begin DoDot:2
+6 SET %=$ORDER(^TMP($JOB,"XQOPED","CHANGED"))
if %=""
QUIT
+7 IF $DATA(^DIC(19,%,0))#2
SET $PIECE(^(0),U,5)=DUZ
+8 QUIT
End DoDot:2
+9 QUIT
End DoDot:1
+10 KILL ^TMP($JOB,"XQOPED")
+11 QUIT
+12 ;
CMPLT ;Check to make sure that the option is complete enough to leave
+1 ;it in the Option File.
+2 IF $DATA(XQDICNEW)
Begin DoDot:1
+3 NEW %
+4 ;Check the TYPE field
SET %=$PIECE(^DIC(19,+XQDICNEW,0),U,4)
+5 IF %']""
SET DA=+XQDICNEW
SET DIK="^DIC(19,"
DO ^DIK
KILL DIK,DA
+6 QUIT
End DoDot:1
+7 QUIT
+8 ;
+9 ;This code was graciously provided by David LaLiberte
+10 ;AUHBHLP
+11 ;692/DCL-TMT PLAN SCREEN HELP PROCESSOR;OCT 07, 1997@13:34
+12 ;;1.0;WHITE CITY TMT PLAN PKG;;6-17-97
H(XQIEN) ;Process Help for ScreenMan form
+1 if $GET(XQIEN)'>0
QUIT
+2 if $DATA(^DIC(19.8,XQIEN,1))'>9
QUIT
+3 NEW XQA,XQI
+4 FOR XQI=1:1:5
if '$DATA(^DIC(19.8,XQIEN,1,XQI,0))
QUIT
SET XQA(XQI)=^(0)
+5 DO HLP^DDSUTL(.XQA)
+6 KILL XQIEN
+7 QUIT