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

FBUCEN.m

Go to the documentation of this file.
  1. FBUCEN ;ALBISC/TET - ENTER UNAUTHORIZED CLAIM ;10/07/2014
  1. ;;3.5;FEE BASIS;**32,61,114,153,154**;JAN 30, 1995;Build 12
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;FB*3.5*153 Insure the response to the Millenium Act 38
  1. ; U.S.C. 1725 for Y/N is set to 1/0 in field
  1. ; #31 of file 162.7.
  1. ;
  1. ;FBUC - unauthorized claims site parameter node
  1. ;FBTRACK - 1 to track incomplete claims, 0 to track complete claims only
  1. ;FBUCP - 0 to not automatically print letters, otherwise default device
  1. ;FBOK - 0 if claim is incomplete, 1 if claim is complete.
  1. ;FBACT - ENT for enter (fbact represents action type)
  1. ;FBINENT = initial entry parameter: 1 if using, 0 if not
  1. S FBOUT=0,FBUC=$$FBUC^FBUCUTL2(1),FBTRACK=+$P(FBUC,U),FBOK=$S('FBTRACK:1,1:0),FBACT="ENT",FBINENT=+$P(FBUC,U,7)
  1. GET ;get info on new claim entry
  1. K FBVEN,FBVET
  1. VET ;get vet info
  1. N DIR,DA W !! S DIR(0)="162.7,2O",DIR("A")="Select VETERAN" D ^DIR K DIR,DA G END:$D(DIRUT),VET:+Y'>0 S FBVET=+Y
  1. VEN ;get vendor info
  1. N DIR,DA S DIR(0)="162.7,1O",DIR("A")="Select FEE VENDOR" D ^DIR K DIR,DA G VET:$D(DUOUT)!($D(DTOUT)),VEN:+Y<0,VEN:+Y=0&('FBINENT) S FBVEN=+Y
  1. PROG N DIC,DA S DIC="^FBAA(161.8,",DIC(0)="AEQMZ",DIC("S")="I +$P(^(0),U,3)" D ^DIC K DIC,DA S:$D(DTOUT)!($D(DUOUT)) FBOUT=1 G END:FBOUT,GET:Y<0 S FBPR=+Y D S:FBOUT FBOUT=0 G VET
  1. .N FBDA,FBMASTER,FBORDER,FBTFROM,FBTTO,FB1725,FBFPPSC
  1. .; ask if claim is an EDI claim (patch *61)
  1. .S FBFPPSC=$$FPPSC^FBUTL5() I FBFPPSC=-1 S FBFPPSC="",FBOUT=1 Q
  1. .; ask if claim is a mill bill emergency care claim (patch *32)
  1. .S DIR(0)="Y"
  1. .S DIR("A")="Is this claim being considered under Millennium Act 38 U.S.C. 1725 (Y/N)"
  1. .D ^DIR K DIR I $D(DIRUT) S FBOUT=1 Q
  1. .S FB1725=+Y ;FB*3.5*153
  1. .D ASKDT Q:FBOUT I FBTRACK,'FBINENT D Q:FBOUT
  1. ..S DIR(0)="Y",DIR("A")="Is the unauthorized claim complete for the FEE PROGRAM" D DIRQ,^DIR K DIR S:$D(DIRUT) FBOUT=1 S:'FBOUT FBOK=Y Q:FBOUT!(FBOK)
  1. ..D REQ^FBUCPEND Q:FBOUT S FBORDER=10 ;display/select pending information,set status order to incomplete if selected pending items
  1. .;check for duplicates
  1. .I 'FBINENT W !,"Checking for potential duplicates...",! H 1 D ^FBUCDUP
  1. .W !!,"Checking eligibility...",! H 1 S DFN=FBVET D ELIG^VADPT W:VAEL(4)'=1 !,"Patient is not a veteran.",*7 D ELIG^FBAADEM K VAEL,VAERR
  1. .W ! S DIR("A")="Are you sure you wish to enter a new unauthorized claim",DIR(0)="Y" D ^DIR K DIR S:'Y!($D(DIRUT)) FBOUT=1 Q:FBOUT
  1. .;file new claim
  1. .S DIC="^FB583(",DIC(0)="Z",X=DT K DD,DO D FILE^DICN S FBOUT=$S($P(Y,U,3):0,1:1) Q:FBOUT S FBDA=+Y D PRIOR^FBUCEVT(FBDA,FBACT) D
  1. ..S FBMASTER=FBDA,FBORDER=$S(+$G(FBORDER)=10:10,'FBINENT:30,1:5)
  1. ..S DIE=DIC,DIE("NO^")="BACKOUTOK",DR="[FB UNAUTHORIZED ENTER]",DA=FBDA
  1. ..D LOCK^FBUCUTL(DIE,DA,1) S:'FBLOCK FBOUT=1 Q:FBOUT D ^DIE L -^FB583(FBDA) K DA,DIE,DQ,DR,FBLOCK I $D(Y)!($D(DTOUT)) S DIK=DIC,DA=FBDA D ^DIK K DIK W !,"... Deleting incomplete record.",*7 S FBOUT=1 Q
  1. ..I FBORDER=10 D FREQ^FBUCPEND ;file requested info
  1. ..K ^TMP("FBARY",$J),^TMP("FBAR",$J)
  1. .D AFTER^FBUCEVT(FBDA,FBACT)
  1. .K FBARY,FBLOCK Q:FBOUT D ENTER^FBUCLNK1(FBDA,FBUCA,1) K FBARY,^TMP("FBARY",$J),^TMP("FBAR",$J)
  1. .I FBORDER'=10,+$G(FBVEN)>0,+$G(FBTTO)>0 D AFTER^FBUCEVT(FBDA,FBACT),EN^FBUCEN1(FBUCA,FBDA) ;if claim complete, check if group, any in group dispositioned
  1. .;do update
  1. .D AFTER^FBUCEVT(FBDA,FBACT),UPDATE^FBUCUPD(FBUCP,FBUCPA,FBUCA,FBUCAA,FBDA,FBACT)
  1. ;
  1. END ;kill and quit
  1. K DA,DFN,DIC,DIE,DIR,DIRUT,DQ,DR,DTOUT,DUOUT,FBACT,FBARY,FBDA,FBDISP,FBINENT,FBLOCK,FBMASTER,FBOK,FBORDER,FBOUT,FBPEND,FBPI,FBPR,FBPROG
  1. K FBSTATUS,FBTFROM,FBTRACK,FBTTO,FBUC,FBUCA,FBUCP,FBUCAA,FBUCP,FBUCPA,FBVEN,FBVET,X,Y,^TMP("FBAR",$J),^TMP("FBARY",$J)
  1. Q
  1. ASKDT ;ask treatment from/to dates
  1. S DIR(0)="162.7,3" S:FBPR=6 DIR("A")="ADMISSION DATE" D ^DIR K DIR S:'+Y DIRUT="^" S:$D(DIRUT) FBOUT=1 S:'FBOUT FBTFROM=Y
  1. I 'FBOUT S DIR(0)="162.7,4O" S:FBPR=6 DIR("A")="DISCHARGE DATE" S:FBPR'=6&(FBPR'=7) DIR("B")=$$DATX^FBAAUTL(FBTFROM) D ^DIR K DIR S:$D(DUOUT)!($D(DTOUT)) FBOUT=1 I 'FBOUT,'FBINENT G:+Y'>0!(FBTFROM>Y) ASKDT S FBTTO=Y
  1. I 'FBOUT S FBTTO=+Y
  1. Q
  1. HELP ;help text for complete claim question - ??
  1. W !?10,"An unauthorized claim is considered complete (or valid)"
  1. W !?10,"if all the necessary information has been received."
  1. W !?10,"A claim can never be considered complete if it is missing"
  1. W !?10,"form 10-583 or form 10-583 is incomplete."
  1. W !?10,"Some examples of other items which are needed are:"
  1. W !?20,"Copies of actual bills",!?20,"Original paid receipt"
  1. W !?20,"Itemized invoice/UB82",!?20,"Medical records or signature for release"
  1. W !?20,"Diagnostic/Procedure code(s)",!
  1. Q
  1. DIRQ ;set dir(?,#)
  1. S DIR("?")="Enter Y(es) if complete, N(o) if incomplete."
  1. S DIR("??")="^D HELP^FBUCEN"
  1. S DIR("?",1)="Enter Y(es) if all required information has been submitted,"
  1. S DIR("?",2)=" N(o) if the claim is incomplete."
  1. S DIR("?",3)=""
  1. Q