$TXT Created by MULLER,RICHARD at MNTVBB.FO-ALBANY.MED.VA.GOV (KIDS) on Wednesday, 05/19/04 at 11:56 ============================================================================= Run Date: DEC 17, 2004 Designation: DG*5.3*598 Package : DG - REGISTRATION Priority: Mandatory Version : 5.3 SEQ #544 Status: Released Compliance Date: JAN 17, 2005 ============================================================================= Associated patches: (v)DG*5.3*447 <<= must be installed BEFORE `DG*5.3*598' (v)SD*5.3*301 <<= must be installed BEFORE `DG*5.3*598' Subject: SD REPLACEMENT FOR MHA GUI Category: - Routine Description: ============ **INSTALLATION OF THIS PATCH IS TRANSPARENT TO USERS** Installing this patch (DG*5.3*598) does not modify existing functionality or data in any way. PURPOSE OF THE PATCH ==================== This patch is necessary due to the new Scheduling Replacement API that will be used by VistA applications to integrate M-based Class I, Class III and local applications with the Government Off-the-Shelf (GOTS) Scheduling application being developed by the Scheduling Replacement team. The Scheduling Replacement API will replace the other methods of accessing the patient appointment information stored in the following Scheduling files: APPOINTMENT (#2.98) sub-file of the PATIENT (#2) File and the APPOINTMENT (#44.001) sub-file of the HOSPITAL LOCATION (#44) File. During implementation of the new GOTS Scheduler, this appointment information will be moved to the GOTS database and deleted from the Scheduling files. OVERVIEW ======== The Scheduling Replacement API is designed to be 'flexible' and will switch from the old database source (VistA Scheduling files) to the new database source (GOTS SQL tables) without re-programming the requesting application. All hard-coded and FileMan references to Scheduling globals in routines or data dictionaries have been replaced with the Scheduling Replacement API. This patch addresses the following New Service Request (NSR): ------------------------------------------------------------- There is no NSR associated with this patch. This patch addresses the following NOIS message(s): --------------------------------------------------- There are no NOIS messages associated with this patch. Test Sites: ----------- Miami North Florida Upstate New York ================INSTALLATION INSTRUCTIONS ================= This patch can be loaded with users on the system. Install Time - 2 minutes 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 routines included in this patch. The second line of each of these routines now looks like: ;;5.3;Registration;**[patch list]**;Aug 13, 1993 CHECK^XTSUMBLD results Routine Before Patch After Patch Patch List ------- ------------ ----------- ---------- DGQPTQ2 11842536 12327520 447,598 Total number of routines - 1 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 DG*5.3*598): 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 (unless otherwise indicated) c. When prompted 'Want to DISABLE Scheduled Options, Menu Options, and Protocols? YES//' answer NO (unless otherwise indicated) 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. Routine Information: ==================== Routine Name: - DGQPTQ2 Before: I (DGBDATE=-1)!(DGEDATE=-1) S Y(1)="^Error in date range." Q S DGEDATE=$P(DGEDATE,".")_.5 ;ADD 1/2 DAY TO END DATE ;access to SC global granted under DBIA #518: S DGJ=DGBDATE F S DGJ=$O(^SC(+CLIN,"S",DGJ)) Q:DGJ<1!(DGJ>DGEDATE) D .I $L($G(^SC(+CLIN,"S",DGJ,1,0))) D ..S J=0 F S J=$O(^SC(+CLIN,"S",DGJ,1,J)) Q:+J<1!(I>MAXAPPTS) D ...S DGC=$P(^SC(+CLIN,"S",DGJ,1,J,0),U,9) ...Q:DGC="C" ; cancelled clinic availability ...; ...S DFN=+$G(^SC(+CLIN,"S",DGJ,1,J,0)) ...S X=$G(^DPT(DFN,"S",DGJ,0)) I +X'=CLIN Q ; appt cancelled/resched ...; ...; quit if appt cancelled or no show: ...I $P(X,U,2)'="NT",($P(X,U,2)["C")!($P(X,U,2)["N") Q ...; ...S Y(I)=DFN_"^"_$P(^DPT(DFN,0),"^")_"^"_+CLIN_"^"_DGJ,I=I+1 I I>MAXAPPTS D ;maximum allowable appointments exceeded .S CLNAM=$P($G(^SC(CLIN,0)),U) .K Y S Y(1)="^CLINIC: "_CLNAM_" - Too many appointments found; please narrow search range." S:'$D(Y) Y(1)="^No appointments." Q After: I (DGBDATE=-1)!(DGEDATE=-1) S Y(1)="^Error in date range." Q S DGEDATE=$P(DGEDATE,".")_.5 ; N DGARRAY,SDCNT,SDFN,SAPPT,ASTAT S DGARRAY(1)=DGBDATE_";"_DGEDATE,DGARRAY(2)=CLIN,DGARRAY("FLDS")="1;2;3" S DGARRAY("SORT")="P",SDCNT=$$SDAPI^SDAMA301(.DGARRAY) I +SDCNT<1 S Y(1)="^Appointment Database is unavailable." Q S SDFN=0 F S SDFN=$O(^TMP($J,"SDAMA301",SDFN)) Q:'SDFN D .S SAPPT=0 F S SAPPT=$O(^TMP($J,"SDAMA301",SDFN,SAPPT)) Q:'SAPPT D ..S ^TMP($J,"SDAM",SAPPT,SDFN)=SDFN_"^"_^TMP($J,"SDAMA301",SDFN,SAPPT) ; S DGJ=0 F S DGJ=$O(^TMP($J,"SDAM",DGJ)) Q:'DGJ D .S DFN=0 F S DFN=$O(^TMP($J,"SDAM",DGJ,DFN)) Q:'DFN D ..S ASTAT=$P($P(^TMP($J,"SDAM",DGJ,DFN),"^",4),";") ..; quit if appt cancelled or no show: ..I ASTAT'="NT",(ASTAT["C")!(ASTAT["N") Q ..S Y(I)=DFN_"^"_$P(^DPT(DFN,0),"^")_"^"_+CLIN_"^"_DGJ,I=I+1 ; I I>MAXAPPTS D ;maximum allowable appointments exceeded .S CLNAM=$P($G(^SC(CLIN,0)),U) .K Y S Y(1)="^CLINIC: "_CLNAM_" - Too many appointments found; please narrow search range." S:'$D(Y) Y(1)="^No appointments." K ^TMP($J,"SDAM"),^TMP($J,"SDAMA301"),SDCNT,DGARRAY,SDFN,SAPPT,ASTAT Q Routine Checksum: ============================================================================= User Information: Entered By : MULLER,RICHARD Date Entered : APR 13, 2004 Completed By: HUA,PATRICK Date Completed: DEC 17, 2004 Released By : FITCH,DONNA Date Released : DEC 17, 2004 ============================================================================= Packman Mail Message: ===================== $END TXT