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

MAGIP350.m

Go to the documentation of this file.
MAGIP350 ;WOIFO/PMK - Install code for MAG*3.0*350; Jun 03, 2024@14:10:12
 ;;3.0;IMAGING;**350**;Mar 19, 2002;Build 4
 ;; Per VHA Directive 2004-038, this routine should not be modified.
 ;; +---------------------------------------------------------------+
 ;; | Property of the US Government.                                |
 ;; | No permission to copy or redistribute this software is given. |
 ;; | Use of unreleased versions of this software requires the user |
 ;; | to execute a written test agreement with the VistA Imaging    |
 ;; | Development Office of the Department of Veterans Affairs,     |
 ;; | telephone (301) 734-0100.                                     |
 ;; | The Food and Drug Administration classifies this software as  |
 ;; | a medical device.  As such, it may not be changed in any way. |
 ;; | Modifications to this software may result in an adulterated   |
 ;; | medical device under 21CFR820, the use of which is considered |
 ;; | to be a violation of US Federal Statutes.                     |
 ;; +---------------------------------------------------------------+
 ;;
 ; There are no environment checks here 
 ; 
 Q
 ;
 ;+++++ INSTALLATION ERROR HANDLING
ERROR ;
 S:$D(XPDNM) XPDABORT=1
 ;--- Display the messages and store them to the INSTALL file
 D DUMP^MAGUERR1(),ABTMSG^MAGKIDS()
 Q
 ;
 ;
 ;
 ;***** PRE-INSTALL CODE
PRE ;
 Q
 ;
 ;***** POST-INSTALL CODE
POST ;
 N CALLBACK
 D CLEAR^MAGUERR(1)
 ;
 ;--- Various Updates
 D REASON ; add new reason to STATUS REASON file (#2005.88)
 ;
 ;--- Send the notification e-mail
 D BMES^XPDUTL("Post Install Mail Message: "_$$FMTE^XLFDT($$NOW^XLFDT))
 D INS^MAGQBUT4(XPDNM,DUZ,$$NOW^XLFDT,XPDA)
 Q
 ;
REASON ; add new reason to STATUS REASON file (#2005.88)
 N DIC,IEN,IENS,MAGERR,MAGIENS,REASON,REASONIEN,X,Y
 S REASON="Corrected DICOM image generated by Patch MAG*3.0*350"
 S REASONIEN=$O(^MAG(2005.88,"B",$E(REASON,1,30),""))
 I REASONIEN W !!,"STATUS REASON (file #2005.88) previously updated",! Q  ; already added
 ;
 ; create the new IEN for the STATUS REASON
 S IEN=$O(^MAG(2005.88,99999),-1)
 S IEN=IEN+1
 S IENS="+1,"
 S MAGFDA(2005.88,IENS,.01)=REASON ; REASON
 S MAGFDA(2005.88,IENS,.02)="S"    ; TYPE (S=Change image status)
 S MAGFDA(2005.88,IENS,.03)=""     ; DATE OF INACTIVATION
 S MAGFDA(2005.88,IENS,.04)=IEN    ; CODE (same as IEN)
 D UPDATE^DIE("","MAGFDA","MAGIENS","MAGERR")
 I $D(MAGERR) W !!,"Error #1 in REASON^MAGIP350",! Q
 ;
 ; Add the DESCRIPTION (Word-Processing Field and must be saved separately)
 N REASON
 S REASON(1,0)="A problem was caused by patch MAG*3.0*226 (October 2019) which changed"
 S REASON(2,0)="the way that Clinical Capture stored DICOM images."
 S REASON(3,0)=" "
 S REASON(4,0)="Instead of saving them as DICOM objects, they were stored as raw JPEG"
 S REASON(5,0)="images with a *.DCM extension (that is, JPEG.DCM)."
 S REASON(6,0)=" "
 S REASON(7,0)="These images have been converted to DICOM by MAG*3.0*350 and reprocessed."
 D WP^DIE(2005.88,IEN_",",1,"K","REASON","MAGERR")
 I $D(MAGERR) W !!,"Error #2 in REASON^MAGIP350",! Q
 ;
 W !!,"STATUS REASON (file #2005.88) successfuly updated",!
 Q
 ;
UPDATE() ; nothing to update
 Q 0