GMRVXCHT ;HIRMFO/RM-CONVERSION TABLE FOR QUALIFIERS ;7/22/96
;;4.0;Vitals/Measurements;;Apr 25, 1997
BLDTABL ; THIS PROCEDURE WILL CREATE THE CONVERSION TABLE IN THE ^TMP($J
; ARRAY.
; Output Variables:
; ^TMP($J,"GMRVCHAR",CHAR)=VP
; ^TMP($J,"GMRVCHAR",CHAR,TYPE)=CATEGORY
; ^TMP($J,"GMRVCAT",CATEGORY,TYPE)=^MAX^^PORD^EORD^DEFCH
; where CHAR=Qualifier name (free text)
; TYPE=Vital Type (ptr to 120.51 file)
; VP=Variable ptr address of this qualifier in
; pre-converted system, i.e., 1;GMRD(120.52,
; CATEGORY=Category of Qualifier (free text)
; MAX=Maximum Entries (numeric)
; PORD=Print Order (numeric)
; EORD=Edit Order (numeric)
; DEFCH=Default Qualifier (free text)
;
N GMRVFILE,GMRVCAT,GMRVCHAR,GMRVLINE,GMRVP,GMRVPTR,GMRVTXT,GMRVTYP
F GMRVTXT=1:1 S GMRVLINE=$P($T(CHRTABL+GMRVTXT),";;",2) Q:GMRVLINE="" D
. S GMRVTYP=$P(GMRVLINE,";",2) Q:GMRVTYP=""
. S GMRVTYP=$O(^GMRD(120.51,"B",GMRVTYP,"")) Q:GMRVTYP'>0
. S GMRVCHAR=$P(GMRVLINE,";")
. Q:GMRVCHAR=""
. S GMRVP="" F GMRVFILE=120.52,120.53 D Q:+GMRVP
. . S GMRVPTR=$O(^GMRD(GMRVFILE,"B",GMRVCHAR,"")) Q:GMRVPTR'>0
. . S GMRVP=GMRVPTR_";GMRD("_GMRVFILE_","
. . Q
. S ^TMP($J,"GMRVCHAR",GMRVCHAR)=GMRVP
. S ^TMP($J,"GMRVCHAR",GMRVCHAR,GMRVTYP)=$P(GMRVLINE,";",3)
. Q
F GMRVTXT=1:1 S GMRVLINE=$P($T(CATTABL+GMRVTXT),";;",2) Q:GMRVLINE="" D
. S GMRVCAT=$P(GMRVLINE,";") Q:GMRVCAT=""
. S GMRVTYP=$P(GMRVLINE,";",2) Q:GMRVTYP=""
. S GMRVTYP=$O(^GMRD(120.51,"B",GMRVTYP,"")) Q:GMRVTYP'>0
. S ^TMP($J,"GMRVCAT",GMRVCAT,GMRVTYP)=$P(GMRVLINE,";",3)
. Q
Q
CHRTABL ;;CHACTERISTIC;TYPE;CATEGORY
;;L ARM;BLOOD PRESSURE;LOCATION
;;L LEG;BLOOD PRESSURE;LOCATION
;;R ARM;BLOOD PRESSURE;LOCATION
;;R LEG;BLOOD PRESSURE;LOCATION
;;LYING;BLOOD PRESSURE;POSITION
;;SITTING;BLOOD PRESSURE;POSITION
;;STANDING;BLOOD PRESSURE;POSITION
;;APICAL;PULSE;LOCATION
;;BILATERAL PERIPHERALS;PULSE;LOCATION
;;CAROTID;PULSE;LOCATION
;;OTHER;PULSE;LOCATION
;;PERIPHERAL;PULSE;LOCATION
;;RADIAL;PULSE;LOCATION
;;ASSISTED VENTILATOR;RESPIRATION;METHOD
;;CONTROLLED VENTILATOR;RESPIRATION;METHOD
;;SPONTANEOUS;RESPIRATION;METHOD
;;AXILLARY;TEMPERATURE;LOCATION
;;CORE;TEMPERATURE;LOCATION
;;ORAL;TEMPERATURE;LOCATION
;;RECTAL;TEMPERATURE;LOCATION
;;SKIN;TEMPERATURE;LOCATION
;;TYMPANIC;TEMPERATURE;LOCATION
;;ACTUAL;WEIGHT;QUALITY
;;DRY;WEIGHT;QUALITY
;;ESTIMATED;WEIGHT;QUALITY
Q
CATTABL ;;CATEGORY;TYPE;^MAX^^PRINT ORDER^EDIT ORDER^DEFAULT CHAR.
;;LOCATION;BLOOD PRESSURE;^1^^1^1
;;LOCATION;PULSE;^1^^2^1^RADIAL
;;LOCATION;TEMPERATURE;^1^^1^1^ORAL
;;METHOD;RESPIRATION;^1^^1^1^SPONTANEOUS
;;POSITION;BLOOD PRESSURE;^1^^2^2
;;QUALITY;WEIGHT;^1^^1^1^ACTUAL
Q
GMRVXCHT ;HIRMFO/RM-CONVERSION TABLE FOR QUALIFIERS ;7/22/96
+1 ;;4.0;Vitals/Measurements;;Apr 25, 1997
BLDTABL ; THIS PROCEDURE WILL CREATE THE CONVERSION TABLE IN THE ^TMP($J
+1 ; ARRAY.
+2 ; Output Variables:
+3 ; ^TMP($J,"GMRVCHAR",CHAR)=VP
+4 ; ^TMP($J,"GMRVCHAR",CHAR,TYPE)=CATEGORY
+5 ; ^TMP($J,"GMRVCAT",CATEGORY,TYPE)=^MAX^^PORD^EORD^DEFCH
+6 ; where CHAR=Qualifier name (free text)
+7 ; TYPE=Vital Type (ptr to 120.51 file)
+8 ; VP=Variable ptr address of this qualifier in
+9 ; pre-converted system, i.e., 1;GMRD(120.52,
+10 ; CATEGORY=Category of Qualifier (free text)
+11 ; MAX=Maximum Entries (numeric)
+12 ; PORD=Print Order (numeric)
+13 ; EORD=Edit Order (numeric)
+14 ; DEFCH=Default Qualifier (free text)
+15 ;
+16 NEW GMRVFILE,GMRVCAT,GMRVCHAR,GMRVLINE,GMRVP,GMRVPTR,GMRVTXT,GMRVTYP
+17 FOR GMRVTXT=1:1
SET GMRVLINE=$PIECE($TEXT(CHRTABL+GMRVTXT),";;",2)
IF GMRVLINE=""
QUIT
Begin DoDot:1
+18 SET GMRVTYP=$PIECE(GMRVLINE,";",2)
IF GMRVTYP=""
QUIT
+19 SET GMRVTYP=$ORDER(^GMRD(120.51,"B",GMRVTYP,""))
IF GMRVTYP'>0
QUIT
+20 SET GMRVCHAR=$PIECE(GMRVLINE,";")
+21 IF GMRVCHAR=""
QUIT
+22 SET GMRVP=""
FOR GMRVFILE=120.52,120.53
Begin DoDot:2
+23 SET GMRVPTR=$ORDER(^GMRD(GMRVFILE,"B",GMRVCHAR,""))
IF GMRVPTR'>0
QUIT
+24 SET GMRVP=GMRVPTR_";GMRD("_GMRVFILE_","
+25 QUIT
End DoDot:2
IF +GMRVP
QUIT
+26 SET ^TMP($JOB,"GMRVCHAR",GMRVCHAR)=GMRVP
+27 SET ^TMP($JOB,"GMRVCHAR",GMRVCHAR,GMRVTYP)=$PIECE(GMRVLINE,";",3)
+28 QUIT
End DoDot:1
+29 FOR GMRVTXT=1:1
SET GMRVLINE=$PIECE($TEXT(CATTABL+GMRVTXT),";;",2)
IF GMRVLINE=""
QUIT
Begin DoDot:1
+30 SET GMRVCAT=$PIECE(GMRVLINE,";")
IF GMRVCAT=""
QUIT
+31 SET GMRVTYP=$PIECE(GMRVLINE,";",2)
IF GMRVTYP=""
QUIT
+32 SET GMRVTYP=$ORDER(^GMRD(120.51,"B",GMRVTYP,""))
IF GMRVTYP'>0
QUIT
+33 SET ^TMP($JOB,"GMRVCAT",GMRVCAT,GMRVTYP)=$PIECE(GMRVLINE,";",3)
+34 QUIT
End DoDot:1
+35 QUIT
CHRTABL ;;CHACTERISTIC;TYPE;CATEGORY
+1 ;;L ARM;BLOOD PRESSURE;LOCATION
+2 ;;L LEG;BLOOD PRESSURE;LOCATION
+3 ;;R ARM;BLOOD PRESSURE;LOCATION
+4 ;;R LEG;BLOOD PRESSURE;LOCATION
+5 ;;LYING;BLOOD PRESSURE;POSITION
+6 ;;SITTING;BLOOD PRESSURE;POSITION
+7 ;;STANDING;BLOOD PRESSURE;POSITION
+8 ;;APICAL;PULSE;LOCATION
+9 ;;BILATERAL PERIPHERALS;PULSE;LOCATION
+10 ;;CAROTID;PULSE;LOCATION
+11 ;;OTHER;PULSE;LOCATION
+12 ;;PERIPHERAL;PULSE;LOCATION
+13 ;;RADIAL;PULSE;LOCATION
+14 ;;ASSISTED VENTILATOR;RESPIRATION;METHOD
+15 ;;CONTROLLED VENTILATOR;RESPIRATION;METHOD
+16 ;;SPONTANEOUS;RESPIRATION;METHOD
+17 ;;AXILLARY;TEMPERATURE;LOCATION
+18 ;;CORE;TEMPERATURE;LOCATION
+19 ;;ORAL;TEMPERATURE;LOCATION
+20 ;;RECTAL;TEMPERATURE;LOCATION
+21 ;;SKIN;TEMPERATURE;LOCATION
+22 ;;TYMPANIC;TEMPERATURE;LOCATION
+23 ;;ACTUAL;WEIGHT;QUALITY
+24 ;;DRY;WEIGHT;QUALITY
+25 ;;ESTIMATED;WEIGHT;QUALITY
+26 QUIT
CATTABL ;;CATEGORY;TYPE;^MAX^^PRINT ORDER^EDIT ORDER^DEFAULT CHAR.
+1 ;;LOCATION;BLOOD PRESSURE;^1^^1^1
+2 ;;LOCATION;PULSE;^1^^2^1^RADIAL
+3 ;;LOCATION;TEMPERATURE;^1^^1^1^ORAL
+4 ;;METHOD;RESPIRATION;^1^^1^1^SPONTANEOUS
+5 ;;POSITION;BLOOD PRESSURE;^1^^2^2
+6 ;;QUALITY;WEIGHT;^1^^1^1^ACTUAL
+7 QUIT