$TXT Created by L. at MNTVBB.DOMAIN.EXT (KIDS) on Thursday, 06/08/23 at 13:56 ============================================================================= Run Date: SEP 06, 2023 Designation: PSD*3*93 Package : PSD - CONTROLLED SUBSTANCES Priority: Mandatory Version : 3 SEQ #77 Status: Released Compliance Date: OCT 06, 2023 ============================================================================= Associated patches: (v)PSD*3*90 <<= must be installed BEFORE `PSD*3*93' Subject: ALREADY POSTED ORIGINAL CS FILL ABLE TO BE SIGNED OUT AGAIN Category: - Routine Description: ============ This patch will resolve the following issue: An issue was reported that when using the VistA option Outpatient Rx's [PSD OUTPATIENT] to sign out a controlled substance after a refill was returned to stock (RTS), the user is presented with the opportunity to sign out the original fill even though it had previously been signed out. Associated ticket(s): --------------------- INC24850676 - ALREADY POSTED ORIGINAL CS FILL ABLE TO BE SIGNED OUT AGAIN Patch Components: ----------------- Files & Fields Associated: File Name (Number) Field Name (Number) New/Modified/Deleted ------------------ ------------------- -------------------- N/A 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 List Templates Associated: Template Name Type New/Modified/Deleted ------------- ---- ------------ N/A Remote Procedures Associated: Remote Procedure Name New/Modified/Deleted --------------------- -------------------- N/A Parameter Definitions Associated: Parameter Name New/Modified/Deleted -------------- -------------------- N/A New Service Requests (NSRs): ---------------------------- N/A Patient Safety Issues (PSIs): ----------------------------- N/A Defect Tracking System Ticket(s) & Overview: -------------------------------------------- INC24850676 - ALREADY POSTED ORIGINAL CS FILL ABLE TO BE SIGNED OUT AGAIN Problem: -------- An issue was reported that occurs after a controlled substance refill is RTS. For the issue to happen, the original fill must be signed out of the controlled substance package using the VistA option Outpatient Rx's [PSD OUTPATIENT]. A refill for the same prescription is also signed out of the controlled substance package, then returned to stock. When subsequently accessing the Outpatient Rx's option for this prescription, the user is presented with the opportunity to sign out the already posted original fill. The transaction can be completed for the original fill, allowing it to be signed out of the controlled substance package more than once. Resolution: ----------- The PSDREPR^PSDOPT0 api was modified to check if the original fill was RTS. Prior to this patch, there was no distinguishing if the RTS was for the original or for a refill. Now, if the prescription has been RTS, transactions for the original fill are obtained from the Drug Accountability Transaction file (#58.81). If the last transaction for the original fill is type Returned to Stock, the original fill will display for selection. Otherwise, the original fill will not be selectable. This, in turn, will prevent the original fill from being signed out again when using the option Outpatient Rx's [PSD OUTPATIENT]. Technical Resolution: --------------------- When using option Outpatient Rx's [PSD OUTPATIENT], if the prescription has been RTS, the api PSDREPR^PSDOPT0 was modified to cycle through each of the prescription's DRUG ACCOUNTABILITY TRANSACTION file (#58.81) records. All transactions that ARE NOT for the original fill will be bypassed. All transactions for the original fill that DO NOT have a transaction type "OUTPATIENT RX" (posted) and "RETURNED TO STOCK", will be bypassed from further evaluation. In this case, a value of 1 will be returned to keep the array PSDSEL("OR") intact. In addition, another condition was added that if the last transaction is type RTS and the posting flag that is in piece 3 of the PSDSEL("OR") array is set to yes (1), the posting flag will be reset to zero and the value of one will be returned to keep PSDSEL("OR") intact. Outside of these conditions, a zero will be returned, allowing PSDSEL("OR") to be killed off, thus making the original fill unable to be selected for further processing. Test Sites: ----------- Heartland West VAMC (Wichita, KS) Cincinnati VAMC (Cincinnati, OH) SNOW Change Order #: -------------------- Wichita - CHG0398106 Cincinnati - CHG0395572 Software and Documentation Retrieval Instructions: -------------------------------------------------- The software for this patch is being released in a PackMan message. Patch Installation: ------------------- Pre-Installation Instructions: ------------------------------ This patch may be installed with users on the system although it is recommended that it be installed during non-peak hours to minimize potential disruption to users. This patch should take less than 2 minutes to install. For this installation there are no options that are required to be disabled. Installation Instructions: -------------------------- 1. Choose the PackMan message containing this build. Then select the INSTALL/CHECK MESSAGE PackMan option to load the build. 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 PSD*3.0*93. 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 PSD*3.0*93. 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 your build? 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. 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 of the 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? 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. Post-Installation Instructions: ------------------------------- N/A Back-out/Roll Back Plan: ------------------------ Back-out will be done only with the concurrence and participation of development team and appropriate VA site/region personnel. The decision to back-out or rollback software will be a joint decision between development team, VA site/region personnel and other appropriate VA personnel. Prior to installing an updated KIDS package, the site/region should have saved a backup of the routine in a mail message using the Backup a Transport Global [XPD BACKUP] menu option from the Kernel Installation and Distribution System Menu and selecting the Installation Menu. The back-out plan is to restore the routine from the backup created. The message containing the backed-up routine can be loaded with the "Xtract PackMan" function at the Message Action prompt. The Packman function "INSTALL/CHECK MESSAGE" is then used to install the backed-up routine onto the VistA System. If the patch was backed up for the build, from the Kernel Installation and Distribution System Menu, select the Installation Menu. Select the Install Package(s) option and choose the patch (PSD*3.0*93b) to install. No data was modified by this patch installation and, therefore, no rollback strategy is required. Validation of Back-out Procedure: --------------------------------- The Back-out Procedure can be verified by confirming the checksums have been returned to the pre-patch value using CHECK1^XTSUMBLD. It can also be verified by printing the first 2 lines of the PSD routine(s) contained in this patch using the option First Line Routine Print [XU FIRST LINE PRINT]. Once the routine(s) contained in this patch have been backed out, the Second line of each routine will no longer contain the designation of patch PSD*3.0*93. Routine Information: ==================== The second line of each of these routines now looks like: ;;3.0;CONTROLLED SUBSTANCES ;**[Patch List]**;13 Feb 97;Build 6 The checksums below are new checksums, and can be checked with CHECK1^XTSUMBLD. Routine Name: PSDOPT0 Before: B95128095 After: B97992910 **10,30,37,39,45,48,66,79,90,93** Routine list of preceding patches: 90 ============================================================================= User Information: Entered By : Date Entered : JAN 13, 2023 Completed By: Date Completed: SEP 06, 2023 Released By : Date Released : SEP 06, 2023 ============================================================================= Packman Mail Message: ===================== $END TXT