BOPINIT ;IHS/CIA/PLS - Installation Utilities;06-Apr-2005 13:41;SM
;;1.0;AUTOMATED DISPENSING INTERFACE;;Jul 26, 2005
ENV Q
;
POST ;
; Register Hook Protocol
I $$VERSION^XPDUTL("DG")<5.3 D
.D MES("Contact OIT for the MAS 5.0 patch that hooks the ADT interface.")
E D
.D REGPROT("BSDAM APPOINTMENT EVENTS","BOP SDAM")
.D REGPROT("BDGPM MOVEMENT EVENTS","BOP DG ADT")
Q
; EP: Register a protocol to an extended action protocol
; Input: P-Parent protocol
; C-Child protocol
REGPROT(P,C,ERR) ;
N IENARY,PIEN,AIEN,FDA
D
.I '$L(P)!('$L(C)) S ERR="Missing input parameter" Q
.S IENARY(1)=$$FIND1^DIC(101,"","",P)
.S AIEN=$$FIND1^DIC(101,"","",C)
.I 'IENARY(1)!'AIEN S ERR="Unknown protocol name" Q
.S FDA(101.01,"?+2,"_IENARY(1)_",",.01)=AIEN
.D UPDATE^DIE("S","FDA","IENARY","ERR")
Q
;
; Display message in MSG and optionally set quit flag to QUIT
MES(MSG,QUIT) ;
D BMES^XPDUTL(" "_$G(MSG))
S:$G(QUIT) XPDQUIT=QUIT
Q
BOPINIT ;IHS/CIA/PLS - Installation Utilities;06-Apr-2005 13:41;SM
+1 ;;1.0;AUTOMATED DISPENSING INTERFACE;;Jul 26, 2005
ENV QUIT
+1 ;
POST ;
+1 ; Register Hook Protocol
+2 IF $$VERSION^XPDUTL("DG")<5.3
Begin DoDot:1
+3 DO MES("Contact OIT for the MAS 5.0 patch that hooks the ADT interface.")
End DoDot:1
+4 IF '$TEST
Begin DoDot:1
+5 DO REGPROT("BSDAM APPOINTMENT EVENTS","BOP SDAM")
+6 DO REGPROT("BDGPM MOVEMENT EVENTS","BOP DG ADT")
End DoDot:1
+7 QUIT
+8 ; EP: Register a protocol to an extended action protocol
+9 ; Input: P-Parent protocol
+10 ; C-Child protocol
REGPROT(P,C,ERR) ;
+1 NEW IENARY,PIEN,AIEN,FDA
+2 Begin DoDot:1
+3 IF '$LENGTH(P)!('$LENGTH(C))
SET ERR="Missing input parameter"
QUIT
+4 SET IENARY(1)=$$FIND1^DIC(101,"","",P)
+5 SET AIEN=$$FIND1^DIC(101,"","",C)
+6 IF 'IENARY(1)!'AIEN
SET ERR="Unknown protocol name"
QUIT
+7 SET FDA(101.01,"?+2,"_IENARY(1)_",",.01)=AIEN
+8 DO UPDATE^DIE("S","FDA","IENARY","ERR")
End DoDot:1
+9 QUIT
+10 ;
+11 ; Display message in MSG and optionally set quit flag to QUIT
MES(MSG,QUIT) ;
+1 DO BMES^XPDUTL(" "_$GET(MSG))
+2 IF $GET(QUIT)
SET XPDQUIT=QUIT
+3 QUIT