GMRVPCE0 ;HIOFO/RM,FT-Data Event Driver for Vitals ;3/7/05 10:34
;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
;
; This routine uses the following IAs:
; <None>
;
VALIDATE(GMRVDAT) ; Given the array GMRVDAT passed in by PCE Device
; Interface (by reference, i.e., D VALIDATE^GMRVPCE0(.ARRAY)), whose
; format is described in the PCE Device Interface documentation, this
; procedure will validate the Vitals data. If the data is invalid,
; the procedure will return GMRVDAT("ERROR") as described in the PCE
; Device Interface documentation.
;
Q:$D(GMRVDAT("ERROR"))
D PCE^GMRVPCE1(0)
Q
STORE(GMRVDAT) ; Given vitals data passed in the GMRVDAT array, this
; procedure will store that data in the GMRV Patient Measurements
; (120.5) file.
;
Q:$D(GMRVDAT("ERROR"))
D PCE^GMRVPCE1(1)
Q
HELP(GMRVTYP,GMRVARRY) ; This procedure will return help for a particular
; measurement type in an array.
; Input
; Variables: GMRVTYP=Type of measurement (abbreviation
; (req.) from PCE Device Interface Specification).
; GMRVARR=Closed array reference of array to return
; (opt.) help in. If this variable is not specified,
; help is returned in ^TMP($J,"GMRVHELP").
;
Q:'$$VMTYPES(GMRVTYP)
I $G(GMRVARRY)="" S GMRVARRY="^TMP($J,""GMRVHELP"")"
D HELP^GMRVPCE2(GMRVTYP,GMRVARRY)
Q
RATECHK(GMRVTYP,GMRVRATE,GMRVUNIT) ; Extrinsic function to validate the
; rate for a particular measurement
; Input
; Variables: GMRVTYP=Type of measurement (abbreviation
; (req.) from PCE Device Interface Specification).
; GMRVRATE=Measurement rate to be validated.
; (req.)
; GMRVUNIT=Unit of measurement for rate, if specified.
; (opt.)
; Function value: 1 if rate is valid.
; 0 if rate is invalid.
;
N GMRVFXN S GMRVFXN=0
I $$VMTYPES(GMRVTYP),$G(GMRVRATE)]"" D
. I $G(GMRVUNIT)]"" S GMRVRATE=$$UNITRATE^GMRVPCE3(GMRVTYP,GMRVRATE,GMRVUNIT)
. I $G(GMRVRATE)]"" S GMRVFXN=$$VALID^GMRVPCE3(GMRVTYP,GMRVRATE)
. Q
Q GMRVFXN
VMTYPES(TYPE) ; This function returns one if TYPE is a valid selection.
; from the PCE Device Interface Specification.
Q "^AUD^BP^HT^TMP^WT^FT^FH^HE^PU^RS^TON^VC^VU^PN^"[(U_TYPE_U)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVPCE0 2355 printed Dec 13, 2024@01:57:23 Page 2
GMRVPCE0 ;HIOFO/RM,FT-Data Event Driver for Vitals ;3/7/05 10:34
+1 ;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; <None>
+5 ;
VALIDATE(GMRVDAT) ; Given the array GMRVDAT passed in by PCE Device
+1 ; Interface (by reference, i.e., D VALIDATE^GMRVPCE0(.ARRAY)), whose
+2 ; format is described in the PCE Device Interface documentation, this
+3 ; procedure will validate the Vitals data. If the data is invalid,
+4 ; the procedure will return GMRVDAT("ERROR") as described in the PCE
+5 ; Device Interface documentation.
+6 ;
+7 if $DATA(GMRVDAT("ERROR"))
QUIT
+8 DO PCE^GMRVPCE1(0)
+9 QUIT
STORE(GMRVDAT) ; Given vitals data passed in the GMRVDAT array, this
+1 ; procedure will store that data in the GMRV Patient Measurements
+2 ; (120.5) file.
+3 ;
+4 if $DATA(GMRVDAT("ERROR"))
QUIT
+5 DO PCE^GMRVPCE1(1)
+6 QUIT
HELP(GMRVTYP,GMRVARRY) ; This procedure will return help for a particular
+1 ; measurement type in an array.
+2 ; Input
+3 ; Variables: GMRVTYP=Type of measurement (abbreviation
+4 ; (req.) from PCE Device Interface Specification).
+5 ; GMRVARR=Closed array reference of array to return
+6 ; (opt.) help in. If this variable is not specified,
+7 ; help is returned in ^TMP($J,"GMRVHELP").
+8 ;
+9 if '$$VMTYPES(GMRVTYP)
QUIT
+10 IF $GET(GMRVARRY)=""
SET GMRVARRY="^TMP($J,""GMRVHELP"")"
+11 DO HELP^GMRVPCE2(GMRVTYP,GMRVARRY)
+12 QUIT
RATECHK(GMRVTYP,GMRVRATE,GMRVUNIT) ; Extrinsic function to validate the
+1 ; rate for a particular measurement
+2 ; Input
+3 ; Variables: GMRVTYP=Type of measurement (abbreviation
+4 ; (req.) from PCE Device Interface Specification).
+5 ; GMRVRATE=Measurement rate to be validated.
+6 ; (req.)
+7 ; GMRVUNIT=Unit of measurement for rate, if specified.
+8 ; (opt.)
+9 ; Function value: 1 if rate is valid.
+10 ; 0 if rate is invalid.
+11 ;
+12 NEW GMRVFXN
SET GMRVFXN=0
+13 IF $$VMTYPES(GMRVTYP)
IF $GET(GMRVRATE)]""
Begin DoDot:1
+14 IF $GET(GMRVUNIT)]""
SET GMRVRATE=$$UNITRATE^GMRVPCE3(GMRVTYP,GMRVRATE,GMRVUNIT)
+15 IF $GET(GMRVRATE)]""
SET GMRVFXN=$$VALID^GMRVPCE3(GMRVTYP,GMRVRATE)
+16 QUIT
End DoDot:1
+17 QUIT GMRVFXN
VMTYPES(TYPE) ; This function returns one if TYPE is a valid selection.
+1 ; from the PCE Device Interface Specification.
+2 QUIT "^AUD^BP^HT^TMP^WT^FT^FH^HE^PU^RS^TON^VC^VU^PN^"[(U_TYPE_U)
+3 ;