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

IBY664PO.m

Go to the documentation of this file.
  1. IBY664PO ;AITC/VD - Post-Installation for IB patch 664; MAR 31, 2020
  1. ;;2.0;INTEGRATED BILLING;**664**;MAR 21,1994;Build 29
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;
  1. Q
  1. PRE ; PRE-INSTALL for IBY664PO
  1. D DELTRG
  1. Q
  1. ;
  1. DELTRG ; delete 2 triggers in #2.312,.01
  1. ; ICR# 2916 - Is for the use of the DELIX^DDMOD call to delete
  1. ; the TRIGGERS in #2.312,.01.
  1. N IBA
  1. S IBA(2)=" IB*2*664 Pre-Install .....",IBA(1)=" " D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(2.312,.01,4)
  1. S IBA(2)=" >> ^DD(2.312,.01) Trigger #4 deleted",IBA(1)=" " D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(2.312,.01,5)
  1. S IBA(2)=" >> ^DD(2.312,.01) Trigger #5 deleted",IBA(1)=" " D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. S IBA(2)=" IB*2*664 Pre-Install Complete",(IBA(1),IBA(3))=" " D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1. ;
  1. ;
  1. POST ; POST ROUTINE(S)
  1. N IBXPD,PRODENV,SITE,SITENAME,SITENUM,XPDIDTOT
  1. S XPDIDTOT=2
  1. S SITE=$$SITE^VASITE,SITENAME=$P(SITE,U,2),SITENUM=$P(SITE,U,3)
  1. ;
  1. S PRODENV=$$PROD^XUPROD(1) ; 1=Production Environment, 0=Test Environment
  1. D MES^XPDUTL("")
  1. D ADDSOI(1) ; Add 'Electronic Health Record' to the SOI file (#355.12)
  1. D SITEREG(2,SITENUM) ; Send site registration message to FSC
  1. ;
  1. ; Displays the 'Done' message and finishes the progress bar
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("POST-Install for IB*2.0*664 Completed.")
  1. Q
  1. ;============================
  1. ADDSOI(IBXPD) ; Add 'ELECTRONIC HEALTH RECORD' to the SOI file.
  1. N DA,DIK,IBCNT,IBERR,IBIEN,NEWSOI,OLDSOI
  1. D BMES^XPDUTL(" STEP "_IBXPD_" of "_XPDIDTOT)
  1. D MES^XPDUTL("-------------")
  1. D MES^XPDUTL("Adding ELECTRONIC HEALTH RECORD as a new Source of Information")
  1. D MES^XPDUTL("in the Source of Information File (#355.12) ... ")
  1. ;
  1. S NEWSOI(.01)=21,NEWSOI(.02)="ELECTRONIC HEALTH RECORD",NEWSOI(.03)="EHR"
  1. ;
  1. S IBCNT=21
  1. I $D(^IBE(355.12,IBCNT)) D Q ; An SOI already exists in record #21.
  1. . N PCCNT
  1. . F PCCNT=.01:.01:.03 S OLDSOI(PCCNT)=$$GET1^DIQ(355.12,IBCNT,PCCNT,"I")
  1. . ;
  1. . I OLDSOI(.02)="ELECTRONIC HEALTH RECORD",OLDSOI(.03)="EHR" D Q ;'EHR' already exists.
  1. . . D MES^XPDUTL("")
  1. . . D MES^XPDUTL("ELECTRONIC HEALTH RECORD (EHR) entry was not installed.")
  1. . . D MES^XPDUTL("It already exists in the Source Of Information file (#355.12).")
  1. . ;
  1. . ; Delete pre-existing SOI record #21 because it is not the EHR SOI.
  1. . S DA=IBCNT S DIK="^IBE(355.12," D ^DIK
  1. . S IBIEN=$$ADD^IBDFDBS(355.12,,.NEWSOI,.IBERR,IBCNT)
  1. . I IBERR D Q
  1. . . D BMES^XPDUTL("")
  1. . . D BMES^XPDUTL("*** ERROR ADDING "_NEWSOI(.02)_" CODE TO THE SOURCE OF INFORMATION TABLE (#355.12) (#355.12) - Log a Service Ticket! ***")
  1. . D BMES^XPDUTL("")
  1. . D BMES^XPDUTL("Replaced record #21 ("_OLDSOI(.03)_") - "_OLDSOI(.02)_" with the new")
  1. . D BMES^XPDUTL("ELECTRONIC HEALTH RECORD (EHR) entry in the Source Of Information file")
  1. . D BMES^XPDUTL("(#355.12).")
  1. . ;
  1. . I PRODENV D ; Send an email to the eInsurance Rapid Response Team.
  1. . . N MSG,SUBJ,XMINSTR,XMTO
  1. . . S SUBJ="IB*2*644 - EHR replaces existing SOI #"_$P(SITE,U,3)_" "_$P(SITE,U,2) ; Approved by eBiz on 5/5/2020 @ USD&P
  1. . . S SUBJ=$E(SUBJ,1,65)
  1. . . S MSG(1)="On "_$$FMTE^XLFDT($$NOW^XLFDT)_" at Site # "_SITENUM_" - "_SITENAME_","
  1. . . S MSG(2)="the installation of patch IB*2.0*664 added the new EHR - ELECTRONIC HEALTH RECORD"
  1. . . S MSG(3)="entry to the Source Of Information file (#355.12) by removing the non-standardized"
  1. . . S MSG(4)="entry # 21 for "_OLDSOI(.03)_" - "_OLDSOI(.02)_"."
  1. . . S MSG(5)=""
  1. . . S XMTO("VHAeInsuranceRapidResponse@domain.ext")=""
  1. . . ;
  1. . . S XMINSTR("FROM")="VistA-eInsurance"
  1. . . D SENDMSG^XMXAPI(DUZ,SUBJ,"MSG",.XMTO,.XMINSTR)
  1. ;
  1. S IBIEN=$$ADD^IBDFDBS(355.12,,.NEWSOI,.IBERR,IBCNT)
  1. I IBERR D Q
  1. . D BMES^XPDUTL("")
  1. . D BMES^XPDUTL("*** ERROR ADDING "_NEWSOI(.02)_" CODE TO THE SOURCE OF INFORMATION TABLE (#355.12) (#355.12) - Log a Service Ticket! ***")
  1. D MES^XPDUTL("Source of Information: ELECTRONIC HEALTH RECORD added successfully")
  1. Q
  1. ;
  1. SITEREG(IBXPD,SITENUM) ; send site registration message to FSC
  1. D BMES^XPDUTL(" STEP "_IBXPD_" of "_XPDIDTOT)
  1. D MES^XPDUTL("-------------")
  1. D MES^XPDUTL("Send eIV site registration message to FSC ... ")
  1. ;
  1. I '$$PROD^XUPROD(1) D MES^XPDUTL("N/A - Not a production account - No site registration message sent") G SITEREGQ
  1. I SITENUM=358 D MES^XPDUTL("Current Site is MANILA - NO eIV site registration message sent") G SITEREGQ
  1. D ^IBCNEHLM
  1. D MES^XPDUTL("eIV site registration message was successfully sent")
  1. ;
  1. SITEREGQ ;
  1. Q
  1. ;