GMRYED0 ;HIRMFO/YH-INTAKE, OUTPUT AND IV ENTRY POINTS ;5/2/96
;;4.0;Intake/Output;;Apr 25, 1997
EN1 ;ENTER/EDIT IV AND IV MAINTENANCE
S GMRYOPT="LIST^GMRYED3" D EDIT
Q
EN2 ;ENTER/EDIT OUTPUT
S GMRYOPT="OUTPUT^GMRYED1" D EDIT
Q
EN3 ;ENTER/EDIT INPUT
S GMRYOPT="INPUT^GMRYED1" D EDIT
Q
EDIT K ^TMP("GMRPT",$J) S (GMRVIDT,GDR,GMROUT)=0,GSITE="" D MASPT^GMRYRP5 G:GMROUT QUIT
G:'$D(^TMP("GMRPT",$J)) QUIT
I $G(GMRVHLOC)>0 S GMRHLOC=+$G(GMRVHLOC)
E I $G(GMRWARD)>0 S GMRHLOC=+$G(^DIC(42,+GMRWARD,44))
I +$G(GMRHLOC)=0 D HOSP^GMRYRP5 S GMRHLOC=+$G(GMRVHLOC)
I '$D(^SC(GMRHLOC)) W !,GMRWARD(1)_" NOT DEFINED IN HOSPITAL LOCATION FILE",! G QUIT
S GMRRM="" F S GMRRM=$O(^TMP("GMRPT",$J,GMRRM)) Q:GMRRM=""!GMROUT S GMRNM="" F S GMRNM=$O(^TMP("GMRPT",$J,GMRRM,GMRNM)) Q:GMRNM=""!GMROUT S DFN=0 F S DFN=$O(^TMP("GMRPT",$J,GMRRM,GMRNM,DFN)) Q:DFN'>0!GMROUT S GMRNAM=^(DFN) D
. I "P"[GMREDB S DA=$$SEARCH^GMRYUT12(DFN) D:DA>0 @GMRYOPT Q
. S GMROUT(1)=0 D ASKOK Q:GMROUT I 'GMROUT(1) S DA=$$SEARCH^GMRYUT12(DFN) D:DA>0 @GMRYOPT S GMROUT=0 W !
. Q
QUIT ;
K DFN,GPORT,^TMP("GMRPT",$J),GMREDB,GMRHLOC,GMRI,GMRLEN,GMRNAM,GMRNM,GMROUT,GMRRM,GMRVIDT,GMRYOPT,GDR,GMRVHLOC,GMRVWLOC,GSITE,GMRWARD Q
ASKOK ;LOOPING THROUGH PATIENT GLOBAL
W !,GMRNAM,?$X+10,$S(GMRRM=" BLANK":" ",1:GMRRM)_"-"_$S(GMRNM="BLANK":" ",1:GMRNM_" ") S %=1 D YN^DICN I %=1!(%=-1) S:%=-1 GMROUT=1 Q
I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASKOK
ASL W !!,"Do you wish to stop looping through names?" S %=1 D YN^DICN W ! I %=1!(%=-1) S GMROUT=1 Q
I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASL
S GMROUT(1)=1
Q
GMRYED0 ;HIRMFO/YH-INTAKE, OUTPUT AND IV ENTRY POINTS ;5/2/96
+1 ;;4.0;Intake/Output;;Apr 25, 1997
EN1 ;ENTER/EDIT IV AND IV MAINTENANCE
+1 SET GMRYOPT="LIST^GMRYED3"
DO EDIT
+2 QUIT
EN2 ;ENTER/EDIT OUTPUT
+1 SET GMRYOPT="OUTPUT^GMRYED1"
DO EDIT
+2 QUIT
EN3 ;ENTER/EDIT INPUT
+1 SET GMRYOPT="INPUT^GMRYED1"
DO EDIT
+2 QUIT
EDIT KILL ^TMP("GMRPT",$JOB)
SET (GMRVIDT,GDR,GMROUT)=0
SET GSITE=""
DO MASPT^GMRYRP5
IF GMROUT
GOTO QUIT
+1 IF '$DATA(^TMP("GMRPT",$JOB))
GOTO QUIT
+2 IF $GET(GMRVHLOC)>0
SET GMRHLOC=+$GET(GMRVHLOC)
+3 IF '$TEST
IF $GET(GMRWARD)>0
SET GMRHLOC=+$GET(^DIC(42,+GMRWARD,44))
+4 IF +$GET(GMRHLOC)=0
DO HOSP^GMRYRP5
SET GMRHLOC=+$GET(GMRVHLOC)
+5 IF '$DATA(^SC(GMRHLOC))
WRITE !,GMRWARD(1)_" NOT DEFINED IN HOSPITAL LOCATION FILE",!
GOTO QUIT
+6 SET GMRRM=""
FOR
SET GMRRM=$ORDER(^TMP("GMRPT",$JOB,GMRRM))
IF GMRRM=""!GMROUT
QUIT
SET GMRNM=""
FOR
SET GMRNM=$ORDER(^TMP("GMRPT",$JOB,GMRRM,GMRNM))
IF GMRNM=""!GMROUT
QUIT
SET DFN=0
FOR
SET DFN=$ORDER(^TMP("GMRPT",$JOB,GMRRM,GMRNM,DFN))
IF DFN'>0!GMROUT
QUIT
SET GMRNAM=^(DFN)
Begin DoDot:1
+7 IF "P"[GMREDB
SET DA=$$SEARCH^GMRYUT12(DFN)
IF DA>0
DO @GMRYOPT
QUIT
+8 SET GMROUT(1)=0
DO ASKOK
IF GMROUT
QUIT
IF 'GMROUT(1)
SET DA=$$SEARCH^GMRYUT12(DFN)
IF DA>0
DO @GMRYOPT
SET GMROUT=0
WRITE !
+9 QUIT
End DoDot:1
QUIT ;
+1 KILL DFN,GPORT,^TMP("GMRPT",$JOB),GMREDB,GMRHLOC,GMRI,GMRLEN,GMRNAM,GMRNM,GMROUT,GMRRM,GMRVIDT,GMRYOPT,GDR,GMRVHLOC,GMRVWLOC,GSITE,GMRWARD
QUIT
ASKOK ;LOOPING THROUGH PATIENT GLOBAL
+1 WRITE !,GMRNAM,?$X+10,$SELECT(GMRRM=" BLANK":" ",1:GMRRM)_"-"_$SELECT(GMRNM="BLANK":" ",1:GMRNM_" ")
SET %=1
DO YN^DICN
IF %=1!(%=-1)
IF %=-1
SET GMROUT=1
QUIT
+2 IF '%
WRITE $CHAR(7),!,?4,"ANSWER 'YES' or 'NO'"
GOTO ASKOK
ASL WRITE !!,"Do you wish to stop looping through names?"
SET %=1
DO YN^DICN
WRITE !
IF %=1!(%=-1)
SET GMROUT=1
QUIT
+1 IF '%
WRITE $CHAR(7),!,?4,"ANSWER 'YES' or 'NO'"
GOTO ASL
+2 SET GMROUT(1)=1
+3 QUIT