DGPFMPI ;BP/DMR - PRF TRANSMISSION CALL FOR MPI
;;5.3;Registration;**864**;Aug 13, 1993;Build 16
;
;Routine to transmit PRF, used by MPI during the the patient load/edit
;process or as a standalone routine.
;
;INPUT - DFN
;
EN(DFN) ;
;
Q:$G(DFN)'>0 0
;
N DGINST,DGTRANS,DGTF,DGTF2
S DGTRANS=0,DGTF2=""
;
I $$BLDTFL^DGPFUT2(DFN,.DGTF) D G EXIT
. D SITE
. S DGINST=0
. F S DGINST=$O(DGTF2(DGINST)) Q:+$G(DGINST)'>0 D
. . S DGTRANS=$$SNDQRY^DGPFHLS(DFN,$$QRYON^DGPFPARM(),DGINST)
;
EXIT ;
Q DGTRANS
;
;Call to run in background, without displaying patient information.
;
EN1(DFN) ;
;
Q:$G(DFN)'>0 0
;
N DGTF,DGINST,DGTRANS,DGMODE,DGTF2
S DGMODE=2
S DGTRANS=0,DGTF2=""
;
I $$BLDTFL^DGPFUT2(DFN,.DGTF) D G EXIT1
. D SITE
. S DGINST=0
. F S DGINST=$O(DGTF2(DGINST)) Q:+$G(DGINST)'>0 D
. . S DGTRANS=$$SNDQRY^DGPFHLS(DFN,DGMODE,DGINST)
;
EXIT1 ;
Q DGTRANS
;
SITE ;
N FAC,IEN
;
S FAC=0,IEN=0
F S FAC=$O(DGTF(FAC)) Q:+$G(FAC)'>0 D
. S IEN=$$GET1^DIQ(4,FAC,99) Q:+IEN'>0 D
. . S DGTF2(IEN)=DGTF(FAC)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGPFMPI 1097 printed Dec 13, 2024@02:48:30 Page 2
DGPFMPI ;BP/DMR - PRF TRANSMISSION CALL FOR MPI
+1 ;;5.3;Registration;**864**;Aug 13, 1993;Build 16
+2 ;
+3 ;Routine to transmit PRF, used by MPI during the the patient load/edit
+4 ;process or as a standalone routine.
+5 ;
+6 ;INPUT - DFN
+7 ;
EN(DFN) ;
+1 ;
+2 if $GET(DFN)'>0
QUIT 0
+3 ;
+4 NEW DGINST,DGTRANS,DGTF,DGTF2
+5 SET DGTRANS=0
SET DGTF2=""
+6 ;
+7 IF $$BLDTFL^DGPFUT2(DFN,.DGTF)
Begin DoDot:1
+8 DO SITE
+9 SET DGINST=0
+10 FOR
SET DGINST=$ORDER(DGTF2(DGINST))
if +$GET(DGINST)'>0
QUIT
Begin DoDot:2
+11 SET DGTRANS=$$SNDQRY^DGPFHLS(DFN,$$QRYON^DGPFPARM(),DGINST)
End DoDot:2
End DoDot:1
GOTO EXIT
+12 ;
EXIT ;
+1 QUIT DGTRANS
+2 ;
+3 ;Call to run in background, without displaying patient information.
+4 ;
EN1(DFN) ;
+1 ;
+2 if $GET(DFN)'>0
QUIT 0
+3 ;
+4 NEW DGTF,DGINST,DGTRANS,DGMODE,DGTF2
+5 SET DGMODE=2
+6 SET DGTRANS=0
SET DGTF2=""
+7 ;
+8 IF $$BLDTFL^DGPFUT2(DFN,.DGTF)
Begin DoDot:1
+9 DO SITE
+10 SET DGINST=0
+11 FOR
SET DGINST=$ORDER(DGTF2(DGINST))
if +$GET(DGINST)'>0
QUIT
Begin DoDot:2
+12 SET DGTRANS=$$SNDQRY^DGPFHLS(DFN,DGMODE,DGINST)
End DoDot:2
End DoDot:1
GOTO EXIT1
+13 ;
EXIT1 ;
+1 QUIT DGTRANS
+2 ;
SITE ;
+1 NEW FAC,IEN
+2 ;
+3 SET FAC=0
SET IEN=0
+4 FOR
SET FAC=$ORDER(DGTF(FAC))
if +$GET(FAC)'>0
QUIT
Begin DoDot:1
+5 SET IEN=$$GET1^DIQ(4,FAC,99)
if +IEN'>0
QUIT
Begin DoDot:2
+6 SET DGTF2(IEN)=DGTF(FAC)
End DoDot:2
End DoDot:1
+7 QUIT