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

AMHRDISP.m

Go to the documentation of this file.
AMHRDISP ; IHS/CMI/LAB - DISPLAY A RECORD (FILEMAN INQUIRE FORMAT) ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
 ;
 D GETDATE
 I AMHDATE="" W !!,"No Date entered!" D EOJ Q
 D GETLOC
 D GETPAT
 I $G(AMHIAMDE),AMHPAT="" W !!,"No patient selected." H 2 D EOJ Q
 D RECLKUP
 I '$G(AMHR) D EOJ Q
 D DSPLY
 D EOJ
 Q
GETDATE ; GET DATE OF ENCOUNTER
 W !
 S AMHDATE=""
 S DIR(0)="DO^:"_DT_":EPT",DIR("A")="Enter ENCOUNTER DATE" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 Q:$D(DIRUT)
 S %DT="ET" D ^%DT G:Y<0 GETDATE
 I Y>DT W "  <Future dates not allowed>",$C(7),$C(7) K X G GETDATE
 K AMHODAT
 S AMHDATE=Y
 ;
 Q
GETPAT ; GET PATIENT
 S AMHPAT=""
 S DIC("A")="Enter PATIENT (if known, otherwise press ENTER): ",DIC="^AUPNPAT(",DIC(0)="AEMQ"
 I $G(AMHIAMDE) S DIC("A")="Enter PATIENT NAME: "
 D ^DIC K DIC
 Q:Y<0
 S AMHPAT=+Y
 I '$$ALLOWP^AMHUTIL(DUZ,AMHPAT) D NALLOWP^AMHUTIL,PAUSE^AMHLEA S AMHPAT="" Q
 I $G(AUPNDOD)]"" W !!?10,"***** PATIENT'S DATE OF DEATH IS ",$$FMTE^XLFDT(AUPNDOD),!! H 2
 Q
 ;
GETLOC ;get location of encounter
 S AMHLOC=""
 S DIC("A")="Enter LOCATION OF ENCOUNTER (if known, otherwise press ENTER): ",DIC="^AUTTLOC(",DIC(0)="AEMQ" D ^DIC K DIC,DA
 Q:Y<0
 S AMHLOC=+Y
 Q
DSPLY ;
 D ^AMHDVD
 Q
 ;
RECLKUP ;
 D ^AMHRLKUP
 Q
EOJ ; END OF JOB
 K AMHPROV,AMHDATE,AMHPAT,AMHODAT,AMHR
 Q
TEXT ;
 ;;BH Data Entry Module
 ;;
 ;;************************
 ;;* Update BH Visits *
 ;;************************
 ;;
 Q
 ;