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

MAGIP183.m

Go to the documentation of this file.
  1. MAGIP183 ;WOIFO/PMK - Install code for MAG*3.0*183 ;12 Oct 2017 4:10 PM
  1. ;;3.0;IMAGING;**183**;Mar 19, 2002;Build 11
  1. ;; Per VHA Directive 2004-038, 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 MAGIP183 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. ;
  1. ; Supported IA #1157 reference for $$ADD^XPDMENU function
  1. ;
  1. Q
  1. ;
  1. ;+++++ INSTALLATION ERROR HANDLING
  1. ERROR ;
  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. ;
  1. ;
  1. ;***** PRE-INSTALL CODE
  1. PRE ;
  1. Q
  1. ;
  1. ;
  1. ;
  1. ;***** POST-INSTALL CODE
  1. POS ;
  1. N CALLBACK
  1. D CLEAR^MAGUERR(1)
  1. ;
  1. ;--- Various Updates
  1. I $$CP^MAGKIDS("MAG P183 UPDATE","$$UPDATE^"_$T(+0))<0 D ERROR Q
  1. ;
  1. W !!!,"Setting DICOM Text Gateway to use Radiology HL7 V2.4 protocols -- PASS 1"
  1. D MAGIP183^MAGDHPS ; set the Radiology HL7 V2.4 for MAG SEND ORM/ORU
  1. W !!!,"Setting DICOM Text Gateway to use Radiology HL7 V2.4 protocols -- PASS 2"
  1. D MAGIP183^MAGDHPS ; run twice to remove any incorrect settings
  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. Q
  1. ;
  1. UPDATE() ;
  1. ; This subroutine creates the MAGD PATHOLOGY entry in the
  1. ; HLO SUBSCRIPTION REGISTRY (file 779.4).
  1. D NEW7794 ; create new entry in file 779.4
  1. D UPDTMENU ; set display order for IHE menu option
  1. Q 0
  1. ;
  1. NEW7794 ; create an entry in the HLO SUBSCRIPTION REGISTRY (file 779.4)
  1. N DESCRIPTION,NAME,OWNER
  1. ; create the MAGD PATHOLOGY entry
  1. S NAME="MAGD PATHOLOGY"
  1. S DESCRIPTION="Subscription list for anatomic pathology"
  1. S OWNER="MAGD (Imaging)"
  1. D NEW7794A(NAME,DESCRIPTION,OWNER)
  1. Q
  1. ;
  1. NEW7794A(NAME,DESCRIPTION,OWNER) ; create the entry in file 779.4
  1. N DIC,DIERR,I,IENS,MAGERR,MAGFDA,MAGIENS,X,Y
  1. ;
  1. ; check to see if <NAME> already exists
  1. S DIC=779.4,DIC(0)="BX",X=NAME D ^DIC
  1. I Y>0 D Q
  1. . D MES^MAGKIDS(""""_NAME_""" already exists in the HLO SUBSCRIPTION REGISTRY.")
  1. . Q
  1. D MES^MAGKIDS("Creating new """_NAME_""" HLO SUBSCRIPTION REGISTRY entry.")
  1. ;
  1. S IENS="+1,"
  1. S MAGFDA(779.4,IENS,.01)=NAME ; NAME
  1. S MAGFDA(779.4,IENS,.02)=OWNER ; OWNER
  1. S MAGFDA(779.4,IENS,.03)=DESCRIPTION ; DESCRIPTION
  1. D UPDATE^DIE("","MAGFDA","MAGIENS","MAGERR")
  1. I $D(DIERR) D Q
  1. . D MES^MAGKIDS("Error in creating """_NAME_""" in the HLO SUBSCRIPTION REGISTRY.")
  1. . F I=1:1 Q:'$D(MAGERR("DIERR",1,"TEXT",I)) D
  1. . . D MES^MAGKIDS(MAGERR("DIERR",1,"TEXT",I))
  1. . . Q
  1. . Q
  1. Q
  1. ;
  1. UPDTMENU ; set the DISPLAY ORDER for MAG CONFIGURE IHE PACS HL7 I/F
  1. N MENU,MSG,OPTION,ORDER,SYNONYM,X
  1. S MENU="MAG HL7 MAINT"
  1. S OPTION="MAG CONFIGURE IHE PACS HL7 I/F"
  1. S SYNONYM="IHE"
  1. S ORDER=20 ; display order
  1. S MSG="Updating DISPLAY ORDER for "_SYNONYM_" on "_MENU_" menu -- "
  1. S X=$$ADD^XPDMENU(MENU,OPTION,SYNONYM,ORDER)
  1. I X>0 D
  1. . D MES^MAGKIDS(MSG_"SUCCESS.")
  1. . Q
  1. E D
  1. . D MES^MAGKIDS(MSG_"FAILURE: """_$P(X,"^",2,999)_"""")
  1. . Q
  1. Q