$TXT Created by KOPECKY,STEVE at MNTVBB.FO-ALBANY.MED.VA.GOV (KIDS) on Thursday, 06/26/03 at 15:57 ============================================================================= Run Date: JUL 01, 2003 Designation: EAS*1*22 Package : EAS - ENROLLMENT APPLICATION Priority: Mandatory Version : 1 SEQ #28 Status: Released Compliance Date: AUG 01, 2003 ============================================================================= Associated patches: (v)EAS*1*15 <<= must be installed BEFORE `EAS*1*22' (v)EAS*1*20 <<= must be installed BEFORE `EAS*1*22' (v)EAS*1*25 <<= must be installed BEFORE `EAS*1*22' (v)EAS*1*29 <<= must be installed BEFORE `EAS*1*22' Subject: EAS MT LETTERS FIX PATCH Category: - Routine Description: ============ This patch provides a number of fixes to issues raised with the Means Test Letters from the Enrollment Application System. This patch addresses the following E3R(s): ------------------------------------------ None This patch addresses the following NOIS message(s): --------------------------------------------------- BIG-1102-70997 - Means Test Letter Problem PAL-1102-61905 - Means Test Letter FGH-1002-30478 - Problem with Prohibit MT Letters Add/Edit DET-1102-41080 - Recipient contains -1 BED-0303-11768 - Recipient contains -1/mt letters not priting LIT-0103-70594 - PROHIBIT-EASMTUTL PROBLEM LIT-1102-71682 - EAS MT PENDING OPTION WILLNOT PRINT CORRECTLY Overview of NOIS Message(s): --------------------------- LIT-0103-70594 FGH-1002-30478 The use of the FileMan DIE call to update the Prohibit Flag information through the EAS MT PROHIBIT EDIT option is causing the wrong user to be entered into the WHO ENTERED PROHIBIT FLAG, Field #4, in the EAS MT PATIENT STATUS File (#713.1) under certain circumstances. If the DUZ of the user entering the Prohibit Flag matches the last four of another users social security number in the NEW PERSON File (#200), the user with the matching SSN is entered instead of the user with the correct DUZ. This is being caused by the multiple lookup FileMan is using during the DIE update. This patch updates the code to use the newer FileMan database server API, removing the older DIE call. LIT-1102-71682 If the printed length of the Count of pending letters to be printed [EAS MT PENDING LETTERS] report, using the Detailed Listing option, exceeds 2 pages, "Enter RETURN to continue or '^' to exit:" appears on the print out. The code has been corrected to remove this. DET-1102-41080 BED-0303-11768 PAL-1102-61905 BIG-1102-70997 Several sites reported a number of entries in the EAS MT LETTER STATUS File (#713.2) where the RECIPIENT, Field #2, contains a -1 as the pointer value back to the EAS MT PATIENT STATUS File (#713.1). It appears that the FileMan FILE^DICN call in the Means Test Letter Search functionality is causing this problem. In some circumstances, this call is returning a "-1" when adding a new entry to the EAS MT PATIENT STATUS file (#713.1) and this is being carried over to the EAS MT LETTER STATUS File (#713.2). This patch addresses this issue through two modifications. The first modification is to the search functionality, replacing the DICN call with the newer FileMan database server API. This API provides an error return should a problem occur when updating the field. If an error should occur, a mail message is generated with the error condition and processing of this status entry halts. The second modification is during the letter build, if the RECIPIENT, Field #2, contains a value less than zero, further processing of the letter halts to prevent the undefined variable error from occurring. As part of this patch, a post-install routine will be run which will scan the EAS MT LETTER STATUS File (#713.2) for any existing records where the RECIPIENT Field, #2, is currently set to -1. This record will be removed from File #713.2. A mail message with the number of records removed by processing date will be sent to the G.EAS MTLETTERS mail group. After completion of this scan, a second scan will be run on the EAS MT PATIENT STATUS File (#713.1). This scan searches for any entries in File #713.1 which do not have the Prohibit Flag set and do not have a corresponding entry in File #713.2. Any entries found will be posted in a mail message to the G.EAS MTLETTERS mail group for review. A new message is being exported which will display all error conditions that occurred during the Search update to the EAS MT PATIENT STATUS File (#713.1). Test Sites: ----------- Bedford VAMC Big Spring VAMC ================INSTALLATION INSTRUCTIONS ================= If installed during the normal workday, it is recommended that the following menu options (File #19) be disabled to prevent possible conflicts while running the KIDS Install. Other VISTA users will not be affected. Background print job for EAS MT Letters Background search for MT Anniversary dates Install Time - Less than 5 Minutes for the actual patch installation. The Post-install will run in the background, depending on the number of records with an incorrect pointer (-1) in the EAS MT LETTER STATUS File (#713.2), the job could run from a few seconds to approximately an hour. 1. LOAD TRANSPORT GLOBAL --------------------- Choose the PackMan message containing this patch and invoke the INSTALL/CHECK MESSAGE PackMan option. 2. DISABLE ROUTINE MAPPING (DSM for Open VMS sites only) ----------------------- Disable routine mapping on all systems for the routines listed in step 3 below. NOTE: If the routines included in this patch are not currently in your mapped routine set, please skip this step. 3. COMPONENTS SENT WITH PATCH ------------------------ The following is a list of the routine(s) included in this patch. The second line of each of these routine(s) will look like: ;;1.0;ENROLLMENT APPLICATION SYSTEM;**[patch list]**;MAR 15,2001 CHECK^XTSUMBLD results Routine name Before Patch After Patch Patch List ============ ============ =========== ========== EAS122PT N/A 7149476 22 EASMTL2 5351624 6746043 3,12,14,20,22 EASMTL6 11254974 11283265 3,14,15,29,25 22 EASMTRP2 4063717 4158736 3,15,22 EASMTUTL 6999153 8220967 3,14,15,29,22 Total number of routines - 5 **** 4. START UP KIDS ------------- Start up the Kernel Installation and Distribution System Menu [XPD MAIN]: Edits and Distribution ... Utilities ... Installation ... Select Kernel Installation & Distribution System Option: INStallation --- Load a Distribution Print Transport Global Compare Transport Global to Current System Verify Checksums in Transport Global Install Package(s) Restart Install of Package(s) Unload a Distribution Backup a Transport Global Select Installation Option: 5. Select Installation Option: -------------------------- NOTE: The following are OPTIONAL - (When prompted for the INSTALL NAME, enter EAS*1.0*22): a. Backup a Transport Global - This option will create a backup message of any routines exported with this patch. It will not backup any other changes such as DD's or templates. b. 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 (routines, DD's, templates, etc.). c. Verify Checksums in Transport Global - This option will allow you to ensure the integrity of the routines that are in the transport global. 6. Select Installation Option: Install Package(s) ---------------- **This is the step to start the installation of this KIDS patch: a. Choose the Install Package(s) option to start the patch install. b. When prompted 'Want KIDS to INHIBIT LOGONs during the install? YES//' answer NO c. When prompted 'Want to DISABLE Scheduled Options, Menu Options, and Protocols? YES//' Answer "YES" d. When prompted 'Enter options you wish to mark as 'Out Of Order':' Enter the following options: Background print job for EAS MT Letters [EAS MT LETTERS BG PRINT] Background search for MT Anniversary dates [EAS MT LETTERS BG SEARCH] 7. REBUILD MAPPED ROUTINE(S) (DSM for Open VMS sites only) ------------------------- Optional - Include the routines distributed with this patch in the mapped routine set. NOTE: This step is only necessary if you performed step 2 or if you wish to include the routines in your mapped set. Post Installation ================= If the post installation identified patients for whom no corresponding means test letters status in the EAS MT LETTER STATUS File (#713.2) was generated, you may re-generate the means test letter dates for these patients. If no patients where identified in the mail message received from the post-installation cleanup, this procedure does not need to be run. It is run however, it will not cause any data issues. 1. From the programmer prompt, run the re-generation procedure. This re-generation will run in the foreground. Depending on the number of entries that need to be re-generated, the run time can be from a few seconds to an hour. This procedure will re-generate the letter dates in the EAS MT PATIENT STATUS File (#713.2). >D REGEN^EAS122PT At the "Re-generate Means Test Letter Dates for patients identified in patch EAS*1*22 cleanup? NO//" prompt enter "YES" 2. After the re-generation completes, print the Automated MT Letters Summary Report from Report Menu on the Automated Means Test Letter Menu. At the "Start with Processing date: OCT 1, 1998//" enter "TODAY", if you ran the re-generation today, otherwise enter the date the re-generation was started. At the "Ending Processing date: TODAY//" press the ENTER key, or the date the re-generation was run. 3. Compare the report with the list of patients in the mail message from the post-install. 4. These patients should now have entries with the 60-day print flag set and the appropriate letters dates set for their annual means test anniversary date now re-generated in the EAS MT LETTER STATUS File (#713.2). Their processing date is now the date the re-generation was run. Routine Information: ==================== Routine Name: - EASMTUTL Before ====== 92 PROHBIT ; Set or delete the Prohibit fields in the Patient Status file, #713.1 93 N DIR,DIRUT,EASF,DIC,DIE,Y,X,EASIEN,DR,DA,DFN 94 ; 119 . . I 'Y S DIRUT=1 Q 120 . . S DIC="^EAS(713.1,",DIC(0)="Z",X=DFN 121 . . D FILE^DICN 122 . . S EASIEN=+Y 125 Q:'$G(EASIEN) 126 ; 127 S DIE="^EAS(713.1,",DA=EASIEN 128 S:EASF="S" DR="2///YES;3;5///^S X=$$NOW^XLFDT;4///^S X=DUZ;10" 129 S:EASF="R" DR="2///@;3///@;5///@;4///@;10///@" 130 D ^DIE K DIE 131 ; 132 Q After ===== 93 PROHBIT ; Set or delete the Prohibit fields in the Patient Status file, #713.1 94 N DIR,DIRUT,EASF,Y,X,EASIEN,DFN,DGFDA,FDAIEN,ERRMSG 120 . . I 'Y S DIRUT=1 Q 121 . . S DGFDA(1,713.1,"+1,",.01)=DFN 122 . . D UPDATE^DIE("","DGFDA(1)","FDAIEN","ERRMSG") 123 . . S EASIEN=FDAIEN(1) 126 Q:'$G(EASIEN) 127 ; 128 N DGFDA,DGIEN,DGEFF,DIR,DIRUT,DGERR,DIE 129 ; 130 S DGIEN=EASIEN_"," 131 I EASF="S" D 132 . S DIR(0)="DAO^"_$$DT^XLFDT_"::EX" 133 . S DIR("A")="Effective Date: " 134 . D ^DIR K DIR 135 . Q:$G(DIRUT) 136 . S DGFDA(1,713.1,DGIEN,3)=Y 137 . S DGFDA(1,713.1,DGIEN,2)=1 138 . S DGFDA(1,713.1,DGIEN,5)=$$NOW^XLFDT 139 . S DGFDA(1,713.1,DGIEN,4)=DUZ 140 . D:$D(DGFDA) FILE^DIE("","DGFDA(1)","DGERR") 141 . I $D(DGERR) D Q 142 . . D DSPLYER(.DGERR) 143 . S DIE="^EAS(713.1,",DA=EASIEN,DR="10" 144 . D ^DIE K DIE 145 ; 146 I EASF="R" D 147 . S DGFDA(1,713.1,DGIEN,2)=0 148 . S DGFDA(1,713.1,DGIEN,3)="@" 149 . S DGFDA(1,713.1,DGIEN,5)="@" 150 . S DGFDA(1,713.1,DGIEN,4)="@" 151 . S DGFDA(1,713.1,DGIEN,10)="@" 152 . D:$D(DGFDA) FILE^DIE("","DGFDA(1)","DGERR") 153 . I $D(DGERR) D 154 . . D DSPLYER(.DGERR) 155 . E W !!?3,"Prohibit Flag Removed from Patient.",! 156 ; 157 Q 159 DSPLYER(ERRARY) -- ; 160 N DGER 161 ; 162 W !!?3,"The following error(s) occurred:" 163 S DGER=0 164 F S DGER=$O(ERRARY("DIERR",DGER)) Q:'DGER D 165 . W !?3,ERRARY("DIERR",DGER)," - ",ERRARY("DIERR",DGER,"TEXT",1) 166 W !?3,"Please check, this record update may not have processed completely." 167 Q Routine Checksum: Routine Name: - EASMTRP2 Before ====== 5 N ZTSAVE,DIR,EASUM 16 N CNT,EASIEN,PCNT,RCNT,EASX,TOT,PAGE,EAS0,EAS4,EAS6,EASPDT,EAX,TOTALS 47 DETAIL ; 53 . I ($Y+4)>IOSL D 54 . . S DIR(0)="E" 55 . . D ^DIR K DIR 56 . . Q:$D(DIRUT) 57 . . D HDR After ===== 5 N ZTSAVE,DIR,EASUM,Y 16 N CNT,EASIEN,PCNT,RCNT,EASX,TOT,PAGE,EAS0,EAS4,EAS6,EASPDT,EAX,TOTALS,DUOUT 46 DETAIL ; Print details section 52 . I ($Y+4)>IOSL D Q:$D(DIRUT) 53 . . I $E(IOST,1,2)="C-" D Q:$D(DIRUT) 54 . . . S DIR(0)="E" 55 . . . D ^DIR K DIR 56 . . D HDR Routine Checksum: Routine Name: - EASMTL2 Before ====== 28 . D NEWSTAT(DFN,.EASPT) 29 . Q:'EASPT ; Safety check 30 . Q:'$$NEWLTR(EASPT,.EASDT) ; Quit if letter status was not updated 31 . ; Finally, Update the counters 32 . S CNT=CNT+1 33 S EAS6CNT(EASPRCDT)=CNT,EAS6CNT=EAS6CNT+CNT 34 Q 75 N DIE,DR,DA 76 ; 77 S DIE="^EAS(713.2,",DA=EAS1 78 S DR=$S(TYPE=2:12,TYPE=4:18,1:0) 79 Q:'DR 80 S DR=DR_"///1" 81 D ^DIE K DIE 82 Q 89 N EASIEN 90 ; 91 ; Create new entry in the patient status file 92 I '$D(^EAS(713.1,"B",DFN)) D Q 93 . S X=DFN,DIC="^EAS(713.1,",DIC(0)="Z" 94 . S DIC("DR")="2///0" 95 . D FILE^DICN K DIC 96 . S EASPT=+Y 97 ; After ===== 6 ; 7 K ^TMP("EASERR",$J) 8 S CNT=0 ; Initialize counter 30 . Q:EASPT'>0 ; Safety check 31 . Q:'$$NEWLTR(EASPT,.EASDT) ; Quit if letter status was not updated 32 . ; Finally, Update the counters 33 . S CNT=CNT+1 34 S EAS6CNT(EASPRCDT)=CNT,EAS6CNT=EAS6CNT+CNT 35 D ERRMSG 36 K ^TMP("EASERR",$J) 37 Q 78 N DGFDA,ERRMSG 79 ; 80 S DGFDA(1,713.2,EAS1_",",$S(TYPE=2:12,1:18))=1 81 D UPDATE^DIE("","DGFDA(1)","","ERRMSG") 82 Q 89 N EASIEN,DGFDA,FDAIEN,ERROUT 90 ; 91 ; Create new entry in the patient status file 92 ; 93 I '$D(^EAS(713.1,"B",DFN)) D Q 94 . S DGFDA(1,713.1,"+1,",.01)=DFN 95 . S DGFDA(1,713.1,"+1,",2)=0 96 . D UPDATE^DIE("","DGFDA(1)","FDAIEN","ERROUT(1)") 97 . I $D(ERROUT) D 98 . . S ^TMP("EASERR",$J,DFN)=ERROUT(1,"DIERR",1)_" - "_ERROUT(1,"DIER R",1,"TEXT",1) 99 . . S:+$G(FDAIEN(1))'>0 ^TMP("EASERR",$J,DFN)="Unable to generate en try in EAS MT PATIENT STATUS File, #713.1" 100 . S EASPT=+$G(FDAIEN(1)) 164 ERRMSG ; Send mail message if any errors were generated during processing 165 Q:'$D(^TMP("EASERR",$J)) 166 ; 167 N EASDFN,EASERR,MSG,XMSUB,XMY,XMTEXT,XMDUZ,DFN,VA 168 ; 169 S MSG(.1)="The following issues were reported by the Means Test Letter Search Process:" 170 S MSG(.9)="" 171 ; 172 S EASDFN=0 173 F S EASDFN=$O(^TMP("EASERR",$J,EASDFN)) Q:'EASDFN D 174 . S DFN=EASDFN D PID^VADPT 175 . S MSG(EASDFN)=$$GET1^DIQ(2,EASDFN,.01)_" ("_VA("BID")_") "_$G(^TMP("EASERR",$J,EASDFN)) 176 . K VA 177 ; 178 S XMSUB="MT LETTERS SEARCH ISSUES - "_$$FMTE^XLFDT($$NOW^XLFDT,"D") 179 S XMTEXT="MSG(" 180 S XMY("G.EAS MTLETTERS")="" 181 S XMDUZ="AUTOMATED MT LETTERS" 182 D ^XMD 183 Q Routine Checksum: Routine Name: - EASMTL6 Before ====== 1 EASMTL6 ; ALB/SCK,BRM,LBD - AUTOMATED MEANS TEST LETTER-INTERACTIVE PRINT ; 5/22/03 9:52am 2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**3,14,15,29,25**;MAR 15,2001 3 ; 102 . ; begin checks 103 . Q:$$LTRTYP^EASMTL6B(EASIEN)'=EATYP ; Check for appropriate letter type 104 . S DFN=$$GET1^DIQ(713.1,EASPTR,.01,"I") Q:'DFN After ===== 1 EASMTL6 ; ALB/SCK,BRM,LBD - AUTOMATED MEANS TEST LETTER-INTERACTIVE PRINT ; 5/22/03 9:52am 2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**3,14,15,29,25,22**;MAR 15,2001 3 ; 102 . ; begin checks 103 . Q:EASPTR<0 ; SAFETY CHECK 104 . Q:$$LTRTYP^EASMTL6B(EASIEN)'=EATYP ; Check for appropriate letter type 105 . S DFN=$$GET1^DIQ(713.1,EASPTR,.01,"I") Q:'DFN Routine Checksum: Routine Name: - EAS122PT This is a new post installation routine and may be deleted once the patch has been installed and the post install run. Routine Checksum: ============================================================================= User Information: Entered By : KOPECKY,STEPHEN C Date Entered : NOV 26, 2002 Completed By: MULLER,RICHARD Date Completed: JUL 01, 2003 Released By : KOVACH,STUART Date Released : JUL 01, 2003 ============================================================================= Packman Mail Message: ===================== $END TXT