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

MAGIP278.m

Go to the documentation of this file.
  1. MAGIP278 ;WOIFO/DAC - Install code for MAG*3.0*278 ; Oct 06, 2021@13:54:20
  1. ;;3.0;IMAGING;**278**;Mar 19, 2002;Build 138
  1. ;; Per VA Directive 6402, this routine should not be modified.
  1. ;; +---------------------------------------------------------------+
  1. ;; | Property of the US Government. |
  1. ;; | No permission to copy or redistribute this software is given. |
  1. ;; | Use of unreleased versions of this software requires the user |
  1. ;; | to execute a written test agreement with the VistA Imaging |
  1. ;; | Development Office of the Department of Veterans Affairs, |
  1. ;; | telephone (301) 734-0100. |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed in any way. |
  1. ;; | Modifications to this software may result in an adulterated |
  1. ;; | medical device under 21CFR820, the use of which is considered |
  1. ;; | to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. ; There are no environment checks here but the MAGIP278 has to be
  1. ; referenced by the "Environment Check Routine" field of the KIDS
  1. ; build so that entry points of the routine are available to the
  1. ; KIDS during all installation phases.
  1. Q
  1. ;
  1. ;+++++ INSTALLATION ERROR HANDLING
  1. ERROR ; Error handling
  1. S:$D(XPDNM) XPDABORT=1
  1. ;--- Display the messages and store them to the INSTALL file
  1. D DUMP^MAGUERR1(),ABTMSG^MAGKIDS()
  1. Q
  1. ;
  1. ;***** POST-INSTALL CODE
  1. POS ; Post-Install
  1. ;
  1. D QUE
  1. ;
  1. D ATTACH
  1. D SYN
  1. Q
  1. ;
  1. QUE ; Que post install
  1. N NAMSP,PATCH,JOBN,ZTSK,ZTRTN,ZTIO,ZTDTH,ZTDESC,Y,ZTQUEUED,ZTREQ,ZTSAVE,CNT,PSJCNT,SBJM,RESTART,SMSG
  1. S NAMSP="MAGVCLN"
  1. S JOBN="MAG*3.0*278 Post Install"
  1. S PATCH="MAG*3.0*278"
  1. S Y=$$NOW^XLFDT S ZTDTH=$$FMTH^XLFDT(Y)
  1. ;
  1. S ZTRTN="QUE^"_NAMSP,ZTIO=""
  1. S (SBJM,ZTDESC)="Background job for "_JOBN
  1. S ZTSAVE("JOBN")="",ZTSAVE("ZTDTH")="",ZTSAVE("DUZ")="",ZTSAVE("SBJM")=""
  1. D ^%ZTLOAD
  1. D:$D(ZTSK)
  1. . N POSTEXT
  1. . S POSTEXT(1)="A MailMan message will be sent to the installer and the"
  1. . S POSTEXT(2)="MAG SERVER mail group upon Post Install Completion"
  1. . S POSTEXT(3)="*** Task #"_ZTSK_" Queued! ***"
  1. . D MES^XPDUTL(.POSTEXT)
  1. . S ZTSAVE("ZTSK")=""
  1. ;
  1. ;--- Send the notification e-mail
  1. D BMES^XPDUTL("Post Install Mail Message: "_$$FMTE^XLFDT($$NOW^XLFDT))
  1. D INS^MAGQBUT4(XPDNM,DUZ,$$NOW^XLFDT,XPDA)
  1. K XPDQUES
  1. Q
  1. ;
  1. ;
  1. ATTACH ; Attach options to PSO EPCS UTILITY menu
  1. N MENU,OPTION,CHECK,SYN
  1. S MENU="MAGV HDIG MENU"
  1. F OPTION="MAGV SEARCH PROBLEMS","MAGV RESOLVE PROBLEMS" D
  1. . S SYN=$S(OPTION["SEARCH":"SRPR",1:"VRPR")
  1. . S CHECK=$$ADD^XPDMENU(MENU,OPTION,SYN)
  1. . D BMES^XPDUTL(">>> "_OPTION_" Option"_$S('CHECK:" NOT added to "_MENU,1:" added to "_MENU)_" <<<")
  1. Q
  1. ;
  1. SYN ; Add Synonyms to Menu
  1. N MENUIEN
  1. S MENUIEN=$$FIND1^DIC(19,,"BX","MAGV HDIG MENU")
  1. I MENUIEN D
  1. . N IENS,MAGERR,ITEMIEN,FDA
  1. . S ITEMIEN=$$FIND1^DIC(19.01,","_MENUIEN_",",,"MAGV SEARCH PROBLEMS")
  1. . Q:'ITEMIEN
  1. . S IENS=ITEMIEN_","_MENUIEN_","
  1. . S FDA(19.01,IENS,2)="SRPR"
  1. . D FILE^DIE(,"FDA","MAGERR")
  1. . ;
  1. . K IENS,MAGERR,ITEMIEN
  1. . S ITEMIEN=$$FIND1^DIC(19.01,","_MENUIEN_",",,"MAGV RESOLVE PROBLEMS")
  1. . Q:'ITEMIEN
  1. . S IENS=ITEMIEN_","_MENUIEN_","
  1. . S FDA(19.01,IENS,2)="VRPR"
  1. . D FILE^DIE(,"FDA","MAGERR")
  1. ;
  1. Q
  1. ;
  1. ;***** PRE-INSTALL CODE
  1. PRE ; Pre-Install
  1. N DIU,MAGFLD,MAGERR,MAGOPTID,MAGOPTDE,DA
  1. S MAGOPTID=$$FIND1^DIC(19,,"X","MAGV IDENTIFY DUPLICATES")
  1. S MAGOPTDE=$$FIND1^DIC(19,,"X","MAGV DELETE DUPLICATES")
  1. ; Delete Obsolete Options if they exist
  1. I MAGOPTID D
  1. . N MAGVRMI,DIK
  1. . S MAGVRMI=$$DELETE^XPDMENU("MAGV HDIG MENU","MAGV IDENTIFY DUPLICATES")
  1. . I MAGVRMI S DIK="^DIC(19,",DA=+$G(MAGOPTID) D ^DIK
  1. I MAGOPTDE D
  1. . N MAGVRMD,DIK
  1. . S MAGVRMD=$$DELETE^XPDMENU("MAGV HDIG MENU","MAGV DELETE DUPLICATES")
  1. . I MAGVRMD S DIK="^DIC(19,",DA=+$G(MAGOPTID) D ^DIK
  1. D FIELD^DID(2005.67,.01,,"LABEL","MAGFLD","MAGERR")
  1. ; If old DD exists, remove it
  1. I $G(MAGFLD("LABEL"))="DUPLICATE IEN" D
  1. . S DIU(0)="D",DIU="^MAGV(2005.67," D EN^DIU2
  1. Q