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

PXRMP42I.m

Go to the documentation of this file.
  1. PXRMP42I ;SLC/PKR - Inits for PXRM*2.0*42. ;04/04/2019
  1. ;;2.0;CLINICAL REMINDERS;**42**;Feb 04, 2005;Build 245
  1. Q
  1. ;==========================================
  1. PRE ;Pre-init
  1. ;Disable options and protocols
  1. D OPTIONS^PXRMUTIL("DISABLE","Install of PXRM*2.0*42")
  1. D PROTCOLS^PXRMUTIL("DISABLE","Install of PXRM*2.0*42")
  1. D RMOLDDDS^PXRMP42I
  1. Q
  1. ;
  1. ;==========================================
  1. POST ;Post-init
  1. N RES
  1. D RBLDAPDS^PXRMP42I
  1. D RBLDD^PXRMP42I
  1. D RMQUERIX^PXRMP42I
  1. D UPCSPON^PXRMP42I
  1. ;Remove PXRM GEC REFERRAL REPORT from the Manager's Menu.
  1. S RES=$$DELETE^XPDMENU("PXRM MANAGERS MENU","PXRM GEC REFERRAL REPORT")
  1. I RES=1 D BMES^XPDUTL("PXRM GEC REFERRAL REPORT was removed from the PXRM MANAGERS MENU.")
  1. D SETPVER^PXRMUTIL("2.0P42")
  1. ;Enable options and protocols
  1. D OPTIONS^PXRMUTIL("ENABLE","Install of PXRM*2.0*42")
  1. D PROTCOLS^PXRMUTIL("ENABLE","Install of PXRM*2.0*42")
  1. D SENDIM^PXRMMSG("PXRM*2.0*42")
  1. Q
  1. ;
  1. ;==========================================
  1. RBLDAPDS ;Rebuild the "APDS" index for all taxonomies, to include
  1. ;V Standard Codes.
  1. N IEN,NAME,PDS
  1. D BMES^XPDUTL("Rebuilding the 'APDS' index for all taxonomies.")
  1. S NAME=""
  1. F S NAME=$O(^PXD(811.2,"B",NAME)) Q:NAME="" D
  1. . S IEN=$O(^PXD(811.2,"B",NAME,""))
  1. . S PDS=$P(^PXD(811.2,IEN,0),U,4)
  1. . D SPDS^PXRMPDS(IEN,PDS)
  1. Q
  1. ;
  1. ;==========================================
  1. RBLDD ;Rebuild the "D" index for 811.9.
  1. N DIK
  1. D BMES^XPDUTL("Rebuilding the 'D' index for Reminder Definition Print Names.")
  1. K ^PXD(811.9,"D")
  1. S DIK="^PXD(811.9,",DIK(1)="1.2^D"
  1. D ENALL^DIK
  1. Q
  1. ;
  1. ;==========================================
  1. RMOLDDDS ;Remove old data dictionaries.
  1. N DIU,TEXT
  1. D BMES^XPDUTL("Removing old data dictionaries.")
  1. S DIU(0)=""
  1. F DIU=811.6 D
  1. . S TEXT=" Deleting data dictionary for file # "_DIU
  1. . D MES^XPDUTL(TEXT)
  1. . D EN^DIU2
  1. Q
  1. ;
  1. ;==========================================
  1. RMQUERIX ;Remove the QUERI extracts.
  1. N IEN,IENS,KFDA,MSG,NAME,NAMES,NUM
  1. ;Deletion from file #19.2 covered by ICR #3732.
  1. ;Delete the Option Scheduling file entries.
  1. D BMES^XPDUTL("Deleting the QUERI extracts.")
  1. F NAME="PXRM EXTRACT VA-IHD QUERI","PXRM EXTRACT VA-MH QUERI" D
  1. . S IEN=+$$FIND1^DIC(19.2,"","BX",NAME,"","","MSG")
  1. . I IEN=0 Q
  1. . D BMES^XPDUTL("Deleting scheduled option "_NAME)
  1. . S IENS=IEN_","
  1. . S KFDA(19.2,IENS,.01)="@"
  1. . D FILE^DIE("","KFDA","MSG")
  1. . I $D(MSG) D AWRITE^PXRMUTIL("MSG")
  1. ;Delete all the QUERI patient lists.
  1. D BMES^XPDUTL("Deleting QUERI patient lists.")
  1. F NAMESTART="VA-*IHD QUERI","VA-*MH QUERI" D
  1. . S NAME=NAMESTART
  1. . S NUM=0
  1. . D BMES^XPDUTL("Deleting "_NAMESTART_" lists.")
  1. . F S NAME=$O(^PXRMXP(810.5,"B",NAME)) Q:NAME'[NAMESTART D
  1. .. S IEN=+$$FIND1^DIC(810.5,"","BX",NAME,"","","MSG")
  1. .. I IEN=0 Q
  1. .. D MES^XPDUTL("Deleting Patient List "_NAME)
  1. .. S IENS=IEN_","
  1. .. S KFDA(810.5,IENS,.01)="@"
  1. .. D FILE^DIE("","KFDA","MSG")
  1. .. I $D(MSG) D AWRITE^PXRMUTIL("MSG")
  1. .. S NUM=NUM+1
  1. . D BMES^XPDUTL("Deleted "_NUM_" "_NAMESTART_" lists.")
  1. Q
  1. ;
  1. ;==========================================
  1. UPCSPON ;Make all the .01s in the Sponsor file uppercase.
  1. N FDA,NEWIEN,NEWNAME,MSG,OLDIEN,OLDNAME,RPL
  1. D BMES^XPDUTL("Checking for Sponsor Names that need to be changed to all uppercase.")
  1. S OLDNAME=""
  1. F S OLDNAME=$O(^PXRMD(811.6,"B",OLDNAME)) Q:OLDNAME="" D
  1. . I OLDNAME'?.E1.L.E Q
  1. . S NEWNAME=$$UP^XLFSTR(OLDNAME)
  1. .;If the uppercase name already exists repoint the lowercase one
  1. .;to it.
  1. . S NEWIEN=+$$FIND1^DIC(811.6,"","BXU",NEWNAME) I NEWIEN>0 D Q
  1. .. K RPL
  1. .. D BMES^XPDUTL("The uppercase version of "_OLDNAME_" already exists at IEN="_NEWIEN)
  1. .. D MES^XPDUTL("repointing to it.")
  1. .. S OLDIEN=$O(^PXRMD(811.6,"B",OLDNAME,""))
  1. .. S RPL(1)=OLDIEN_U_NEWIEN
  1. .. D EN^DITP(811.6,.RPL)
  1. ..;Remove the lowercase entry.
  1. .. S FDA(811.6,OLDIEN_",",.01)="@"
  1. .. D FILE^DIE("","FDA","MSG")
  1. . D BMES^XPDUTL("Renaming: "_OLDNAME)
  1. . D MES^XPDUTL("To: "_NEWNAME)
  1. . D RENAME^PXRMUTIL(811.6,OLDNAME,NEWNAME)
  1. ;
  1. ;Remove the old 'B' and 'BN' indexes and build the new 'B'.
  1. K ^PXRMD(811.6,"B"),^PXRMD(811.6,"BN")
  1. D BMES^XPDUTL("Rebuilding Sponsor B index.")
  1. N DIK
  1. S DIK="^PXRMD(811.6,",DIK(1)=".01^B"
  1. D ENALL^DIK
  1. Q
  1. ;