- BMCRR12 ; IHS/PHXAO/TMJ - list patients for which medical and/or cost data has not been received ;
- ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
- ;
- ;
- ;
- START ;
- W !,"This report will display CHS Referral Costs By Requesting provider",!,"or referring facility. The report will include total number of referrals"
- W !,"total number of CHS referrals, total cost of CHS referrals, # of PCC visits,",!,"and CHS Referral Cost per 100 PCC Visits.",!
- W !,"** - canceled referrals and In-House referrals are excluded"
- W !!,"Report includes Secondary Referrals. The user will enter a date range.",!!
- D ;DATE RANGE
- BD ;get beginning date
- W ! S DIR(0)="D^::EP",DIR("A")="Enter beginning Referral Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
- I $D(DIRUT) G XIT
- S BMCBD=Y
- ED ;get ending date
- W ! S DIR(0)="D^"_BMCBD_"::EP",DIR("A")="Enter ending Referral Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
- I $D(DIRUT) G BD
- S BMCED=Y
- S X1=BMCBD,X2=-1 D C^%DTC S BMCSD=X
- ;
- PF ;run for provider or requesting facility
- 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
- G:$D(DIRUT) BD
- S BMCTYPE=Y
- COST ;
- S BMCTCOST=""
- 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
- G:$D(DIRUT) PF
- S BMCTCOST=Y
- ZIS ;call to XBDBQUE
- K BMCOPT
- 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
- I $D(DIRUT) S BMCQUIT="" Q
- S BMCOPT=Y
- G:$G(BMCQUIT) PF
- I $G(BMCOPT)="B" D BROWSE,XIT Q
- S XBRP="^BMCRR12P",XBRC="^BMCRR121",XBRX="XIT^BMCRR12",XBNS="BMC"
- D ^XBDBQUE
- D XIT
- Q
- BROWSE ;
- S XBRP="VIEWR^XBLM(""^BMCRR12P"")"
- S XBRC="^BMCRR121",XBRX="XIT^BMCRR12",XBIOP=0 D ^XBDBQUE
- Q
- XIT ;EP - CALLED FROM BMCRR12
- D KILL^AUPNPAT
- 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
- K DA,DIR,DIRUT,DTOUT,DUOUT,X,X1,X2,Y
- Q
- 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
- +2 ;
- +3 ;
- +4 ;
- START ;
- +1 WRITE !,"This report will display CHS Referral Costs By Requesting provider",!,"or referring facility. The report will include total number of referrals"
- +2 WRITE !,"total number of CHS referrals, total cost of CHS referrals, # of PCC visits,",!,"and CHS Referral Cost per 100 PCC Visits.",!
- +3 WRITE !,"** - canceled referrals and In-House referrals are excluded"
- +4 WRITE !!,"Report includes Secondary Referrals. The user will enter a date range.",!!
- D ;DATE RANGE
- BD ;get beginning date
- +1 WRITE !
- SET DIR(0)="D^::EP"
- SET DIR("A")="Enter beginning Referral Date"
- DO ^DIR
- KILL DIR
- IF $DATA(DUOUT)
- SET DIRUT=1
- +2 IF $DATA(DIRUT)
- GOTO XIT
- +3 SET BMCBD=Y
- ED ;get ending date
- +1 WRITE !
- SET DIR(0)="D^"_BMCBD_"::EP"
- SET DIR("A")="Enter ending Referral Date"
- DO ^DIR
- KILL DIR
- IF $DATA(DUOUT)
- SET DIRUT=1
- +2 IF $DATA(DIRUT)
- GOTO BD
- +3 SET BMCED=Y
- +4 SET X1=BMCBD
- SET X2=-1
- DO C^%DTC
- SET BMCSD=X
- +5 ;
- PF ;run for provider or requesting facility
- +1 WRITE !
- SET DIR(0)="S^P:Requesting Provider;F:Requesting Facility"
- SET DIR("A")="Run the report for requesting"
- SET DIR("B")="P"
- KILL DA
- DO ^DIR
- KILL DIR
- +2 IF $DATA(DIRUT)
- GOTO BD
- +3 SET BMCTYPE=Y
- COST ;
- +1 SET BMCTCOST=""
- +2 SET DIR(0)="S^A:ACTUAL CHS COST;B:BEST AVAILABLE CHS COST"
- SET DIR("A")="Which Cost Data Should be Used"
- SET DIR("B")="A"
- KILL DA
- DO ^DIR
- KILL DIR
- +3 IF $DATA(DIRUT)
- GOTO PF
- +4 SET BMCTCOST=Y
- ZIS ;call to XBDBQUE
- +1 KILL BMCOPT
- +2 WRITE !
- SET DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen"
- SET DIR("A")="Do you wish to"
- SET DIR("B")="P"
- KILL DA
- DO ^DIR
- KILL DIR
- +3 IF $DATA(DIRUT)
- SET BMCQUIT=""
- QUIT
- +4 SET BMCOPT=Y
- +5 IF $GET(BMCQUIT)
- GOTO PF
- +6 IF $GET(BMCOPT)="B"
- DO BROWSE
- DO XIT
- QUIT
- +7 SET XBRP="^BMCRR12P"
- SET XBRC="^BMCRR121"
- SET XBRX="XIT^BMCRR12"
- SET XBNS="BMC"
- +8 DO ^XBDBQUE
- +9 DO XIT
- +10 QUIT
- BROWSE ;
- +1 SET XBRP="VIEWR^XBLM(""^BMCRR12P"")"
- +2 SET XBRC="^BMCRR121"
- SET XBRX="XIT^BMCRR12"
- SET XBIOP=0
- DO ^XBDBQUE
- +3 QUIT
- XIT ;EP - CALLED FROM BMCRR12
- +1 DO KILL^AUPNPAT
- +2 KILL BMC2,BMC80D,BMC80E,BMCBD,BMCBT,BMCBTH,BMCED,BMCET,BMCJOB,BMCODAT,BMCOPT,BMCPG,BMCPN,BMCQUIT,BMCRCNT,BMCREF,BMCRREC,BMCSD,BMCSORT,BMCTYPE,BMCVDFN,BMCVREC,BMCX,BMCTCOST
- +3 KILL DA,DIR,DIRUT,DTOUT,DUOUT,X,X1,X2,Y
- +4 QUIT