source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMVITL.m@ 841

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

revised back to 6/30/08 version

File size: 3.1 KB
Line 
1PXRMVITL ; SLC/PKR - Handle vitals findings. ;10/21/2004
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ;===========================================================
5EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate vital measurement findings.
6 D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
7 Q
8 ;
9 ;===========================================================
10EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate vital measurement
11 ;term findings for patient lists.
12 D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
13 Q
14 ;
15 ;===========================================================
16EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate vital measurement
17 ;terms.
18 D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
19 Q
20 ;
21 ;===========================================================
22GETDATA(DAS,FIEVT) ;Return the value, which is Rate, for a specified
23 ;GMRV Vital Measurement entry.
24 N IND,GMRVDATA,TEMP
25 ;DBIA #3647
26 D EN^GMVPXRM(.GMRVDATA,DAS,"I")
27 I $P(GMRVDATA(1),U,1)=-1 D Q
28 . S ^TMP("PXRMXMZ",$J,1,0)="Found GMRV entry "_DAS_" in the index, but it does not exist in ^GMRV(120.5"
29 . D SEND^PXRMMSG("Bad entry in Vitals index.")
30 S FIEVT("TYPE")=$P(GMRVDATA(3),U,1)
31 S (FIEVT("RATE"),FIEVT("VALUE"))=$P(GMRVDATA(7),U,1)
32 S IND=0
33 ;Load the external form of the qualifiers.
34 F S IND=$O(GMRVDATA(12,IND)) Q:IND="" D
35 . S TEMP=$P(GMRVDATA(12,IND),U,1)
36 .;DBIA #4504
37 . I TEMP'="" S FIEVT("QUALIFIER",IND)=$P($G(^GMRD(120.52,+TEMP,0)),U,1)
38 Q
39 ;
40 ;===========================================================
41MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
42 N DATE,EM,IND,JND,NAME,NOUT,RATE,TEMP,TEXTOUT,TYPE
43 S TYPE=$$EXTERNAL^DILFD(120.5,.03,"",IFIEVAL("TYPE"),.EM)
44 S NAME="Vital Measurement: "_TYPE_" = "
45 S IND=0
46 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
47 . S RATE=$G(IFIEVAL(IND,"VALUE"))
48 . I RATE="" S RATE="MISSING"
49 . S DATE=IFIEVAL(IND,"DATE")
50 . S TEMP=NAME_RATE_" ("_$$EDATE^PXRMDATE(DATE)_")"
51 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
52 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
53 S NLINES=NLINES+1,TEXT(NLINES)=""
54 Q
55 ;
56 ;===========================================================
57OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
58 ;maintenance output.
59 N DATE,EM,IND,JND,NOUT,RATE,TEMP,TEXTOUT,TYPE
60 S TYPE=$$EXTERNAL^DILFD(120.5,.03,"",IFIEVAL("TYPE"),.EM)
61 S NLINES=NLINES+1
62 S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Vital Measurement: "_TYPE
63 S IND=0
64 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
65 . S DATE=IFIEVAL(IND,"DATE")
66 . S TEMP=$$EDATE^PXRMDATE(DATE)
67 . S RATE=$G(IFIEVAL(IND,"VALUE"))
68 . I RATE="" S RATE="MISSING"
69 . S TEMP=TEMP_"; rate - "_RATE
70 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
71 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
72 .;If there are qualifiers display them.
73 . I $D(IFIEVAL(IND,"QUALIFIER")) D
74 .. S TEMP="Qualifiers:"
75 .. N QIND S QIND=0
76 .. S QIND=$O(IFIEVAL(IND,"QUALIFIER",QIND)) S TEMP=TEMP_" "_IFIEVAL(IND,"QUALIFIER",QIND)
77 .. F S QIND=$O(IFIEVAL(IND,"QUALIFIER",QIND)) Q:QIND="" S TEMP=TEMP_", "_IFIEVAL(IND,"QUALIFIER",QIND)
78 .. D FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
79 .. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
80 S NLINES=NLINES+1,TEXT(NLINES)=""
81 Q
82 ;
Note: See TracBrowser for help on using the repository browser.