source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVPCE0.m@ 1446

Last change on this file since 1446 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1GMRVPCE0 ;HIOFO/RM,FT-Data Event Driver for Vitals ;3/7/05 10:34
2 ;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7VALIDATE(GMRVDAT) ; Given the array GMRVDAT passed in by PCE Device
8 ; Interface (by reference, i.e., D VALIDATE^GMRVPCE0(.ARRAY)), whose
9 ; format is described in the PCE Device Interface documentation, this
10 ; procedure will validate the Vitals data. If the data is invalid,
11 ; the procedure will return GMRVDAT("ERROR") as described in the PCE
12 ; Device Interface documentation.
13 ;
14 Q:$D(GMRVDAT("ERROR"))
15 D PCE^GMRVPCE1(0)
16 Q
17STORE(GMRVDAT) ; Given vitals data passed in the GMRVDAT array, this
18 ; procedure will store that data in the GMRV Patient Measurements
19 ; (120.5) file.
20 ;
21 Q:$D(GMRVDAT("ERROR"))
22 D PCE^GMRVPCE1(1)
23 Q
24HELP(GMRVTYP,GMRVARRY) ; This procedure will return help for a particular
25 ; measurement type in an array.
26 ; Input
27 ; Variables: GMRVTYP=Type of measurement (abbreviation
28 ; (req.) from PCE Device Interface Specification).
29 ; GMRVARR=Closed array reference of array to return
30 ; (opt.) help in. If this variable is not specified,
31 ; help is returned in ^TMP($J,"GMRVHELP").
32 ;
33 Q:'$$VMTYPES(GMRVTYP)
34 I $G(GMRVARRY)="" S GMRVARRY="^TMP($J,""GMRVHELP"")"
35 D HELP^GMRVPCE2(GMRVTYP,GMRVARRY)
36 Q
37RATECHK(GMRVTYP,GMRVRATE,GMRVUNIT) ; Extrinsic function to validate the
38 ; rate for a particular measurement
39 ; Input
40 ; Variables: GMRVTYP=Type of measurement (abbreviation
41 ; (req.) from PCE Device Interface Specification).
42 ; GMRVRATE=Measurement rate to be validated.
43 ; (req.)
44 ; GMRVUNIT=Unit of measurement for rate, if specified.
45 ; (opt.)
46 ; Function value: 1 if rate is valid.
47 ; 0 if rate is invalid.
48 ;
49 N GMRVFXN S GMRVFXN=0
50 I $$VMTYPES(GMRVTYP),$G(GMRVRATE)]"" D
51 . I $G(GMRVUNIT)]"" S GMRVRATE=$$UNITRATE^GMRVPCE3(GMRVTYP,GMRVRATE,GMRVUNIT)
52 . I $G(GMRVRATE)]"" S GMRVFXN=$$VALID^GMRVPCE3(GMRVTYP,GMRVRATE)
53 . Q
54 Q GMRVFXN
55VMTYPES(TYPE) ; This function returns one if TYPE is a valid selection.
56 ; from the PCE Device Interface Specification.
57 Q "^AUD^BP^HT^TMP^WT^FT^FH^HE^PU^RS^TON^VC^VU^PN^"[(U_TYPE_U)
58 ;
Note: See TracBrowser for help on using the repository browser.