source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGQEHL70.m@ 1715

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1DGQEHL70 ;ALB/JFP - VIC HL7 Utility Bulletins; 09/01/96
2 ;;V5.3;REGISTRATION;**73**;DEC 11,1996
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5ERRBULL(REASON) ; -- Sends error bulletin
6 ;
7 ;Input: REASON - Why transmission of data could not be completed
8 ;Output: None
9 ;
10 ; -- Check input, reason in piece 2
11 S REASON=$P($G(REASON),"^",2)
12 ; -- Declare variables
13 N MSGTXT,XMB,XMTEXT,XMY,XMDUZ,XMDT,XMZ
14 ; -- Send message text
15 S MSGTXT(1)="Transmission of data to photo capture station"
16 S MSGTXT(2)=" "
17 S MSGTXT(3)="could not be completed for the following reason:"
18 S MSGTXT(4)=" "
19 S MSGTXT(5)=" "_REASON
20 ; -- Send bulletin subject
21 S XMB(1)="** Transmission of data to Photo station not complete **"
22 ; -- Deliver bulletin
23 S XMB="DGQE PHOTO CAPTURE"
24 S XMTEXT="MSGTXT("
25 D ^XMB
26 Q
27 ;
28CMPLBULL(SENT,ERRARY) ;Send completion bulletin
29 ;
30 ;Input : SENT - Number of encounters sent to NPCDB (Defaults to 0)
31 ; ERRARRY - Array containing list of transactions that
32 ; could not be transmitted (full global reference)
33 ;
34 ; ERRARY(Ptr) = Reason
35 ; Ptr - Pointer to entry in Patient file (#2)
36 ; Reason - Why the encounter could not be transmitted
37 ;Output : None
38 ;
39 ; -- Check input
40 S SENT=+$G(SENT)
41 S ERRARY=$G(ERRARY)
42 S:(ERRARY="") ERRARY="^TMP(""DGQE-XMIT-BLD"","_$J_",""ERRORS"")"
43 ; -- Declare variables
44 N MSGTXT,XMB,XMTEXT,XMY,XMDUZ,XMDT,XMZ,XMITPTR,LINE
45 N NAME,TMP,SSN,PATZND,CNT
46 S MSGTXT="^TMP(""DGQE-XMIT-BLD"","_$J_",""BULLETIN"")"
47 K @MSGTXT
48 ; -- Put number of transactions transmitted into message text
49 S @MSGTXT@(1)="Transmission of data to the Photo Capture Station completed."
50 S @MSGTXT@(2)="A total of "_SENT_" transactions were sent."
51 S @MSGTXT@(3)=" "
52 ; -- Put nontransmitted encounter information into message text
53 I (+$O(@ERRARY@(0))) D
54 .S @MSGTXT@(4)=" "
55 .S @MSGTXT@(5)="The following transactions could not be sent:"
56 .S @MSGTXT@(6)=" "
57 .S LINE=7
58 .S XMITPTR=0
59 .S CNT=0
60 .F S XMITPTR=+$O(@ERRARY@(XMITPTR)) Q:('XMITPTR) D
61 ..S CNT=CNT+1
62 ..; -- Get patient's name & SSN - truncate name to 24 characters
63 ..S PATZND=$G(^DPT(XMITPTR,0))
64 ..S NAME=$E($P(PATZND,"^",1),1,24)
65 ..S:(NAME="") NAME="Unknown Patient"
66 ..S SSN=$E($P(PATZND,"^",9),6,10)
67 ..S:(SSN="") SSN="????"
68 ..; -- Put info into bulletin
69 ..S TMP=CNT_" - "
70 ..S TMP=$$INSERT^SCDXUTL1(NAME,TMP,5)
71 ..S TMP=$$INSERT^SCDXUTL1("("_SSN_")",TMP,29)
72 ..S @MSGTXT@(LINE)=TMP
73 ..; -- insert reason
74 ..S @MSGTXT@(LINE+1)=$G(@ERRARY@(XMITPTR))
75 ..S @MSGTXT@(LINE+2)=" "
76 ..S LINE=LINE+3
77 ; -- Set bulletin subject
78 S XMB(1)="Transmission of data to Photo Capture station completed"
79 ; -- Deliver bulletin
80 S XMB="DGQE PHOTO CAPTURE"
81 S XMTEXT=$P(MSGTXT,")",1)_","
82 D ^XMB
83 ; -- Done: (clean up and quit)
84 K @MSGTXT
85 Q
86 ;
87END ; -- End of code
88 Q
89 ;
Note: See TracBrowser for help on using the repository browser.