============================================================================= Run Date: OCT 23, 2024 Designation: MAG*3*350 Package : MAG - IMAGING Priority: Mandatory Version : 3 SEQ #258 Status: Released Compliance Date: NOV 25, 2024 ============================================================================= Subject: DICOM - FIX BAD DCM FILES Category: - Enhancement (Mandatory) - Routine Description: ============ This document describes MAG*3.0*350, a patch that provides an update to VistA Imaging DICOM Gateway. This patch addresses the following issues: Defect: ------- 1. VISTAIS-1378 (INC16540392, INC21709265) - Requesting a Cleanup Utility for files that were saved as JPEG format but with a DCM extension. Patch Components: ----------------- Files & Fields Associated: File Name (Number) Field Name (Number) New/Modified/Deleted ------------------ ------------------- -------------------- CLEANUP OF JPEG IMAGES 2006.59935 New STORED AS DICOM IMAGES Forms Associated: Form Name File Number New/Modified/Deleted --------- ----------- -------------------- N/A Mail Groups Associated: Mail Group Name New/Modified/Deleted --------------- -------------------- N/A Options Associated: Option Name Type New/Modified/Deleted ------------ ----- -------------------- N/A Protocols Associated: Protocol Name New/Modified/Deleted ------------- -------------------- N/A Security Keys Associated: Security Key Name ----------------- N/A Templates Associated: Template Name Type File Name (Number) New/Modified/Deleted ------------- ---- ------------------ -------------------- N/A Remote Procedures Associated: Remote Procedure Name New/Modified/Deleted ------------------------ -------------------- MAG DICOM P350 FIX ONE IMAGE New MAG DICOM P350 GET BASIC IMAGE New MAG DICOM P350 GET NEXT TO FIX New MAG DICOM P350 MAKE LIST New MAG DICOM P350 FIX FAIL IMAGES New MAG DICOM P350 UPDATE FIELDS New Parameter Definitions Associated: Parameter Name New/Modified/Deleted -------------- -------------------- N/A Additional Information: ----------------------- N/A Blood Bank Team Coordination: N/A New Service Requests (NSRs): N/A Patient Safety Issues (PSIs): N/A Defect Tracking System Ticket(s) & Overview: -------------------------------------------- 1. VISTAIS-1378 (INC16540392, INC21709265) - Requesting a Cleanup Utility for files that were saved as JPEG format but with a DCM extension. Problem: -------- MAG*3.0*106 provided the capability to use the Clinical Capture Workstation to acquire dermatology and other specialty images and to insert them into the VistA Imaging database as DICOM objects. MAG*3.0*226 (released October 2, 2019) inadvertently changed the operation of the Clinical Capture workstation so that the images were saved as JPEG files with the *.dcm extension (that is JPEG.dcm) instead of as actual DICOM files. The Clinical Capture workstation problem was corrected in MAG*3.0*267 (released). Resolution: ----------- MAG*3.0*350 corrects the JPEG.dcm files caused by this problem by creating a proper DICOM.dcm file from the JPEG image and the information in the IMAGE file (#2005) and then sending it to a Storage SCP for Image Processing (2-3). The old IMAGE file entry is then deleted (i.e., moved to the IMAGE AUDIT file). Test Sites: ----------- George E. Wahlen Department of Veterans Affairs Medical Center (Salt Lake City, UT) William S. Middleton Memorial Veterans Hospital (Madison, WI) Spokane Veterans Affairs Medical Center (Washington, WA) Test Sites - SNOW Change Order #: --------------------------------- George E. Wahlen Department of Veterans Affairs Medical Center - (Salt Lake City, UT)- CHG0516969 William S. Middleton Memorial Veterans Hospital (Madison, WI)- CHG0526681 Spokane Veterans Affairs Medical Center (Washington, WA)- CHG0526982 Software and Documentation Retrieval Instructions: -------------------------------------------------- The software for this patch is being released using a host file. The host file is available at the following location: /srv/vista/patches/SOFTWARE/MAG3_0P350.KID Other Software Files: This release also includes other software files. Other software files can be obtained by accessing the URL: https://download.vista.domain.ext/index.html/SOFTWARE File Title File Name ------------------------------------------------------------------------- Kernel Installation and MAG3_0P350.KID Distribution System (KIDS) Build for MAG*3.0*350 VistA Imaging DICOM Gateway MAG3_0P350_DICOM_SETUP.EXE Installation File Documentation describing the new functionality is included in this release. Documentation can be found on the VA Software Documentation Library at: https://www.domain.ext/vdl/. Documentation can also be obtained at https://download.vista.domain.ext/index.html/SOFTWARE Documentation Title File Name --------------------------------------------------------------------- Patch Description for MAG*3.0*350 MAG3_0P350_PATCH_DESCRIPTION.PDF Deployment, Installation, Back-Out, MAG3_0P350_DIBORG.PDF and Rollback Guide Patch Installation: ------------------- Supported Server Versions: -------------------------- When MAG*3.0*350 is released, the list of supported versions LDGW will change: LDGW (Server) Versions Supported: ---------------------------------------------- 3.0.350 3.0.319 3.0.305 LDGW (Server) Versions No Longer Supported: ------------------------------------------------------------ 3.0.274 3.0.257 3.0.231 Pre/Post Installation Overview: ------------------------------- All released VistA Imaging patches must be installed on the VistA system before installing MAG*3.0*350. MAG*3.0*350 must be installed on the VistA System. This patch must be installed by the compliance date. All sites running VistA Imaging 3.0 must install the KIDS portion of this patch on the VistA System. This patch can be loaded while the VistA Imaging System is active, and users are on the system. Installing the MAG*3.0*350 KIDS takes 2-5 minutes. Note: The MAG*3.0*350 KIDS should be installed on VistA first and then the DICOM Gateway updated. Following the KIDS install, the DICOM Gateways can be updated. Installation Instructions: -------------------------- 1. Use the Load a Distribution option contained on the Kernel Installation and Distribution System Menu to load the Host file. When prompted to "Enter a Host File:" enter /srv/vista/patches/SOFTWARE/MAG3_0P350.KID 2. From the Kernel Installation and Distribution System Menu, select the Installation Menu. From this menu, A. Select the Verify Checksums in Transport Global option to confirm the integrity of the routines that are in the transport global. When prompted for the INSTALL NAME enter the patch or build name. (ex. MAG*3.0*350). NOTE: Using will not bring up a Multi-Package build even if it was loaded immediately before this step. It will only bring up the last patch in the build. B. Select the Backup a Transport Global option to create a backup message. You must use this option and specify what to backup; the entire Build or just Routines. The backup message can be used to restore the routines and components of the build to the pre-patch condition. i. At the Installation option menu, select Backup a Transport Global ii. At the Select INSTALL NAME prompt, enter your build MAG*3.0*350 iii. When prompted for the following, enter "R" for Routines or "B" for Build. Select one of the following: B Build R Routines Enter response: Build iv. When prompted "Do you wish to secure this message? NO//", press and take the default response of "NO". v. When prompted with, "Send mail to: Last name, First Name", press to take default recipient. Add any additional recipients. vi. When prompted with "Select basket to send to: IN//", press and take the default IN mailbox or select a different mailbox. vii. Repeat step ii for each build in the host file. C. You may also elect to use the following options: i. Print Transport Global - This option will allow you to view the components of the KIDS build. ii. Compare Transport Global to Current System - This option will allow you to view all changes that will be made when this patch is installed. It compares all components of this patch, such as routines, DDs, templates, etc. D. Select the Install Package(s) option and choose the patch to install. i. If prompted 'Want KIDS to Rebuild Menu Trees Upon Completion of Install?,' answer NO. ii. If prompted 'Want KIDS to INHIBIT LOGONs during the install?,' answer NO. iii. If prompted 'Want to DISABLE Scheduled Options, Menu Options, and Protocols?,' answer NO. Server Installation Instructions -------------------------------- For installing the DICOM Gateway, refer to Section 3, Installing the VistA Imaging DICOM Gateway in the VistA Imaging DICOM Gateway Installation Guide. Use these following steps to upgrade the software on an existing Legacy DICOM Gateway installation from a previous patch. NOTE: When uninstalling MAG*3.0*319, do NOT stop the IRIS service. 1. Log into the DICOM Gateway. 2. Back up the DICOM Dictionaries (the master file directory). The DICOM dictionary directory is usually on a shared network system and is used to hold DICOM master files. F:\DICOM is typically the DICOM dictionary directory. Note: The installation will not overwrite site-configurable Master files. 3. Using a LDGW Terminal session, run option 4-2-1 Display Gateway Configuration Parameters. Review the general setup of the DICOM Gateway (number of text data directories, mapped drives for components such as dictionary files, and so on.) and record the location of these directories here: . The local directory for images queued for processing IMAGE INPUT PATH = ____________________________________. . The local directory for images that have been processed IMAGE OUTPUT PATH = ___________________________________. . The directory for data dictionaries DICT PATH _____________________________________________. 4. Stop and close all active IRIS terminal windows on the LDGW. 5. Make a backup copy of the current LDGW database. C:\DICOM\IRIS\Iris.dat. (This can be done without stopping IRIS). 6. Copy the MAG3_0P350_DICOM_SETUP.EXE file to a local folder on the computer on which you will install the DICOM Gateway. 7. Go to the Control Panel, choose Uninstall a program, and remove the VistA DICOM Gateway (Patch 319). 8. When the message "Cannot delete file "C:\DICOM\IRIS\iris.dat", click OK button to proceed with the uninstall. 9. Install the DICOM Gateway by following the steps in section 3.4.1 Installing the DICOM Gateway and 3.4.2 Installing IRIS for Health in the VistA Imaging DICOM Gateway Installation Guide. 10. Verify that security settings are correct. Refer to section 4 Securing the Gateway and IRIS in the VistA Imaging DICOM Gateway Installation Guide. 11. Verify DICOM Gateway Installation. Refer to section 5.3 Verify the DICOM Gateway Installation in the VistA Imaging DICOM Gateway Installation Guide. Post-Installation Instructions: -------------------------------- ALL DICOM Gateways, including Legacy, Text and Routing, as well as HDIGs, need to be upgraded with the installation of MAG3_0P350_DICOM_Setup.exe at your earliest convenience. Refer to the VistA Imaging DICOM Gateway Installation Guide for details. Running the DICOM Cleanup Utility process ----------------------------------------- Prior to running the DICOM Cleanup Utility, these 5 steps must be completed: 1. It is recommended to have an Image Gateway dedicated to running this process until complete. A legacy consult DICOM listener should be set up on the dedicated gateway as described in the VistA Imaging DICOM Gateway Installation Guide section B.4.4.2 Invoking MAG_CSTORE.EXE without an INSTRUMENT.DIC entry. Example "C:\Program Files (x86)\VistA\Imaging\DICOM\MAG_CStore.exe" localhost 60000 "60101 CON" 2. C-Store Service Class provider must be set up in the SCU_List.dic to send the corrected images to DICOM listener set up in step 1. See VistA Imaging DICOM Gateway Installation Guide section B.4.5 SCU_LIST.DIC for more information. If any changes to the SCU_List.dic are made, be sure to run option 4-2-7 Update SCU_LIST.DIC on the dedicated gateway. Example CON STORAGE|VISTA_STORAGE|VistA Testing|LOCALHOST|60101|||STORE |CT Image Storage|Implicit VR Little Endian |Verification SOP Class|Implicit VR Little Endian 3. To ensure DICOM Service Class Provider is set up correctly: a. On the VistA Imaging DICOM Gateway server open a terminal. b. At the OPTION: prompt, select Menu option 4-1-3: VistA DICOM Gateway Menu -- Site's DICOM Gateway 4 System Maintenance -> 1 System Operation --> 3 Issue a DICOM Echo Request c. Select the provider application from the DICOM Service Class Providers. Press d. Verify "DICOM ECHO Completed Successfully" is displayed to your terminal. 4. Ensure there is enough space on your C drive to accommodate the DICOM Cleanup utility creation of a temp/P350_IMAGES folder to hold the corrected images until the DICOM processer can receive them and process them out. It functions like the Image_In folder used in DICOM. 5. Notify Business Health Systems group that you will be running a long process for awareness (SPM.HEALTH.HISM.HEALTHSYSTEMS.TEAM#). Now run the DICOM Cleanup Utility: 1. To Build List of Problem Consults select Menu Option 4-5-1-1: VistA DICOM Gateway Menu -- Site's DICOM Gateway 4 System Maintenance -> 5 Software Maintenance Facilities --> 1 Correct P226 DICOM/JPEG Problem ---> 1 Build List of Problem Consults A. When prompted, enter Yes to build the list of problem consults. This option initiates a search on VistA starting with the 1st image saved at your site since the install of MAG*3.0*226. Any Consult image with a .DCM extension that was created by the Clinical Capture Application will be added to file CLEANUP OF JPEG IMAGES STORED AS DICOM IMAGES (2006.59935) for possible correction. System Displays: A problem was caused by patch MAG*3.0*226 (October 2019) which changed the way that Clinical Capture stored DICOM images. Instead of saving them as DICOM objects, they were stored as raw JPEG images with a *.DCM extension (that is, JPEG.DCM). These images need to be converted to DICOM and reprocessed. The previously stored JPEG.DCM IMAGE file entry needs to be copied to the IMAGE AUDIT file (#2005.1) and deleted from the IMAGE file (#2005). This routine scans the Image file (^MAG(2005)) for problem images and stores them in a list for later processing. Ready to build list of problem images? n// Y B. Enter the number of FILE # 2005 (Image) entries to scan at a time. This VistA search will happen in consecutive batches based on this number entered. You only need to run this option one time. When the scan completes, make note of the number of JPEG Problems that were found. This process may take several hours to run. This option will search for all the entries in FILE #2005 (Image) in consecutive batches starting with the 1st Consult image with a .DCM extension that was created by the VistA Imaging Clinical Capture application following the installation of VistA Imaging Clinical Capture MAG*3.0*226. The entries are added to file CLEANUP OF JPEG IMAGES STORED AS DICOM IMAGES (2005.59935). System Displays: How many image entries to scan at a time? 10000// 10000 Processed JPEG Problems Last Image MAGIEN Last Date/Time 145 100 1000000247 Dec 22, 2022@11:00:35 Image List Completed Press to continue... 2. To Rename the JPEG DICOM files and create the new DICOM ones select Menu Option 4-5-1-2: VistA DICOM Gateway Menu -- Site's DICOM Gateway 4 System Maintenance -> 5 Software Maintenance Facilities --> 1 Correct P226 DICOM/JPEG Problem ---> 2 Rename the JPEG DICOM files and create the new DICOM ones NOTE: Option 2 may be run multiple times. Prior to running Option 2 make sure, ALL images from the previous run have finished processing through the 2-3 window. A. When Prompted, enter Yes to correct JPEG DICOM problem images. System Displays: A problem was caused by patch MAG*3.0*226 (October 2019) which changed the way that Clinical Capture stored DICOM images. Instead of saving them as DICOM objects, they were stored as raw JPEG images with a *.DCM extension (that is JPEG.DCM). This routine reads the list of problem images created on the previous step and processes each of them one at a time. Each previously stored JPEG image is converted to a proper DICOM object, sent to a DICOM Storage Provider, and reprocessed. The previously stored JPEG.DCM IMAGE file (#2005) entry is copied to the IMAGE AUDIT file (#2005.1) and deleted from the IMAGE file (#2005). No modifications are made to the Image file (#2005) itself. After this is completed, after a pause, the IMAGE file entries for the newly processed images are updated with the values from the original image. This must be done after all the new proper DICOM images have been processed. If they have not been completely processed, its OK, just run this step at a later time. Ready to correct JPEG DICOM problem images? n// Y B. When prompted, enter the wait time. After sending the corrected images to DICOM processing, the cleanup will pause for the amount of this wait time to allow DICOM processing of all the images to complete before updating the IMAGE file in VistA. Recommend 15 minutes to allow for the images to go to Compass and then to the HDIG/LDGW for processing. System Displays: Enter the time (minutes) to wait for updating IMAGE file fields: 5// C. Select the Service Class Provider and verify the selection. System Displays: DICOM STORE Service Class Providers ----------------------------------- 1 -- CON STORAGE 2 -- LOCAL RADIOLOGY STORAGE Select the provider application (1-2): 1 Send the images to LOCAL RADIOLOGY STORAGE? y// yes D. Enter the number of images entries to correct at a time. You may elect to run all the images found by Option 1 at one time, Or choose to break them up into smaller batches. If you choose The latter, rerun Option 2 as many times as needed until you have corrected all the images. For example, if the number of JPEG Problems found in Step 1 is 10,000 and you choose to run 1,000 entries at a time, you will need to run Option 2 a total of 10 times. Remember, when Option 2 is running, the corrected images are temporarily sent to C:TEMP/P350_IMAGES. The DICOM processor will receive the corrected Images from this folder once all images in that batch have been corrected. Each time you run option 2 the C:TEMP/P350_IMAGES folder is deleted and recreated so that it only contains the images currently being corrected. We recommend starting with batches of 1000 or less to minimize the risk of not having enough space on your C drive. When running option 2, if "Processing Complete" displays and the number of images created and sent is less than the number you asked to be corrected, Option 2 has completed correcting all the images and you are done with the cleanup. System Displays: Correct how many image entries at a time? 100// 5 E. Setup logging to output to a file and turn on logging. Note: Some images in the file will not be corrected; they are either not a JPEG or the file has already been converted to JPEG. When the image cannot be converted, one of the following messages will be displayed: does not begin with a JPEG 0xFFD8 identifier - or - File is already converted to JPEG transfer syntax DICOM There is no action required. System Displays: Turn Screen Logging ON and push 1/5 Creating DICOM for Image 1000000168 Sending DICOM Image to Storage Server Deleting old IMAGE file entry 1000000168 2/5 Creating DICOM for Image 1000000169 Sending DICOM Image to Storage Server Deleting old IMAGE file entry 1000000169 Processing Complete Sending Corrected JPEG DICOM images to the Storage Server Sending is Done Will run IMAGE file field updates in 5 minutes 5 minutes 4 minutes 3 minutes 2 minutes 1 minute Running IMAGE file field updates Number of new IMAGE files that already have been updated: ------------ 10 Number of new IMAGE files just been updated: ------------------------- 1 Number of new Images that haven't yet been processed: ---------------- 1 Number of records in the file that do not need to be updated: -------- 50 Error: Number of missing records in file #2006.59935: ---------------- 0 F. The above totals will display indicating how many images were Updated in VistA and how many are still waiting to be updated. If the "Number of new images that haven't yet been processed" is greater than zero, repeat step 2. If it still reports images check the VistA DICOM Correct and correct any studies that may have gone there and run option 2 again. If either "Number of records in the file that do not need to be updated" or "Error: Number of missing records in file #2006.59935" continues to be greater than 0, contact the Clinical Diagnostics team by submitting a Service Now ticket to SPM.Health.ClinSvs.Diag. G. When processing is complete turn off logging. System Displays: Turn Screen Logging OFF and push Press to continue... 3. If one or more images receives an error while running Option 2 (for example, network issues caused a time-out error while trying to retrieve the problem Image from storage), run Option 3 after correcting the issue that caused the Error. Option 3 will place the errored images back in the queue. Then repeat Option 2 again to correct the image, send it to the DICOM processor, and update VistA. VistA DICOM Gateway Menu -- Site's DICOM Gateway 4 System Maintenance -> 5 Software Maintenance Facilities --> 1 Correct P226 DICOM/JPEG Problem ---> 3 Requeue Failed DICOM images so that they can be reprocessed System Displays: After previously stored JPEG image were converted to a proper DICOM object, they were sent to a DICOM Storage Provider, and reprocessed. This might have failed because of an error with the DICOM Storage Provider. This option should only be run after Options 1 and 2. This option changes the status of the FAILED images so that they can be reprocessed using Option 2 again. Ready to reprocess JPEG DICOM problem images? n// y Number of images fixed for reprocessing: 21 Press to continue... Back-Out/Roll Back Plan: ------------------------ Please refer to the Deployment, Implementation, Back-Out and Rollback Guide (MAG3_0P350_DIBORG.PDF) for Server Installation instructions. Uninstalling the Application: ----------------------------- If it is necessary to uninstall the MAG*3.0*350 DICOM Gateway, use the Uninstall option from Programs and Features within Windows Control Panel to Uninstall the VistA Imaging DICOM Gateway. Then install the previous version of LEGACY DICOM Gateway. KIDS Uninstall: --------------- If it is necessary to uninstall the MAG*3.0*350 VistA KIDS, the patch backup must be installed. The Kernel Installation & Distribution System menu option, Backup a Transport Global should have been used to create a patch backup of the build prior to installing the patch. (see Installation Steps section, step 2b). Administrators will need to check MailMan for the backup message sent by the Backup a Transport Global function executed prior to the patch install. The patch backup must first be loaded from the MailMan backup message, by performing the message action Xtract KIDS, followed by the PackMan function INSTALL/CHECK MESSAGE. The patch may then be installed using the Install Package(s) option in the KIDS Installation menu. 1. Navigate to the Mailman inbox containing the patch backup message. a. Select the MAG*3.0*350 backup message as shown below: * Backup of MAG*3.0*350 install on b. At the "Enter message action:" prompt, select the Xtract PackMan option. c. At the "Select PackMan function:" prompt, select the Install/Check Message option. d. Enter Yes at the prompt "OK to continue with Load?" 2. Navigate to the Kernel Installation and Distribution System Menu and select the Installation Menu. From this menu: a. Select the Install Package(s) option and choose the patch to install. i. If prompted 'Want KIDS to Rebuild Menu Trees Upon Completion of Install? NO//', answer NO. ii. When prompted 'Want KIDS to INHIBIT LOGONs during the install? NO//', answer NO. iii. When prompted 'Want to DISABLE Scheduled Options, Menu Options, and Protocols? NO//', answer NO. iv. When prompted 'Delay Install (Minutes): (0 - 60): 0//', answer 0. Legacy DICOM Gateway (LDGW) Routine Information: ================================================ This section lists modified routines for the LDGW build. For each routine, the second line will contain the following information: ;;3.0;IMAGING;**[Patch List]**;Mar 19, 2002;Build 1 Routine Name: MAGD350A Before: n/a After: 202370735 **350** Routine Name: MAGD350B Before: n/a After: 142796201 **350** Routine Name: MAGDDCF2 Before: n/a After: 69471816 **110,305,350** Routine Name: MAGDJPEG Before: n/a After: 26736828 **350** Routine Name: MAGDMENO Before: n/a After: 58925350 **11,30,51,50,69,54, 53,118,110,231,305,319,350** Routine Name: MAGDVRSN Before: n/a After: 21494340 **1,7,9,26,21,10,36,3,11,30,5,51, 50,52,69,75, 102,103,54,53,66, 49,99,123,118,87,110,138,156, 160,162,174,166,183,190,218, 231,257,274,305,319,350** Routine Information: ==================== The second line of each of these routines now looks like: ;;3.0;IMAGING;**[Patch List]**;Mar 19, 2002;Build 4 The checksums below are new checksums, and can be checked with CHECK1^XTSUMBLD. Routine Name: MAGD350I Before: n/a After: B85375644 **350** Routine Name: MAGD350J Before: n/a After: B18341189 **350** Routine Name: MAGD350K Before: n/a After: B4142005 **350** Routine Name: MAGD350L Before: n/a After: B68066991 **350** Routine Name: MAGIP350 Before: n/a After: B12921995 **350** ============================================================================= User Information: Entered By : Date Entered : DEC 05, 2022 Completed By: Date Completed: OCT 23, 2024 Released By : Date Released : OCT 23, 2024 ============================================================================= Packman Mail Message: ===================== No routines included