IVMPBUL ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- BULLETIN ; 10/20/05 11:48am
;;2.0;INCOME VERIFICATION MATCH;**105**;JUL 8,1996;Build 2
;
; this routine will send a bulletin for a specified condition
;
EN ; entry point
N DGB,DGTEXT,XMDUZ,XMSUB,DGSM,XMY,XMTEXT
;
; type = Type of Bulletin to send
;
D CC ; assemble arrays and variables for bulletin
S DGB=6 D BUL ; send bulletin and quit
Q
;
CC ; Consistency check bulletin
; This bulletin will be sent for Z07 Consistency check process
; it indicates the number of records sent and the number not sent
; and instructions for further action
;
N DGSEND,DGSENX,DGTOT,DGC,I,J
I '$D(^TMP($J,"CC")) Q
S DGSEND=^TMP($J,"CC",1),DGSENX=^TMP($J,"CC",0),DGTOT=DGSEND+DGSENX
S XMDUZ="IVM BACKGROUND JOB"
S XMSUB="HEC INCONSISTENCY TRANSMISSIONS" F I=1:1 S J=$P($T(BT+I),";;",2) Q:J="QUIT" S DGTEXT(I,0)=J,DGC=I
S DGC=DGC+1,DGTEXT(DGC,0)=""
S DGC=DGC+1,DGTEXT(DGC,0)=" Z07 MESSAGES SENT: "_$J(DGSEND,10)
S DGC=DGC+1,DGTEXT(DGC,0)=" Z07 MESSAGES NOT SENT: "_$J(DGSENX,10)
S DGC=DGC+1,DGTEXT(DGC,0)=""
Q
;
BT ; ** Bulletin Text -- Line offset is called to assemble message ***
;;Following is a summary of the inconsistent data check performed during
;;the nightly process to transmit patient data to the HEC. The number NOT
;;SENT, indicates the number of Z07 messages that were not transmitted due
;;to data inconsistencies. These Z07 messages will not be sent until the
;;inconsistencies are corrected. For details, run the Inconsistent Data
;;Elements Report in the ADT Outputs Menu.
;;
;;QUIT
BUL ; create and transmit bulletin
;
N DIC,DIX,DIY,DO,DD
I '$D(DGB),'$D(XMSUB) Q
K:$D(DGTEXT) XMTEXT I '$D(DGTEXT)&('$D(XMTEXT)) Q
S DGB=+$P($G(^DG(43,1,"NOT")),"^",DGB)
I '$D(^XMB(3.8,DGB,0)) Q
;
;Protect Fileman from Mailman call
N DICRREC,DIDATA,DIEFAR,DIEFCNOD,DIEFDAS,DIEFECNT,DIEFF,DIEFFLAG
N DIEFFLD,DIEFFLST,DIEFFREF,DIEFFVAL,DIEFFXR,DIEFI,DIEFIEN,DIEFLEV
N DIEFNODE,DIEFNVAL,DIEFOUT,DIEFOVAL,DIEFRFLD,DIEFRLST,DIEFSORK
N DIEFSPOT,DIEFTMP,DIEFTREF,DIFLD,DIFM,DIQUIET,DISYS,D,D0,DA
;
S XMY("G."_$P($G(^XMB(3.8,DGB,0)),"^",1))="" ; pass mailgroup
Q:'$D(DUZ) S:'$D(DGSM) DGSM=1
S XMTEXT=$S('$D(XMTEXT):"DGTEXT(",1:XMTEXT)
S:$D(DUZ)#2&(DGSM) XMY(DUZ)="" K:'$D(XMY) DGSM D ^XMD:$D(XMY)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMPBUL 2379 printed Oct 16, 2024@18:02:51 Page 2
IVMPBUL ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- BULLETIN ; 10/20/05 11:48am
+1 ;;2.0;INCOME VERIFICATION MATCH;**105**;JUL 8,1996;Build 2
+2 ;
+3 ; this routine will send a bulletin for a specified condition
+4 ;
EN ; entry point
+1 NEW DGB,DGTEXT,XMDUZ,XMSUB,DGSM,XMY,XMTEXT
+2 ;
+3 ; type = Type of Bulletin to send
+4 ;
+5 ; assemble arrays and variables for bulletin
DO CC
+6 ; send bulletin and quit
SET DGB=6
DO BUL
+7 QUIT
+8 ;
CC ; Consistency check bulletin
+1 ; This bulletin will be sent for Z07 Consistency check process
+2 ; it indicates the number of records sent and the number not sent
+3 ; and instructions for further action
+4 ;
+5 NEW DGSEND,DGSENX,DGTOT,DGC,I,J
+6 IF '$DATA(^TMP($JOB,"CC"))
QUIT
+7 SET DGSEND=^TMP($JOB,"CC",1)
SET DGSENX=^TMP($JOB,"CC",0)
SET DGTOT=DGSEND+DGSENX
+8 SET XMDUZ="IVM BACKGROUND JOB"
+9 SET XMSUB="HEC INCONSISTENCY TRANSMISSIONS"
FOR I=1:1
SET J=$PIECE($TEXT(BT+I),";;",2)
if J="QUIT"
QUIT
SET DGTEXT(I,0)=J
SET DGC=I
+10 SET DGC=DGC+1
SET DGTEXT(DGC,0)=""
+11 SET DGC=DGC+1
SET DGTEXT(DGC,0)=" Z07 MESSAGES SENT: "_$JUSTIFY(DGSEND,10)
+12 SET DGC=DGC+1
SET DGTEXT(DGC,0)=" Z07 MESSAGES NOT SENT: "_$JUSTIFY(DGSENX,10)
+13 SET DGC=DGC+1
SET DGTEXT(DGC,0)=""
+14 QUIT
+15 ;
BT ; ** Bulletin Text -- Line offset is called to assemble message ***
+1 ;;Following is a summary of the inconsistent data check performed during
+2 ;;the nightly process to transmit patient data to the HEC. The number NOT
+3 ;;SENT, indicates the number of Z07 messages that were not transmitted due
+4 ;;to data inconsistencies. These Z07 messages will not be sent until the
+5 ;;inconsistencies are corrected. For details, run the Inconsistent Data
+6 ;;Elements Report in the ADT Outputs Menu.
+7 ;;
+8 ;;QUIT
BUL ; create and transmit bulletin
+1 ;
+2 NEW DIC,DIX,DIY,DO,DD
+3 IF '$DATA(DGB)
IF '$DATA(XMSUB)
QUIT
+4 if $DATA(DGTEXT)
KILL XMTEXT
IF '$DATA(DGTEXT)&('$DATA(XMTEXT))
QUIT
+5 SET DGB=+$PIECE($GET(^DG(43,1,"NOT")),"^",DGB)
+6 IF '$DATA(^XMB(3.8,DGB,0))
QUIT
+7 ;
+8 ;Protect Fileman from Mailman call
+9 NEW DICRREC,DIDATA,DIEFAR,DIEFCNOD,DIEFDAS,DIEFECNT,DIEFF,DIEFFLAG
+10 NEW DIEFFLD,DIEFFLST,DIEFFREF,DIEFFVAL,DIEFFXR,DIEFI,DIEFIEN,DIEFLEV
+11 NEW DIEFNODE,DIEFNVAL,DIEFOUT,DIEFOVAL,DIEFRFLD,DIEFRLST,DIEFSORK
+12 NEW DIEFSPOT,DIEFTMP,DIEFTREF,DIFLD,DIFM,DIQUIET,DISYS,D,D0,DA
+13 ;
+14 ; pass mailgroup
SET XMY("G."_$PIECE($GET(^XMB(3.8,DGB,0)),"^",1))=""
+15 if '$DATA(DUZ)
QUIT
if '$DATA(DGSM)
SET DGSM=1
+16 SET XMTEXT=$SELECT('$DATA(XMTEXT):"DGTEXT(",1:XMTEXT)
+17 if $DATA(DUZ)#2&(DGSM)
SET XMY(DUZ)=""
if '$DATA(XMY)
KILL DGSM
if $DATA(XMY)
DO ^XMD
+18 ;