VAQPST10 ;ALB/JRP - POST INITS;10-JUN-93
;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
MAIL() ;ADD MAIL GROUPS USED
;INPUT : NONE
;OUTPUT : XYZ - Code telling which groups were/weren't added
; X specifies if VAQ PDX ERRORS was added
; Y specifies if VAQ MANUAL PROCESSING was added
; Z specifies if VAQ UNSOLICITED RECEIVED was added
;NOTES : When an error occurs, the error code returned specifies
; which mail groups were & weren't added. If the "bit"
; position that specifies the mail group is set to 1, the
; mail group wasn't added.
; EX: -101 tells that the mail groups VAQ PDX ERRORS and
; VAQ UNSOLICITED RECEIVED were not added, while the
; mail group VAQ MANUAL PROCESSING was added.
;
;DECLARE VARIABLES
N GROUP,PRIVATE,ENROLL,RESTCODE,TMPARR,OUTCODE,ERROR
S OUTCODE="000"
;ADD VAQ PDX ERRORS
S GROUP="VAQ PDX ERRORS"
S PRIVATE=0
S ENROLL=0
S RESTCODE=0
S TMPARR(1)="Mail group that will receive any recoverable errors that occur"
S TMPARR(2)="when using PDX. These errors will generally happen when a PDX"
S TMPARR(3)="message can not be properly received by the PDX Server or when"
S TMPARR(4)="a PDX message can not be properly created by the PDX Transmitter."
S TMPARR(6)="This group will typically consist of the ADPAC(s) and IRM personnel"
S TMPARR(7)="responsible for PDX."
S ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
S:(ERROR<0) OUTCODE="1"_$E(OUTCODE,2,$L(OUTCODE))
;ADD VAQ MANUAL PROCESSING
S GROUP="VAQ MANUAL PROCESSING"
S PRIVATE=0
S ENROLL=0
S RESTCODE=0
K TMPARR
S TMPARR(1)="Mail group that will receive notification of a PDX Request that"
S TMPARR(2)="has been received and requires manual processing. This group"
S TMPARR(3)="will typically consist of users that authorize the release of"
S TMPARR(4)="patient data to other facilities."
S ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
S:(ERROR<0) OUTCODE=$E(OUTCODE,1)_"1"_$E(OUTCODE,3,$L(OUTCODE))
;ADD VAQ UNSOLICITED RECEIVED
S GROUP="VAQ UNSOLICITED RECEIVED"
S PRIVATE=0
S ENROLL=0
S RESTCODE=0
K TMPARR
S TMPARR(1)="Mail group that will receive notification when an Unsolicited"
S TMPARR(2)="PDX has been received. This group will typically consist of"
S TMPARR(3)="users that receive patient data from other facilities."
S ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
S:(ERROR<0) OUTCODE=$E(OUTCODE,1,2)_"1"_$E(OUTCODE,4,$L(OUTCODE))
Q OUTCODE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQPST10 2613 printed Nov 22, 2024@17:36:30 Page 2
VAQPST10 ;ALB/JRP - POST INITS;10-JUN-93
+1 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
MAIL() ;ADD MAIL GROUPS USED
+1 ;INPUT : NONE
+2 ;OUTPUT : XYZ - Code telling which groups were/weren't added
+3 ; X specifies if VAQ PDX ERRORS was added
+4 ; Y specifies if VAQ MANUAL PROCESSING was added
+5 ; Z specifies if VAQ UNSOLICITED RECEIVED was added
+6 ;NOTES : When an error occurs, the error code returned specifies
+7 ; which mail groups were & weren't added. If the "bit"
+8 ; position that specifies the mail group is set to 1, the
+9 ; mail group wasn't added.
+10 ; EX: -101 tells that the mail groups VAQ PDX ERRORS and
+11 ; VAQ UNSOLICITED RECEIVED were not added, while the
+12 ; mail group VAQ MANUAL PROCESSING was added.
+13 ;
+14 ;DECLARE VARIABLES
+15 NEW GROUP,PRIVATE,ENROLL,RESTCODE,TMPARR,OUTCODE,ERROR
+16 SET OUTCODE="000"
+17 ;ADD VAQ PDX ERRORS
+18 SET GROUP="VAQ PDX ERRORS"
+19 SET PRIVATE=0
+20 SET ENROLL=0
+21 SET RESTCODE=0
+22 SET TMPARR(1)="Mail group that will receive any recoverable errors that occur"
+23 SET TMPARR(2)="when using PDX. These errors will generally happen when a PDX"
+24 SET TMPARR(3)="message can not be properly received by the PDX Server or when"
+25 SET TMPARR(4)="a PDX message can not be properly created by the PDX Transmitter."
+26 SET TMPARR(6)="This group will typically consist of the ADPAC(s) and IRM personnel"
+27 SET TMPARR(7)="responsible for PDX."
+28 SET ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
+29 if (ERROR<0)
SET OUTCODE="1"_$EXTRACT(OUTCODE,2,$LENGTH(OUTCODE))
+30 ;ADD VAQ MANUAL PROCESSING
+31 SET GROUP="VAQ MANUAL PROCESSING"
+32 SET PRIVATE=0
+33 SET ENROLL=0
+34 SET RESTCODE=0
+35 KILL TMPARR
+36 SET TMPARR(1)="Mail group that will receive notification of a PDX Request that"
+37 SET TMPARR(2)="has been received and requires manual processing. This group"
+38 SET TMPARR(3)="will typically consist of users that authorize the release of"
+39 SET TMPARR(4)="patient data to other facilities."
+40 SET ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
+41 if (ERROR<0)
SET OUTCODE=$EXTRACT(OUTCODE,1)_"1"_$EXTRACT(OUTCODE,3,$LENGTH(OUTCODE))
+42 ;ADD VAQ UNSOLICITED RECEIVED
+43 SET GROUP="VAQ UNSOLICITED RECEIVED"
+44 SET PRIVATE=0
+45 SET ENROLL=0
+46 SET RESTCODE=0
+47 KILL TMPARR
+48 SET TMPARR(1)="Mail group that will receive notification when an Unsolicited"
+49 SET TMPARR(2)="PDX has been received. This group will typically consist of"
+50 SET TMPARR(3)="users that receive patient data from other facilities."
+51 SET ERROR=+$$MAILGRP^VAQUTL4(GROUP,PRIVATE,ENROLL,RESTCODE,"TMPARR")
+52 if (ERROR<0)
SET OUTCODE=$EXTRACT(OUTCODE,1,2)_"1"_$EXTRACT(OUTCODE,4,$LENGTH(OUTCODE))
+53 QUIT OUTCODE