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

GMRVPCE0.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ; This routine uses the following IAs:
  1. ; <None>
  1. ;
  1. VALIDATE(GMRVDAT) ; Given the array GMRVDAT passed in by PCE Device
  1. ; Interface (by reference, i.e., D VALIDATE^GMRVPCE0(.ARRAY)), whose
  1. ; format is described in the PCE Device Interface documentation, this
  1. ; procedure will validate the Vitals data. If the data is invalid,
  1. ; the procedure will return GMRVDAT("ERROR") as described in the PCE
  1. ; Device Interface documentation.
  1. ;
  1. Q:$D(GMRVDAT("ERROR"))
  1. D PCE^GMRVPCE1(0)
  1. Q
  1. STORE(GMRVDAT) ; Given vitals data passed in the GMRVDAT array, this
  1. ; procedure will store that data in the GMRV Patient Measurements
  1. ; (120.5) file.
  1. ;
  1. Q:$D(GMRVDAT("ERROR"))
  1. D PCE^GMRVPCE1(1)
  1. Q
  1. HELP(GMRVTYP,GMRVARRY) ; This procedure will return help for a particular
  1. ; measurement type in an array.
  1. ; Input
  1. ; Variables: GMRVTYP=Type of measurement (abbreviation
  1. ; (req.) from PCE Device Interface Specification).
  1. ; GMRVARR=Closed array reference of array to return
  1. ; (opt.) help in. If this variable is not specified,
  1. ; help is returned in ^TMP($J,"GMRVHELP").
  1. ;
  1. Q:'$$VMTYPES(GMRVTYP)
  1. I $G(GMRVARRY)="" S GMRVARRY="^TMP($J,""GMRVHELP"")"
  1. D HELP^GMRVPCE2(GMRVTYP,GMRVARRY)
  1. Q
  1. RATECHK(GMRVTYP,GMRVRATE,GMRVUNIT) ; Extrinsic function to validate the
  1. ; rate for a particular measurement
  1. ; Input
  1. ; Variables: GMRVTYP=Type of measurement (abbreviation
  1. ; (req.) from PCE Device Interface Specification).
  1. ; GMRVRATE=Measurement rate to be validated.
  1. ; (req.)
  1. ; GMRVUNIT=Unit of measurement for rate, if specified.
  1. ; (opt.)
  1. ; Function value: 1 if rate is valid.
  1. ; 0 if rate is invalid.
  1. ;
  1. N GMRVFXN S GMRVFXN=0
  1. I $$VMTYPES(GMRVTYP),$G(GMRVRATE)]"" D
  1. . I $G(GMRVUNIT)]"" S GMRVRATE=$$UNITRATE^GMRVPCE3(GMRVTYP,GMRVRATE,GMRVUNIT)
  1. . I $G(GMRVRATE)]"" S GMRVFXN=$$VALID^GMRVPCE3(GMRVTYP,GMRVRATE)
  1. . Q
  1. Q GMRVFXN
  1. VMTYPES(TYPE) ; This function returns one if TYPE is a valid selection.
  1. ; from the PCE Device Interface Specification.
  1. Q "^AUD^BP^HT^TMP^WT^FT^FH^HE^PU^RS^TON^VC^VU^PN^"[(U_TYPE_U)
  1. ;