source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVLATS.m@ 1147

Last change on this file since 1147 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.1 KB
RevLine 
[613]1GMVLATS ;HOIFO/YH,FT-QUEUES LATEST VITALS/MEASUREMENTS ;12/27/01 11:08
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10104 - ^XLFSTR calls (supported)
6 ;
7SETBP ;
8 S GDT=GMRDAT,GDATE=GMRDAT+.00000014
9 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
10 S GMRDAT=GDT K GDT,GDATE
11 Q
12SETP ;
13 S GMRL=$S($D(^GMR(120.5,Y,0)):^(0),1:"")
14 N GG S GG=$P(GMRL,"^",8),OK=0 D Q:'OK
15 . I "REFUSEDPASSUNAVAILABLE"[$$UP^XLFSTR(GG) Q
16 . I '$D(^GMR(120.5,Y,5,"B")) S OK=1 Q
17 . I $D(^GMR(120.5,Y,5,"B",GAPICAL)) S OK=1 Q
18 . I $D(^GMR(120.5,Y,5,"B",GRADIAL)) S OK=1 Q
19 . I $D(^GMR(120.5,Y,5,"B",GBRACH)) S OK=1 Q
20 S GMRL1=$P(GMRL,"^") ;adding trailing zeros to time if necessary
21 S $P(GMRL1,".",2)=$P(GMRL1,".",2)_"0000"
22 S $P(GMRL1,".",2)=$E($P(GMRL1,".",2),1,4)
23 S $P(GMRL,"^")=GMRL1
24 K GMRL1
25 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))
26 Q
Note: See TracBrowser for help on using the repository browser.