GMRVDS2 ;HIRMFO/RM,YH-VITAL SIGNS DISPLAY ;3/9/99
;;4.0;Vitals/Measurements;**11**;Apr 25, 1997
PRNT ;
S GMRI=0 F S GMRI=$O(GMRLIN(GMRI)) Q:GMRI'>0 D WRT2^GMRVDS1:$D(GLOC)&(IOSL<($Y+6)) W ! F GMRJ=1:1:5 S GMRSP=$S(GMRJ'=1:7+((GMRJ-2)*16),1:0) D
.I GMRI=1 W ?GMRSP,$P(GMRLIN(GMRI),"^",GMRJ)
.E D
..I GMRJ=1 W:'$D(GLIN($P(GMRLIN(GMRI),"^"))) ?GMRSP,$P(GMRLIN(GMRI),"^") S:'$D(GLIN($P(GMRLIN(GMRI),"^"))) GLIN($P(GMRLIN(GMRI),"^"))=""
..E W ?GMRSP,$P(GMRLIN(GMRI),"^",GMRJ)
Q
SETBP ;
S GDT=GMRDAT,GDATE=GMRDAT+.00000014
F S GMRDAT=$O(^GMR(120.5,"AA",DFN,GMR(X),GMRDAT)) Q:GMRDAT'>0!(GMRDAT>GDATE) S Y=0 F S Y=$O(^GMR(120.5,"AA",DFN,GMR(X),GMRDAT,Y)) Q:Y'>0 I '$D(^GMR(120.5,+Y,2)) D:X="BP" SETNODE^GMRVDS0 D:X="P" SETP
S GMRDAT=GDT K GDT,GDATE Q
STOP ;
W !,"Return to continue " K X R X:DTIME I '$T!(X["^") S GMROUT=1
W @IOF Q
SETP ;dISPLAY MULTIPLE PULSE
S GMRL=$S($D(^GMR(120.5,Y,0)):^(0),1:"")
N GG S GG=$P(GMRL,"^",8),OK=0 D Q:'OK
. I "REFUSEDPASSUNAVAILABLE"[$$UP^XLFSTR(GG) Q
. I '$D(^GMR(120.5,Y,5,"B")) S OK=1 Q
. I $D(^GMR(120.5,Y,5,"B",GAPICAL)) S OK=1 Q
. I $D(^GMR(120.5,Y,5,"B",GBRACHI)) S OK=1 Q
. I $D(^GMR(120.5,Y,5,"B",GRADIAL)) S OK=1
S GMRL1=$P(GMRL,"^") ;adding trailing zeros to time if necessary
S $P(GMRL1,".",2)=$P(GMRL1,".",2)_"0000"
S $P(GMRL1,".",2)=$E($P(GMRL1,".",2),1,4)
S $P(GMRL,"^")=GMRL1
K GMRL1
I GMRL'="" S GMRDATA(X,$P(GMRL,"^"),Y)=$P(GMRL,"^",8),GMRDATS=1 I $P($G(^GMR(120.5,Y,5,0)),"^",4)>0 D CHAR^GMRVCHAR(Y,.GMRVARY,GMR(X))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVDS2 1530 printed Dec 13, 2024@01:56:11 Page 2
GMRVDS2 ;HIRMFO/RM,YH-VITAL SIGNS DISPLAY ;3/9/99
+1 ;;4.0;Vitals/Measurements;**11**;Apr 25, 1997
PRNT ;
+1 SET GMRI=0
FOR
SET GMRI=$ORDER(GMRLIN(GMRI))
if GMRI'>0
QUIT
if $DATA(GLOC)&(IOSL<($Y+6))
DO WRT2^GMRVDS1
WRITE !
FOR GMRJ=1:1:5
SET GMRSP=$SELECT(GMRJ'=1:7+((GMRJ-2)*16),1:0)
Begin DoDot:1
+2 IF GMRI=1
WRITE ?GMRSP,$PIECE(GMRLIN(GMRI),"^",GMRJ)
+3 IF '$TEST
Begin DoDot:2
+4 IF GMRJ=1
if '$DATA(GLIN($PIECE(GMRLIN(GMRI),"^")))
WRITE ?GMRSP,$PIECE(GMRLIN(GMRI),"^")
if '$DATA(GLIN($PIECE(GMRLIN(GMRI),"^")))
SET GLIN($PIECE(GMRLIN(GMRI),"^"))=""
+5 IF '$TEST
WRITE ?GMRSP,$PIECE(GMRLIN(GMRI),"^",GMRJ)
End DoDot:2
End DoDot:1
+6 QUIT
SETBP ;
+1 SET GDT=GMRDAT
SET GDATE=GMRDAT+.00000014
+2 FOR
SET GMRDAT=$ORDER(^GMR(120.5,"AA",DFN,GMR(X),GMRDAT))
if GMRDAT'>0!(GMRDAT>GDATE)
QUIT
SET Y=0
FOR
SET Y=$ORDER(^GMR(120.5,"AA",DFN,GMR(X),GMRDAT,Y))
if Y'>0
QUIT
IF '$DATA(^GMR(120.5,+Y,2))
if X="BP"
DO SETNODE^GMRVDS0
if X="P"
DO SETP
+3 SET GMRDAT=GDT
KILL GDT,GDATE
QUIT
STOP ;
+1 WRITE !,"Return to continue "
KILL X
READ X:DTIME
IF '$TEST!(X["^")
SET GMROUT=1
+2 WRITE @IOF
QUIT
SETP ;dISPLAY MULTIPLE PULSE
+1 SET GMRL=$SELECT($DATA(^GMR(120.5,Y,0)):^(0),1:"")
+2 NEW GG
SET GG=$PIECE(GMRL,"^",8)
SET OK=0
Begin DoDot:1
+3 IF "REFUSEDPASSUNAVAILABLE"[$$UP^XLFSTR(GG)
QUIT
+4 IF '$DATA(^GMR(120.5,Y,5,"B"))
SET OK=1
QUIT
+5 IF $DATA(^GMR(120.5,Y,5,"B",GAPICAL))
SET OK=1
QUIT
+6 IF $DATA(^GMR(120.5,Y,5,"B",GBRACHI))
SET OK=1
QUIT
+7 IF $DATA(^GMR(120.5,Y,5,"B",GRADIAL))
SET OK=1
End DoDot:1
if 'OK
QUIT
+8 ;adding trailing zeros to time if necessary
SET GMRL1=$PIECE(GMRL,"^")
+9 SET $PIECE(GMRL1,".",2)=$PIECE(GMRL1,".",2)_"0000"
+10 SET $PIECE(GMRL1,".",2)=$EXTRACT($PIECE(GMRL1,".",2),1,4)
+11 SET $PIECE(GMRL,"^")=GMRL1
+12 KILL GMRL1
+13 IF GMRL'=""
SET GMRDATA(X,$PIECE(GMRL,"^"),Y)=$PIECE(GMRL,"^",8)
SET GMRDATS=1
IF $PIECE($GET(^GMR(120.5,Y,5,0)),"^",4)>0
DO CHAR^GMRVCHAR(Y,.GMRVARY,GMR(X))
+14 QUIT