GMRYINTK ;HIRMFO/YH-PATIENT INTAKE ;11/6/96
;;4.0;Intake/Output;;Apr 25, 1997
INTAKE ;EDIT OR DELETE INPUT RECORD
S GX(1)=+GX I GMRDEL="@" S %=1 W !!,"Are you sure you want to delete this record" D YN^DICN S:%<0 GMROUT=1 W:%=0 !!,"Enter N(o) if you do not want to delete this record or '^' to quit.",! G:%=0 INTAKE D:%=1 KILLRC K % Q
S Y=+GX X ^DD("DD") W ! D:GNI>GMRYITM ITEM W !,"Enter "_GLABEL_" dated "_Y W !,?5,"Unit ml is not required.",!
I GNI>GMRYITM S DR="1///^S X=GLABEL;3;7///^S X=""`""_GHLOC;6///^S X=""`""_DUZ;",DR(2,126.13)=".01;I $P(^GMRD(126.8,+X,0),""^"")'[""OTHER"" S Y=""@1"";2;@1;1"
E S DR="1///^S X=GLABEL;7///^S X=""`""_GHLOC;6///^S X=""`""_DUZ;4;8;"
S GEDIT=1,GMRYTYP=GTP,DIE="^GMR(126,"_DA(1)_",""IN""," D WAIT^GMRYUT0 I GMROUT K DIE,DR Q
D ^DIE L -^GMR(126,DFN) K DIE,DR S:'$D(^GMR(126,DA(1),GNANS,DA,0)) GMROUT=1 I GMROUT Q
S DA(2)=DA(1),DA(1)=DA I $D(^GMR(126,DA(2),"IN",DA(1),1)) D EN3^GMRYUT2
S DA=DA(1),DA(1)=DA(2)
I $P(^GMR(126,DA(1),GNANS,DA,0),"^",5)="" D KILLRC Q
W !!,?5,"Total "_GLABEL_" intake for this time: ",$P(^GMR(126,DA(1),GNANS,DA,0),"^",5)_" mls" Q
;
KILLRC S DIK="^GMR(126,"_DA(1)_","""_GNANS_"""," D ^DIK K DIK S Y=+GX X ^DD("DD") W !!,GLABEL_" Entered on "_$P(Y,":",1,2)," has been deleted!!!",! Q
;
ITEM W !,"You may select the following items:",! S (GTM,GTM(1))=0 F S GTM=$O(^GMRD(126.8,"C",GTP,GTM)) Q:GTM'>0!GMROUT W:$D(^GMRD(126.8,+GTM,0)) ?5,$P(^(0),"^"),?20,$P(^(0),"^",2),?25,"mls",! S GTM(1)=GTM(1)+1 I (GTM(1)#18)=0 D W !
.W "Return to continue " S GTM(2)="" R GTM(2):DTIME S:'$T!(GTM(2)["^") GMROUT=1
K GTM S GMROUT=0 Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRYINTK 1618 printed Dec 13, 2024@01:55:28 Page 2
GMRYINTK ;HIRMFO/YH-PATIENT INTAKE ;11/6/96
+1 ;;4.0;Intake/Output;;Apr 25, 1997
INTAKE ;EDIT OR DELETE INPUT RECORD
+1 SET GX(1)=+GX
IF GMRDEL="@"
SET %=1
WRITE !!,"Are you sure you want to delete this record"
DO YN^DICN
if %<0
SET GMROUT=1
if %=0
WRITE !!,"Enter N(o) if you do not want to delete this record or '^' to quit.",!
if %=0
GOTO INTAKE
if %=1
DO KILLRC
KILL %
QUIT
+2 SET Y=+GX
XECUTE ^DD("DD")
WRITE !
if GNI>GMRYITM
DO ITEM
WRITE !,"Enter "_GLABEL_" dated "_Y
WRITE !,?5,"Unit ml is not required.",!
+3 IF GNI>GMRYITM
SET DR="1///^S X=GLABEL;3;7///^S X=""`""_GHLOC;6///^S X=""`""_DUZ;"
SET DR(2,126.13)=".01;I $P(^GMRD(126.8,+X,0),""^"")'[""OTHER"" S Y=""@1"";2;@1;1"
+4 IF '$TEST
SET DR="1///^S X=GLABEL;7///^S X=""`""_GHLOC;6///^S X=""`""_DUZ;4;8;"
+5 SET GEDIT=1
SET GMRYTYP=GTP
SET DIE="^GMR(126,"_DA(1)_",""IN"","
DO WAIT^GMRYUT0
IF GMROUT
KILL DIE,DR
QUIT
+6 DO ^DIE
LOCK -^GMR(126,DFN)
KILL DIE,DR
if '$DATA(^GMR(126,DA(1),GNANS,DA,0))
SET GMROUT=1
IF GMROUT
QUIT
+7 SET DA(2)=DA(1)
SET DA(1)=DA
IF $DATA(^GMR(126,DA(2),"IN",DA(1),1))
DO EN3^GMRYUT2
+8 SET DA=DA(1)
SET DA(1)=DA(2)
+9 IF $PIECE(^GMR(126,DA(1),GNANS,DA,0),"^",5)=""
DO KILLRC
QUIT
+10 WRITE !!,?5,"Total "_GLABEL_" intake for this time: ",$PIECE(^GMR(126,DA(1),GNANS,DA,0),"^",5)_" mls"
QUIT
+11 ;
KILLRC SET DIK="^GMR(126,"_DA(1)_","""_GNANS_""","
DO ^DIK
KILL DIK
SET Y=+GX
XECUTE ^DD("DD")
WRITE !!,GLABEL_" Entered on "_$PIECE(Y,":",1,2)," has been deleted!!!",!
QUIT
+1 ;
ITEM WRITE !,"You may select the following items:",!
SET (GTM,GTM(1))=0
FOR
SET GTM=$ORDER(^GMRD(126.8,"C",GTP,GTM))
if GTM'>0!GMROUT
QUIT
if $DATA(^GMRD(126.8,+GTM,0))
WRITE ?5,$PIECE(^(0),"^"),?20,$PIECE(^(0),"^",2),?25,"mls",!
SET GTM(1)=GTM(1)+1
IF (GTM(1)#18)=0
Begin DoDot:1
+1 WRITE "Return to continue "
SET GTM(2)=""
READ GTM(2):DTIME
if '$TEST!(GTM(2)["^")
SET GMROUT=1
End DoDot:1
WRITE !
+2 KILL GTM
SET GMROUT=0
QUIT