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

BMCRR12.m

Go to the documentation of this file.
  1. BMCRR12 ; 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 display CHS Referral Costs By Requesting provider",!,"or referring facility. The report will include total number of referrals"
  1. W !,"total number of CHS referrals, total cost of CHS referrals, # of PCC visits,",!,"and CHS Referral Cost per 100 PCC Visits.",!
  1. W !,"** - canceled referrals and In-House referrals are excluded"
  1. W !!,"Report includes Secondary Referrals. The user will enter a date range.",!!
  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. PF ;run for provider or requesting facility
  1. W ! S DIR(0)="S^P:Requesting Provider;F:Requesting Facility",DIR("A")="Run the report for requesting",DIR("B")="P" K DA D ^DIR K DIR
  1. G:$D(DIRUT) BD
  1. S BMCTYPE=Y
  1. COST ;
  1. S BMCTCOST=""
  1. S DIR(0)="S^A:ACTUAL CHS COST;B:BEST AVAILABLE CHS COST",DIR("A")="Which Cost Data Should be Used",DIR("B")="A" K DA D ^DIR K DIR
  1. G:$D(DIRUT) PF
  1. S BMCTCOST=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) PF
  1. I $G(BMCOPT)="B" D BROWSE,XIT Q
  1. S XBRP="^BMCRR12P",XBRC="^BMCRR121",XBRX="XIT^BMCRR12",XBNS="BMC"
  1. D ^XBDBQUE
  1. D XIT
  1. Q
  1. BROWSE ;
  1. S XBRP="VIEWR^XBLM(""^BMCRR12P"")"
  1. S XBRC="^BMCRR121",XBRX="XIT^BMCRR12",XBIOP=0 D ^XBDBQUE
  1. Q
  1. XIT ;EP - CALLED FROM BMCRR12
  1. D KILL^AUPNPAT
  1. K BMC2,BMC80D,BMC80E,BMCBD,BMCBT,BMCBTH,BMCED,BMCET,BMCJOB,BMCODAT,BMCOPT,BMCPG,BMCPN,BMCQUIT,BMCRCNT,BMCREF,BMCRREC,BMCSD,BMCSORT,BMCTYPE,BMCVDFN,BMCVREC,BMCX,BMCTCOST
  1. K DA,DIR,DIRUT,DTOUT,DUOUT,X,X1,X2,Y
  1. Q