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

IBY368PO.m

Go to the documentation of this file.
  1. IBY368PO ;YMG/BP - Post-Installation for IB patch 368 ;12-Mar-2007
  1. ;;2.0;INTEGRATED BILLING;**368**;12-MAR-2007;Build 21
  1. ;
  1. EN ;
  1. N XPDIDTOT S XPDIDTOT=3
  1. D NTFY ; 1. notify FSC that patch has been installed in production
  1. D TEXT ; 2. add new text entries to file 361.3
  1. D AUTOFILE ; 3. clean up stale informational messages in file 361
  1. ;
  1. EX ;
  1. Q
  1. ;
  1. NTFY ; notify FSC that patch has been installed succesfully
  1. N HEADER,BODY,MAILTO,SITE,TS
  1. D BMES^XPDUTL(" STEP 1 of "_XPDIDTOT)
  1. D MES^XPDUTL("-------------")
  1. D MES^XPDUTL("Sending notification to FSC ...")
  1. ; do not send notification if installed in test account
  1. I '$$PROD^XUPROD D MES^XPDUTL("N/A for test account installation."),UPDATE^XPDID(1) Q
  1. D DTNOLF^DICRW
  1. S SITE=$$SITE^VASITE()
  1. S HEADER="Patch IB*2.0*368 installed at VistA site "_$P(SITE,U,2)
  1. D NOW^%DTC S TS=$$HLDATE^HLFNC(%,"TS")
  1. S BODY(.1)="Patch installed successfully at "_$E(TS,5,6)_"/"_$E(TS,7,8)_"/"_$E(TS,1,4)_" "_$E(TS,9,10)_":"_$E(TS,11,12)_":"_$E(TS,13,19)
  1. S BODY(.2)="Station Number: "_$P(SITE,U,3)
  1. ; FSC destination address
  1. ; FSC address for integration testing
  1. S MAILTO="fsc.edi-team@domain.ext"
  1. D MAIL(HEADER,.BODY,MAILTO)
  1. D MES^XPDUTL(" Done.")
  1. D UPDATE^XPDID(1)
  1. Q
  1. TEXT ; Add new text entries in file 361.3 - IB MESSAGE SCREEN TEXT
  1. N DATA,TXT,DO,DA,DIC,X,Y
  1. D BMES^XPDUTL(" STEP 2 of "_XPDIDTOT)
  1. D MES^XPDUTL("-------------")
  1. D MES^XPDUTL("Adding new entries into file 361.3 ....")
  1. S DATA("ACCEPT")=0
  1. S DATA("ACK/RECEIPT")=0
  1. S DATA("CLAIM ACKNOWLEDGED AND FORWARD")=0
  1. S DATA("FINAL/PAYMENT")=0
  1. S DATA("PAPER CLAIM MAILED VIA USPS")=0
  1. S DATA("ACCEPT *WARNING*")=1
  1. S TXT="" F S TXT=$O(DATA(TXT)) Q:TXT="" D
  1. .I $D(^IBE(361.3,"B",TXT)) Q ; already on file
  1. .S DIC="^IBE(361.3,",DIC(0)="F",X=TXT
  1. .S DIC("DR")=".02////"_DATA(TXT)
  1. .D FILE^DICN
  1. .Q
  1. TX ;
  1. D MES^XPDUTL(" Done.")
  1. D UPDATE^XPDID(2)
  1. Q
  1. ;
  1. AUTOFILE ; Check if informational status messages with no Final Review Action qualify for auto-file with no review.
  1. ;
  1. N IBDA,IBCNT,IB,Z,STOP,IBAUTO,TXT,NOREVU,IBREV
  1. D BMES^XPDUTL(" STEP 3 of "_XPDIDTOT)
  1. D MES^XPDUTL("-------------")
  1. D MES^XPDUTL("Now looking at all informational status messages on file to see if any of them")
  1. D MES^XPDUTL("can be auto-filed with no review needed. Each ""."" represents 1000 messages.")
  1. D MES^XPDUTL("")
  1. S IBDA=0,IBCNT=0 F S IBDA=$O(^IBM(361,"ASV","I",IBDA)) Q:'IBDA D
  1. .S IBCNT=IBCNT+1 W:(IBCNT#1000=0)&'$D(ZTQUEUED) "."
  1. .S IB=$G(^IBM(361,IBDA,0))
  1. .I $P(IB,U,10)'="" Q ; final review action exists so quit out
  1. .; if this message was previously auto-filed with no review, then
  1. .; update the final review information and quit out
  1. .I $P(IB,U,9)=2,$P(IB,U,14)=1 D Q
  1. ..N DIE,DR,DA
  1. ..S DIE=361,DR=".1////F",DA=IBDA D ^DIE
  1. ..Q
  1. .;
  1. .; IBAUTO - flag indicating that the whole message can be auto-filed
  1. .; with no review needed
  1. .; NOREVU - flag indicating that one of the message lines had 'No
  1. .; Review Needed' text
  1. .; IBREV - flag indicating that one of the message lines had 'Review
  1. .; Always Needed' text (so the whole message needs review)
  1. .;
  1. .S (Z,STOP,IBAUTO)=0 F S Z=$O(^IBM(361,IBDA,1,Z)) Q:'Z D Q:STOP
  1. ..S TXT=$G(^IBM(361,IBDA,1,Z,0)) Q:TXT="" ; text line Z
  1. ..S NOREVU=$$CKREVU^IBCEM4(TXT,,,.IBREV)
  1. ..I IBREV S STOP=1,IBAUTO=0 Q ; 'review always needed' text found
  1. ..I NOREVU S IBAUTO=1 ; 'no review needed' text found
  1. ..Q
  1. .I IBAUTO D
  1. ..N DIE,DR,DA
  1. ..S DIE=361,DR=".09////2;.14////1;.1////F",DA=IBDA D ^DIE
  1. ..Q
  1. .Q
  1. D MES^XPDUTL(" Done.")
  1. D UPDATE^XPDID(3)
  1. D CLEAN^DILF
  1. Q
  1. ;
  1. MAIL(MTITLE,MLINES,MRECIP) ; send message
  1. N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY,XMZ,XMMG
  1. S XMSUB=MTITLE,XMDUZ=.5,XMTEXT="MLINES(",XMY(""_MRECIP_"")=""
  1. D ^XMD
  1. Q