Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRVCAQU

GMRVCAQU.m

Go to the documentation of this file.
GMRVCAQU ;HIRMFO/YH-DISPLAY CATEGORY/QUALIFIER/SYNONYM TABLE FOR VITAL TYPE ;4/30/97
 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
EN1 ;DISPLAY QUALIFIER/SYNONYM TABLE FOR EACH VITAL TYPE
DEV S %ZIS="Q" D ^%ZIS K %ZIS G:POP Q1  I $E(IOST)="P",'$D(IO("Q")),'$D(IO("S")) D ^%ZISC W !,?3,"PRINTED REPORTS MUST BE QUEUED!!",$C(7) G DEV
 I $D(IO("Q")) S ZTIO=ION,ZTDESC="Vital Categry/Qualifier/Synonym Table",ZTRTN="START^GMRVCAQU" D ^%ZTLOAD K IO("Q"),ZTSK,ZTIO Q
START ;
 S (GMROUT,GMRPG)=0 U IO D HDR F GMRVIT(1)="BLOOD PRESSURE","PULSE","RESPIRATION","TEMPERATURE","WEIGHT","CIRCUMFERENCE/GIRTH","HEIGHT","PULSE OXIMETRY" Q:GMROUT  D
 . S GMRVIT=$O(^GMRD(120.51,"B",GMRVIT(1),0)) Q:GMRVIT'>0!GMROUT  D
 . . S GMRVITY=$P(^GMRD(120.51,GMRVIT,0),"^",2) Q:GMRVITY=""!GMROUT  S GLVL=8 D LISTQ^GMRVQUAL Q:GMROUT  D OTHERQ D CLEAR
Q1 K GMRVIT,GMRVITY,GLVL,GMROUT,GMRPG D CLEAR
 S:$D(ZTQUEUED) ZTREQ="@" D ^%ZISC
 Q
HDR ;
 Q:$G(GSFILE)>0  I $E(IOST)'="P",GMRPG>0 W "Press return to continue ""^"" to escape " R X:DTIME I X="^"!'$T S GMROUT=1 Q
 W @IOF S GMRPG=GMRPG+1
 W !,"Vitals/Measurements Category/Qualifier/Synonym Table",?65,"Page ",GMRPG,!,$$RJ^XLFSTR(" ",75,"-")
 W:GMRPG>1 !,GLABEL,!,GLABEL(1)
 Q
CLEAR ;
 K GCHART1,GQUAL,GMRVDFLT,GORDER,GLABEL,GFLAG,GMAX,GMIN,GMRLAST,GMRINF,GCAT,GCHA,GCHART,GCOL,GDA,GENTR,GTXT,GBLNK,GCOUNT,GLN,GMRENTR,GMRVODR,GSIDE,GTYPE,GDASH
 Q
OTHERQ ;
 Q:'$D(GCHART)&('$D(GCHART1))  S GCOL=1,GFLAG=0,$P(GLABEL," ",80)="",$P(GBLNK," ",80)="",$P(GLABEL(1)," ",80)="",$P(GDASH,"-",20)=""
 S (GMAX,GMAX(1))=0 F  S GMAX(1)=$O(GCOUNT(GMAX(1))) Q:GMAX(1)'>0  S GMAX(2)="" F  S GMAX(2)=$O(GCOUNT(GMAX(1),GMAX(2))) Q:GMAX(2)=""  I GCOUNT(GMAX(1),GMAX(2))>GMAX S GMAX=GCOUNT(GMAX(1),GMAX(2))
 Q:+$G(GMAX)=0  F I=1:1:GMAX S $P(GTXT(I)," ",80)=""
 S GMRVODR=0 F  S GMRVODR=$O(GCOUNT(GMRVODR)) Q:GMRVODR'>0  S GCAT=$O(GCOUNT(GMRVODR,"")) Q:GCAT=""  D
 . S GCOL=$S(GMRVODR=1:1,GMRVODR=2:18,GMRVODR=3:39,GMRVODR=4:58,1:70)
 . I GMRVODR=2,GMRVIT(1)="PULSE" S GCOL=28
 . I GMRVODR=2,GMRVIT(1)="RESPIRATION" S GCOL=32
 . S GLABEL=$S(GMRVODR=1:$E(GCAT_GBLNK,1,80),1:$E($E(GLABEL,1,GCOL)_GCAT_GBLNK,1,80))
 . S GCAT(1)=$E(GDASH,1,$L(GCAT))
 . S GLABEL(1)=$S(GMRVODR=1:$E(GCAT(1)_GBLNK,1,80),1:$E($E(GLABEL(1),1,GCOL)_GCAT(1)_GBLNK,1,80))
 . S I=0,GCHA="" F  S GCHA=$O(GQUAL(GMRVODR,GCHA)) Q:GCHA=""  D
 . . S GSYNO(1)=$O(^GMRD(120.52,"B",GCHA,0)) Q:GSYNO(1)'>0  S GSYNO=$P($G(^GMRD(120.52,GSYNO(1),0)),"^",2)
 . . S I=I+1,GTXT(I)=$S(GMRVODR=1:$E(GCHA_": "_GSYNO_GBLNK,1,80),1:$E($E(GTXT(I),1,GCOL)_GCHA_": "_GSYNO_GBLNK,1,80))
 W !!,"Qualifiers for "_GMRVIT(1)_": ",!!,GLABEL,!,GLABEL(1)
 F I=1:1:GMAX D:IOSL<($Y+6) HDR Q:GMROUT  W !,GTXT(I)
 Q
GETSYN(GSYNON,GCHA) ;EXTRACT SYNONYM
 ;I $D(GSYNON(GCHA)) S GSYNON=GSYNON(GCHA) Q
 ;I GCHA["-" S GCHA=$P(GCHA,"-")_" "_$P(GCHA,"-",2)
 ;I $L(GCHA," ")<2 S GSYNON=$E(GCHA)_$$LOW^XLFSTR($E(GCHA,2,3)) Q
 ;N GLEN,I S GLEN=$L(GCHA," ") F I=1:1:GLEN S GSYNON=GSYNON_$S($E($P(GCHA," ",I))'="(":$E($P(GCHA," ",I)),1:"")
 ;Q