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

BMCRR3.m

Go to the documentation of this file.
  1. BMCRR3 ; IHS/PHXAO/TMJ - list patients for which medical and/or cost data has not been received ;
  1. ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
  1. ;
  1. ;
  1. ;
  1. START ;
  1. W !,"This report will present a list of high cost users. The user will enter",!,"a date range and a dollar amount which will serve as the indicator of high",!,"cost. "
  1. W "All referrals incurred by a patient in that date range will be totalled.",!,"If the total cost is greater than or equal to the dollar amount entered by the",!,"user, that patient will be considered a high cost user.",!
  1. W !,"The Total Cost can be either IHS COST or TOTAL COST.",!
  1. W !,"If ACTUAL Cost is available, it will be used. If not available, estimated",!,"cost is used. Inhouse Referrals are NOT included.",!
  1. D ;DATE RANGE
  1. BD ;get beginning date
  1. W ! S DIR(0)="D^::EP",DIR("A")="Enter beginning Referral Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G XIT
  1. S BMCBD=Y
  1. ED ;get ending date
  1. W ! S DIR(0)="D^"_BMCBD_"::EP",DIR("A")="Enter ending Referral Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G BD
  1. S BMCED=Y
  1. S X1=BMCBD,X2=-1 D C^%DTC S BMCSD=X
  1. ;
  1. DOLLAR ;
  1. W ! S DIR(0)="90001,1101",DIR("A")="Enter a dollar amount that will be used to determine high cost" K DA D ^DIR K DIR
  1. I Y="" G BD
  1. I $D(DIRUT) G BD
  1. S BMCAMT=Y
  1. COST ;
  1. S BMCCOST=""
  1. S DIR(0)="S^I:BEST AVAILABLE IHS COST;T:BEST AVAILABLE TOTAL COST",DIR("A")="Use which COST in determining high cost users",DIR("B")="I" K DA D ^DIR K DIR
  1. I $D(DIRUT) G DOLLAR
  1. S BMCCOST=Y
  1. ZIS ;call to XBDBQUE
  1. K BMCOPT
  1. W ! S DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen",DIR("A")="Do you wish to",DIR("B")="P" K DA D ^DIR K DIR
  1. I $D(DIRUT) S BMCQUIT="" Q
  1. S BMCOPT=Y
  1. G:$G(BMCQUIT) COST
  1. I $G(BMCOPT)="B" D BROWSE,XIT Q
  1. S XBRP="^BMCRR3P",XBRC="^BMCRR31",XBRX="XIT^BMCRR3",XBNS="BMC"
  1. D ^XBDBQUE
  1. D XIT
  1. Q
  1. BROWSE ;
  1. S XBRP="VIEWR^XBLM(""^BMCRR3P"")"
  1. S XBRC="^BMCRR31",XBRX="XIT^BMCRR3",XBIOP=0 D ^XBDBQUE
  1. Q
  1. XIT ;EP - CALLED FROM BMCRR3
  1. D KILL^AUPNPAT
  1. K BMC11,BMC80D,BMC80E,BMCAMT,BMCBD,BMCBT,BMCBTH,BMCCOST,BMCDOLL,BMCED,BMCET,BMCHRN,BMCJOB,BMCOPT,BMCPG,BMCPN,BMCQUIT,BMCRCNT,BMCREF,BMCRREC,BMCSD
  1. K DA,DFN,DIR,DIRUT,DTOUT,DUOUT,X,X1,X2,Y
  1. Q