source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSAS0.m@ 623

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1GMRVSAS0 ;HIRMFO/RM,YH-CALCULATE ABNORMAL V/S ;09/11/96
2 ;;4.0;Vitals/Measurements;**11**;Apr 25, 1997
3EN1 ; SENT GMRVX = "T","P","R","BP","CG","PO2" AS VITAL TYPE CODE, GMRVX(0) AS VITAL
4 ; DATA. RETURN GMRVX(1)=0 IF WITHING NORMAL RANGE, 1 IF ABNORMAL
5 N GMRVSBSH,GMRVSBSL,GMRVHI,GMRVLO,GMRVADAT,GMRVBP2
6 S GMRVX(1)=0 Q:'$D(GMRVX)#2 Q:'$D(GMRVX)\2 Q:GMRVX(0)="" Q:'$D(^GMRD(120.57,1,1))
7 I "TPRBPCGPO2"']GMRVX Q
8 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)
9 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
10 I GMRVX="BP"!(GMRVX="B") S GMRVSBSH(0)=8,GMRVSBSL(0)=10
11 S GMRVADAT=^GMRD(120.57,1,1)
12 S GMRVHI=$S(GMRVSBSH>0:$P(GMRVADAT,"^",GMRVSBSH),1:0),GMRVLO=$S(GMRVSBSL>0:$P(GMRVADAT,"^",GMRVSBSL),1:0)
13 I GMRVX="PO2" S:GMRVX(0)'>GMRVLO GMRVX(1)=1 Q
14 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))
15 S GMRVX(1)=0
16 I $P(GMRVX(0),"/")'<GMRVHI!($P(GMRVX(0),"/")'>GMRVLO) S GMRVX(1)=1
17 Q:(GMRVX="BP"!(GMRVX="B"))&($G(GMRVBP2)="")
18 I (GMRVX="BP"!(GMRVX="B")),(GMRVBP2'<GMRVHI(0)!(GMRVBP2'>GMRVLO(0))) S GMRVX(1)=1
19 Q
Note: See TracBrowser for help on using the repository browser.