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
GMRVCAQU ;HIRMFO/YH-DISPLAY CATEGORY/QUALIFIER/SYNONYM TABLE FOR VITAL TYPE ;4/30/97
+1 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
EN1 ;DISPLAY QUALIFIER/SYNONYM TABLE FOR EACH VITAL TYPE
DEV SET %ZIS="Q"
DO ^%ZIS
KILL %ZIS
IF POP
GOTO Q1
IF $EXTRACT(IOST)="P"
IF '$DATA(IO("Q"))
IF '$DATA(IO("S"))
DO ^%ZISC
WRITE !,?3,"PRINTED REPORTS MUST BE QUEUED!!",$CHAR(7)
GOTO DEV
+1 IF $DATA(IO("Q"))
SET ZTIO=ION
SET ZTDESC="Vital Categry/Qualifier/Synonym Table"
SET ZTRTN="START^GMRVCAQU"
DO ^%ZTLOAD
KILL IO("Q"),ZTSK,ZTIO
QUIT
START ;
+1 SET (GMROUT,GMRPG)=0
USE IO
DO HDR
FOR GMRVIT(1)="BLOOD PRESSURE","PULSE","RESPIRATION","TEMPERATURE","WEIGHT","CIRCUMFERENCE/GIRTH","HEIGHT","PULSE OXIMETRY"
IF GMROUT
QUIT
Begin DoDot:1
+2 SET GMRVIT=$ORDER(^GMRD(120.51,"B",GMRVIT(1),0))
IF GMRVIT'>0!GMROUT
QUIT
Begin DoDot:2
+3 SET GMRVITY=$PIECE(^GMRD(120.51,GMRVIT,0),"^",2)
IF GMRVITY=""!GMROUT
QUIT
SET GLVL=8
DO LISTQ^GMRVQUAL
IF GMROUT
QUIT
DO OTHERQ
DO CLEAR
End DoDot:2
End DoDot:1
Q1 KILL GMRVIT,GMRVITY,GLVL,GMROUT,GMRPG
DO CLEAR
+1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
DO ^%ZISC
+2 QUIT
HDR ;
+1 IF $GET(GSFILE)>0
QUIT
IF $EXTRACT(IOST)'="P"
IF GMRPG>0
WRITE "Press return to continue ""^"" to escape "
READ X:DTIME
IF X="^"!'$TEST
SET GMROUT=1
QUIT
+2 WRITE @IOF
SET GMRPG=GMRPG+1
+3 WRITE !,"Vitals/Measurements Category/Qualifier/Synonym Table",?65,"Page ",GMRPG,!,$$RJ^XLFSTR(" ",75,"-")
+4 IF GMRPG>1
WRITE !,GLABEL,!,GLABEL(1)
+5 QUIT
CLEAR ;
+1 KILL 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
+2 QUIT
OTHERQ ;
+1 IF '$DATA(GCHART)&('$DATA(GCHART1))
QUIT
SET GCOL=1
SET GFLAG=0
SET $PIECE(GLABEL," ",80)=""
SET $PIECE(GBLNK," ",80)=""
SET $PIECE(GLABEL(1)," ",80)=""
SET $PIECE(GDASH,"-",20)=""
+2 SET (GMAX,GMAX(1))=0
FOR
SET GMAX(1)=$ORDER(GCOUNT(GMAX(1)))
IF GMAX(1)'>0
QUIT
SET GMAX(2)=""
FOR
SET GMAX(2)=$ORDER(GCOUNT(GMAX(1),GMAX(2)))
IF GMAX(2)=""
QUIT
IF GCOUNT(GMAX(1),GMAX(2))>GMAX
SET GMAX=GCOUNT(GMAX(1),GMAX(2))
+3 IF +$GET(GMAX)=0
QUIT
FOR I=1:1:GMAX
SET $PIECE(GTXT(I)," ",80)=""
+4 SET GMRVODR=0
FOR
SET GMRVODR=$ORDER(GCOUNT(GMRVODR))
IF GMRVODR'>0
QUIT
SET GCAT=$ORDER(GCOUNT(GMRVODR,""))
IF GCAT=""
QUIT
Begin DoDot:1
+5 SET GCOL=$SELECT(GMRVODR=1:1,GMRVODR=2:18,GMRVODR=3:39,GMRVODR=4:58,1:70)
+6 IF GMRVODR=2
IF GMRVIT(1)="PULSE"
SET GCOL=28
+7 IF GMRVODR=2
IF GMRVIT(1)="RESPIRATION"
SET GCOL=32
+8 SET GLABEL=$SELECT(GMRVODR=1:$EXTRACT(GCAT_GBLNK,1,80),1:$EXTRACT($EXTRACT(GLABEL,1,GCOL)_GCAT_GBLNK,1,80))
+9 SET GCAT(1)=$EXTRACT(GDASH,1,$LENGTH(GCAT))
+10 SET GLABEL(1)=$SELECT(GMRVODR=1:$EXTRACT(GCAT(1)_GBLNK,1,80),1:$EXTRACT($EXTRACT(GLABEL(1),1,GCOL)_GCAT(1)_GBLNK,1,80))
+11 SET I=0
SET GCHA=""
FOR
SET GCHA=$ORDER(GQUAL(GMRVODR,GCHA))
IF GCHA=""
QUIT
Begin DoDot:2
+12 SET GSYNO(1)=$ORDER(^GMRD(120.52,"B",GCHA,0))
IF GSYNO(1)'>0
QUIT
SET GSYNO=$PIECE($GET(^GMRD(120.52,GSYNO(1),0)),"^",2)
+13 SET I=I+1
SET GTXT(I)=$SELECT(GMRVODR=1:$EXTRACT(GCHA_": "_GSYNO_GBLNK,1,80),1:$EXTRACT($EXTRACT(GTXT(I),1,GCOL)_GCHA_": "_GSYNO_GBLNK,1,80))
End DoDot:2
End DoDot:1
+14 WRITE !!,"Qualifiers for "_GMRVIT(1)_": ",!!,GLABEL,!,GLABEL(1)
+15 FOR I=1:1:GMAX
IF IOSL<($Y+6)
DO HDR
IF GMROUT
QUIT
WRITE !,GTXT(I)
+16 QUIT
GETSYN(GSYNON,GCHA) ;EXTRACT SYNONYM
+1 ;I $D(GSYNON(GCHA)) S GSYNON=GSYNON(GCHA) Q
+2 ;I GCHA["-" S GCHA=$P(GCHA,"-")_" "_$P(GCHA,"-",2)
+3 ;I $L(GCHA," ")<2 S GSYNON=$E(GCHA)_$$LOW^XLFSTR($E(GCHA,2,3)) Q
+4 ;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:"")
+5 ;Q