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

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

initial load of FOIAVistA 6/30/08 version

File size: 5.6 KB
Line 
1IBJDF8I ;ALB/RRG-ADD/EDIT IB DM WORKLOAD PARAMETERS ;11/06/00
2 ;;2.0;INTEGRATED BILLING;**123**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5START D BEG G EXIT:IBQUIT I IBPRONLY G START
6 D ASSIGN G START:IBQUIT
7 I IBJOB="A" D ADD G START:IBQUIT
8 I IBJOB="E" D EDIT^IBJDF8I1 G START:IBQUIT
9 I IBJOB="D" D DELETE G START:IBQUIT
10 L -^IBE(351.73,IBCL)
11 G START
12 Q
13 ;
14BEG ;Start editing workload paramters
15 N DIC,IBDELFLG S (IBQUIT,IBPRONLY)=0 S (IBDA0,IBCL)="",IBDELFLG=1
16 S DIC="^IBE(351.73,",DIC(0)="QEAML",DLAYGO=351.73,DIC("A")="Select Clerk: "
17 D ^DIC I ($D(DTOUT))!($D(DUOUT))!(Y'>0) S IBQUIT=1 Q
18 S IBCL=+Y W !
19 L +^IBE(351.73,IBCL):2 I '$T W !?3,"Another user is editing this entry." G BEG
20 I $P(^IBE(351.73,IBCL,0),"^",3)="" D
21 . S DIE=DIC,DR=".03////"_DUZ,DA=IBCL D ^DIE K DIE,DR,DA
22PRONLY S DIR(0)="351.73,.02",DA=IBCL,IBDELFLG=1
23 D ^DIR K DIR I ($D(DTOUT))!($D(DUOUT)) L -^IBE(351.73,IBCL) G BEG
24 S IBPRONLY=Y K DIROUT,DTOUT,DUOUT
25 I 'IBPRONLY S $P(^IBE(351.73,IBCL,0),"^",2)=0 Q
26 I IBPRONLY D Q:IBQUIT I 'IBDELFLG G PRONLY
27 . I $O(^IBE(351.73,IBCL,1,0)) D
28 . . S DIR(0)="Y",DIR("B")="NO"
29 . . S DIR("A",1)="There are existing assignments for this clerk."
30 . . S DIR("A",2)="Those assignments must be deleted before the 'Productivity Report Only'"
31 . . S DIR("A",3)=" flag can be changed to 'Yes'."
32 . . S DIR("A")="Do you want to delete the existing assignments now"
33 . . D ^DIR K DIR I ($D(DTOUT))!($D(DUOUT)) L -^IBE(351.73,IBCL) S IBQUIT=1 Q
34 . . K DIROUT,DTOUT,DUOUT I 'Y S IBDELFLG=0
35 . . ; Delete all assignments and change 'Prod Rpt only' flag to YES
36 . . I Y S IBASNUM=0 F S IBASNUM=$O(^IBE(351.73,IBCL,1,IBASNUM)) Q:'IBASNUM D S $P(^IBE(351.73,IBCL,0),"^",2)=1 W !?3,"Productivity Report Only? changed to 'YES'..." L -^IBE(351.73,IBCL)
37 . . . S DA(1)=IBCL,DA=IBASNUM,DIK="^IBE(351.73,"_DA(1)_",1," D ^DIK
38 . . . K DA,DIK
39 . . . W !?3,"Assignment # "_IBASNUM_" deleted..."
40 Q
41ASSIGN ; Start editing assignments
42 ;
43 ; - Build assignment array for display
44 S IBASNUM=0,IBNEWASN=1 K IBPRONLY,IBAS
45 N IBBCAT,IBMBAL,IBSUP,IBFOTP,IBLBY,IBERC
46 F S IBASNUM=$O(^IBE(351.73,IBCL,1,IBASNUM)) Q:'IBASNUM D
47 . S IBASDA0=$G(^IBE(351.73,IBCL,1,IBASNUM,0)),IBBCAT=$P(IBASDA0,"^",2)
48 . S IBMBAL=$P(IBASDA0,"^",3),IBSUP=$P(IBASDA0,"^",4)
49 . S IBERC=$P(IBASDA0,"^",5)
50 . S IBFOTP=$$CATTYP^IBJD1(IBBCAT)
51 . I IBFOTP="F" S IBASDA1=$G(^IBE(351.73,IBCL,1,IBASNUM,1)) D
52 . . S IBLBY=$S($P(IBASDA1,"^",1)'="":"LAST PMT",1:"")
53 . . S IBLBY=IBLBY_$S(($P(IBASDA1,"^",2)="")&($P(IBASDA1,"^",3)=""):"",IBLBY="":"NAME",1:"/NAME")
54 . . S IBLBY=IBLBY_$S(($P(IBASDA1,"^",4)="")&($P(IBASDA1,"^",5)=""):"",IBLBY="":"SSN",1:"/SSN")
55 . I IBFOTP="T" S IBASDA2=$G(^IBE(351.73,IBCL,1,IBASNUM,2)) D
56 . . S IBLBY=$S($P(IBASDA2,"^",1)'="":"LAST TRX",1:"")
57 . . S IBLBY=IBLBY_$S($P(IBASDA2,"^",8)="":"",IBLBY="":"REC.TYPE",1:"/REC.TYPE")
58 . . S IBLBY=IBLBY_$S(($P(IBASDA2,"^",2)="")&($P(IBASDA2,"^",3)=""):"",IBLBY="":"CARRIER",1:"/CARRIER")
59 . . S IBLBY=IBLBY_$S(($P(IBASDA2,"^",4)="")&($P(IBASDA2,"^",5)=""):"",IBLBY="":"NAME",1:"/NAME")
60 . . S IBLBY=IBLBY_$S(($P(IBASDA2,"^",6)="")&($P(IBASDA2,"^",7)=""):"",IBLBY="":"SSN",1:"/SSN")
61 . S IBAS(IBASNUM)=$P($G(^PRCA(430.2,IBBCAT,0)),"^",1)_"^"
62 . S IBAS(IBASNUM)=IBAS(IBASNUM)_IBMBAL_"^"_$P($G(^VA(200,+IBSUP,0)),"^",1)_"^"
63 . S IBAS(IBASNUM)=IBAS(IBASNUM)_IBLBY_"^"_IBERC
64 ;
65 ; - Display assignment array
66 S IBJOB="" N IBASDAT
67 I '$D(IBAS) S IBJOB="A" Q
68 S IBASNUM=0
69 W !,?38,"EXCLUDE REFER"
70 W !,"ASSIGNMENT",?12,"CATEGORY",?26,"MIN BALANCE",?38,"TO REG COUNSEL"
71 W ?53,"LIMITED BY CARRIER/NAME/SSN"
72 F S IBASNUM=$O(IBAS(IBASNUM)) Q:'IBASNUM D
73 . S IBASDAT=IBAS(IBASNUM) W !,?4,IBASNUM,?12,$E($P(IBASDAT,"^",1),1,13)
74 . W ?26,$J($FN($P(IBASDAT,"^",2),",",2),10)
75 . W ?43,$S($P(IBASDAT,"^",5)=0:"NO",1:"YES")
76 . W ?53,$E($P(IBASDAT,"^",4),1,26)
77 . S IBNEWASN=IBASNUM+1
78 W !
79 S DIR("A")="(A)dd, (E)dit, or (D)elete Assignment"
80 S DIR(0)="SB^A:ADD;E:EDIT;D:DELETE" D ^DIR K DIR
81 I ($D(DTOUT))!($D(DUOUT)) S IBQUIT=1 L -^IBE(351.73,IBCL) Q
82 K DIROUT,DTOUT,DUOUT,DIRUN
83 S IBJOB=Y
84 ;
85 Q
86 ;
87ADD ; - Add new assignments to clerk
88 ;
89 N IBBCAT,IBFOTP
90 W !?3,"Adding new assignment - # "_IBNEWASN_" - for "_$P(^VA(200,IBCL,0),"^",1)
91 S DA(1)=IBCL,DIC="^IBE(351.73,"_DA(1)_",1,",DIC(0)="EML",DLAYGO=351.731
92 S (DA,DINUM,X)=IBNEWASN
93 D FILE^DICN I Y=-1 K DIC,DA Q
94 K DLAYGO,DINUM,DIC(0)
95 S DIC(0)="QEAM",DIC="^PRCA(430.2,"
96 S DIC("S")="I $$CATTYP^IBJD1(+Y)]"""""
97 D ^DIC K DIC I ($D(DTOUT))!($D(DUOUT))!(Y'>0) D S IBQUIT=1 Q
98 . S DA(1)=IBCL,DA=IBNEWASN,DIK="^IBE(351.73,"_DA(1)_",1,"
99 . D ^DIK K DIK,DA,DTOUT,DUOUT,Y
100 . L -^IBE(351.73,IBCL)
101 S DA(1)=IBCL,DIE="^IBE(351.73,"_DA(1)_",1,"
102 S (DA,IBASNNUM)=IBNEWASN
103 S DR=".02////"_+Y_";.04////"_DUZ D ^DIE K DIE,DA,DR
104 S IBBCAT=$P($G(^IBE(351.73,IBCL,1,IBNEWASN,0)),"^",2)
105 S IBFOTP=$$CATTYP^IBJD1(IBBCAT)
106 G EDIT1^IBJDF8I1
107 ;
108 Q
109 ;
110DELETE ; - Delete assignment
111 ;
112 N DIR
113 S DIR("A")="Choose a valid Assignment Number to delete",DIR(0)="N"
114 D ^DIR K DIR
115 I ($D(DTOUT))!($D(DUOUT)) L -^IBE(351.73,IBCL) S IBQUIT=1 K DTOUT,DUOUT Q
116 I '$D(^IBE(351.73,IBCL,1,Y)) W !?3,"Not a valid assignment number" G DELETE
117 S IBASNNUM=+Y
118 S DA(1)=IBCL,DA=IBASNNUM,DIK="^IBE(351.73,"_DA(1)_",1,"
119 D ^DIK K DA,DIK
120 W !,?3,"Assignment #"_IBASNNUM_" deleted..."
121 I '$O(^IBE(351.73,IBCL,1,0)) D
122 . S $P(^IBE(351.73,IBCL,0),"^",2)=1
123 . W !,?3,"No more valid assignments on file for this clerk. Changing the 'Productivity Report Only' flag to Yes."
124 Q
125 ;
126EXIT ; - Exit routine
127 I IBCL L -^IBE(351.73,IBCL)
128 K IBPRONLY,IBQUIT,IBCL,IBASNUM,IBNEWASN,IBASDA0,IBBCAT,IBMBAL,IBSUP
129 K IBFOTP,IBASDA1,IBASDA2,IBLBY,IBAS,IBJOB,IBASDAT,IBASNNUM,IBSNF,IBSNL
130 K IBSN,IBFPDATA,IBTPDATA,IBSDEF,IBTDEF,IBOFF,IBBTYP,IBCATDA0,IBDA0
131 K IBRTDEF
132 K DIE,DA,DIR,DR,DUOUT,DTOUT,Y,X,DIK,DINUM,DLAYGO,DIC
133 Q
Note: See TracBrowser for help on using the repository browser.