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

APCLRAD.m

Go to the documentation of this file.
  1. APCLRAD ; IHS/CMI/LAB - ADMISSIONS 30 DAYS AFTER A DISCHARGE ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;
  1. START ;
  1. I '$G(DUZ(2)) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",!! Q
  1. S APCLJOB=$J,APCLBTH=$H
  1. D INFORM
  1. ;
  1. GETDATES ;
  1. BD ;get beginning date
  1. W ! S DIR(0)="D^:DT:EP",DIR("A")="Enter beginning Visit Date for Report" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G XIT
  1. S APCLBD=Y
  1. ED ;get ending date
  1. W ! S DIR(0)="DA^"_APCLBD_":DT:EP",DIR("A")="Enter ending Visit Date for Report: " S Y=APCLBD D DD^%DT S Y="" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G BD
  1. S APCLED=Y
  1. S X1=APCLBD,X2=-1 D C^%DTC S APCLSD=X
  1. ;
  1. LOC ;
  1. S DIR(0)="S^O:ONE FACILITY ONLY;A:ANY FACILITY",DIR("A")="Include admissions to ",DIR("B")="O" K DA D ^DIR K DIR
  1. G:$D(DIRUT) BD
  1. I Y="A" S APCLLOC="" G ZIS
  1. LOC1 ;enter location
  1. S DIC("A")="Which Location: ",DIC="^AUTTLOC(",DIC(0)="AEMQ" D ^DIC K DIC,DA G:Y<0 LOC
  1. S APCLLOC=+Y
  1. ZIS ;call to XBDBQUE
  1. DEMO ;
  1. D DEMOCHK^APCLUTL(.APCLDEMO)
  1. I APCLDEMO=-1 G LOC
  1. S XBRP="^APCLRADP",XBRC="^APCLRAD1",XBRX="XIT^APCLRAD",XBNS="APCL"
  1. D ^XBDBQUE
  1. D XIT
  1. Q
  1. XIT ;
  1. K APCL3D,APCLBD,APCLBT,APCLBTH,APCLDFN,APCLED,APCLFAC,APCLFRST,APCLFVD,APCLIVD,APCLJOB,APCLLOC,APCLP,APCLPG,APCLQUIT,APCLSD,APCLV,APCLVDFN,APCLVREC
  1. D KILL^AUPNPAT
  1. Q
  1. INFORM ;
  1. W:$D(IOF) @IOF
  1. W !!,"ADMISSIONS WITHIN n DAYS of A DISCHARGE"
  1. W !!,"This report will display patients who have had an admission within",!," 30 number of days of a discharge.",!
  1. W !,"The user will decide whether to include admissions to any facility",!,"or to only one facility. For example, if a patient was admitted to the local"
  1. W !,"facility and within 30 days was admitted to a contract facility, and if",!,"you choose to included all facilities in the report, this admission",!,"will be included in the report.",!
  1. Q
  1. ;