source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLPO0.m@ 1604

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1GMRVLPO0 ;HIRMFO/YH-DOT MATRIX OXIMETRY/RESP. GRAPH - DATA ARRAY ;5/25/99 10:58
2 ;;4.0;Vitals/Measurements;**1,11**;Apr 25, 1997
3EN1 ;ENTRY POINT FROM GMRVSR0 TO PRINT PO2/RESP. GRAPH FOR LINE PRINTER
4 S GMROUT=0 K ^TMP($J,"GMRVG"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GTNM")
5 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
6 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
7 F GTYPE="PO2","R","P" D SETT^GMRVHPO0
8 F GMRK="PO2","R","P" D GMRDT
9 K GMRVD F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D PULSE
10 F GMRDT=0:0 S GMRDT=$O(GMRVD(GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
11 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
12 U IO D GRAPH
13Q1 K Z,GSOL,GIVDT,GMRHLOC,GMRVJ,GDATA,GDT,GEN,GEND1,GI,GJ,GK,GMRVX,GSTART1,GTNM,GTYP,GTYPE,GX,I,GMRVD D KVAR^VADPT K VA,VAROOT
14 K GMRRMBD,GAGE,GCNT,GDOB,GCNTB,GCNTD,GCNTP,GCNTR,GCNTT,GCNTT1,GCNTI,GCNTO,GDT1,GCNTPD,GCNTTD,GCNTW,GPG,GPGS,GTYPE1,GCNTB3,GDTA,XDT,XIO,XX,^TMP($J,"GMRK"),^TMP($J,"GMR"),^TMP($J,"GDT"),^TMP($J,"GMRVG")
15 K GLPRNTR,GMRESP,GMRPO2,GMRR,GMRRHI,GMRRLO,GMRROFF,GMRY,GP,GR,GMRQUAL,GLINE,^TMP($J,"GTNM") Q
16GRAPH ;
17 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
18 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
19 S GMRPG=$S(GMRTNM=0:1,1:GMRTNM\10+$S(GMRTNM#10>0:1,1:0)) F GMRPGS=1:1:GMRPG S GMRPO2=105.666,GMRPO2(1)=100,GMRESP=45.666,GMRESP(1)=40,GMRY=9 D PAGE Q:GMROUT ;PO2 AND RESPIRATION VALUES WHEN $Y=1
20 Q
21PAGE ;
22 K GMRQUAL W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
23 I '$D(^TMP($J,"GMRVG")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMRVLPO2 Q
24 W ! D DATES^GMRVVS2 W !," Pulse Ox. Resp.",?17,"|",?18,GMRX
25 F GMRI=0:0 Q:$Y>61 W ! D SETHD^GMRVLPO1 W ?8,GMRHDR10,?16,$S(GMR3:"-",1:" "),?17,"|" D DATAPRT^GMRVLPO1
26 W !,?17,"|",GMRX2 F GMRI="R","PO2","OX1","OX2","OX3","P","P1" S GMRLINE(GMRI)=GMRX1
27 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>10 F GMRI="PO2","R","P" D:$D(^TMP($J,"GMRVG",GMRI,GMRDT)) STLNP^GMRVLPO2
28 F GMRI="R","PO2","OX1","OX2","OX3","P","P1" D
29 .S G=$S(GMRI="R":"Respiration",GMRI="PO2":"Pulse Ox.",GMRI="OX1":" L/Min",GMRI="OX2":" %",GMRI="OX3":" Method",GMRI="P":"Pulse",1:"")
30 . W !,G,?17,"|",GMRLINE(GMRI)
31 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
32 W !,"R: Respiration POx: Pulse Oximetry * - Abnormal value ** - Abnormal value off of graph"
33 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMRVLGQU F I=1:1:5 W !,GLINE(I)
34 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
35 D FOOTER^GMRVLPO2 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
36 K GG,GI,GMRVJ,GSYNO Q
37GMRDT S GMRTNM(GMRK)=0 F GMRI=0:0 S GMRI=$O(^TMP($J,"GMRVG",GMRK,GMRI)) Q:GMRI'>0 S GMRJ="" F X=0:0 S GMRJ=$O(^TMP($J,"GMRVG",GMRK,GMRI,GMRJ)) Q:GMRJ="" S GMRTNM(GMRK)=GMRTNM(GMRK)+1 S:GMRK'="XI1" ^TMP($J,"GMRDT",GMRI)=""
38 Q
39PULSE ; Process Apical, Brachial, and Radial Pulses
40 N GMRP,GMRVPS,GMRVPO,GMRVR
41 S GMRP=$O(^TMP($J,"GMRVG","P",GMRDT,"")) Q:GMRP=""
42 S GMRVPS=$P($G(^TMP($J,"GMRVG","P",GMRDT,GMRP)),"^",1)
43 I GMRVPS'["APICAL",(GMRVPS'["RADIAL"),(GMRVPS'["BRACHIAL") S GMRVD(GMRDT)=""
44 S GMRVPO=$O(^TMP($J,"GMRVG","PO2",GMRDT,""))
45 S GMRVR=$O(^TMP($J,"GMRVG","R",GMRDT,""))
46 I GMRVPO="",(GMRVR="") Q
47 K GMRVD(GMRDT)
48 Q
Note: See TracBrowser for help on using the repository browser.