MDDEVCL ;HOIFO/NCA - Collect Device Data ;8:34 AM 9 Jun 2005
;;1.0;CLINICAL PROCEDURES;**20**;Apr 01, 2004;Build 9
; Reference IA # 2056 for DIQ
; 2263 FOR XPAR
; 2729 for XMXAPI calls.
; 10060 for NEW PERSON file (#200) access
COL ; Collect Device data for Transmission
K ^TMP("MDMTXT",$J)
N MDLP,MDTXT,MDTXT1,MDCT,MDSTAT,XMBODY,XMSUBJ,XMINSTR,XMTO S MDCT=0,MDSTAT=DUZ(2)
Q:'+$$GET^XPAR("SYS","MD DEVICE SURVEY TRANSMISSION",1)
S MDLP=0 F S MDLP=$O(^MDS(702.09,MDLP)) Q:MDLP<1 S MDTXT=$G(^(MDLP,0)),MDTXT1=$G(^(.1)) D
.S MDCT=MDCT+1
.S ^TMP("MDMTXT",$J,MDCT)=MDSTAT_"^"_$P(MDTXT,"^",1)_"^"_$P(MDTXT1,"^",2)_"^"_$P(MDTXT,"^",9)_"^"_$$GET1^DIQ(200,DUZ_",",.01)
Q:'MDCT
S XMSUBJ="Medical Device Name Report"
S XMINSTR("FROM")=.5,XMBODY="^TMP(""MDMTXT"",$J)"
S XMTO="G.MDDEVICE@DEV.DEV.FO-HINES.DOMAIN.EXT"
D SENDMSG^XMXAPI(DUZ,XMSUBJ,XMBODY,XMTO,.XMINSTR) K ^TMP("MDMTXT",$J)
I $G(XQY0)'=""&($P($G(XQY0),"^")["TRANSMISSION") W !!,"Message Transmitted."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMDDEVCL 1038 printed Dec 13, 2024@01:42:41 Page 2
MDDEVCL ;HOIFO/NCA - Collect Device Data ;8:34 AM 9 Jun 2005
+1 ;;1.0;CLINICAL PROCEDURES;**20**;Apr 01, 2004;Build 9
+2 ; Reference IA # 2056 for DIQ
+3 ; 2263 FOR XPAR
+4 ; 2729 for XMXAPI calls.
+5 ; 10060 for NEW PERSON file (#200) access
COL ; Collect Device data for Transmission
+1 KILL ^TMP("MDMTXT",$JOB)
+2 NEW MDLP,MDTXT,MDTXT1,MDCT,MDSTAT,XMBODY,XMSUBJ,XMINSTR,XMTO
SET MDCT=0
SET MDSTAT=DUZ(2)
+3 if '+$$GET^XPAR("SYS","MD DEVICE SURVEY TRANSMISSION",1)
QUIT
+4 SET MDLP=0
FOR
SET MDLP=$ORDER(^MDS(702.09,MDLP))
if MDLP<1
QUIT
SET MDTXT=$GET(^(MDLP,0))
SET MDTXT1=$GET(^(.1))
Begin DoDot:1
+5 SET MDCT=MDCT+1
+6 SET ^TMP("MDMTXT",$JOB,MDCT)=MDSTAT_"^"_$PIECE(MDTXT,"^",1)_"^"_$PIECE(MDTXT1,"^",2)_"^"_$PIECE(MDTXT,"^",9)_"^"_$$GET1^DIQ(200,DUZ_",",.01)
End DoDot:1
+7 if 'MDCT
QUIT
+8 SET XMSUBJ="Medical Device Name Report"
+9 SET XMINSTR("FROM")=.5
SET XMBODY="^TMP(""MDMTXT"",$J)"
+10 SET XMTO="G.MDDEVICE@DEV.DEV.FO-HINES.DOMAIN.EXT"
+11 DO SENDMSG^XMXAPI(DUZ,XMSUBJ,XMBODY,XMTO,.XMINSTR)
KILL ^TMP("MDMTXT",$JOB)
+12 IF $GET(XQY0)'=""&($PIECE($GET(XQY0),"^")["TRANSMISSION")
WRITE !!,"Message Transmitted."
+13 QUIT