Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCOPP1

IBCOPP1.m

Go to the documentation of this file.
  1. IBCOPP1 ;ALB/NLR - LIST INS. PLANS BY CO. (DRIVER 1) ; 20-OCT-2015
  1. ;;2.0;INTEGRATED BILLING;**28,528,549**;21-MAR-94;Build 54
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. SELR() ; Prompt user to select report type
  1. ; Returns: IBV1 0 - List insurance plans by company
  1. ; 1 - List insurance plans by company with subscriber information
  1. ; -1 - No selection made
  1. N IBV1
  1. S DIR(0)="SA^1:1. List Insurance Plans by Company;2:2. List Insurance Plans by Company With Subscriber Information"
  1. S DIR("A")=" Select Report (1 OR 2): "
  1. S DIR("A",1)="1. List Insurance Plans by Company"
  1. S DIR("A",2)="2. List Insurance Plans by Company With Subscriber Information"
  1. D ^DIR K DIR I Y<0!$D(DIRUT) S IBV1=-1 G SELRQ
  1. S IBV1=(+Y=2) K Y
  1. SELRQ ;
  1. Q IBV1
  1. ;
  1. SELI() ; Prompt user to select all or subset of insurance companies
  1. ; Count ins. companies with plans
  1. ; Returns: IBV2 0 - User selects insurance companies
  1. ; 1 - Run report for all insurance companies with plans
  1. ; -1 - No selection made
  1. ;
  1. N A,B,IBV2
  1. S (A,B)=0
  1. F S A=$O(^IBA(355.3,"B",A)) Q:'A S B=B+1
  1. S DIR(0)="SA^1:1. List All "_B_" Ins. Companies;2:2. List Only Ins. Companies That You Select"
  1. W !!," There are "_B_" insurance companies associated with "
  1. ;
  1. ; IB*2.0*549 Added Plan count below
  1. W $P(^IBA(355.3,0),"^",4)_" group plans.",!
  1. S DIR("A",1)="1. List All "_B_" Ins. Companies"
  1. S DIR("A",2)="2. List Only Ins. Companies That You Select"
  1. S DIR("A")=" SELECT 1 or 2: "
  1. S DIR("?",1)="Enter a code from the list: 1 or 2. Only insurance"
  1. S DIR("?")="companies with one or more plans can be selected."
  1. D ^DIR K DIR I Y<0!$D(DIRUT) S IBV2=-1 G SELIQ
  1. S IBV2=(+Y=1) K Y
  1. SELIQ ;
  1. Q IBV2
  1. ;
  1. SELA() ;EP
  1. ; IB*2.0*549 - Added function
  1. ; Prompt user to select Active/Inactive/Both Insurance Companies
  1. ; Input: None
  1. ; Returns: 0 - Inactive Insurance Companies Only
  1. ; 1 - Active Insurance Companies Only
  1. ; 2 - Both Active and Inactive Insurance Companies
  1. ; -1 - No selection made
  1. ;
  1. N DIR,DIROUT,DIRUT,DTOUT,XX
  1. W !
  1. S DIR(0)="SA^1:ACTIVE;2:INACTIVE;3:BOTH"
  1. S DIR("A")=" Select 1 or 2 or 3: "
  1. S DIR("A",1)=" 1. Select ACTIVE Insurance Companies"
  1. S DIR("A",2)=" 2. Select INACTIVE Insurance Companies"
  1. S DIR("A",3)=" 3. Select BOTH"
  1. S DIR("?",1)=" 1 - Only allow selection of ACTIVE Insurance Companies"
  1. S DIR("?",2)=" 2 - Only allow selection of INACTIVE Insurance Companies"
  1. S DIR("?")=" 3 - Allow selection of ACTIVE and INACTIVE Insurance Companies"
  1. S DIR("B")=1
  1. D ^DIR
  1. I Y<0!$D(DIRUT) Q -1
  1. S XX=$S(Y=1:1,Y=2:0,1:2)
  1. Q XX
  1. ;
  1. SELPA() ;EP
  1. ; IB*2.0*549 - Added function
  1. ; Prompt user to select Active/Inactive/Both Insurance Company Plans
  1. ; Input: None
  1. ; Returns: 0 - Inactive Insurance Company Plans Only
  1. ; 1 - Active Insurance Company Plans Only
  1. ; 2 - Both Active and Inactive Insurance Company Plans
  1. ; -1 - No selection made
  1. ;
  1. N DIR,DIROUT,DIRUT,DTOUT,XX
  1. W !
  1. S DIR(0)="SA^1:ACTIVE;2:INACTIVE;3:BOTH"
  1. S DIR("A")=" Select 1 or 2 or 3: "
  1. S DIR("A",1)=" 1. Select ACTIVE Group Plans"
  1. S DIR("A",2)=" 2. Select INACTIVE Group Plans"
  1. S DIR("A",3)=" 3. Select BOTH"
  1. S DIR("?",1)=" 1 - Only allow selection of ACTIVE Insurance Company Plans"
  1. S DIR("?",2)=" 2 - Only allow selection of INACTIVE Insurance Company Plans"
  1. S DIR("?")=" 3 - Allow selection of ACTIVE and INACTIVE Insurance Company Plans"
  1. S DIR("B")=1
  1. D ^DIR
  1. I Y<0!$D(DIRUT) Q -1
  1. S XX=$S(Y=1:1,Y=2:0,1:2)
  1. Q XX
  1. ;
  1. SELP() ; Prompt user to select all or subset of plans
  1. ; Returns: IBV3 0 - Whether some or all ins. co's., user selects plans (may be
  1. ; all for certain companies, some for other companies
  1. ; 1 - Whether some or all ins. co's., run report for all plans
  1. ; associated with those co's.
  1. ; -1 - No selection made
  1. ;
  1. N IBV3
  1. ;
  1. ; IB*2.0*549 Removed total plan count sentence from line below
  1. S DIR(0)="YO",DIR("A")="List all plans for each company",DIR("B")="No"
  1. S DIR("B")="No"
  1. S DIR("?",1)="If you say yes, the report will list all of the plans for each company."
  1. S DIR("?",2)="If you selected 2. List Insurance Plans by Company With Subscriber"
  1. S DIR("?",3)="Information and 1. List All "_$P(^IBA(355.3,0),"^",4)_" Ins. Companies,"
  1. S DIR("?",4)="this will result in the most complete report possible. However, it"
  1. S DIR("?",5)="may take awhile to run. If you say no, you must make plan selections"
  1. S DIR("?")="for each individual company (anywhere from one plan to all)."
  1. W ! D ^DIR W ! K DIR I Y<0!$D(DIRUT) S IBV3=-1 G SELPQ
  1. S IBV3=+Y K Y
  1. SELPQ ;
  1. Q IBV3
  1. ;
  1. OUT() ; Prompt to allow users to select output format
  1. ; Returns: E - Output to excel
  1. ; R - Output to report
  1. ; -1 - No Selection made
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. W !
  1. S DIR(0)="SA^E:Excel;R:Report"
  1. S DIR("A")="(E)xcel Format or (R)eport Format: "
  1. S DIR("B")="Report"
  1. S DIR("?",1)="Select 'E' to create CSV output for import into Excel."
  1. S DIR("?")="Select 'R' to create a standard report."
  1. D ^DIR
  1. I $D(DIRUT) Q -1
  1. Q Y