VADPT62 ;ALB/MJK - Patient ID Trigger Nodes ; 11 MAR 1991
;;5.3;Registration;;Aug 13, 1993
;
; This routine contains all the the 1 and 2 nodes for triggers
; on fields in the PATIENT ELIGIBILITIES multiple of the
; PATIENT file.
;
; Because of the layered nature of the execution of these
; triggers, M11+ could not handle their execution reliably.
; Store errors would sometimes occur.
;
; By placing the code for these nodes in this rouitne, the operating
; system will not have use up as much symbol space to store the
; executeable code. The 1 and 2 nodes now only contain calls
; to the appropriate tag in this routine. [Tag 'P31' is the
; tag called by the 3rd cross reference of the LONG ID field
; to execute the 'set' logic of the trigger - ^DD(2.0361,.03,1,3,1).]
;
E31 ; -- first set node of ^DD(2.0361,.01,1,3,1) trigger on ELIGIBILITY field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DPT(D0,"E",D1,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(2.0361,.01,1,3,1.1) X ^DD(2.0361,.01,1,3,1.4)
Q
;
E32 ; -- first kill node of ^DD(2.0361,.01,1,3,2) trigger on ELIGIBILITY field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DPT(D0,"E",D1,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" X ^DD(2.0361,.01,1,3,2.4)
Q
;
L11 ; -- first set node of ^DD(2.0361,.03,1,1,1) trigger on LONG ID field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DPT(D0,"E",D1,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y X ^DD(2.0361,.03,1,1,1.1) X ^DD(2.0361,.03,1,1,1.4)
Q
;
L12 ; -- first kill node of ^DD(2.0361,.03,1,1,2) trigger on LONG ID field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DPT(D0,"E",D1,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X="" X ^DD(2.0361,.03,1,1,2.4)
Q
;
L31 ; -- first set node of ^DD(2.0361,.03,1,3,1) trigger on LONG ID field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA S Y(0)=X S X=$S('$D(^DPT(DA(1),.36)):0,1:DA=+^(.36)) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.36)):^(.36),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV S X=DIV X ^DD(2.0361,.03,1,3,1.4)
Q
;
L32 ; -- first kill node of ^DD(2.0361,.03,1,3,2) trigger on LONG ID
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA S Y(0)=X S X=$S('$D(^DPT(DA(1),.36)):0,1:DA=+^(.36)) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.36)):^(.36),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" X ^DD(2.0361,.03,1,3,2.4)
Q
;
S31 ; -- first set node of ^DD(2.0361,.04,1,3,1) trigger on SHORT ID field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA S Y(0)=X S X=$S('$D(^DPT(DA(1),.36)):0,1:DA=+^(.36)) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.36)):^(.36),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X=DIV S X=DIV X ^DD(2.0361,.04,1,3,1.4)
Q
;
S32 ; -- first kill node of ^DD(2.0361,.04,1,3,2) trigger on SHORT ID field
K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA S Y(0)=X S X=$S('$D(^DPT(DA(1),.36)):0,1:DA=+^(.36)) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.36)):^(.36),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X="" X ^DD(2.0361,.04,1,3,2.4)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVADPT62 3027 printed Dec 13, 2024@03:01:23 Page 2
VADPT62 ;ALB/MJK - Patient ID Trigger Nodes ; 11 MAR 1991
+1 ;;5.3;Registration;;Aug 13, 1993
+2 ;
+3 ; This routine contains all the the 1 and 2 nodes for triggers
+4 ; on fields in the PATIENT ELIGIBILITIES multiple of the
+5 ; PATIENT file.
+6 ;
+7 ; Because of the layered nature of the execution of these
+8 ; triggers, M11+ could not handle their execution reliably.
+9 ; Store errors would sometimes occur.
+10 ;
+11 ; By placing the code for these nodes in this rouitne, the operating
+12 ; system will not have use up as much symbol space to store the
+13 ; executeable code. The 1 and 2 nodes now only contain calls
+14 ; to the appropriate tag in this routine. [Tag 'P31' is the
+15 ; tag called by the 3rd cross reference of the LONG ID field
+16 ; to execute the 'set' logic of the trigger - ^DD(2.0361,.03,1,3,1).]
+17 ;
E31 ; -- first set node of ^DD(2.0361,.01,1,3,1) trigger on ELIGIBILITY field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET DIV(1)=D1
SET Y(1)=$SELECT($DATA(^DPT(D0,"E",D1,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,3)
SET X=X
SET DIU=X
KILL Y
XECUTE ^DD(2.0361,.01,1,3,1.1)
XECUTE ^DD(2.0361,.01,1,3,1.4)
+2 QUIT
+3 ;
E32 ; -- first kill node of ^DD(2.0361,.01,1,3,2) trigger on ELIGIBILITY field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET DIV(1)=D1
SET Y(1)=$SELECT($DATA(^DPT(D0,"E",D1,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,3)
SET X=X
SET DIU=X
KILL Y
SET X=""
XECUTE ^DD(2.0361,.01,1,3,2.4)
+2 QUIT
+3 ;
L11 ; -- first set node of ^DD(2.0361,.03,1,1,1) trigger on LONG ID field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET DIV(1)=D1
SET Y(1)=$SELECT($DATA(^DPT(D0,"E",D1,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,4)
SET X=X
SET DIU=X
KILL Y
XECUTE ^DD(2.0361,.03,1,1,1.1)
XECUTE ^DD(2.0361,.03,1,1,1.4)
+2 QUIT
+3 ;
L12 ; -- first kill node of ^DD(2.0361,.03,1,1,2) trigger on LONG ID field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET DIV(1)=D1
SET Y(1)=$SELECT($DATA(^DPT(D0,"E",D1,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,4)
SET X=X
SET DIU=X
KILL Y
SET X=""
XECUTE ^DD(2.0361,.03,1,1,2.4)
+2 QUIT
+3 ;
L31 ; -- first set node of ^DD(2.0361,.03,1,3,1) trigger on LONG ID field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET Y(0)=X
SET X=$SELECT('$DATA(^DPT(DA(1),.36)):0,1:DA=+^(.36))
IF X
SET X=DIV
SET Y(1)=$SELECT($DATA(^DPT(D0,.36)):^(.36),1:"")
SET X=$PIECE(Y(1),U,3)
SET X=X
SET DIU=X
KILL Y
SET X=DIV
SET X=DIV
XECUTE ^DD(2.0361,.03,1,3,1.4)
+2 QUIT
+3 ;
L32 ; -- first kill node of ^DD(2.0361,.03,1,3,2) trigger on LONG ID
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET Y(0)=X
SET X=$SELECT('$DATA(^DPT(DA(1),.36)):0,1:DA=+^(.36))
IF X
SET X=DIV
SET Y(1)=$SELECT($DATA(^DPT(D0,.36)):^(.36),1:"")
SET X=$PIECE(Y(1),U,3)
SET X=X
SET DIU=X
KILL Y
SET X=""
XECUTE ^DD(2.0361,.03,1,3,2.4)
+2 QUIT
+3 ;
S31 ; -- first set node of ^DD(2.0361,.04,1,3,1) trigger on SHORT ID field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET Y(0)=X
SET X=$SELECT('$DATA(^DPT(DA(1),.36)):0,1:DA=+^(.36))
IF X
SET X=DIV
SET Y(1)=$SELECT($DATA(^DPT(D0,.36)):^(.36),1:"")
SET X=$PIECE(Y(1),U,4)
SET X=X
SET DIU=X
KILL Y
SET X=DIV
SET X=DIV
XECUTE ^DD(2.0361,.04,1,3,1.4)
+2 QUIT
+3 ;
S32 ; -- first kill node of ^DD(2.0361,.04,1,3,2) trigger on SHORT ID field
+1 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET Y(0)=X
SET X=$SELECT('$DATA(^DPT(DA(1),.36)):0,1:DA=+^(.36))
IF X
SET X=DIV
SET Y(1)=$SELECT($DATA(^DPT(D0,.36)):^(.36),1:"")
SET X=$PIECE(Y(1),U,4)
SET X=X
SET DIU=X
KILL Y
SET X=""
XECUTE ^DD(2.0361,.04,1,3,2.4)
+2 QUIT
+3 ;