source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMORDR.m@ 1006

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1PXRMORDR ; SLC/PKR - Handle orderable item findings. ;07/14/2006
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;
4 ;=========================================================
5EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate orderable item findings.
6 D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
7 Q
8 ;
9 ;=========================================================
10EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate orderable item term findings
11 ;for patient lists.
12 D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
13 Q
14 ;
15 ;=========================================================
16EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate orderable item terms.
17 D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
18 Q
19 ;
20 ;=========================================================
21GETDATA(DAS,FIEVT) ;Return data, for a specified order file entry.
22 N DA,DATA
23 S DA=$P(DAS,";",1)
24 ;DBIA #4498
25 D GETDATA^ORPXRM(DA,.DATA)
26 S (FIEVT("STATUS"),FIEVT("VALUE"))=$P(DATA("ORSTS"),U,2)
27 S FIEVT("ORDER")=DATA("ORORDER")
28 S FIEVT("RELEASE DATE")=DATA("ORREL")
29 S FIEVT("START DATE")=DATA("ORSTRT")
30 S FIEVT("STOP DATE")=DATA("ORSTOP")
31 S FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("STOP DATE"))
32 Q
33 ;
34 ;=========================================================
35MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
36 N DATE,IND,JND,NAME,NOUT,PNAME,TEMP,TEXTOUT
37 S PNAME=$P(IFIEVAL("ORDER"),U,2)
38 S NAME="Orderable Item: "_PNAME_" = "
39 S IND=0
40 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
41 . S TEMP=NAME_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
42 . S DATE=$G(IFIEVAL(IND,"START DATE"))
43 . S TEMP=TEMP_" ("_$$EDATE^PXRMDATE(DATE)
44 . S DATE=$G(IFIEVAL(IND,"STOP DATE"))
45 . I DATE'="" S TEMP=TEMP_" - "_$$EDATE^PXRMDATE(DATE)
46 . S TEMP=TEMP_")"
47 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
48 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
49 S NLINES=NLINES+1,TEXT(NLINES)=""
50 Q
51 ;
52 ;=========================================================
53OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
54 ;maintenance output.
55 N DATE,IND,JND,NOUT,PNAME,TEMP,TEXTOUT
56 S PNAME=$P(IFIEVAL("ORDER"),U,2)
57 S NLINES=NLINES+1
58 S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Orderable Item: "_PNAME
59 S IND=0
60 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
61 . S DATE=IFIEVAL(IND,"DATE")
62 . S TEMP=$$EDATE^PXRMDATE(DATE)
63 . S TEMP=TEMP_" Status: "_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
64 . S DATE=$G(IFIEVAL(IND,"START DATE"))
65 . I DATE="" S DATE="missing"
66 . S TEMP=TEMP_", Start date: "_$$EDATE^PXRMDATE(DATE)
67 . S DATE=$G(IFIEVAL(IND,"STOP DATE"))
68 . I DATE="" S DATE="missing"
69 . S TEMP=TEMP_", Stop date: "_$$EDATE^PXRMDATE(DATE)
70 . I $D(IFIEVAL(IND,"DURATION")) S TEMP=TEMP_" Duration: "_IFIEVAL(IND,"DURATION")_" D"
71 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
72 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
73 S NLINES=NLINES+1,TEXT(NLINES)=""
74 Q
75 ;
Note: See TracBrowser for help on using the repository browser.