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

FBNHEXP.m

Go to the documentation of this file.
FBNHEXP ;AISC/CMR CNH WITH CONTRACT EXPIRING WITHIN DATE RANGE;10MAR93
 ;;3.5;FEE BASIS;;JAN 30, 1995
 ;;Per VHA Directive 10-93-142, this routine should not be modified.
 S %DT="AEX" D DATE^FBAAUTL K %DT G END:$G(FBPOP)
 W !,"This option will list nursing homes with contracts expiring between",!,$$DATX^FBAAUTL(BEGDATE)," and ",$$DATX^FBAAUTL(ENDDATE),".",!
 S DIR("A")="Are you sure you want to continue",DIR(0)="Y",DIR("B")="Yes" D ^DIR K DIR G END:$D(DIRUT)!(Y=0)
 S VAR="BEGDATE^ENDDATE",VAL=BEGDATE_"^"_ENDDATE,PGM="START^FBNHEXP" D ZIS^FBAAUTL G END:FBPOP
 ;
START S Q="",$P(Q,"=",80)="=",FBAAOUT=0 U IO W:$E(IOST,1,2)["C-" @IOF D HED
 F FBV=0:0 S FBV=$O(^FBAA(161.21,"ADR",FBV)) Q:FBV'>0!(FBAAOUT)   F FBDT=-(ENDDATE+.001):0 S FBDT=$O(^FBAA(161.21,"ADR",FBV,FBDT)) Q:FBDT=""!(FBDT>-BEGDATE)!(FBAAOUT)  F FBI=0:0 S FBI=$O(^FBAA(161.21,"ADR",FBV,FBDT,FBI)) Q:FBI'>0!(FBAAOUT)  D
 .I $Y+4>IOSL,($E(IOST,1,2)["C-") S DIR(0)="E" D ^DIR K DIR I 'Y S FBAAOUT=1 Q
 .I $Y+4>IOSL W @IOF D HED
 .W !,$$VNAME(FBV),?47,$$VID(FBV),?58,$P(^FBAA(161.21,FBI,0),"^"),?72,$$DATX^FBAAUTL($P(^(0),"^",3))
END I '$G(FBAAOUT),'$G(FBPOP),$E(IOST,1,2)="C-" W ! S DIR(0)="E",DIR("A")="Press Return to continue" D ^DIR K DIR
 K BEGDATE,ENDDATE,FBAAOUT,FBDT,FBI,FBV,Q,X,Y
 D CLOSE^FBAAUTL
 Q
HED W !?12,"CNH CONTRACTS EXPIRING BETWEEN ",$$DATX^FBAAUTL(BEGDATE)," AND ",$$DATX^FBAAUTL(ENDDATE)
 W !?12,$E(Q,1,52),!!!,"Vendor Name",?47,"Vendor ID",?58,"Contract #",?72,"Exp. Dt.",!,Q
 Q
VNAME(X) ;INPUT - VENDOR IEN
 ;OUTPUTS VENDOR NAME
 I $G(X),$D(^FBAAV(X,0)) Q $P(^(0),"^")
 Q "UNKNOWN"
 ;
VID(X) ;INPUT - VENDOR IEN
 ;OUTPUTS VENDOR ID
 I $G(X),$D(^FBAAV(X,0)) Q $P(^(0),"^",2)
 Q "UNKNOWN"