VistA-WorldVistAEHR/r/GEN_MED_OTHER-GMV/GMVDS2.m

27 lines
1.1 KiB
Mathematica

GMVDS2 ;HOIFO/RM,YH,FT-VITAL SIGNS DISPLAY ;12/27/01 10:55
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; #10104 - ^XLFSTR calls (supported)
;
SETBP ; {called from GMVDS0}
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^GMVDS0 D:X="P" SETP
S GMRDAT=GDT K GDT,GDATE
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^GMVCHAR(Y,.GMRVARY,GMR(X))
Q