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

BMCRR5.m

Go to the documentation of this file.
  1. BMCRR5 ; IHS/PHXAO/TMJ - patients without medical and/or cost data;
  1. ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
  1. ;IHS/ITSC/FCJ ADDED VAR ;ADDED REQUEST TO SORT BY ALPHA
  1. ;
  1. START ;
  1. W:$D(IOF) @IOF
  1. W !,"This report will list patients who are currently under treatment at outside ",!,"referral facilities. The definition of those under treatment at outside"
  1. W !,"facilities is the following:"
  1. W !?5,"- the referral is an Inpatient referral"
  1. W !?5,"- the beginning date of service is today or earlier and the expected",!?7,"end date of service is on or after today's date of " W $$FMTE^XLFDT(DT)
  1. W !?5,"- the status of the referral is active",!,?5,"- Inhouse Referrals are excluded",!
  1. W !,"This transfer log will contain a 1-2 page detailed summary record display",!,"for each referral.",!
  1. ;
  1. ;
  1. SORT ;sort by?
  1. S BMCSTYPE=""
  1. S DIR(0)="S^F:Facility Referred to;C:Case Manager;P:Patient Name",DIR("A")="Sort output by which of the above",DIR("B")="F" K DA D ^DIR K DIR
  1. I $D(DIRUT) G XIT
  1. S BMCSTYPE=Y
  1. S BMCSTYPA=""
  1. I BMCSTYPE'="P" D G:$D(DIRUT) SORT
  1. .S DIR(0)="Y",DIR("A")="Would you like entries listed alphabetically by patient name",DIR("B")="Y" K DA D ^DIR K DIR
  1. .Q:$D(DIRUT)
  1. .S BMCSTYPA=Y
  1. ;
  1. PAGE ;separate page for each
  1. S BMCSPAGE=""
  1. S DIR(0)="Y",DIR("A")="Do you want each "_$S(BMCSTYPE="C":"Case Manager",BMCSTYPE="P":"Patient",BMCSTYPE="F":"Facility")_" on a separate page",DIR("B")="N" K DA D ^DIR K DIR
  1. I $D(DIRUT) G SORT
  1. S BMCSPAGE=Y
  1. SECREF ;PRINT SEC REF AS A SEPARATE ENTRY
  1. S BMCTYPR=""
  1. S DIR(0)="Y",DIR("A")="Would you like to print the Secondary Referrals as Separate entries",DIR("B")="N" K DA D ^DIR K DIR
  1. Q:$D(DIRUT)
  1. S BMCTYPR=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) XIT
  1. I $G(BMCOPT)="B" D BROWSE,XIT Q
  1. S XBRP="^BMCRR5P",XBRC="^BMCRR51",XBRX="XIT^BMCRR5",XBNS="BMC"
  1. D ^XBDBQUE
  1. D XIT
  1. Q
  1. BROWSE ;
  1. S XBRP="VIEWR^XBLM(""^BMCRR5P"")"
  1. S XBRC="^BMCRR51",XBRX="XIT^BMCRR5",XBIOP=0 D ^XBDBQUE
  1. Q
  1. XIT ;EP - CALLED FROM BMCRR5
  1. D KILL^AUPNPAT
  1. K BMC1,BMC2,BMC80D,BMC80E,BMCAR,BMCBT,BMCBTH,BMCCOL,BMCCTR,BMCET,BMCFILE,BMCG,BMCH,BMCI,BMCJOB,BMCNODE,BMCOPT,BMCPG,BMCPN,BMCQUIT,BMCRCNT,BMCREF,BMCRREC,BMCSTR,BMCV,BMCVDFN,BMCVDG,BMCVFILE,BMCVI,BMCVIGR,BMCVL,BMCVNM,BMCX,BMCY
  1. K %,C,D0,DA,DFN,DI,DIC,DIQ,DIR,DIRUT,DIWF,DIWL,DIWR,DR,DTOUT,F,I,X,Y,Z
  1. K BMCD,BMCHRN,BMCSORT,BMCP,BMCSPAGE,BMCSTYPE,BMCTST,BMC15S,BMCRNUMB,BMCTYPR
  1. Q