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

AMHLETPU.m

Go to the documentation of this file.
AMHLETPU  ;IHS/TUCSON/LAB - TP PLAN UTILITIES 
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
 ;
 ;
EN ;EP - called from option
 D GETPAT
 I 'DFN K DFN W !,"Bye..." Q
 D EN1
 Q
EN1 ;EP - called from protocol
 ;DFN must be equal to patient
 Q:'$G(DFN)
 Q:'$D(^DPT(DFN))
 ;get device
 S XBRP="PRINT^AMHLETPP",XBRC="COMP^AMHLETPU",XBRX="XIT^AMHLETPU",XBNS="AMH;DFN"
 D ^XBDBQUE
 D EXIT
 Q
GETPAT ;get patient
 S DFN=""
 W !
 S DIC="^AUPNPAT(",DIC(0)="AEMQ" D ^DIC K DIC
 Q:Y<0
 S (DFN,AMHPAT)=+Y
 I $G(AUPNDOD)]"" W !!?10,"***** PATIENT'S DATE OF DEATH IS ",$$FMTE^XLFDT(AUPNDOD),!! H 2
 Q
EXIT ;EP
 D TERM^VALM0
 S VALMBCK="R"
 D GATHER^AMHLETP
 S VALMCNT=AMHLINE
 D HDR^AMHLETP
 K AMHX,AMHQUIT,AMHTP,AMHNODE,AMHG,AMHDA,AMHFILE,AMHC,AMHGIEN,AMHLEC,AMHLETP,AMHLETXT,AMHPCNT,AMHPRNM,AMHTP,AMHRMETH
 K D,D0,DA,DD,DIADD,DIC,DICR,DIE,DIG,DIH,DIK,DINUM,DIR,DIRUT,DIU,DIV,DIW,DIWF,DIWL,DIWR,DIY,DLAYGO,DO,DQ,DR,DTOUT,DUOUT
 K X,Y,Z,I
 Q
COMP ;EP - called from xbdbque
 Q
XIT ;EP - clean up all variables used by display/print
 K AMHC,AMHD,AMHDA,AMHFILE,AMHGIEN,AMHLEC,AMHLETP,AMHLETXT,AMHNODE,AMHPCNT,AMHPG,AMHPRNM,AMHQUIT,AMHRMETH,AMHTP,AMHG,AMHGIEN,AMHLINE,AMHPCNT,AMHX
 K D,D0,DA,DD,DIADD,DIC,DIE,DIG,DIH,DIK,DINUM,DIR,DIRUT,DIU,DIV,DIW,DIWF,DIWL,DIWR,DIY,DLAYGO,DO,DQ,DR,DTOUT,DUOUT,I,X,Y,Z
 Q