Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IVMPBUL

IVMPBUL.m

Go to the documentation of this file.
  1. IVMPBUL ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- BULLETIN ; 10/20/05 11:48am
  1. ;;2.0;INCOME VERIFICATION MATCH;**105**;JUL 8,1996;Build 2
  1. ;
  1. ; this routine will send a bulletin for a specified condition
  1. ;
  1. EN ; entry point
  1. N DGB,DGTEXT,XMDUZ,XMSUB,DGSM,XMY,XMTEXT
  1. ;
  1. ; type = Type of Bulletin to send
  1. ;
  1. D CC ; assemble arrays and variables for bulletin
  1. S DGB=6 D BUL ; send bulletin and quit
  1. Q
  1. ;
  1. CC ; Consistency check bulletin
  1. ; This bulletin will be sent for Z07 Consistency check process
  1. ; it indicates the number of records sent and the number not sent
  1. ; and instructions for further action
  1. ;
  1. N DGSEND,DGSENX,DGTOT,DGC,I,J
  1. I '$D(^TMP($J,"CC")) Q
  1. S DGSEND=^TMP($J,"CC",1),DGSENX=^TMP($J,"CC",0),DGTOT=DGSEND+DGSENX
  1. S XMDUZ="IVM BACKGROUND JOB"
  1. 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
  1. S DGC=DGC+1,DGTEXT(DGC,0)=""
  1. S DGC=DGC+1,DGTEXT(DGC,0)=" Z07 MESSAGES SENT: "_$J(DGSEND,10)
  1. S DGC=DGC+1,DGTEXT(DGC,0)=" Z07 MESSAGES NOT SENT: "_$J(DGSENX,10)
  1. S DGC=DGC+1,DGTEXT(DGC,0)=""
  1. Q
  1. ;
  1. BT ; ** Bulletin Text -- Line offset is called to assemble message ***
  1. ;;Following is a summary of the inconsistent data check performed during
  1. ;;the nightly process to transmit patient data to the HEC. The number NOT
  1. ;;SENT, indicates the number of Z07 messages that were not transmitted due
  1. ;;to data inconsistencies. These Z07 messages will not be sent until the
  1. ;;inconsistencies are corrected. For details, run the Inconsistent Data
  1. ;;Elements Report in the ADT Outputs Menu.
  1. ;;
  1. ;;QUIT
  1. BUL ; create and transmit bulletin
  1. ;
  1. N DIC,DIX,DIY,DO,DD
  1. I '$D(DGB),'$D(XMSUB) Q
  1. K:$D(DGTEXT) XMTEXT I '$D(DGTEXT)&('$D(XMTEXT)) Q
  1. S DGB=+$P($G(^DG(43,1,"NOT")),"^",DGB)
  1. I '$D(^XMB(3.8,DGB,0)) Q
  1. ;
  1. ;Protect Fileman from Mailman call
  1. N DICRREC,DIDATA,DIEFAR,DIEFCNOD,DIEFDAS,DIEFECNT,DIEFF,DIEFFLAG
  1. N DIEFFLD,DIEFFLST,DIEFFREF,DIEFFVAL,DIEFFXR,DIEFI,DIEFIEN,DIEFLEV
  1. N DIEFNODE,DIEFNVAL,DIEFOUT,DIEFOVAL,DIEFRFLD,DIEFRLST,DIEFSORK
  1. N DIEFSPOT,DIEFTMP,DIEFTREF,DIFLD,DIFM,DIQUIET,DISYS,D,D0,DA
  1. ;
  1. S XMY("G."_$P($G(^XMB(3.8,DGB,0)),"^",1))="" ; pass mailgroup
  1. Q:'$D(DUZ) S:'$D(DGSM) DGSM=1
  1. S XMTEXT=$S('$D(XMTEXT):"DGTEXT(",1:XMTEXT)
  1. S:$D(DUZ)#2&(DGSM) XMY(DUZ)="" K:'$D(XMY) DGSM D ^XMD:$D(XMY)
  1. ;