$TXT Created by HUA,PATRICK at MNTVLL.FO-ALBANY.MED.VA.GOV (KIDS) on Thursday, 06/09/05 at 09:47 ============================================================================= Run Date: JUN 13, 2005 Designation: DG*5.3*651 Package : DG - REGISTRATION Priority: Mandatory Version : 5.3 SEQ #573 Status: Released Compliance Date: JUL 14, 2005 ============================================================================= Associated patches: (v)IB*2*249 <<= must be installed BEFORE `DG*5.3*651' (v)DG*5.3*570 <<= must be installed BEFORE `DG*5.3*651' Subject: INSURANCE BUFFER CHECK Category: - Routine Description: ============ This patch replaces functionality which was removed with the retirement of DBIA #10146 and the installation of Insurance Encapsulation patch, DG*5.3*570. DBIA10146 provided a standard Insurance Display and with the retirement of this DBIA an alternate display (DBIA #4408) was provided with patch DG*5.3*570. Because all insurance information was encapsulated, and with the Insurance Buffer File (#355.33) scheduled to be re-designed, this new API did not include the flag for Insurance Buffer holdings (denoted by "*** Patient has Insurance Buffer entries ***"). Patch IB*2.0*249 will include an update to the Insurance API to now return a flag if the Insurance Buffer has any activity for a patient. If this flag is present when the DG Insurance display is called, the line "*** Patient has Insurance Buffer entries ***" will be added to the bottom of the insurance display. This patch will also modify the HL7 IN1 and IN2 segment builders to pull insurance information from the Insurance Buffer. This patch also fixes the display of the dates in the insurance display to replace leading blanks with leading zeros for a better display. This patch addresses the following New Service Request (NSR): ------------------------------------------------------------- There is no NSR associated with this patch. This patch addresses the following NOIS/Remedy Ticket(s): --------------------------------------------------------- HD0000000064714 - NTH-0105-71124 Pat. insurance info update doesn't display asterisk * HD0000000065753 - Screen 5 of Register Patient remains at No and does not display insurance data entered by clerks (duplicate 64714) Overview of NOIS/Remedy Ticket(s): ---------------------------------- HD0000000064714 Problem: After patch DG*5.3*570 was entered, Billing states that they are not able to tell if the insurance information for the patients have been updated due to the removal of the asterisk "*". Billing is using the option DGPRE PRE-REGISTER OPTION. In the past, when they went in and updated the patient's insurance information, they would see an asterisk in the patient's display on screen 5. Now it doesn't have any indicator present to know whether or not the insurance has been updated when having to review patient information. Resolution: IB has modified the Insurance API in patch IB*2.0*249 to include a flag if insurance buffer information is found for a patient. DISP^DGIBDSP has been modified to check for this flag and display the buffer message if insurance buffer activity is present. COMPONENTS SENT WITH PATCH -------------------------- For Routines: 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 ------- ------------ ----------- ---------- DGIBDSP 3035598 3450453 570,651 VAFHLIN1 7461619 9365903 122,190,651 VAFHLIN2 1745076 2020623 190,421,651 Total number of routines - 3 **** Test Sites: ----------- Saginaw, MI (Medium) North Texas HCS (Large) West LA VAMC (Integrated) ================INSTALLATION INSTRUCTIONS ================= This patch should be loaded during non-peak hours to minimize disruption to the user. Install time is less than 5 minutes. 1. LOAD TRANSPORT GLOBAL --------------------- Choose the PackMan message containing this patch and invoke the INSTALL/CHECK MESSAGE PackMan option. 2. 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: 3. Select Installation Option: --------------------------- NOTE: The following are OPTIONAL - (When prompted for the INSTALL NAME, enter DG*5.3*651): 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. d. Print Transport Global - this option will allow you to view the components of the KIDS build. 4. 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: Load/Edit Patient Data [DG LOAD PATIENT DATA] Preregister a Patient [DGPRE PRE-REGISTER OPTION] e. When prompted 'Enter protocols you wish to mark as 'Out Of Order':' press . Routine Information: ==================== Routine Name: - DGIBDSP Before ======== 2 ;;5.3;Registration;**570**;Aug 13, 1993 29 ; 30 DISPQ K DGSTAT 31 Q 56 W ?(55+OFF),$$FMTE^XLFDT(DGINS(DGVAL,10),"2DF"),?(65+OFF+$S(OFF:1,1: 0)),$$FMTE^XLFDT(DGINS(DGVAL,11),"2DF") 57 I 'OFF D After ===== 2 ;;5.3;Registration;**570,651**;Aug 13, 1993 29 ; 30 DISPQ W ! I $D(DGRTN("BUFFER")) D 31 . I DGRTN("BUFFER")>0 W !?17,"*** Patient has Insurance Buffer entri es ***" 32 K DGSTAT 33 Q 58 W ?(55+OFF),$TR($$FMTE^XLFDT(DGINS(DGVAL,10),"2DF")," ","0"),?(65+OF F+$S(OFF:1,1:0)),$TR($$FMTE^XLFDT(DGINS(DGVAL,11),"2DF")," ","0") 59 I 'OFF D Routine Checksum: Routine Name: - VAFHLIN1 Before ====== 2 ;;5.3;Registration;**122,190**;Aug 13, 1993 25 ; 26 N VAFGRP,VAFI,VAFIDX,VAFINS,VAFNODE,VAFPHN,VAFY,VAF36,X 27 S VAFARRY=$G(VAFARRY),VAFIDX=0 28 ; 37 ; 38 ; find all insurance data for a patient (IB SUPPORTED CALL) 39 D ALL^IBCNS1(DFN,"VAFINS",2) 40 ; 41 ; if no active insurance on file for patient, build IN1 42 I '$G(VAFINS(0)) S VAFINS(1)=0 43 ; 44 ALL ; get all active insurance for patient 45 F VAFI=0:0 S VAFI=$O(VAFINS(VAFI)) Q:'VAFI D 46 .; 47 .; - zero node of (#2.312) mult. of Patient (#2) file 48 .; and, zero node of the Group Ins. Plan (#355.3) file 49 .S VAFNODE=$G(VAFINS(VAFI,0)),VAFGRP=$G(VAFINS(VAFI,355.3)) 50 .; 51 .; - zero node and (.13) node of Insurance Company (#36) file 52 .S VAF36=$G(^DIC(36,+VAFNODE,0)),VAFPHN=$G(^(.13)) 53 .; 54 .; - build array of HL7 (IN1) segments 55 .D BUILD 56 ; 57 ENQ Q 58 ; 59 ; 60 BUILD ; Build array of HL7 (IN1) segments 61 S $P(VAFY,VAFHLFS,36)="",VAFIDX=VAFIDX+1 62 ; 63 ; if VAFSTR not passed, return all data fields 64 I $G(VAFSTR)']"" S VAFSTR="4,5,7,8,9,12,13,15,16,17,28,36" 65 S VAFSTR=","_VAFSTR_"," 66 ; 67 ; sequential number (required field) 68 S $P(VAFY,VAFHLFS,1)=VAFIDX 69 ; 70 ; build HL7 (IN1) segment fields 71 I VAFSTR[",3," S $P(VAFY,VAFHLFS,3)=+VAFNODE ;Insurance company IEN (P-190) 72 I VAFSTR[",4," S $P(VAFY,VAFHLFS,4)=$S($P(VAF36,"^")]"":$P(VAF36,"^" ),1:VAFHLQ) ; Insurance Carrier Name 73 I VAFSTR[",5," S X=$$ADDR(+VAFNODE) S $P(VAFY,VAFHLFS,5)=$S(+X>0:X,1 :VAFHLQ) 74 I VAFSTR[",7," S X=$$HLPHONE^HLFNC($P(VAFPHN,"^")) S $P(VAFY,VAFHLFS ,7)=$S(X]"":X,1:VAFHLQ) ; Insurance Co. Phone Number 75 I VAFSTR[",8," S $P(VAFY,VAFHLFS,8)=$S($P(VAFGRP,"^",4)]"":$P(VAFGRP ,"^",4),1:VAFHLQ) ; Group Number 76 I VAFSTR[",9," S $P(VAFY,VAFHLFS,9)=$S($P(VAFGRP,"^",3)]"":$P(VAFGRP ,"^",3),1:VAFHLQ) ; Group Name 77 I VAFSTR[",12," S X=$$HLDATE^HLFNC($P(VAFNODE,"^",8)) S $P(VAFY,VAFH LFS,12)=$S(X]"":X,1:VAFHLQ) ; Policy Effective Date 78 I VAFSTR[",13," S X=$$HLDATE^HLFNC($P(VAFNODE,"^",4)) S $P(VAFY,VAFH LFS,13)=$S(X]"":X,1:VAFHLQ) ; Policy Expiration Date 79 I VAFSTR[",15," S $P(VAFY,VAFHLFS,15)=$S($P(VAFGRP,"^",9)]"":$P(VAFG RP,"^",9),1:VAFHLQ) ; Plan Type (ptr. to Type of Plan (#355.1) file ) 80 I VAFSTR[",16," S $P(VAFY,VAFHLFS,16)=$S($P(VAFNODE,"^",17)]"":$P(VA FNODE,"^",17),1:VAFHLQ) ; Name of Insured 81 I VAFSTR[",17," S $P(VAFY,VAFHLFS,17)=$S($P(VAFNODE,"^",6)]"":$P(VAF NODE,"^",6),1:VAFHLQ) ; Whose Insurance 82 I VAFSTR[",28," S $P(VAFY,VAFHLFS,28)=$S($P(VAFGRP,"^",6)]"":$P(VAFG RP,"^",6),1:VAFHLQ) ; Is Pre-Certification Required? 83 I VAFSTR[",36," S $P(VAFY,VAFHLFS,36)=$S($P(VAFNODE,"^",2)]"":$P(VAF NODE,"^",2),1:VAFHLQ) ; Subscriber ID 84 ; 85 ; set all active insurance policies into array 86 S @VAFARRY@(VAFIDX,0)="IN1"_VAFHLFS_$G(VAFY) 87 Q 88 ; After ===== 2 ;;5.3;Registration;**122,190,651**;Aug 13, 1993 9 ; 10 ; SCK - modified for Insurance Encapsulation API 11 ; 1. The Insurance API does not currently support the Pre-Certifica tion flag 12 ; in the IN1 segment, Field 28. No value will be returned for fiel d 28. 13 ; 2. The Insurance API does not support Line 2 or Line 3 of the ad dress. 14 ; The API returns a single address line. 15 ; 31 ; 32 N VAFGRP,VAFI,VAFIDX,VAFINS,VAFNODE,VAFPHN,VAFY,VAF36,X,VAFX,VAFTMP 33 S VAFARRY=$G(VAFARRY),VAFIDX=0 34 ; 43 ; 44 ; find all insurance data for a patient (IB SUPPORTED CALL) 45 ; This uses the Encapsulated Insurance API to retrieve data into an array 46 ; See IB*2*267 Release Notes v1.0 for flags and array ID's 47 S VAFX=$$INSUR^IBBAPI(DFN,,"R",.VAFTMP,"*") 48 ; 49 ; if no active insurance on file for patient, build IN1 50 I '$D(VAFTMP) D 51 .; Build a null array if no insurance data returned 52 . F VAFI=1:1:22 S VAFINS(1,VAFI)="" 53 .; Merge array to remove first two nodes to simplify handling 54 E M VAFINS=VAFTMP("IBBAPI","INSUR") 55 ; 56 ALL ; get all active insurance for patient 57 F VAFI=0:0 S VAFI=$O(VAFINS(VAFI)) Q:'VAFI D 58 .D BUILD 59 ; 60 ENQ Q 61 ; 62 ; 63 BUILD ; Build array of HL7 (IN1) segments 64 S $P(VAFY,VAFHLFS,36)="",VAFIDX=VAFIDX+1 65 ; 66 ; if VAFSTR not passed, return all data fields 67 I $G(VAFSTR)']"" S VAFSTR="4,5,7,8,9,12,13,15,16,17,28,36" 68 S VAFSTR=","_VAFSTR_"," 69 ; 70 ; sequential number (required field) 71 S $P(VAFY,VAFHLFS,1)=VAFIDX 72 ; 73 ; build HL7 (IN1) segment fields 74 I VAFSTR[",3," S $P(VAFY,VAFHLFS,3)=+$P(VAFINS(VAFI,1),U) ;Insurance company IEN (P-190) 75 I VAFSTR[",4," S $P(VAFY,VAFHLFS,4)=$S($P(VAFINS(VAFI,1),U,2)]"":$P( VAFINS(VAFI,1),U,2),1:VAFHLQ) ; Insurance Carrier Name 76 I VAFSTR[",5," S X=$$ADDR1(VAFI) S $P(VAFY,VAFHLFS,5)=$S(+X>0:X,1:VA FHLQ) 77 I VAFSTR[",7," S X=$$HLPHONE^HLFNC(VAFINS(VAFI,6)) S $P(VAFY,VAFHLFS ,7)=$S(X]"":X,1:VAFHLQ) ; Insurance Co. Phone Number 78 I VAFSTR[",8," S $P(VAFY,VAFHLFS,8)=$S(VAFINS(VAFI,18)]"":VAFINS(VAF I,18),1:VAFHLQ) ; Group Number 79 I VAFSTR[",9," S $P(VAFY,VAFHLFS,9)=$S($P(VAFINS(VAFI,8),U,2)]"":$P( VAFINS(VAFI,8),U,2),1:VAFHLQ) ; Group Name ** The Insurance Encapsu lation API doesnot return a "Group" Name, this field will display t he Policy Name returned by the API 80 I VAFSTR[",12," S X=$$HLDATE^HLFNC(VAFINS(VAFI,10)) S $P(VAFY,VAFHLF S,12)=$S(X]"":X,1:VAFHLQ) ; Policy Effective Date 81 I VAFSTR[",13," S X=$$HLDATE^HLFNC(VAFINS(VAFI,11)) S $P(VAFY,VAFHLF S,13)=$S(X]"":X,1:VAFHLQ) ; Policy Expiration Date 82 I VAFSTR[",15," S $P(VAFY,VAFHLFS,15)=$S(+$P($G(VAFINS(VAFI,21)),"^" )>0:+$P(VAFINS(VAFI,21),"^"),1:VAFHLQ) ; Plan Type (ptr. to Type of Plan (#355.1) file) 83 I VAFSTR[",16," S $P(VAFY,VAFHLFS,16)=$S(VAFINS(VAFI,13)]"":VAFINS(V AFI,13),1:VAFHLQ) ; Name of Insured 84 I VAFSTR[",17," S X=$$WHOSE($P(VAFINS(VAFI,12),U)) S $P(VAFY,VAFHLFS ,17)=$S(X]"":X,1:VAFHLQ) ; Whose Insurance 85 ;I VAFSTR[",28," S $P(VAFY,VAFHLFS,28)=VAFHLQ ; $S($P(VAFGRP,"^",6)] "":$P(VAFGRP,"^",6),1:VAFHLQ) ; Is Pre-Certification Required? 86 I VAFSTR[",36," S $P(VAFY,VAFHLFS,36)=$S(VAFINS(VAFI,14)]"":VAFINS(V AFI,14),1:VAFHLQ) ; Subscriber ID 87 ; 88 ; set all active insurance policies into array 89 S @VAFARRY@(VAFIDX,0)="IN1"_VAFHLFS_$G(VAFY) 90 Q 91 ; 92 WHOSE(VAFWHO) -- ; Format Subscriber relationship for HL7 conversion 93 ; 94 ; Input: Subscriber relationship from Insurance API, ID=12 95 ; P - Patient 96 ; S - Spouse 97 ; O - Other 98 ; 99 ; Output: 100 ; v - Veteran 101 ; s - Spouse 102 ; o - Other 103 ; 104 S:VAFWHO["P" VAFWHO="V" 105 Q $$LOW^XLFSTR(VAFWHO) 106 ; 107 ADDR1(VAFI) -- ; Format insurance company address from Insurance API for HL7 conver sion. 108 ; 109 ; Input: 110 ; Index number for Insurance API array 111 ; 112 ; Output: 113 ; String in the form of the HL7 address field 114 ; 115 N VAFAD,VAFGL 116 S VAFAD=VAFINS(VAFI,2) 117 S VAFGL=VAFINS(VAFI,3)_"^"_$P(VAFINS(VAFI,4),U)_"^"_VAFINS(VAFI,5) 118 ; 119 ; convert DHCP address to HL7 format using HL7 utility 120 Q $$HLADDR^HLFNC(VAFAD,VAFGL) 121 ; Routine Checksum: Routine Name: - VAFHLIN2 Before ====== 2 ;;5.3;Registration;**190,421**;Aug 13, 1993 3 ; 4 ;This routine will build an HL7 IN2 segment for an inpatient. 5 ; 6 EN(DFN,VAFHMIEN,VAFSTR) -- ;Entry point of routine 7 ;DFN - Patient Internal Entry Number 8 ;VAFHMIEN - Patient Movement Internal Entry Number 9 ;VAFSTR - Sequence numbers to be included 10 ; 11 N VAFINS,VAFHLREC,VAFHA,VAFHSUB,VAFHADD,VAFHLOC,VAFHNAME S VAFHSUB=" " 12 D ALL^IBCNS1(DFN,"VAFINS",2) ;GET INSURANCE DATA FOR PATIENT 13 S $P(VAFHLREC,HL("FS"))="IN2" ;Set segment type to IN2 14 I VAFSTR[",2," S $P(VAFHLREC,HL("FS"),3)=$$GET1^DIQ(2,DFN,".09","I") ;Patient SSN 15 I VAFSTR[",3," S VAFHNAME=$P($G(VAFINS(2,2)),"^",9),$P(VAFHLREC,HL(" FS"),4)=$E(HL("ECH"))_VAFHNAME 16 I VAFSTR[",6," S $P(VAFHLREC,HL("FS"),7)=$$MEDICARE^DGRUUTL(DFN) ;Se t to Medicare Number or null 17 I VAFSTR[",8," S $P(VAFHLREC,HL("FS"),9)=$$MEDICAID^DGRUUTL(DFN) ;Se t to Medicaid Number or null; p-421 18 QUITIN2 Q VAFHLREC After ===== 2 ;;5.3;Registration;**190,421,651**;Aug 13, 1993 3 ; 4 ;This routine will build an HL7 IN2 segment for an inpatient. 5 ; 6 EN(DFN,VAFHMIEN,VAFSTR) -- ;Entry point of routine 7 ;DFN - Patient Internal Entry Number 8 ;VAFHMIEN - Patient Movement Internal Entry Number 9 ;VAFSTR - Sequence numbers to be included 10 ; 11 ; Patch 651 12 ; The Insurance Encapsulation API does not return the Insured's 13 ; Employer Name and ID (IN2-3) at this time. This field will not 14 ; be populated. 15 ; 16 N VAFINS,VAFHLREC,VAFHA,VAFHSUB,VAFHADD,VAFHLOC,VAFHNAME,VAFX,VAFTMP S VAFHSUB="" 17 S VAFX=$$INSUR^IBBAPI(DFN,,"R",.VAFTMP,"*") 18 S $P(VAFHLREC,HL("FS"))="IN2" ;Set segment type to IN2 19 I VAFSTR[",2," S $P(VAFHLREC,HL("FS"),3)=$$GET1^DIQ(2,DFN,".09","I") ;Patient SSN 20 I VAFSTR[",3," S $P(VAFHLREC,HL("FS"),4)=$E(HL("ECH")) ; VAFHNAME=$P ($G(VAFINS(2,2)),"^",9),$P(VAFHLREC,HL("FS"),4)=$E(HL("ECH"))_VAFHN AME 21 I VAFSTR[",6," S $P(VAFHLREC,HL("FS"),7)=$$MEDICARE^DGRUUTL(DFN) ;Se t to Medicare Number or null 22 I VAFSTR[",8," S $P(VAFHLREC,HL("FS"),9)=$$MEDICAID^DGRUUTL(DFN) ;Se t to Medicaid Number or null; p-421 23 QUITIN2 Q VAFHLREC Routine Checksum: ============================================================================= User Information: Entered By : KOPECKY,STEPHEN C. Date Entered : FEB 23, 2005 Completed By: RUDINGER,NANCY L. Date Completed: JUN 10, 2005 Released By : ALEXANDER,DIANNE Date Released : JUN 13, 2005 ============================================================================= Packman Mail Message: ===================== $END TXT