EDPYP2 ;BP/TDP - Post-init for patch 2 ;3/1/12 10:45am
;;2.0;EMERGENCY DEPARTMENT;;May 2, 2012;Build 103
;
EN ;Entry point
N EDPTMOUT,EDPNWTM,EDPCNTDN,EDPNWCNT,EDPVALUE,EDPINST,EDPPARAM,FDA,X,Y
N EDPSYS S EDPSYS=0
D BMES^XPDUTL("Post-install started.")
S EDPTMOUT=+$O(^XTV(8989.51,"B","ORWOR TIMEOUT CHART",""))
S EDPNWTM=+$O(^XTV(8989.51,"B","EDP APP TIMEOUT",""))
S EDPCNTDN=+$O(^XTV(8989.51,"B","ORWOR TIMEOUT COUNTDOWN",""))
S EDPNWCNT=+$O(^XTV(8989.51,"B","EDP APP COUNTDOWN",""))
F X=EDPTMOUT,EDPCNTDN D
. I X=EDPTMOUT S Y=EDPNWTM D
.. D BMES^XPDUTL(" Copying ORWOR TIMEOUT CHART parameter values to EDP APP TIMEOUT.")
. I X=EDPCNTDN S Y=EDPNWCNT D
.. D MES^XPDUTL(" Copying ORWOR TIMEOUT COUNTDOWN parameter values to EDP APP COUNTDOWN.")
. S EDPPARAM=""
. F S EDPPARAM=$O(^XTV(8989.5,"AC",X,EDPPARAM)) Q:EDPPARAM="" D
.. ;Do not set values for user if not EDIS Tracking Staff.
.. I EDPPARAM["VA(200",'$D(^EDPB(231.7,"B",$P(EDPPARAM,";",1))) Q
.. S EDPINST=0
.. F S EDPINST=$O(^XTV(8989.5,"AC",X,EDPPARAM,EDPINST)) Q:EDPINST="" D
... S EDPVALUE=+$G(^XTV(8989.5,"AC",X,EDPPARAM,EDPINST))
... I EDPVALUE<1 Q ;If parameter value less than 1 quit
... I $D(^XTV(8989.5,"AC",Y,EDPPARAM,EDPINST)) Q ;If entry already exist quit
... I EDPPARAM["DIC(4.2",EDPVALUE<$S(X=EDPTMOUT:1200,1:120) S EDPVALUE=$S(X=EDPTMOUT:1200,1:120) ;Set system level parameters to EDIS default if less than default.
... S FDA(8989.5,8989.5,"+1,",.01)=EDPPARAM
... S FDA(8989.5,8989.5,"+1,",.02)=$S(X=EDPTMOUT:EDPNWTM,1:EDPNWCNT)
... S FDA(8989.5,8989.5,"+1,",.03)=EDPINST
... S FDA(8989.5,8989.5,"+1,",1)=EDPVALUE
... D UPDATE^DIE("","FDA(8989.5)","")
... Q
;Set System level parameter values
I $G(XPARSYS)'="" S EDPSYS=$G(XPARSYS)
I $G(XPARSYS)="" S EDPSYS=$$FIND1^DIC(4.2,"","QX",$$KSP^XUPARAM("WHERE"))_";DIC(4.2,"
I +$G(EDPSYS)>0,EDPSYS?1.N1";DIC(4.2," D
. I '$D(^XTV(8989.5,"AC",EDPNWTM,EDPSYS,1)) D
.. S FDA(8989.5,8989.5,"+1,",.01)=EDPSYS
.. S FDA(8989.5,8989.5,"+1,",.02)=EDPNWTM
.. S FDA(8989.5,8989.5,"+1,",.03)=1
.. S FDA(8989.5,8989.5,"+1,",1)=1200
.. D UPDATE^DIE("","FDA(8989.5)","")
. I '$D(^XTV(8989.5,"AC",EDPNWCNT,EDPSYS,1)) D
.. S FDA(8989.5,8989.5,"+1,",.01)=EDPSYS
.. S FDA(8989.5,8989.5,"+1,",.02)=EDPNWCNT
.. S FDA(8989.5,8989.5,"+1,",.03)=1
.. S FDA(8989.5,8989.5,"+1,",1)=120
.. D UPDATE^DIE("","FDA(8989.5)","")
D BMES^XPDUTL("Post-install complete.")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEDPYP2 2468 printed Nov 22, 2024@17:02:48 Page 2
EDPYP2 ;BP/TDP - Post-init for patch 2 ;3/1/12 10:45am
+1 ;;2.0;EMERGENCY DEPARTMENT;;May 2, 2012;Build 103
+2 ;
EN ;Entry point
+1 NEW EDPTMOUT,EDPNWTM,EDPCNTDN,EDPNWCNT,EDPVALUE,EDPINST,EDPPARAM,FDA,X,Y
+2 NEW EDPSYS
SET EDPSYS=0
+3 DO BMES^XPDUTL("Post-install started.")
+4 SET EDPTMOUT=+$ORDER(^XTV(8989.51,"B","ORWOR TIMEOUT CHART",""))
+5 SET EDPNWTM=+$ORDER(^XTV(8989.51,"B","EDP APP TIMEOUT",""))
+6 SET EDPCNTDN=+$ORDER(^XTV(8989.51,"B","ORWOR TIMEOUT COUNTDOWN",""))
+7 SET EDPNWCNT=+$ORDER(^XTV(8989.51,"B","EDP APP COUNTDOWN",""))
+8 FOR X=EDPTMOUT,EDPCNTDN
Begin DoDot:1
+9 IF X=EDPTMOUT
SET Y=EDPNWTM
Begin DoDot:2
+10 DO BMES^XPDUTL(" Copying ORWOR TIMEOUT CHART parameter values to EDP APP TIMEOUT.")
End DoDot:2
+11 IF X=EDPCNTDN
SET Y=EDPNWCNT
Begin DoDot:2
+12 DO MES^XPDUTL(" Copying ORWOR TIMEOUT COUNTDOWN parameter values to EDP APP COUNTDOWN.")
End DoDot:2
+13 SET EDPPARAM=""
+14 FOR
SET EDPPARAM=$ORDER(^XTV(8989.5,"AC",X,EDPPARAM))
if EDPPARAM=""
QUIT
Begin DoDot:2
+15 ;Do not set values for user if not EDIS Tracking Staff.
+16 IF EDPPARAM["VA(200"
IF '$DATA(^EDPB(231.7,"B",$PIECE(EDPPARAM,";",1)))
QUIT
+17 SET EDPINST=0
+18 FOR
SET EDPINST=$ORDER(^XTV(8989.5,"AC",X,EDPPARAM,EDPINST))
if EDPINST=""
QUIT
Begin DoDot:3
+19 SET EDPVALUE=+$GET(^XTV(8989.5,"AC",X,EDPPARAM,EDPINST))
+20 ;If parameter value less than 1 quit
IF EDPVALUE<1
QUIT
+21 ;If entry already exist quit
IF $DATA(^XTV(8989.5,"AC",Y,EDPPARAM,EDPINST))
QUIT
+22 ;Set system level parameters to EDIS default if less than default.
IF EDPPARAM["DIC(4.2"
IF EDPVALUE<$SELECT(X=EDPTMOUT:1200,1:120)
SET EDPVALUE=$SELECT(X=EDPTMOUT:1200,1:120)
+23 SET FDA(8989.5,8989.5,"+1,",.01)=EDPPARAM
+24 SET FDA(8989.5,8989.5,"+1,",.02)=$SELECT(X=EDPTMOUT:EDPNWTM,1:EDPNWCNT)
+25 SET FDA(8989.5,8989.5,"+1,",.03)=EDPINST
+26 SET FDA(8989.5,8989.5,"+1,",1)=EDPVALUE
+27 DO UPDATE^DIE("","FDA(8989.5)","")
+28 QUIT
End DoDot:3
End DoDot:2
End DoDot:1
+29 ;Set System level parameter values
+30 IF $GET(XPARSYS)'=""
SET EDPSYS=$GET(XPARSYS)
+31 IF $GET(XPARSYS)=""
SET EDPSYS=$$FIND1^DIC(4.2,"","QX",$$KSP^XUPARAM("WHERE"))_";DIC(4.2,"
+32 IF +$GET(EDPSYS)>0
IF EDPSYS?1.N1";DIC(4.2,"
Begin DoDot:1
+33 IF '$DATA(^XTV(8989.5,"AC",EDPNWTM,EDPSYS,1))
Begin DoDot:2
+34 SET FDA(8989.5,8989.5,"+1,",.01)=EDPSYS
+35 SET FDA(8989.5,8989.5,"+1,",.02)=EDPNWTM
+36 SET FDA(8989.5,8989.5,"+1,",.03)=1
+37 SET FDA(8989.5,8989.5,"+1,",1)=1200
+38 DO UPDATE^DIE("","FDA(8989.5)","")
End DoDot:2
+39 IF '$DATA(^XTV(8989.5,"AC",EDPNWCNT,EDPSYS,1))
Begin DoDot:2
+40 SET FDA(8989.5,8989.5,"+1,",.01)=EDPSYS
+41 SET FDA(8989.5,8989.5,"+1,",.02)=EDPNWCNT
+42 SET FDA(8989.5,8989.5,"+1,",.03)=1
+43 SET FDA(8989.5,8989.5,"+1,",1)=120
+44 DO UPDATE^DIE("","FDA(8989.5)","")
End DoDot:2
End DoDot:1
+45 DO BMES^XPDUTL("Post-install complete.")
+46 QUIT