IBCMDT1 ;ALB/VD - INSURANCE PLANS MISSING DATA REPORT (DRIVER 1) ; 10-APR-15
;;2.0;INTEGRATED BILLING ;**549,827**;21-MAR-94;Build 24
;;Per VA Directive 6402, this routine should not be modified.
;
; Reference to ^DIQ in ICR #2056
; Reference to ^DIR in ICR #10026
;
SLAI ; Prompt user to select all or subset of insurance companies
; Count ins. companies with plans
;
; 0 -- user selects insurance companies
; 1 -- run report for all insurance companies with plans
;
N A,B
;IB*827/DTG make sure insurance is found and is active
;S (A,B)=0
;F S A=$O(^IBA(355.3,"B",A)) Q:'A S B=B+1
N IBC S (A,B,IBC)=0 F S A=$O(^IBA(355.3,"B",A)) Q:'A I $D(^DIC(36,A)) D ;
. D GETS^DIQ(36,+A_",",".01;.05","I","IBC")
. I $G(IBC(36,+A_",",.01,"I"))="" Q ;name not defined
. I '$G(IBC(36,+A_",",.05,"I")) S B=B+1 ;1=Inactive, 0=Active
; IB*827/DTG update question/message to include 'with plans'
;S DIR(0)="SA^1:List All "_B_" Ins. Companies;2:List Only Ins. Companies That You Select"
;W !!," There are "_B_" insurance companies associated with plans.",!
;S DIR("A",1)="1. List All "_B_" Active Ins. Companies"
S DIR(0)="SA^1:List All "_B_" Ins. Companies With Plans;2:List Only Ins. Companies That You Select"
S DIR("A",1)="1. List All "_B_" Active Ins. Companies With Plans"
S DIR("A",2)="2. List Only Active Ins. Companies That You Select"
S DIR("A")=" SELECT 1 or 2: "
S DIR("?",1)="Enter a code from the list: 1 or 2. Only insurance"
S DIR("?")="companies with one or more plans can be selected."
D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLAIQ
S IBMDTSPC("IBAI")=(+Y=1) K Y
SLAIQ ;
Q
;
SLAPL ; Prompt user to select all or subset of plans
;
; 0 -- whether some or all ins. co's., user selects plans (may be
; all for certain companies, some for other companies
; 1 -- whether some or all ins. co's., run report for all plans
; associated with those co's.
;
S DIR(0)="YO"
S DIR("A")="There are "_$P(^IBA(355.3,0),"^",4)_" plans. List all plans for each company"
S DIR("B")="No"
S DIR("?",1)="If you say yes, the report will list all of the plans for each company."
S DIR("?",2)="If you say no, you must make plan selections for each individual company"
S DIR("?")="(anywhere from one plan to all)."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLAPLQ
S IBMDTSPC("IBAPL")=+Y K Y
SLAPLQ ;
Q
;
SLGRN ; Prompt user to report missing Group Numbers
;
; 0 -- Do not print missing Group Numbers.
; 1 -- Print missing Group Numbers.
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing Group Number"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Group Number is missing."
S DIR("?",1)="If you say yes, the report will print #'s when Group Number is missing." ;IB*827/DTG change X to #
S DIR("?")="If you say no, missing Group Number will not be indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLGRNQ
S IBMDTSPC("IBGRN")=+Y K Y
SLGRNQ ;
Q
;
SLPTY ; Prompt user to report missing Type of Plan
;
; 0 -- Do not print missing Type of Plan.
; 1 -- Print missing Type of Plan.
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing Type of Plan"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Type of Plan is missing."
S DIR("?",1)="If you say yes, the report will print #'s when Type of Plan is missing." ;IB*827/DTG change X to #
S DIR("?")="If you say no, missing Type of Plan will not be indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLPTYQ
S IBMDTSPC("IBPTY")=+Y K Y
SLPTYQ ;
Q
;
SLTFT ; Prompt user to report missing Timely Filing Time Frame
;
; 0 -- Do not print missing Timely Filing Time Frame.
; 1 -- Print missing Timely Filing Time Frame.
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing Timely Filing Time Frame"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Timely Filing Time Frame"
S DIR("?",1)="If you say yes, the report will print #'s when Timely Filing Time Frame" ;IB*827/DTG change X to #
S DIR("?",2)="is missing."
S DIR("?")="If you say no, missing Timely Filing Time Frame will not be indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLTFTQ
S IBMDTSPC("IBTFT")=+Y K Y
SLTFTQ ;
Q
;
SLEPT ; Prompt user to report missing Electronic Plan Type
;
; 0 -- Do not print missing Electronic Plan Type.
; 1 -- Print missing Electronic Plan Type.
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing Electronic Plan Type"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Electronic Plan Type is missing."
S DIR("?",1)="If you say yes, the report will print #'s when Electronic Plan Type is missing." ;IB*827/DTG change X to #
S DIR("?")="If you say no, missing Electronic Plan Type will not be indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLEPTQ
S IBMDTSPC("IBEPT")=+Y K Y
SLEPTQ ;
Q
;
SLCLM ; Prompt user to report missing Coverage Limitations
;
; 0 -- Do not print missing Coverage Limitations.
; 1 -- Print missing Coverage Limitations.
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing Coverage Limitations"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Coverage Limitations is missing."
S DIR("?",1)="If you say yes, the report will print #'s when Coverage Limitations is missing." ;IB*827/DTG change X to #
S DIR("?")="If you say no, missing Coverage Limitations will not be indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLCLMQ
S IBMDTSPC("IBCLM")=+Y K Y
SLCLMQ ;
Q
;
SLBIN ; Prompt user to report missing Banking Identification Numbers (BIN)
;
; 0 -- Do not print missing Banking Identification Numbers (BIN).
; 1 -- Print missing Banking Identification Numbers (BIN).
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing BIN"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Banking Identification Number"
S DIR("?",1)="If you say yes, the report will print #'s when Banking Identification Number" ;IB*827/DTG change X to #
S DIR("?",2)="(BIN) is missing."
S DIR("?",3)="If you say no, missing Banking Identification Number (BIN) will not be"
S DIR("?")="indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLBINQ
S IBMDTSPC("IBBIN")=+Y K Y
SLBINQ ;
Q
;
SLPCN ; Prompt user to report missing Processor Control Numbers (PCN)
;
; 0 -- Do not print missing Processor Control Numbers (PCN).
; 1 -- Print missing Processor Control Numbers (PCN).
;
S DIR(0)="YO"
S DIR("A")="Display Active Group(s) missing PCN"
S DIR("B")="YES"
;S DIR("?",1)="If you say yes, the report will print X's when Processor Control Number"
S DIR("?",1)="If you say yes, the report will print #'s when Processor Control Number" ;IB*827/DTG change X to #
S DIR("?",2)="(PCN) is missing."
S DIR("?",3)="If you say no, missing Processor Control Number (PCN) will not be"
S DIR("?")="indicated."
W ! D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SLPCNQ
S IBMDTSPC("IBPCN")=+Y K Y
SLPCNQ ;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCMDT1 7174 printed Jul 22, 2026@15:22:25 Page 2
IBCMDT1 ;ALB/VD - INSURANCE PLANS MISSING DATA REPORT (DRIVER 1) ; 10-APR-15
+1 ;;2.0;INTEGRATED BILLING ;**549,827**;21-MAR-94;Build 24
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; Reference to ^DIQ in ICR #2056
+5 ; Reference to ^DIR in ICR #10026
+6 ;
SLAI ; Prompt user to select all or subset of insurance companies
+1 ; Count ins. companies with plans
+2 ;
+3 ; 0 -- user selects insurance companies
+4 ; 1 -- run report for all insurance companies with plans
+5 ;
+6 NEW A,B
+7 ;IB*827/DTG make sure insurance is found and is active
+8 ;S (A,B)=0
+9 ;F S A=$O(^IBA(355.3,"B",A)) Q:'A S B=B+1
+10 ;
NEW IBC
SET (A,B,IBC)=0
FOR
SET A=$ORDER(^IBA(355.3,"B",A))
if 'A
QUIT
IF $DATA(^DIC(36,A))
Begin DoDot:1
+11 DO GETS^DIQ(36,+A_",",".01;.05","I","IBC")
+12 ;name not defined
IF $GET(IBC(36,+A_",",.01,"I"))=""
QUIT
+13 ;1=Inactive, 0=Active
IF '$GET(IBC(36,+A_",",.05,"I"))
SET B=B+1
End DoDot:1
+14 ; IB*827/DTG update question/message to include 'with plans'
+15 ;S DIR(0)="SA^1:List All "_B_" Ins. Companies;2:List Only Ins. Companies That You Select"
+16 ;W !!," There are "_B_" insurance companies associated with plans.",!
+17 ;S DIR("A",1)="1. List All "_B_" Active Ins. Companies"
+18 SET DIR(0)="SA^1:List All "_B_" Ins. Companies With Plans;2:List Only Ins. Companies That You Select"
+19 SET DIR("A",1)="1. List All "_B_" Active Ins. Companies With Plans"
+20 SET DIR("A",2)="2. List Only Active Ins. Companies That You Select"
+21 SET DIR("A")=" SELECT 1 or 2: "
+22 SET DIR("?",1)="Enter a code from the list: 1 or 2. Only insurance"
+23 SET DIR("?")="companies with one or more plans can be selected."
+24 DO ^DIR
KILL DIR
+25 IF $DATA(DIRUT)
SET STOP=1
GOTO SLAIQ
+26 SET IBMDTSPC("IBAI")=(+Y=1)
KILL Y
SLAIQ ;
+1 QUIT
+2 ;
SLAPL ; Prompt user to select all or subset of plans
+1 ;
+2 ; 0 -- whether some or all ins. co's., user selects plans (may be
+3 ; all for certain companies, some for other companies
+4 ; 1 -- whether some or all ins. co's., run report for all plans
+5 ; associated with those co's.
+6 ;
+7 SET DIR(0)="YO"
+8 SET DIR("A")="There are "_$PIECE(^IBA(355.3,0),"^",4)_" plans. List all plans for each company"
+9 SET DIR("B")="No"
+10 SET DIR("?",1)="If you say yes, the report will list all of the plans for each company."
+11 SET DIR("?",2)="If you say no, you must make plan selections for each individual company"
+12 SET DIR("?")="(anywhere from one plan to all)."
+13 WRITE !
DO ^DIR
KILL DIR
+14 IF $DATA(DIRUT)
SET STOP=1
GOTO SLAPLQ
+15 SET IBMDTSPC("IBAPL")=+Y
KILL Y
SLAPLQ ;
+1 QUIT
+2 ;
SLGRN ; Prompt user to report missing Group Numbers
+1 ;
+2 ; 0 -- Do not print missing Group Numbers.
+3 ; 1 -- Print missing Group Numbers.
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing Group Number"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Group Number is missing."
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Group Number is missing."
+10 SET DIR("?")="If you say no, missing Group Number will not be indicated."
+11 WRITE !
DO ^DIR
KILL DIR
+12 IF $DATA(DIRUT)
SET STOP=1
GOTO SLGRNQ
+13 SET IBMDTSPC("IBGRN")=+Y
KILL Y
SLGRNQ ;
+1 QUIT
+2 ;
SLPTY ; Prompt user to report missing Type of Plan
+1 ;
+2 ; 0 -- Do not print missing Type of Plan.
+3 ; 1 -- Print missing Type of Plan.
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing Type of Plan"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Type of Plan is missing."
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Type of Plan is missing."
+10 SET DIR("?")="If you say no, missing Type of Plan will not be indicated."
+11 WRITE !
DO ^DIR
KILL DIR
+12 IF $DATA(DIRUT)
SET STOP=1
GOTO SLPTYQ
+13 SET IBMDTSPC("IBPTY")=+Y
KILL Y
SLPTYQ ;
+1 QUIT
+2 ;
SLTFT ; Prompt user to report missing Timely Filing Time Frame
+1 ;
+2 ; 0 -- Do not print missing Timely Filing Time Frame.
+3 ; 1 -- Print missing Timely Filing Time Frame.
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing Timely Filing Time Frame"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Timely Filing Time Frame"
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Timely Filing Time Frame"
+10 SET DIR("?",2)="is missing."
+11 SET DIR("?")="If you say no, missing Timely Filing Time Frame will not be indicated."
+12 WRITE !
DO ^DIR
KILL DIR
+13 IF $DATA(DIRUT)
SET STOP=1
GOTO SLTFTQ
+14 SET IBMDTSPC("IBTFT")=+Y
KILL Y
SLTFTQ ;
+1 QUIT
+2 ;
SLEPT ; Prompt user to report missing Electronic Plan Type
+1 ;
+2 ; 0 -- Do not print missing Electronic Plan Type.
+3 ; 1 -- Print missing Electronic Plan Type.
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing Electronic Plan Type"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Electronic Plan Type is missing."
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Electronic Plan Type is missing."
+10 SET DIR("?")="If you say no, missing Electronic Plan Type will not be indicated."
+11 WRITE !
DO ^DIR
KILL DIR
+12 IF $DATA(DIRUT)
SET STOP=1
GOTO SLEPTQ
+13 SET IBMDTSPC("IBEPT")=+Y
KILL Y
SLEPTQ ;
+1 QUIT
+2 ;
SLCLM ; Prompt user to report missing Coverage Limitations
+1 ;
+2 ; 0 -- Do not print missing Coverage Limitations.
+3 ; 1 -- Print missing Coverage Limitations.
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing Coverage Limitations"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Coverage Limitations is missing."
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Coverage Limitations is missing."
+10 SET DIR("?")="If you say no, missing Coverage Limitations will not be indicated."
+11 WRITE !
DO ^DIR
KILL DIR
+12 IF $DATA(DIRUT)
SET STOP=1
GOTO SLCLMQ
+13 SET IBMDTSPC("IBCLM")=+Y
KILL Y
SLCLMQ ;
+1 QUIT
+2 ;
SLBIN ; Prompt user to report missing Banking Identification Numbers (BIN)
+1 ;
+2 ; 0 -- Do not print missing Banking Identification Numbers (BIN).
+3 ; 1 -- Print missing Banking Identification Numbers (BIN).
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing BIN"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Banking Identification Number"
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Banking Identification Number"
+10 SET DIR("?",2)="(BIN) is missing."
+11 SET DIR("?",3)="If you say no, missing Banking Identification Number (BIN) will not be"
+12 SET DIR("?")="indicated."
+13 WRITE !
DO ^DIR
KILL DIR
+14 IF $DATA(DIRUT)
SET STOP=1
GOTO SLBINQ
+15 SET IBMDTSPC("IBBIN")=+Y
KILL Y
SLBINQ ;
+1 QUIT
+2 ;
SLPCN ; Prompt user to report missing Processor Control Numbers (PCN)
+1 ;
+2 ; 0 -- Do not print missing Processor Control Numbers (PCN).
+3 ; 1 -- Print missing Processor Control Numbers (PCN).
+4 ;
+5 SET DIR(0)="YO"
+6 SET DIR("A")="Display Active Group(s) missing PCN"
+7 SET DIR("B")="YES"
+8 ;S DIR("?",1)="If you say yes, the report will print X's when Processor Control Number"
+9 ;IB*827/DTG change X to #
SET DIR("?",1)="If you say yes, the report will print #'s when Processor Control Number"
+10 SET DIR("?",2)="(PCN) is missing."
+11 SET DIR("?",3)="If you say no, missing Processor Control Number (PCN) will not be"
+12 SET DIR("?")="indicated."
+13 WRITE !
DO ^DIR
KILL DIR
+14 IF $DATA(DIRUT)
SET STOP=1
GOTO SLPCNQ
+15 SET IBMDTSPC("IBPCN")=+Y
KILL Y
SLPCNQ ;
+1 QUIT
+2 ;