source: FOIAVistA/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQBUL07.m@ 1742

Last change on this file since 1742 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1VAQBUL07 ;ALB/JRP - BULLETINS;26-JUL-93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3PURGE(ERRARR) ;SEND PURGING ERROR BULLETIN
4 ;INPUT : ERRARR - Array of errors subscripted by entry number in
5 ; transaction file (full global ref)
6 ;OUTPUT : 0 - Bulletin sent
7 ; -1^ErrorText - Bulletin not sent
8 ;NOTES : ERRARR should be in the format
9 ; ERRARR(Transaction's IFN)=Error text
10 ;
11 ;CHECK INPUT
12 Q:($G(ERRARR)="") "-1^Did not pass reference to error array"
13 Q:('$D(@ERRARR)) 0
14 ;DECLARE VARIABLES
15 N SUBJ,SENTBY,FWRDBY,XMY,TMPARR,TRANPTR,X,STOPPED,LINE
16 S TMPARR="^TMP(""VAQ-BUL"","_$J_")"
17 K @TMPARR
18 S LINE=1
19 ;DETERMINE IF PURGER WAS STOPPED
20 S STOPPED=$D(@ERRARR@("STOPPED"))
21 I (STOPPED) D
22 .S @TMPARR@(LINE,0)="** Purger was stopped before completion **"
23 .S LINE=LINE+1
24 .S @TMPARR@(LINE,0)=""
25 .S LINE=LINE+1
26 .S @TMPARR@(LINE,0)=""
27 .S LINE=LINE+1
28 ;BUILD MESSAGE
29 S @TMPARR@(LINE,0)="The following PDX Transaction(s) could not be purged ..."
30 S LINE=LINE+1
31 S @TMPARR@(LINE,0)=""
32 S LINE=LINE+1
33 S TRANPTR=""
34 F S TRANPTR=$O(@ERRARR@(TRANPTR)) Q:(TRANPTR="") D
35 .Q:(TRANPTR="STOPPED")
36 .S @TMPARR@(LINE,0)=""
37 .S LINE=LINE+1
38 .S X=$G(@ERRARR@(TRANPTR))
39 .S @TMPARR@(LINE,0)="Entry #: "_TRANPTR
40 .S LINE=LINE+1
41 .S @TMPARR@(LINE,0)=" Global: ^VAT(394.61,"_TRANPTR_")"
42 .S LINE=LINE+1
43 .S @TMPARR@(LINE,0)=" Reason: "_X
44 .S LINE=LINE+1
45 S @TMPARR@(LINE,0)=""
46 S LINE=LINE+1
47 S @TMPARR@(LINE,0)=""
48 S LINE=LINE+1
49 S @TMPARR@(LINE,0)="** Please remember that PDX Transactions may also **"
50 S LINE=LINE+1
51 S @TMPARR@(LINE,0)="** have associated data stored in file number 394.62 **"
52 S LINE=LINE+1
53 S @TMPARR@(LINE,0)=""
54 S LINE=LINE+1
55 ;SET UP CALL TO SEND BULLETIN
56 S SUBJ="PDX TRANSACTIONS COULD NOT BE PURGED"
57 S SENTBY="PDX"
58 S FWRDBY="Patient Data eXchange"
59 S XMY("G.VAQ PDX ERRORS")=""
60 ;SEND BULLETIN
61 S X=$$SENDBULL^VAQBUL(SUBJ,SENTBY,FWRDBY,TMPARR)
62 S:(X>0) X=0
63 ;CLEAN UP
64 K @TMPARR
65 Q X
Note: See TracBrowser for help on using the repository browser.