[613] | 1 | IBCOPP ;ALB/NLR - LIST INS. PLANS BY CO. (DRIVER) ; 08-SEP-94
|
---|
| 2 | ;;Version 2.0 ; INTEGRATED BILLING ;**28,62**; 21-MAR-94
|
---|
| 3 | ;
|
---|
| 4 | EN ; Describe report
|
---|
| 5 | W !!?5,"This report will generate a list of insurance plans by company."
|
---|
| 6 | W !?5,"It will help you identify duplicates and verify patient coverage."
|
---|
| 7 | W !?5,"You must select one, many (up to 20) or all of the insurance companies;"
|
---|
| 8 | W !?5,"anywhere from one to all of the plans under each company; and whether to"
|
---|
| 9 | W !?5,"include the patient policies (subscribers) under each plan. The number of"
|
---|
| 10 | W !?5,"plans you select is independent for each company you are including, but"
|
---|
| 11 | W !?5,"subscriber selection is the same (all or none) for all companies and"
|
---|
| 12 | W !?5,"plans within a report. Regardless of how you run the report, the"
|
---|
| 13 | W !?5,"number of subscribers per plan will be included.",!!
|
---|
| 14 | ;
|
---|
| 15 | ; Prompt user to select report type, insurance companies, plans
|
---|
| 16 | ;
|
---|
| 17 | ; Output from user selections:
|
---|
| 18 | ;
|
---|
| 19 | ; IBAPA=0 -- list insurance plans by company
|
---|
| 20 | ; IBAPA=1 -- list Insurance plans by company with subscriber information
|
---|
| 21 | ; IBAI=0 -- user selects insurance companies
|
---|
| 22 | ; IBAI=1 -- run report for all insurance companies with plans
|
---|
| 23 | ; IBAPL=0 -- whether some or all ins. co's., user selects plans (may be
|
---|
| 24 | ; all for certain companies, some for other companies)
|
---|
| 25 | ; IBAPL=1 -- whether some or all ins. co's., run report for all plans
|
---|
| 26 | ; associated with those co's.
|
---|
| 27 | ;
|
---|
| 28 | S IBAPA=$$SELR^IBCOPP1 I IBAPA<0 G ENQ
|
---|
| 29 | S IBAI=$$SELI^IBCOPP1 I IBAI<0 G ENQ
|
---|
| 30 | S IBAPL=$$SELP^IBCOPP1 I IBAPL<0 G ENQ
|
---|
| 31 | ;
|
---|
| 32 | ; obtain plans for selected insurance companies
|
---|
| 33 | ;
|
---|
| 34 | I IBAI,IBAPL G DEVICE
|
---|
| 35 | D START I IBQUIT G ENQ
|
---|
| 36 | I '$D(^TMP("IBINC",$J)) W !!,"No plans selected!" G ENQ
|
---|
| 37 | ;
|
---|
| 38 | DEVICE ; Ask user to select device
|
---|
| 39 | ;
|
---|
| 40 | W !!,"*** You will need a 132 column printer for this report. ***",!
|
---|
| 41 | S %ZIS="QM" D ^%ZIS G:POP ENQ
|
---|
| 42 | I $D(IO("Q")) D G ENQ
|
---|
| 43 | .S ZTRTN="^IBCOPP2",ZTDESC="IB - LIST OF PLANS BY INSURANCE COMPANY"
|
---|
| 44 | .F I="^TMP(""IBINC"",$J,","IBAPA","IBAI","IBAPL" S ZTSAVE(I)=""
|
---|
| 45 | .D ^%ZTLOAD K IO("Q") D HOME^%ZIS
|
---|
| 46 | .W !!,$S($D(ZTSK):"This job has been queued as task #"_ZTSK_".",1:"Unable to queue this job.")
|
---|
| 47 | .K ZTSK,IO("Q")
|
---|
| 48 | ;
|
---|
| 49 | ; Compile and print report
|
---|
| 50 | ;
|
---|
| 51 | U IO D ^IBCOPP2
|
---|
| 52 | ;
|
---|
| 53 | ENQ K DIRUT,DIROUT,DUOUT,DTOUT,IBAPA,IBAI,IBAPL,IBQUIT,X,Y,^TMP("IBINC",$J)
|
---|
| 54 | Q
|
---|
| 55 | ;
|
---|
| 56 | ;
|
---|
| 57 | START ; Gather plans for all selected companies.
|
---|
| 58 | S (IBCT,IBQUIT)=0 K ^TMP("IBINC",$J)
|
---|
| 59 | ;
|
---|
| 60 | ; - allow user selection of companies if required
|
---|
| 61 | I 'IBAI D I Y<0 S IBQUIT=1 G STARTQ
|
---|
| 62 | .S DIC="^DIC(36,",DIC("S")="I $D(^IBA(355.3,""B"",Y))"
|
---|
| 63 | .S VAUTSTR="insurance company",VAUTNI=2,VAUTVB="VAUTI",VAUTNALL=1
|
---|
| 64 | .D FIRST^VAUTOMA K DIC,VAUTSTR,VAUTNI,VAUTVB,VAUTNALL Q:Y<0
|
---|
| 65 | .S IBCNS="" F S IBCNS=$O(VAUTI(IBCNS)) Q:IBCNS="" S ^TMP("IBINC",$J,$E(VAUTI(IBCNS),1,25),IBCNS)=""
|
---|
| 66 | I IBAPL G STARTQ
|
---|
| 67 | ;
|
---|
| 68 | ; - gather all companies if required
|
---|
| 69 | I IBAI S A=0 F S A=$O(^IBA(355.3,"B",A)) Q:'A S ^TMP("IBINC",$J,$E($P($G(^DIC(36,A,0)),"^"),1,25),A)=""
|
---|
| 70 | ;
|
---|
| 71 | ; - gather plans for selected companies
|
---|
| 72 | S IBIC="" F S IBIC=$O(^TMP("IBINC",$J,IBIC)) Q:IBIC=""!IBQUIT D
|
---|
| 73 | .S IBCNS="" F S IBCNS=$O(^TMP("IBINC",$J,IBIC,IBCNS)) Q:IBCNS=""!(IBQUIT) D
|
---|
| 74 | ..S IBCT=IBCT+1 W !!,"Insurance Company # "_IBCT_": "_IBIC
|
---|
| 75 | ..D OK^IBCNSM3 Q:IBQUIT I 'IBOK K ^TMP("IBINC",$J,IBIC,IBCNS) S IBAI=0 Q
|
---|
| 76 | ..W " ...building a list of plans..."
|
---|
| 77 | ..K IBSEL,^TMP($J,"IBSEL") D LKP^IBCNSU2(IBCNS,1,1,.IBSEL,0,1) Q:IBQUIT
|
---|
| 78 | ..I '$O(^TMP($J,"IBSEL",0)) K ^TMP("IBINC",$J,IBIC,IBCNS) S IBAI=0 Q
|
---|
| 79 | ..;
|
---|
| 80 | ..; - set plans into an array
|
---|
| 81 | ..S IBPN=0 F S IBPN=$O(^TMP($J,"IBSEL",IBPN)) Q:'IBPN S ^TMP("IBINC",$J,IBIC,IBCNS,IBPN)=""
|
---|
| 82 | ;
|
---|
| 83 | STARTQ K IBCNS,IBIC,IBJJ,IBCT,IBLCT,IBOK,IBPN,IBSEL,VAUTI,VAUTP,^TMP($J,"IBSEL")
|
---|
| 84 | Q
|
---|