source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVSAS0.m@ 873

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMVSAS0 ;HIOFO/RM,YH,FT-CALCULATE ABNORMAL V/S ;11/8/01 14:36
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7EN1 ; SENT GMRVX = "T","P","R","BP","CG","PO2" AS VITAL TYPE CODE, GMRVX(0) AS VITAL
8 ; DATA. RETURN GMRVX(1)=0 IF WITHING NORMAL RANGE, 1 IF ABNORMAL
9 N GMRVSBSH,GMRVSBSL,GMRVHI,GMRVLO,GMRVADAT,GMRVBP2
10 S GMRVX(1)=0 Q:'$D(GMRVX)#2 Q:'$D(GMRVX)\2 Q:GMRVX(0)="" Q:'$D(^GMRD(120.57,1,1))
11 I "TPRBPCGPO2"']GMRVX Q
12 S GMRVSBSH=$S(GMRVX="T":1,GMRVX="P":3,GMRVX="R":5,GMRVX="CVP":11,GMRVX="B"!(GMRVX="BP"):7,1:0) Q:GMRVX'="PO2"&(GMRVSBSH'>0)
13 S GMRVSBSL=$S(GMRVX="T":2,GMRVX="P":4,GMRVX="R":6,GMRVX="CVP":12,GMRVX="PO2":13,GMRVX="B"!(GMRVX="BP"):9,1:0) Q:GMRVSBSL'>0
14 I GMRVX="BP"!(GMRVX="B") S GMRVSBSH(0)=8,GMRVSBSL(0)=10
15 S GMRVADAT=^GMRD(120.57,1,1)
16 S GMRVHI=$S(GMRVSBSH>0:$P(GMRVADAT,"^",GMRVSBSH),1:0),GMRVLO=$S(GMRVSBSL>0:$P(GMRVADAT,"^",GMRVSBSL),1:0)
17 I GMRVX="PO2" S:GMRVX(0)'>GMRVLO GMRVX(1)=1 Q
18 I GMRVX="BP"!(GMRVX="B") S GMRVHI(0)=$P(GMRVADAT,"^",GMRVSBSH(0)),GMRVLO(0)=$P(GMRVADAT,"^",GMRVSBSL(0)),GMRVBP2=$S($P(GMRVX(0),"/",3)="":$P(GMRVX(0),"/",2),1:$P(GMRVX(0),"/",3))
19 S GMRVX(1)=0
20 I $P(GMRVX(0),"/")'<GMRVHI!($P(GMRVX(0),"/")'>GMRVLO) S GMRVX(1)=1
21 Q:(GMRVX="BP"!(GMRVX="B"))&($G(GMRVBP2)="")
22 I (GMRVX="BP"!(GMRVX="B")),(GMRVBP2'<GMRVHI(0)!(GMRVBP2'>GMRVLO(0))) S GMRVX(1)=1
23 Q
Note: See TracBrowser for help on using the repository browser.