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

ACHSVDV2.m

Go to the documentation of this file.
ACHSVDV2 ; IHS/ITSC/TPF/PMF - YTD PAID VENDOR INFO BY FY ; 
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**15**;JUN 11, 2001
 ;ACHS*3.1*15;IHS.OIT.FCJ MODIFIED FORMAT FOR DISPLAYING RATE AND CONTRACT NUMBER NEW LENGTH
 ;
 N ACHSIEN
 S ACHSIEN=$O(^ACHSVPMT(DUZ(2),1,"B",ACHSPROV,0))
 I 'ACHSIEN W !!,"None on file." Q
 I '$D(^ACHSVPMT(DUZ(2),1,ACHSIEN,1,0)) W !!,"None on file." Q
 ;
 W !!,"FISCAL YEAR",?16,"A M O U N T",?30,"LAST PMT DATE",!!
 F ACHS=0:0 S ACHS=$O(^ACHSVPMT(DUZ(2),1,ACHSIEN,1,ACHS)) Q:'ACHS  W ?2,ACHS,?14,"$",$J($FN($P(^(ACHS,0),U,2),",",2),12),?30,$$FMTE^XLFDT($P(^(0),U,3)),!
 Q
 ;
AGRDSP ;EP
 G:'$D(^AUTTVNDR(ACHSPROV,18,"AGR",ACHSAGTP)) AGRNEW
 D HDR
 S R="",ACHSI=0
 K ACHSAGRL
AGRDSP1 ;
 S R=$O(^AUTTVNDR(ACHSPROV,18,"AGR",ACHSAGTP,R))
 G AGRDSPZ:+R=0
A2A ;
 S ACHSI=ACHSI+1,ACHSAGRL(ACHSI)=R
 ;ACHS*3.1*15 IHS.OIT.FCJ REWROTE DISPLAY OF RATE #
 ;W !,$J(ACHSI,2),?3,ACHSAGTP,?14,$E($P(^AUTTVNDR(ACHSPROV,18,R,0),U,1),1,2),$S(ACHSAGTP="BPA":"-A-",ACHSAGTP="PA":"-PA-",ACHSAGTP="RQ":"-R-",1:"")
 W !,$J(ACHSI,2),?3,ACHSAGTP
 I $L($P(^AUTTVNDR(ACHSPROV,18,R,0),U,1))>6 W ?8,$P(^(0),U) G A2C
 E  W ?8,$E($P(^AUTTVNDR(ACHSPROV,18,R,0),U,1),1,2),$S(ACHSAGTP="BPA":"-A-",ACHSAGTP="PA":"-PA-",ACHSAGTP="RQ":"-R-",1:"")
 S X=$E($P(^AUTTVNDR(ACHSPROV,18,R,0),U,1),3,6)
 I ACHSAGTP="PA" W $E(X,2,4) G A2C
 W $E(X,1,4)
A2C ;
 W ?27,$$MDY($P(^AUTTVNDR(ACHSPROV,18,R,0),U,8)),?36,$$MDY($P(^AUTTVNDR(ACHSPROV,18,R,0),U,9))
 S X=$P(^AUTTVNDR(ACHSPROV,18,R,0),U,4)
 I X="",($P(^AUTTVNDR(ACHSPROV,18,R,0),U,2)="") G A2D
 S Y=$S(X="Y":"YES",X="N":" NO",1:"   ")
 I Y="   ",($P(^AUTTVNDR(ACHSPROV,18,R,0),U,2)="") G A2D
 S Y=Y_"  INP: "
 S:$P(^AUTTVNDR(ACHSPROV,18,R,0),U,2)'="" Y=Y_$P(^(0),U,2)
 W ?45,Y,!
A2D ;
 S X=$P(^AUTTVNDR(ACHSPROV,18,R,0),U,5)
 I X="",($P(^AUTTVNDR(ACHSPROV,18,R,0),U,3)="") G A2E
 S Y=$S(X="Y":"YES",X="N":" NO",1:"   ")
 I Y="   ",($P(^AUTTVNDR(ACHSPROV,18,R,0),U,3)="") G A2E
 S Y=Y_"  OUT: "
 S:$P(^AUTTVNDR(ACHSPROV,18,R,0),U,3)'="" Y=Y_$P(^(0),U,3)
 W ?45,Y,!
A2E ;
 W:$P(^AUTTVNDR(ACHSPROV,18,R,0),U,7)'="" ?49,"PRO: ",$P(^(0),U,7),!
 G AGRDSP1
 ;
AGRDSPZ ;
 Q:$D(ACHSRQFL)!$D(ACHSPAFL)!$D(ACHSBPFL)
AGRSEL ;
 S DA=""
 S Y=$$DIR^XBDIR("NO^1:"_ACHSI,"Enter # to Edit","","","","",2)
 Q:$D(DUOUT)!$D(DTOUT)
 I Y="" G AGRNEW
 S DA=ACHSAGRL(+Y)
 Q
 ;
AGRNEW ;ADD NEW AGREEMENT INFORMATION HERE
 Q:'$D(^XUSEC("ACHSZMGR",DUZ))
 S Y=$$DIR^XBDIR("Y","Want to enter a new Vendor "_$S(ACHSAGTP="RQ":"RATE QUOTATION",ACHSAGTP="PA":"PROVIDER AGREEMENT",ACHSAGTP="BPA":"BLANKET PURCHASE AGREEMENT",1:" "),"N","","","",2)
 Q:$D(DTOUT)!$D(DUOUT)
 I 'Y S DA="" W @IOF Q
 S:'$D(^AUTTVNDR(ACHSPROV,18,0)) ^AUTTVNDR(ACHSPROV,18,0)=$$ZEROTH^ACHS(9999999.11,1801)
 S DIC="^AUTTVNDR("_ACHSPROV_",18,",DIC(0)="QAZEML",DA(1)=ACHSPROV,DIC("W")="W ""    "",$P(^(0),U,10)"
 D ^DIC
 Q:+Y<1
 S DA(1)=ACHSPROV,DA=+Y
 W !
 K DIE,DR
 S DIE("NO^")="",DIE=DIC,DR=".11///^S X=ACHSAGTP;.02;.04;.03;.05;.07;.06;.08;.09"
 D ^DIE
 K DIE
 D AGRDSP
 Q
 ;
HDR ;
 W !!," #",?3,"Type",?14,"Number",?27,"Eff-Date",?36,"Exp-Date",?45,"MCR",?49,"Description",!?3,"----",?8,"------------------",?27,"--------",?36,"--------",?45,"---",?49,"----------------------------"
 Q
 ;
MDY(X) ;
 Q $E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
 ;