source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVLPO0.m@ 730

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1GMVLPO0 ;HIOFO/YH,FT-DOT MATRIX OXIMETRY/RESP. GRAPH - DATA ARRAY ;11/6/01 15:43
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10061 - ^VADPT calls (supported)
6 ; #10104 - ^XLFSTR calls (supported)
7 ;
8EN1 ;ENTRY POINT FROM GMVSR0 TO PRINT PO2/RESP. GRAPH FOR LINE PRINTER
9 S GMROUT=0 K ^TMP($J,"GMRVG"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GTNM")
10 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
11 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
12 F GTYPE="PO2","R","P" D SETT^GMVHPO0
13 F GMRK="PO2","R","P" D GMRDT
14 K GMRVD F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 D PULSE
15 F GMRDT=0:0 S GMRDT=$O(GMRVD(GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
16 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
17 U IO D GRAPH
18Q1 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
19 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")
20 K GLPRNTR,GMRESP,GMRPO2,GMRR,GMRRHI,GMRRLO,GMRROFF,GMRY,GP,GR,GMRQUAL,GLINE,^TMP($J,"GTNM") Q
21GRAPH ;
22 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
23 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
24 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
25 Q
26PAGE ;
27 K GMRQUAL W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
28 I '$D(^TMP($J,"GMRVG")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMVLPO2 Q
29 W ! D DATES^GMVVS2 W !," Pulse Ox. Resp.",?17,"|",?18,GMRX
30 F GMRI=0:0 Q:$Y>61 W ! D SETHD^GMVLPO1 W ?8,GMRHDR10,?16,$S(GMR3:"-",1:" "),?17,"|" D DATAPRT^GMVLPO1
31 W !,?17,"|",GMRX2 F GMRI="R","PO2","OX1","OX2","OX3","P","P1" S GMRLINE(GMRI)=GMRX1
32 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^GMVLPO2
33 F GMRI="R","PO2","OX1","OX2","OX3","P","P1" D
34 .S G=$S(GMRI="R":"Respiration",GMRI="PO2":"Pulse Ox.",GMRI="OX1":" L/Min",GMRI="OX2":" %",GMRI="OX3":" Method",GMRI="P":"Pulse",1:"")
35 . W !,G,?17,"|",GMRLINE(GMRI)
36 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
37 W !,"R: Respiration POx: Pulse Oximetry * - Abnormal value ** - Abnormal value off of graph"
38 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMVLGQU F I=1:1:5 W !,GLINE(I)
39 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
40 D FOOTER^GMVLPO2 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
41 K GG,GI,GMRVJ,GSYNO Q
42GMRDT 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)=""
43 Q
44PULSE ; Process Apical, Brachial, and Radial Pulses
45 N GMRP,GMRVPS,GMRVPO,GMRVR
46 S GMRP=$O(^TMP($J,"GMRVG","P",GMRDT,"")) Q:GMRP=""
47 S GMRVPS=$P($G(^TMP($J,"GMRVG","P",GMRDT,GMRP)),"^",1)
48 I GMRVPS'["APICAL",(GMRVPS'["RADIAL"),(GMRVPS'["BRACHIAL") S GMRVD(GMRDT)=""
49 S GMRVPO=$O(^TMP($J,"GMRVG","PO2",GMRDT,""))
50 S GMRVR=$O(^TMP($J,"GMRVG","R",GMRDT,""))
51 I GMRVPO="",(GMRVR="") Q
52 K GMRVD(GMRDT)
53 Q
Note: See TracBrowser for help on using the repository browser.