source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBUCEN1.m@ 1733

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

initial load of FOIAVistA 6/30/08 version

File size: 4.3 KB
Line 
1FBUCEN1 ;ALBISC/TET - UNAUTH CLAIM ENTER (CONT'D.) ;10/29/01
2 ;;3.5;FEE BASIS;**27**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4EN(FBZ,FBDA) ;entry point from fbucen: check if group, and any in group dispositioned
5 ; if any are, ask if claim being entered should be dispostioned
6 ; disposition new claim to what user selects
7 ;INPUT: FBZ = zero node of unauth claim
8 ; FBDA = ien of unauth claim
9 N DA,DIE,DIRUT,DR,DTOUT,DUOUT,FBALL,FBC,FBD,FBDIRA,FBGCT,FBDISPO,FBGROUP,FBI,FBLOCK,FBOUT,Y ;fbc=flag to determine if u/c dispo'd (1=yes)
10 I $S('+$G(FBDA):1,$G(FBZ)']"":1,1:0) Q
11 S (FBOUT,FBALL)=0
12 D GROUP^FBUCUTL7(FBZ,FBDA) S FBGCT=+$P(FBGROUP,U,5) Q:'FBGCT D
13 .;VARIABLE: fbdispo(ien disposition)= u/c ien ^ disposition name
14 .N FBD,FBI,FBO S FBI=0
15 .F S FBI=$O(FBGROUP(FBI)) Q:'FBI S FBO=$G(FBGROUP(FBI)),FBD=+$P(FBO,U,4) I FBD S FBDISPO(FBD)=FBI_U_$P($$PTR^FBUCUTL("^FB(162.91,",FBD),U)
16 S FBC=$S(+$P(FBZ,U,11):+$P(FBZ,U,11),1:0) I FBC,FBGCT=1 Q
17 I FBC D Q:'FBGCT
18 .I '$$UPOK^FBUCUTL(FBDA) F FBD=2,3,5 I $D(FBDISPO(FBD)) K FBDISPO(FBD) S FBGCT=FBGCT-1
19 .Q:'FBGCT
20 .W:FBGCT>1 *7,!,"The disposition for the selected claim is ",$P($G(FBDISPO(FBC)),U,2) K FBDISPO(FBC) S FBGCT=FBGCT-1
21 Q:'FBGCT
22 W !!,"At least one other claim in this group has been dispositioned."
23 W !!,"The existing disposition(s) in the group follow:",! D
24 .N FBI S FBI=0 F S FBI=$O(FBDISPO(FBI)) Q:'FBI W !?10,$P($G(FBDISPO(FBI)),U,2)
25 ;if u/c not dipo'd, ask to disp/otherwise ask to change dispo
26 ;if group>1 & not dispo'd, don't change prompt/if group>1 & dispo'd add to another/if group=1 add to |dispo|
27 S FBDIRA=$S('FBC:"Would you like this claim to be dispositioned",1:"Would you like to change the disposition"),FBDIRA=FBDIRA_$S(FBGCT>1&('FBC):"",FBGCT>1&(FBC):" to another",1:" to ")
28 S:FBGCT=1 FBDIRA=FBDIRA_$P($$PTR^FBUCUTL("^FB(162.91,",+$O(FBDISPO(0))),U),FBD=+$O(FBDISPO(0))
29 D READ^FBUCUTL7(FBDIRA,.FBOUT) Q:FBOUT!('+$G(FBALL))
30GETDISP I FBGCT>1 S DIC("S")="I $D(FBDISPO(+Y))",DIC="^FB(162.91,",DIC(0)="AEMQZ" D ^DIC K DIC Q:$D(DTOUT)!($D(DUOUT)) G:+Y'>0 GETDISP S FBD=+Y
31 S FBI=0,FBI=+$O(FBDISPO(+$G(FBD),0)) I FBI D
32 .N FBDR,FBZ1 S FBZ1=$G(^FB583(FBI,0)) Q:FBZ1']""!('+$P(FBZ1,U,13)) S FBDR="10////^S X=FBD;12///^S X=$P(FBZ1,U,13);13///^S X=$P(FBZ1,U,14);14"
33 .D DIE^FBUCUTL2("^FB583(",FBDA,FBDR)
34 ;Check Vendor field
35 I $P($G(^FB583(FBDA,0)),U,3)="" W !,"Vendor information is required for disposition.",!,"The claim cannot be dispositioned." Q
36 ;Check PTC and force to fill it out
37 I $$PTC(FBDA)=1 W !,"The claim cannot be dispositioned." Q
38 ;
39 S DA=FBDA,DIE="^FB583(",DR="10////^S X=FBD" D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FB583(DA)
40 Q
41 ;
42 ;checks and force to input PTYPE codes
43 ; returns
44 ; 0 - if OK
45 ; non-zero if no info or not linked, etc
46 ; FBMCL-master claim,FBSCL-secondary claim
47PTC(FBSCL) ;
48 N FBMCL S FBMCL=$P($G(^FB583(FBSCL,0)),"^",20)
49 Q:FBMCL="" 1 ;not linked
50 N FBMPT S FBMPT=$P($G(^FB583(FBMCL,0)),U,10)
51 N FBSPT S FBSPT=$P($G(^FB583(FBSCL,0)),U,10)
52 I FBSPT'=""&(FBMPT'="") Q 0 ;PTC codes - OK
53 W !,"Patient Type Code is required to disposition the claim."
54 S DIR("A")="Do you want to specify the Patient Type Code for the claim",DIR("B")="YES",DIR(0)="Y" D ^DIR K DIR
55 Q:$D(DIRUT)!(Y=0) 1 ;user doesn't want to enter PTC
56 I FBMPT="" I $$MSTRPTC(FBMCL,.FBMPT)=1 W !!,"No Patient Type for master claim." Q 1 ;no PTYPE - quit
57 I FBSPT="" I $$SCNDPTC(FBMCL,FBSCL,FBMPT)=1 W !!,"No Patient Type for secondary claim." Q 1 ;no PTYPE - quit
58 Q 0 ;OK
59 ;
60 ;FBPT="" - allows selection of Patient type
61 ;FBPT'="" - inserts patient type FBPT
62SELPTC(FBDA,FBPT) ;selects Patient type
63 N FBLOCK
64 S DIE="^FB583(",DA=FBDA,DR="9//"
65 S:FBPT'="" DR=DR_"//^S X=FBPT"
66 D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FB583(DA)
67 Q
68 ;
69 ;master claim
70MSTRPTC(FBCLM,FBPTC) ;
71 W !,"Master claim doesn't have any Patient Type Code"
72 S DIR("A")="Do you want to enter Patient Type Code for the master claim",DIR("B")="YES",DIR(0)="Y" D ^DIR K DIR
73 Q:$D(DIRUT)!(Y=0) 1
74 D SELPTC(FBCLM,"")
75 S FBPTC=$P($G(^FB583(FBCLM,0)),U,10)
76 Q:FBPTC="" 1
77 Q 0
78 ;
79 ;secondary claim
80SCNDPTC(FBMCLM,FBCLM,FBPTC) ;
81 W !,"Master claim has Patient Type Code : ",$$GET1^DIQ(162.7,FBMCLM_",",9)
82 S DIR("A")="Do you want to use the same Patient Type for the secondary claim",DIR("B")="YES",DIR(0)="Y" D ^DIR K DIR
83 Q:$D(DIRUT) 1
84 D SELPTC(FBCLM,$S(Y=1:FBPTC,1:""))
85 Q:$P($G(^FB583(FBCLM,0)),U,10)="" 1 ;no PTYPE
86 Q 0
87 ;
88 ;
Note: See TracBrowser for help on using the repository browser.