IBCNILK1 ;ALB/DW - Insurance Company Selection (cont.) ; 02-JAN-2026
;;2.0;INTEGRATED BILLING;**827**;21-MAR-94;Build 24
;;Per VA Directive 6402, this routine should not be modified.
;;
;
Q ; no direct calls
;
GETFILT() ; Gets the Insurance company filter
; Due to routine size of IBCNILK, GETFILT^IBCNILK now calls this
;
; Input: None
; Returns: A^B^C Where:
; A - 1 - Search for Insurance Companies that begin with
; the specified text (case insensitive)
; 2 - Search for Insurance Companies that contain
; the specified text (case insensitive)
; 3 - Search for Insurance Companies in a specified
; range (inclusive, case insensitive)
; B - Begin with text if A=1, Contains Text if A=2 or
; the range start if A=3
; C - Range End text (only present when A=3)
; -1 if a valid filter was not selected
; ^ if user wants to exit
;
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,FILTER,X,XX,Y
;
; First ask what kind of filter to use
W !
S DIR(0)="SA^1:Begins with;2:Contains;3:Range"
S DIR("A")=" SELECT 1, 2 or 3: " ;IB*763/CKB
S DIR("A",1)=" 1 - Select Insurance Companies that Begin with: XXX"
S DIR("A",2)=" 2 - Select Insurance Companies that Contain: XXX"
S DIR("A",3)=" 3 - Select Insurance Companies in Range: XXX - YYY"
S DIR("B")=1
S DIR("?",1)="Select the type of filter to determine what Insurance Companies"
S DIR("?",2)="will be displayed as follows:"
S DIR("?",3)=" Begins with - Displays all insurance companies that begin with"
S DIR("?",4)=" the specified text (inclusive, case insensitive)"
S DIR("?",5)=" Contains - Displays all insurance companies that contain"
S DIR("?",6)=" the specified text (inclusive, case insensitive)"
S DIR("?",7)=" Range - Displays all insurance companies within the "
S DIR("?")=" the specified range (inclusive, case insensitive)"
S XX="1:Begins with;2:Contains;3:Range"
D ^DIR
I Y="^" Q Y ; allow user to exit
I $D(DTOUT)!$D(DUOUT) Q -1 ; No valid search selected
S FILTER=Y
;
; Next ask for 'Begin with', 'Contains' or 'Range Start' text
W !
K DIR
S DIR(0)="F^1;30"
S XX=$S(FILTER=1:"that begin with",FILTER=2:"that contain",1:"Start of Range")
S DIR("A")=" SELECT Insurance Companies "_XX
I FILTER=1 D
. S DIR("?")="Enter text that each Insurance Company name will begin with"
I FILTER=2 D
. S DIR("?")="Enter text that each Insurance Company name will contain"
I FILTER=3 D
. S DIR("?")="Enter the starting range text"
D ^DIR K DIR
I Y="^" Q Y ; allow user to exit
I $D(DTOUT)!$D(DUOUT) Q -1 ; No valid search selected
S $P(FILTER,"^",2)=Y
Q:$P(FILTER,"^",1)'=3 FILTER
;
; Finally, ask for 'Range End' text if using a range filter
W !
K DIR
S DIR(0)="F^1;30"
S DIR("A")=" SELECT Insurance Companies End of Range"
S DIR("B")=$P(FILTER,"^",2)
S DIR("?")="Enter the ending Range text"
D ^DIR
I Y="^" Q Y ; allow user to exit
I $D(DTOUT)!$D(DUOUT) Q -1 ; No valid search selected
S $P(FILTER,"^",3)=Y
Q FILTER
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNILK1 3365 printed Jul 22, 2026@15:24:48 Page 2
IBCNILK1 ;ALB/DW - Insurance Company Selection (cont.) ; 02-JAN-2026
+1 ;;2.0;INTEGRATED BILLING;**827**;21-MAR-94;Build 24
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;
+4 ;
+5 ; no direct calls
QUIT
+6 ;
GETFILT() ; Gets the Insurance company filter
+1 ; Due to routine size of IBCNILK, GETFILT^IBCNILK now calls this
+2 ;
+3 ; Input: None
+4 ; Returns: A^B^C Where:
+5 ; A - 1 - Search for Insurance Companies that begin with
+6 ; the specified text (case insensitive)
+7 ; 2 - Search for Insurance Companies that contain
+8 ; the specified text (case insensitive)
+9 ; 3 - Search for Insurance Companies in a specified
+10 ; range (inclusive, case insensitive)
+11 ; B - Begin with text if A=1, Contains Text if A=2 or
+12 ; the range start if A=3
+13 ; C - Range End text (only present when A=3)
+14 ; -1 if a valid filter was not selected
+15 ; ^ if user wants to exit
+16 ;
+17 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,FILTER,X,XX,Y
+18 ;
+19 ; First ask what kind of filter to use
+20 WRITE !
+21 SET DIR(0)="SA^1:Begins with;2:Contains;3:Range"
+22 ;IB*763/CKB
SET DIR("A")=" SELECT 1, 2 or 3: "
+23 SET DIR("A",1)=" 1 - Select Insurance Companies that Begin with: XXX"
+24 SET DIR("A",2)=" 2 - Select Insurance Companies that Contain: XXX"
+25 SET DIR("A",3)=" 3 - Select Insurance Companies in Range: XXX - YYY"
+26 SET DIR("B")=1
+27 SET DIR("?",1)="Select the type of filter to determine what Insurance Companies"
+28 SET DIR("?",2)="will be displayed as follows:"
+29 SET DIR("?",3)=" Begins with - Displays all insurance companies that begin with"
+30 SET DIR("?",4)=" the specified text (inclusive, case insensitive)"
+31 SET DIR("?",5)=" Contains - Displays all insurance companies that contain"
+32 SET DIR("?",6)=" the specified text (inclusive, case insensitive)"
+33 SET DIR("?",7)=" Range - Displays all insurance companies within the "
+34 SET DIR("?")=" the specified range (inclusive, case insensitive)"
+35 SET XX="1:Begins with;2:Contains;3:Range"
+36 DO ^DIR
+37 ; allow user to exit
IF Y="^"
QUIT Y
+38 ; No valid search selected
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT -1
+39 SET FILTER=Y
+40 ;
+41 ; Next ask for 'Begin with', 'Contains' or 'Range Start' text
+42 WRITE !
+43 KILL DIR
+44 SET DIR(0)="F^1;30"
+45 SET XX=$SELECT(FILTER=1:"that begin with",FILTER=2:"that contain",1:"Start of Range")
+46 SET DIR("A")=" SELECT Insurance Companies "_XX
+47 IF FILTER=1
Begin DoDot:1
+48 SET DIR("?")="Enter text that each Insurance Company name will begin with"
End DoDot:1
+49 IF FILTER=2
Begin DoDot:1
+50 SET DIR("?")="Enter text that each Insurance Company name will contain"
End DoDot:1
+51 IF FILTER=3
Begin DoDot:1
+52 SET DIR("?")="Enter the starting range text"
End DoDot:1
+53 DO ^DIR
KILL DIR
+54 ; allow user to exit
IF Y="^"
QUIT Y
+55 ; No valid search selected
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT -1
+56 SET $PIECE(FILTER,"^",2)=Y
+57 if $PIECE(FILTER,"^",1)'=3
QUIT FILTER
+58 ;
+59 ; Finally, ask for 'Range End' text if using a range filter
+60 WRITE !
+61 KILL DIR
+62 SET DIR(0)="F^1;30"
+63 SET DIR("A")=" SELECT Insurance Companies End of Range"
+64 SET DIR("B")=$PIECE(FILTER,"^",2)
+65 SET DIR("?")="Enter the ending Range text"
+66 DO ^DIR
+67 ; allow user to exit
IF Y="^"
QUIT Y
+68 ; No valid search selected
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT -1
+69 SET $PIECE(FILTER,"^",3)=Y
+70 QUIT FILTER
+71 ;