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

DVBA23P.m

Go to the documentation of this file.
  1. DVBA23P ;ALB/SEK CLEANUP POST-INS DVBA*2.7*23 ;10/02/98
  1. ;;2.7;AMIE;**23**;Apr 10, 1995
  1. ;
  1. ;This routine will be run as post-installation for patch DVBA*2.7*23.
  1. ;This cleanup will delete entries in the IVM PATIENT file (#301.5)
  1. ;pointing to non-existing or non-veteran entries in the PATIENT file
  1. ;(#2). Corresponding entries in the IVM TRANSMISSION LOG file (#301.6)
  1. ;will also be deleted.
  1. ;
  1. POST ;entry point for post-install, setting up checkpoints
  1. N %
  1. S %=$$NEWCP^XPDUTL("DVBIEN","EN^DVBA23P",0)
  1. S %=$$NEWCP^XPDUTL("DVBCTR5")
  1. S %=$$NEWCP^XPDUTL("DVBCTR6")
  1. Q
  1. ;
  1. EN ;begin processing
  1. ;
  1. ;go through the IVM PATIENT file finding entries pointing to non-
  1. ;existing or non-veteran entries in the PATIENT file.
  1. N DVBIEN,DVBCTR5,DVBCTR6
  1. ;
  1. D BMES^XPDUTL(" >> starting cleanup of IVM PATIENT and IVM TRANSMISSION LOG files")
  1. ;
  1. ;get value from checkpoints, previous run
  1. S DVBIEN=+$$PARCP^XPDUTL("DVBIEN")
  1. S DVBCTR5=+$$PARCP^XPDUTL("DVBCTR5")
  1. S DVBCTR6=+$$PARCP^XPDUTL("DVBCTR6")
  1. ;
  1. D LOOP
  1. D BMES^XPDUTL(" "_DVBCTR5_" entries deleted from IVM PATIENT file")
  1. D MES^XPDUTL(" "_DVBCTR6_" entries deleted from IVM TRANSMISSION LOG file")
  1. D BMES^XPDUTL(" >> cleanup done")
  1. Q
  1. ;
  1. LOOP ;
  1. N %,DA,DIK,DVBIVMT,DFN,VAEL,VAERR
  1. F S DVBIEN=$O(^IVM(301.5,DVBIEN)) Q:'DVBIEN D
  1. .S DFN=+$G(^IVM(301.5,DVBIEN,0)) Q:'DFN
  1. .D ELIG^VADPT Q:VAEL(4)
  1. .S DVBIVMT=0
  1. .F S DVBIVMT=$O(^IVM(301.6,"B",DVBIEN,DVBIVMT)) Q:'DVBIVMT D
  1. ..S DA=DVBIVMT,DIK="^IVM(301.6," D ^DIK
  1. ..S DVBCTR6=DVBCTR6+1
  1. ..S %=$$UPCP^XPDUTL("DVBCTR6",DVBCTR6)
  1. .S DA=DVBIEN,DIK="^IVM(301.5," D ^DIK
  1. .S DVBCTR5=DVBCTR5+1
  1. .S %=$$UPCP^XPDUTL("DVBCTR5",DVBCTR5)
  1. .Q
  1. S %=$$UPCP^XPDUTL("DVBIEN",DVBIEN)
  1. Q