source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNRPSI.m@ 1582

Last change on this file since 1582 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1IBCNRPSI ;BHAM ISC/ALA - Group Plan Status Inquiry ;14-NOV-2003
2 ;;2.0;INTEGRATED BILLING;**276**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;**Program Description**
6 ; This program select an insurance company and displays group plans
7 ; (All, Pharmacy covered or Matched) for that insurance company
8 Q
9 ;
10EN ; Select an insurance company (inquiry entry point)
11 S IBCNRRPT=""
12EN0 ;
13 S DIR(0)="350.9,4.06"
14 S DIR("A")="Select INSURANCE COMPANY",DIR("??")="^D ADH^IBCNSM3"
15 S DIR("?")="Select the Insurance Company for the plan you are entering"
16 D ^DIR K DIR S IBCNSP=+Y I Y<1 G EXIT
17 I $P($G(^DIC(36,+IBCNSP,0)),"^",2)="N" W !,"This company does not reimburse. "
18 I $P($G(^DIC(36,+IBCNSP,0)),"^",5) W !,*7,"Warning: Inactive Company" H 3 K IBCNSP G EXIT
19 ;
20TYPE ; Prompt to allow users to inquire for All group plans, Pharmacy group
21 ; plans or Matched group plans
22 N DIR,DIRUT
23 ;
24 S DIR(0)="S^A:All Group Plans;P:Pharmacy Group Plans;M:Matched Group Plans"
25 S DIR("A")=" Select the type of Group Plans you want to see"
26 S DIR("B")="M"
27 S DIR("?",1)=" A - All Group Plans"
28 S DIR("?",2)=" P - Pharmacy Group Plans"
29 S DIR("?",3)=" M - Matched Group Plans"
30 D ^DIR K DIR
31 I $D(DIRUT) G TYPEX
32 S IBCNTYP=Y
33 ;
34 D EN^IBCNRPS2
35 ;
36TYPEX ; TYPE exit point
37 ;
38EXIT K IBCNSP,IBCPOL,IBIND,IBMULT,IBSEL,IBW,IBALR,IBGRP,IBCNGP
39 K IBCNRRPT,IBCNTYP,ZTDESC,ZTSTOP,X,Y
40 Q
41 ;
42PRINT ; Entry pt.
43 ;
44 ; Init vars
45 N CRT,MAXCNT,IBPGC,IBBDT,IBEDT,IBPY,IBPXT,IBSRT,IBDTL
46 N X,Y,DIR,DTOUT,DUOUT,LIN,TOTALS
47 D:'$D(IOF) HOME^%ZIS
48 ;
49 S (IBPXT,IBPGC)=0
50 ;
51 ; Determine IO parameters
52 I IOST["C-" S MAXCNT=IOSL-3,CRT=1
53 E S MAXCNT=IOSL-6,CRT=0
54 ;
55 D PRINTDT(MAXCNT,IBPGC)
56 I $G(ZTSTOP)!IBPXT G EXIT3
57 I CRT,IBPGC>0,'$D(ZTQUEUED) D
58 . I MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
59 . S DIR(0)="E" D ^DIR K DIR
60 ;
61EXIT3 ; Exit pt
62 Q
63 ;
64PRINTDT(MAX,PGC) ; Print data
65 ;
66 ; Init vars
67 N EORMSG,NONEMSG,TOTDASHS,DISPDATA,SORT,CT,PRT1,PRT2
68 ;
69 S EORMSG="*** END OF REPORT ***"
70 S NONEMSG="* * * N O D A T A F O U N D * * *"
71 S $P(TOTDASHS,"=",89)=""
72 S CT=0
73 ;
74 ; Display lines of response
75 D LINE
76 K ^TMP("IBCNR",$J,"DSPDATA")
77 Q
78HEADER ; Print header info for each page
79 ; Assumes vars from PRINT: CRT,PGC,IBPXT,MAX,SRT,BDT,EDT,PYR,RDTL,MAR
80 ; Init vars
81 N DIR,X,Y,DTOUT,DUOUT,OFFSET,HDR,DASHES,DASHES2,LIN
82 ;
83 I CRT,PGC>0,'$D(ZTQUEUED) D I IBPXT G HEADERX
84 . I MAX<51 F LIN=1:1:(MAX-$Y) W !
85 . S DIR(0)="E" D ^DIR K DIR
86 . I $D(DTOUT)!$D(DUOUT) S IBPXT=1 Q
87 I $D(ZTQUEUED),$$S^%ZTLOAD() S (ZTSTOP,IBPXT)=1 G HEADERX
88 S PGC=PGC+1
89 W @IOF,!,?1,"ePHARM GROUP PLAN STATUS INQUIRY"
90 S HDR=$$FMTE^XLFDT($$NOW^XLFDT,1)_" Page: "_PGC
91 S OFFSET=80-$L(HDR)
92 W ?OFFSET,HDR
93 W !,?1,"Report for "_$S(IBCNTYP="A":"All",IBCNTYP="P":"Pharmacy Covered",1:"Matched")_" Group Plans for "_$$GET1^DIQ(36,IBCNSP_",",.01)
94 W !,?1,"Group Name",?20,"Group #",?38,"Plan Type",?52,"Plan ID"
95 W ?71,"Pln Stat"
96 S $P(DASHES,"=",80)=""
97 W !,?1,DASHES
98 ;
99HEADERX ; HEADER exit pt
100 Q
101 ;
102LINE ; Print line of data
103 ; Assumes vars from PRINT: PGC,IBPXT,MAX
104 ; Init vars
105 N CT,II
106 ;
107 S CT=+$O(^TMP("IBCNR",$J,"DSPDATA",""),-1)
108 I $Y+1+CT>MAX D HEADER I $G(ZTSTOP)!IBPXT G LINEX
109 F II=1:1:CT D Q:$G(ZTSTOP)!IBPXT
110 . I $Y+1>MAX!('PGC) D HEADER I $G(ZTSTOP)!IBPXT Q
111 . W !,?1,^TMP("IBCNR",$J,"DSPDATA",II)
112 . Q
113 ;
114LINEX ; LINE exit pt
115 Q
116QUITX ;
117 Q
Note: See TracBrowser for help on using the repository browser.