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

BMCVURT.m

Go to the documentation of this file.
BMCVURT ; IHS/OIT/FCJ - SELECT/DISPLAY RATE QUOTATIONS ;  
 ;;4.0;REFERRED CARE INFO SYSTEM;**5**;JAN 09, 2006;Build 101
 ;BMC*4.0*5 IHS.OIT.FCJ ORIGIAL ROUTINE FR ACHSURT
 ;
A1 ;EP
 S BMCI=""
 S:'$D(BMCCTNA) BMCCTNA=0
A1A ;
 S BMCI=$O(^AUTTVNDR(BMCPROV,18,"AGR",BMCI))
 Q:BMCI=""
 S BMCJ=""
A1C ;
 S BMCJ=$O(^AUTTVNDR(BMCPROV,18,"AGR",BMCI,BMCJ))
 G A1A:BMCJ=""
 S X=$G(^AUTTVNDR(BMCPROV,18,BMCJ,0))   ;GET 'AGREEMENT/RATE/BPA NUMBER NODE
 S:'$D(BMCRT(BMCI)) BMCRT(BMCI)=0
 S BMCRT(BMCI)=BMCRT(BMCI)+1
 ;
 ;IF 'EFFECTIVE DATE' > EST. DATE OF SERVICE
 ;OR EST. DATE OF SERVICE > 'EXPIRATION DATE'
 I ($P(X,U,8)>BMCEDOS)!(BMCEDOS>$P(X,U,9)) G A1C
A1D ;
 S BMCCTNA=BMCCTNA+1
 S BMCRT(BMCCTNA)=X
 S:'$D(BMCRT(BMCI,"ACTIVE")) BMCRT(BMCI,"ACTIVE")=0
 S BMCRT(BMCI,"ACTIVE")=$G(BMCRT(BMCI,"ACTIVE"))+1
 S:'$D(BMCRT(0,"ACTIVE")) BMCRT(0,"ACTIVE")=0
 S BMCRT(0,"ACTIVE")=BMCRT(0,"ACTIVE")+1
 S BMCRT(BMCI)=$G(BMCRT(BMCI))+1
 S X=$P(BMCRT(BMCCTNA),U,6),Y=$E(X,4,5)_"-"_$E(X,6,7)_"-"_$E(X,2,3),$P(BMCRT(BMCCTNA),U,6)=Y
 S X=$P(BMCRT(BMCCTNA),U,8),Y=$E(X,4,5)_"-"_$E(X,6,7)_"-"_$E(X,2,3),$P(BMCRT(BMCCTNA),U,8)=Y
 S X=$P(BMCRT(BMCCTNA),U,9),Y=$E(X,4,5)_"-"_$E(X,6,7)_"-"_$E(X,2,3),$P(BMCRT(BMCCTNA),U,9)=Y
 S $P(BMCRT(BMCCTNA),U,11)=BMCJ
 G A1C
 ;
A2 ;EP
 I BMCCTNA=1 S BMCAGRN=1,BMCAGRP=$P(BMCRT(BMCCTNA),U,11) G A2A
 G A3:'BMCAGRN
A2A ;
 W !!,"Enter Corresponding CONTRACT, AGREEMENT OR RATE QUOTE #. "
 I BMCAGRN,$D(BMCRT(BMCAGRN)) S BMCI=BMCAGRN,BMCJ=$P(BMCRT(BMCAGRN),U,10) D NODISP W Y,"// "
 D READ^BMC
 G:(Y?1"?".E)!(Y="?") A3
 I Y="@" S (BMCAGRN,BMCAGRP)="" W "  DELETED" Q
 S Y=$E(Y)
 Q:$D(DUOUT)!$D(DTOUT)!(Y="")
 I (Y>BMCCTNA)!(Y<1) W !!,"Please enter 1 thru "_BMCCTNA_" " G A2A
 S BMCAGRN=+Y,BMCAGRP=$P(BMCRT(+Y),U,11),BMCCONP=""
 S:$P(BMCRT(+Y),U,10)="CNT" BMCCONP=BMCAGRP,BMCAGRP=""
 G A2A
 ;
A3 ;
 D HDR:'$D(BMCAHDR)
 S BMCI=C
 I BMCCTNA>C S BMCI=0
A3B ;
 S BMCI=$O(BMCRT(BMCI))
 G A2A:+BMCI=0
 S BMCJ=$P(BMCRT(BMCI),U,10)
 W !,$J(BMCI,2),?3,BMCJ
 D NODISP                    ;BPA AGREEMENT NUMBER DISPLAY
 W ?9,Y
A3C ;
 W ?20,$P(BMCRT(BMCI),U,8),?30,$P(BMCRT(BMCI),U,9)
 I BMCJ="CNT" W ?45,$P(BMCRT(BMCI),U,2),! G A3B
 S X=$P(BMCRT(BMCI),U,4)
 I X="",($P(BMCRT(BMCI),U,2)="") G A3D
 S Y=$S(X="Y":"YES",X="N":" NO",1:"   ")
 I Y="   ",$P(BMCRT(BMCI),U,2)="" G A3D
 S Y=Y_"  INP: "
 S:$P(BMCRT(BMCI),U,2)'="" Y=Y_$P(BMCRT(BMCI),U,2)
 W ?40,Y,!
A3D ;
 S X=$P(BMCRT(BMCI),U,5)
 I X=""&($P(BMCRT(BMCI),U,3)="") G A3E
 S Y=$S(X="Y":"YES",X="N":" NO",1:"   ")
 I Y="   ",$P(BMCRT(BMCI),U,3)="" G A3E
 S Y=Y_"  OUT: "
 S:$P(BMCRT(BMCI),U,3)'="" Y=Y_$P(BMCRT(BMCI),U,3)
 W ?40,Y,!
A3E ;
 W:$P(BMCRT(BMCI),U,7)'="" ?45,"PRO: ",$P(BMCRT(BMCI),U,7),!
 G A3B
 ;
EXIT ;
 K Y,X,BMCCT
 Q
 ;
HDR ;
 W !!," #",?3,"Type",?9,"Number",?20,"Eff-Date",?30,"Exp-Date",?40,"MCR",?45,"Description",!?3,"----",?9,"---------",?20,"--------",?30,"--------",?40,"---",?45,"----------------------------"
 Q
 ;
NODISP ;DISPLAY BPA AGREEMENT STUFF
 S Y=""
 I BMCJ="CNT" S Y=$P(BMCRT(BMCI),U) Q
 S Y=$E($P(BMCRT(BMCI),U),1,2)_$S(BMCJ="BPA":"-A-",BMCJ="PA":"-PA-",BMCJ="RQ":"-R-",1:"")
 S X=$E($P(BMCRT(BMCI),U),3,6)
 I BMCJ="PA" S Y=Y_$E(X,2,4) Q
 S Y=Y_$E(X,1,4)
 Q
 ;