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

FBUTL8.m

Go to the documentation of this file.
  1. FBUTL8 ;DSS/BPD - FEE BASIS UTILITY FOR PROVIDER INFORMATION ;5/11/2011
  1. ;;3.5;FEE BASIS;**122,133**;JAN 30, 1995;Build 5
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. RPROV(FBPROV,FBPROVD) ; Prompt for line item rendering providers
  1. ;
  1. ; Input
  1. ; FBPROV - required, array passed by reference
  1. ; will be initialized (killed)
  1. ; array of any entered line item rendering providers
  1. ; format
  1. ; FBPROV(#)=NAME^NPI^TAXONOMY
  1. ; FBPROVD- optional, array passed by reference
  1. ; same format as FBPROV
  1. ; if passed, it will be used to supply default values
  1. ; normally only used when editing an existing payment
  1. ; Result (value of $$ADJ extrinsic function)
  1. ; FBRET - boulean value (0 or 1)
  1. ; = 1 when valid line item rendering providers entered
  1. ; = 0 when processed ended due to time-out or entry of '^'
  1. ; Output
  1. ; FBPROV - the FBPROV input array passed by reference will be modified
  1. ; if the result = 1 then it will contain entered line item rendering providers
  1. ; if the result = 0 then it will be undefined
  1. ;
  1. N FBADJR,FBCAS,FBCNT,FBEDIT,FBERR,FBI,FBNEW,FBRET
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. S FBRET=1,FBEDIT=0
  1. S FBNOOUT=$G(FBNOOUT,0)
  1. K FBPROV
  1. ;
  1. ; if existing LI Rendering Provider exist then load them into array
  1. I $D(FBPROVD) M FBPROV=FBPROVD
  1. S (FBCNT,FBCAS)=0
  1. I $D(FBPROV) S FBI=0 F S FBI=$O(FBPROV(FBI)) Q:'FBI D
  1. . S FBCNT=FBCNT+1
  1. ;
  1. ASKRPROV ; multiply prompt for rendering providers
  1. ;
  1. ; display current list of Rendering Providers
  1. I FBCNT>0 D
  1. . W !!,"Current list of Line Item Rendering Providers: "
  1. . I '$O(FBPROV(0)) W "none"
  1. . S FBI=0 F S FBI=$O(FBPROV(FBI)) Q:'FBI D
  1. . . W !?3,"Line Item: "_FBI
  1. . . W ?25,"Rendering Provider Name: "_$P(FBPROV(FBI),U)
  1. . . W !?3,"Rendering Provider NPI: "_$P(FBPROV(FBI),U,2)
  1. . . W ?45,"Taxonomy Code: "_$P(FBPROV(FBI),U,3)
  1. ;
  1. ; prompt for Line Item Rendering Provider
  1. N FBI,FBPROVR
  1. S DIR(0)="162.579,.01",DIR("A")="Enter LINE ITEM NUMBER"
  1. S DIR("?",1)="Please enter the Rendering Provider information for a specific line item."
  1. S DIR("?",2)="This information is only required if the line item transaction has a different Rendering Provider than the claim."
  1. D ^DIR K DIR I $D(DTOUT)!($D(DUOUT))!(Y="") G EXIT
  1. S FBI=+Y I Y'=0,$G(FBPROV(+Y))'="" S FBEDIT=1
  1. I 'FBEDIT S FBPROV(FBI)=""
  1. S DIR(0)="162.579,.02" I FBEDIT=1,$D(FBPROV(FBI)) S DIR("B")=$P(FBPROV(FBI),U)
  1. S DIR("A")="LINE ITEM RENDERING PROV NAME",DIR("?",1)="Enter the Rendering Provider's Name for the specified line item,"
  1. S DIR("?",2)="if different than the claim level Rendering Provider" D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT
  1. I X="@" D DEL(FBI)
  1. S $P(FBPROV(FBI),U)=Y
  1. S DIR(0)="162.579,.03" I FBEDIT=1,$D(FBPROV(FBI)) S DIR("B")=$P(FBPROV(FBI),U,2)
  1. S DIR("A")="LINE ITEM RENDERING PROV NPI",DIR("?",1)="Enter the Rendering Provider's NPI for the specified line item."
  1. S DIR("?",2)="if different than the claim level Rendering Provider" D ^DIR K DIR I $D(DTOUT)!($D(DIOUT)) G EXIT
  1. S $P(FBPROV(FBI),U,2)=Y
  1. S DIR(0)="162.579,.04",DIR("A")="LINE ITEM RENDERING PROV TAXONOMY CODE" I FBEDIT=1,$D(FBPROV(FBI)) S DIR("B")=$P(FBPROV(FBI),U,3)
  1. S DIR("?",1)="Enter the Rendering Provider's Name for the specified line item,"
  1. S DIR("?",2)="if different than the claim level Rendering Provider" D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT
  1. S $P(FBPROV(FBI),U,3)=Y
  1. S DIR(0)="Y",DIR("B")="NO",DIR("A")="ENTER ANOTHER LINE ITEM RENDERING PROVIDER"
  1. S DIR("?")="Do you need to enter another Line Item level Rendering Provider?",DIR("?",1)="Answering yes will prompt you for more information or allow"
  1. S DIR("?",2)="you to modify an entered record." D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT
  1. I FBPROV(FBI)="" K FBPROV(FBI)
  1. G:Y ASKRPROV G:'Y EXIT
  1. ;
  1. EXIT Q FBRET
  1. ;
  1. DEL(FBI) ; delete Rendering Provider from list
  1. K FBPROV(FBI)
  1. W " (provider deleted)"
  1. Q
  1. ;
  1. ;FBUTL2
  1. FILERP(FBIENS,FBPROV) ; Routine to file Rendering Provider information to 162.5
  1. ;
  1. ; Input
  1. ; IENS - Required - DA_"," for the record to save the Rendering Provider information to
  1. ; FBPROV - Required - Passed by reference array that contains the information to save
  1. ;
  1. ; Output
  1. ; Data in File 162.5 will be modified
  1. ;
  1. N FB,FBFDA,FBI
  1. ;
  1. ; delete line item rendering providers currently on file
  1. D GETS^DIQ(162.5,FBIENS,"79*","","FB")
  1. K FBFDA
  1. S FBSIENS="" F S FBSIENS=$O(FB(162.579,FBSIENS)) Q:FBSIENS="" D
  1. .S FBFDA(162.579,FBSIENS,.01)="@"
  1. I $D(FBFDA) D FILE^DIE("","FBFDA")
  1. ;
  1. ; file line item rendering providers from input array
  1. K FBFDA
  1. S FBI=0 F S FBI=$O(FBPROV(FBI)) Q:'FBI D
  1. .S FBFDA(162.579,"+"_FBI_","_FBIENS,.01)=FBI
  1. .S FBFDA(162.579,"+"_FBI_","_FBIENS,.02)=$P(FBPROV(FBI),U)
  1. .S FBFDA(162.579,"+"_FBI_","_FBIENS,.03)=$P(FBPROV(FBI),U,2)
  1. .S FBFDA(162.579,"+"_FBI_","_FBIENS,.04)=$P(FBPROV(FBI),U,3)
  1. I $D(FBFDA) D UPDATE^DIE("","FBFDA")
  1. ;
  1. Q
  1. LOADRP(FBIENS,FBPROV) ; Load Line Item Rendering Providers
  1. ; Input
  1. ; FBIENS - required, internal entry numbers for subfile 162.5
  1. ; in standard format as specified for FileMan DBS calls
  1. ; FBPROV - required, array passed by reference
  1. ; array to load line item rendering providers into
  1. ; Output
  1. ; FBPROV - the FBPROV input array passed by reference will be modified
  1. ; format
  1. ; FBPROV(#)=IEN^NAME^NPI^TAXONOMY
  1. ; if no line item rendering providers are on file then the array will be undefined
  1. N FB,FBC,FBSIENS
  1. ;
  1. K FBPROV
  1. ;
  1. S FBC=0
  1. D GETS^DIQ(162.5,FBIENS,"79*","I","FB")
  1. S FBSIENS="" F S FBSIENS=$O(FB(162.579,FBSIENS)) Q:FBSIENS="" D
  1. . S FBC=FB(162.579,FBSIENS,.01,"I")
  1. . S FBPROV(FBC)=FB(162.579,FBSIENS,.02,"I")
  1. . S $P(FBPROV(FBC),U,2)=FB(162.579,FBSIENS,.03,"I")
  1. . S $P(FBPROV(FBC),U,3)=FB(162.579,FBSIENS,.04,"I")
  1. ;
  1. Q