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

XU8P540.m

Go to the documentation of this file.
  1. XU8P540 ;SFISC/GB- POST INSTALL ;24 DEC 2009
  1. ;;8.0;KERNEL;**540**;Jul 10, 1995;Build 4
  1. PRE ; Pre-Init
  1. D GROUP
  1. Q
  1. ;
  1. GROUP ; Check to see if mail group has correct remote address. If not, correct it.
  1. N XUGIEN,XUOIEN,XUNIEN
  1. D BMES^XPDUTL("Checking Mail Group 'XUOAA CLIN TRAINEE'...")
  1. S XUGIEN=$$FIND1^DIC(3.8,"","X","XUOAA CLIN TRAINEE") ; eXact match only
  1. I 'XUGIEN D Q
  1. . D BMES^XPDUTL("ERROR: Cannot find mail group 'XUOAA CLIN TRAINEE'")
  1. . S XPDABORT=1
  1. S XUOIEN=$$FIND1^DIC(3.812,","_XUGIEN_",","X","AIMCDATA@LRN.DOMAIN.EXT")
  1. I $D(DIERR) D Q
  1. . D BMES^XPDUTL("ERROR: Lookup of old remote address failed.")
  1. . S XPDABORT=1
  1. I XUOIEN D ; Delete the old remote address from the group.
  1. . N DIR,X,Y,DA,DIK
  1. . S DA(1)=XUGIEN,DA=XUOIEN,DIK="^XMB(3.8,"_XUGIEN_",6,"
  1. . D ^DIK
  1. . D MES^XPDUTL("I've deleted the old remote address from the group.")
  1. E D
  1. . D MES^XPDUTL("The old remote address was already deleted. No action taken.")
  1. S XUNIEN=$$FIND1^DIC(3.812,","_XUGIEN_",","X","AIMCDATA@DOMAIN.EXT")
  1. I $D(DIERR) D Q
  1. . D BMES^XPDUTL("ERROR: Lookup of new remote address failed.")
  1. . S XPDABORT=1
  1. I XUNIEN D
  1. . D MES^XPDUTL("The new remote address 'AIMCDATA@DOMAIN.EXT' was already added. No action taken.")
  1. E D ; Add the new remote address to the group.
  1. . N XUFDA
  1. . S XUFDA(3.812,"?+1,"_XUGIEN_",",.01)="AIMCDATA@DOMAIN.EXT"
  1. . D UPDATE^DIE("","XUFDA")
  1. . I $D(DIERR) D Q
  1. . . D BMES^XPDUTL("ERROR: Cannot add the new remote address to the group.")
  1. . . S XPDABORT=1
  1. . D MES^XPDUTL("I've added the new remote address 'AIMCDATA@DOMAIN.EXT' to the group.")
  1. D MES^XPDUTL("Finished Mail Group Check.")
  1. Q
  1. ;
  1. POST ; Post-Init
  1. I '$$PROD^XUPROD D BMES^XPDUTL("Not a production UCI. Quitting without reindexing/transmitting.") Q
  1. D REINDEX
  1. D XMIT
  1. Q
  1. ;
  1. REINDEX ; Re-index the ATR xref
  1. ; We do this to ensure that data for ALL clinical trainees are transmitted.
  1. D BMES^XPDUTL("Reindexing ""ATR"" cross-reference in the NEW PERSON [#200] file...")
  1. N DIK
  1. S DIK="^VA(200,"
  1. S DIK(1)="12.2^ATR"
  1. D ENALL^DIK
  1. D MES^XPDUTL("Finished reindexing.")
  1. Q
  1. ;
  1. XMIT ; Transmit Data to OAA database
  1. D MES^XPDUTL("Initiating transmission of OAA Clinical Trainee data...")
  1. D OAA^XUOAAHL7
  1. D MES^XPDUTL("Finished with transmission.")
  1. Q