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

APCDVDP.m

Go to the documentation of this file.
APCDVDP ; IHS/CMI/LAB - PRINTS A PATIENT'S VISIT ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
 ;V 2.41
 ;
 D START
 I '$G(APCDVDSP) D EOJ Q
 D PRINT
 I POP D EOJ Q
 I $D(IO("Q")) D TSKMN,EOJ Q
 U IO
 D ^APCDVDSP
 D EOJ
 Q
 ;
START ;
 S APCDVDSP="",APCDPAT=""
 S AUPNLK("INAC")=""
 S DIC="^AUPNPAT(",DIC(0)="AEMQ" D ^DIC K DIC I Y<1 S APCXFLAG=1 Q
 S APCDPAT=+Y
 ;I '$D(^AUPNVSIT("AA",AUPNPAT)) S APCXFLAG=1 Q
 D GETVISIT^APCDDISP
 I '$G(APCDVSIT) S APCXFLAG=1 Q
 S APCDVDSP=APCDVSIT
 ;S APCDVDSP=APCXVDFN
 Q
 ;
PRINT ;
 W !! K IOP S %ZIS="PQ" K IO("Q") D ^%ZIS
 Q
 ;
TSKMN ;
 K ZTSAVE S ZTSAVE("APCDVDSP")="",ZTIO=ION,ZTRTN="ZTM^APCDVDP",ZTDTH="",ZTDESC="LAST VISIT REPORT" D ^%ZTLOAD
 Q
 ;
ZTM ;ENTRY FOR TASK MANAGER
 I $D(ZTQUEUED) S ZTREQ="@"
 U IO
 D ^APCDVDSP
 D ^%ZISC
 Q
 ;
EOJ ;ENTRY POINT
 D ^%ZISC
 K AUPNLK
 D EN^XBVK("APCD")
 K APCXLAST,APCXVDFN,AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,APCXFLAG,APCDVDSP,AUPNDAYS
 K DIC,DA,X,Y,ZTSK,ZTQUEUED
 Q