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

FBAADEM1.m

Go to the documentation of this file.
  1. FBAADEM1 ;AISC/DMK - DISPLAY PATIENT DEMOGRAPHICS ;6/5/2009
  1. ;;3.5;FEE BASIS;**13,51,103,108,139**;JAN 30, 1995;Build 127
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. EN N FBDX,FBFDT,FBI,FBRR,FBT,FBTYPE,FBV,FBZ,PSA,FBDC
  1. S:'$D(FBPROG) FBPROG="I 1"
  1. ;
  1. S Y=$G(^FBAAA(DFN,4)) W:$P(Y,"^")]"" !,"Fee ID Card #: ",$P(Y,"^"),?40,"Fee Card Issue Date: " S Y=$P(Y,"^",2) D PDF W Y,!
  1. ;
  1. I $O(^FBAAA(DFN,1,0)) D Q:FBAAOUT
  1. . D HANG:$Y+5>IOSL Q:FBAAOUT
  1. . W !,"Patient Name: ",VADM(1),?55,"Pt.ID: ",$P(VADM(2),"^",2)
  1. . W !!,"AUTHORIZATIONS:",!
  1. . K FBAUT
  1. . S FBZ=0,FBFDT="9999999"
  1. . F S FBFDT=$O(^FBAAA(DFN,1,"B",FBFDT),-1) Q:'FBFDT D Q:FBAAOUT
  1. . . S FBI=0 F S FBI=$O(^FBAAA(DFN,1,"B",FBFDT,FBI)) Q:'FBI I $D(^FBAAA(DFN,1,FBI,0)) X FBPROG I S FBZ=FBZ+1,X=^(0) D Q:FBAAOUT
  1. . . . S Y=+X,PSA=$P(X,"^",5),FBT=$P(X,"^",13),FBV=+$P(X,"^",4) D PDF
  1. . . . W ?3,"(",FBZ,")",?7,"FR: ",Y,?25,"VENDOR: ",$S($D(^FBAAV(FBV,0)):$P(^(0),"^")_" - "_$P(^(0),"^",2),1:"Not Specified")
  1. . . . S FBDX=$G(^FBAAA(DFN,1,FBI,3))
  1. . . . W !?7,"TO: " S Y=$P(X,"^",2) D PDF W Y
  1. . . . W:$P(X,"^",22) ?25,"Contract: ",$P($G(^FBAA(161.43,$P(X,"^",22),0)),"^")
  1. . . . W !?25,"Authorization Type: " D
  1. . . . . S FBTYPE=$P(X,"^",3),FBTYPE=$S(FBTYPE=2:"Outpatient - "_$S(FBT=1:"Short Term",FBT=2:"Home Health",FBT=3:"ID Card",1:""),$D(^FBAA(161.8,+FBTYPE,0)):$P(^(0),"^"),1:"Unknown")
  1. . . . W FBTYPE W:$P(X,"^",7) !,?11,"Purpose of Visit: ",$P($G(^FBAA(161.82,$P(X,"^",7),0)),"^") I $P(X,"^",9)["FB583(" W !?25,">> Unauthorized Claim <<"
  1. . . . ; PRXM/KJH - Patch 103. Add Referring Provider and NPI to the display.
  1. . . . ; JLG-FB*3.5*139-ICD10 REMEDIATION- print proper version of diagnosis code
  1. . . . ;W !?11,"DX: ",$P(X,"^",8) W ?40,"REF: "
  1. . . . D DC W !?11,"DX: ",FBDC W ?40,"REF: "
  1. . . . I $P(X,"^",21)'="" W $$GET1^DIQ(200,$P(X,"^",21),.01)
  1. . . . W !?11,"REF NPI: ",$$REFNPI^FBCH78($P(X,"^",21)),!
  1. . . . W:$P(FBDX,"^")]"" !?15,$P(FBDX,"^")
  1. . . . W:$P(FBDX,"^",2)]"" !?15,$P(FBDX,"^",2)
  1. . . . S FBAUT($P(X,"^"))=$P(X,"^",2)
  1. . . . W !?7,"County: ",FBCOUNTY,?40,"PSA: ",$S($D(^DIC(4,+PSA,0)):$P(^(0),"^"),1:"Unknown"),!
  1. . . . S FBDEL=$G(^FBAAA(DFN,1,FBI,"ADEL")) I FBDEL]"" S Y=$P(FBDEL,"^",2) D PDF W ?12,">> DELETE MRA SENT TO AUSTIN ON - ",Y," >>",!
  1. . . . I $D(^FBAAA(DFN,1,FBI,2,0)) K ^UTILITY($J,"W") S DIWL=15,DIWR=70,DIWF="W" D HANG:$Y+6>IOSL Q:FBAAOUT W !?11,"REMARKS:" D
  1. . . . . S FBRR=0 F S FBRR=$O(^FBAAA(DFN,1,FBI,2,FBRR)) Q:'FBRR S (FBXX,X)=^(FBRR,0) D ^DIWP
  1. . . . D ^DIWW:$D(FBXX) K FBXX W !
  1. . . . K X,FBDX,FBT,FBTYPE,FBV,PSA D HANG:$Y+5>IOSL
  1. ;
  1. D HANG:$Y+5>IOSL Q:FBAAOUT
  1. ;
  1. I $O(^FBAAA(DFN,2,0))>0 D Q:FBAAOUT
  1. . W !,"VENDOR CONTACTS:"
  1. . S (FBZ,FBI)=0
  1. . F S FBI=$O(^FBAAA(DFN,2,FBI)) Q:'FBI!(FBAAOUT) S FBZ=FBZ+1,X=$G(^(FBI,0)),Y=+X D PDF D
  1. . . W !?3,"(",FBZ,")",?7,"DATE: ",Y,?25,"VENDOR: ",$P(X,"^",2),?55,"PHONE: ",$S($P(X,"^",3)]"":$P(X,"^",3),1:"Not Found")
  1. . . I $D(^FBAAA(DFN,2,FBI,1,0)) K ^UTILITY($J,"W") S DIWL=20,DIWR=70,DIWF="W" D HANG:$Y+5>IOSL Q:FBAAOUT W !?11,"NARRATIVE:",! D
  1. . . . S FBRR=0 F S FBRR=$O(^FBAAA(DFN,2,FBI,1,FBRR)) Q:'FBRR S FBXX=^(FBRR,0) D HANG:$Y+5>IOSL Q:FBAAOUT S X=FBXX D ^DIWP
  1. . . D ^DIWW:$D(FBXX) K FBXX W !
  1. Q
  1. ;
  1. DC ; JLG-FB*3.5*139-ICD10 REMEDIATION- determine diagnosis code based on authorization from date
  1. S FBDC=""
  1. N FBVERS S FBVERS=$S(FBFDT<$$IMPDATE^FBCSV1("10D"):"9",1:"10")
  1. S:FBVERS=9 FBDC=$P(X,"^",8)
  1. S:FBVERS=10 FBDC=$$ICD9^FBCSV1($P($G(^FBAAA(DFN,1,FBI,"C")),"^",2))
  1. ;per SME requirement do not print ICD-10 diagnosis code for a CIVIL HOSPITAL unauthorized claim.
  1. S:(FBVERS'=9)&($P(X,"^",3)=6)&($P(X,"^",9)["FB583(") FBDC=""
  1. K FBVERS
  1. Q
  1. ;
  1. HANG I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y FBAAOUT=1
  1. W @IOF I 'FBAAOUT W !,"Patient Name: ",VADM(1),?55,"Pt.ID: ",$P(VADM(2),"^",2),!
  1. Q
  1. ;
  1. PDF S:Y Y=$$FMTE^XLFDT(Y,5) ; TRANSLATE TO DISPLAY DATE
  1. Q