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