BPMXMPI ;IHS/OIT/NKD - SEND MPI MESSAGE - 6/26/12 ;
;;1.0;IHS PATIENT MERGE;**2**;MAR 01, 2010;Build 1
;;
DESC ;----- ROUTINE DESCRIPTION
;;BPMXMPI:
;;THIS ROUTINE CONTAINS SUBROUTINES TO SEND A MPI MESSAGE
;;
;;THIS ROUTINE IS CALLED BY THE SPECIAL MERGE ROUTINE DRIVER - ^BPMXDRV
;;
;;THE IHS PATIENT MERGE SOFTWARE ENTERS AT EN LINE LABEL. IT IS EXPECTED
;;THAT THE FOLLOWING GLOBAL WOULD HAVE BEEN SET UP BY THE PATIENT MERGE
;;SOFTWARE:
;; ^TMP("XDRFROM",$J,FROMIEN,TOIEN,FROMIEN_GLOBROOT,TOIEN_GLOBROOT)=FILE
;;EXAMPLE:
;; ^TMP("XDRFROM",2804,6364,1991,"6364;DPT(","1991;DPT(")=2
;;WHERE =2 IS THE PARENT FILE (VA PATIENT FILE).
;;
;;$$END
;
N I,X F I=1:1 S X=$P($T(DESC+I),";;",2) Q:X["$$END" D EN^DDIOL(X)
Q
EN(BPMRY) ;EP
;----- MAIN ENTRY POINT FROM DUPLICATE PATIENT MERGE SOFTWARE
;
; BPMRY = TEMP GLOBAL SET UP BY THE PATIENT MERGE SOFTWARE,
; I.E., "^TMP(""XDRFROM"",$J)"
;
N X
S X="AGMPIHLO" X ^%ZOSF("TEST") Q:'$T
;
N BPMFR,BPMTO
S BPMFR=$O(@BPMRY@(0))
Q:'BPMFR
S BPMTO=$O(@BPMRY@(BPMFR,0))
Q:'BPMTO
;
D PROC(BPMFR,BPMTO)
Q
PROC(BPMFR,BPMTO) ;
; SEND A40 MESSAGE
N SUCCESS
;
D CREATMSG^AGMPIHLO(BPMTO,"A40",BPMFR,.SUCCESS)
;
Q
;
BPMXMPI ;IHS/OIT/NKD - SEND MPI MESSAGE - 6/26/12 ;
+1 ;;1.0;IHS PATIENT MERGE;**2**;MAR 01, 2010;Build 1
+2 ;;
DESC ;----- ROUTINE DESCRIPTION
+1 ;;BPMXMPI:
+2 ;;THIS ROUTINE CONTAINS SUBROUTINES TO SEND A MPI MESSAGE
+3 ;;
+4 ;;THIS ROUTINE IS CALLED BY THE SPECIAL MERGE ROUTINE DRIVER - ^BPMXDRV
+5 ;;
+6 ;;THE IHS PATIENT MERGE SOFTWARE ENTERS AT EN LINE LABEL. IT IS EXPECTED
+7 ;;THAT THE FOLLOWING GLOBAL WOULD HAVE BEEN SET UP BY THE PATIENT MERGE
+8 ;;SOFTWARE:
+9 ;; ^TMP("XDRFROM",$J,FROMIEN,TOIEN,FROMIEN_GLOBROOT,TOIEN_GLOBROOT)=FILE
+10 ;;EXAMPLE:
+11 ;; ^TMP("XDRFROM",2804,6364,1991,"6364;DPT(","1991;DPT(")=2
+12 ;;WHERE =2 IS THE PARENT FILE (VA PATIENT FILE).
+13 ;;
+14 ;;$$END
+15 ;
+16 NEW I,X
FOR I=1:1
SET X=$PIECE($TEXT(DESC+I),";;",2)
IF X["$$END"
QUIT
DO EN^DDIOL(X)
+17 QUIT
EN(BPMRY) ;EP
+1 ;----- MAIN ENTRY POINT FROM DUPLICATE PATIENT MERGE SOFTWARE
+2 ;
+3 ; BPMRY = TEMP GLOBAL SET UP BY THE PATIENT MERGE SOFTWARE,
+4 ; I.E., "^TMP(""XDRFROM"",$J)"
+5 ;
+6 NEW X
+7 SET X="AGMPIHLO"
XECUTE ^%ZOSF("TEST")
IF '$TEST
QUIT
+8 ;
+9 NEW BPMFR,BPMTO
+10 SET BPMFR=$ORDER(@BPMRY@(0))
+11 IF 'BPMFR
QUIT
+12 SET BPMTO=$ORDER(@BPMRY@(BPMFR,0))
+13 IF 'BPMTO
QUIT
+14 ;
+15 DO PROC(BPMFR,BPMTO)
+16 QUIT
PROC(BPMFR,BPMTO) ;
+1 ; SEND A40 MESSAGE
+2 NEW SUCCESS
+3 ;
+4 DO CREATMSG^AGMPIHLO(BPMTO,"A40",BPMFR,.SUCCESS)
+5 ;
+6 QUIT
+7 ;