PXRMORDR ; SLC/PKR - Handle orderable item findings. ;07/14/2006
;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
;
;=========================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate orderable item findings.
D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
Q
;
;=========================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate orderable item term findings
;for patient lists.
D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
Q
;
;=========================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate orderable item terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;=========================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified order file entry.
N DA,DATA
S DA=$P(DAS,";",1)
;DBIA #4498
D GETDATA^ORPXRM(DA,.DATA)
S (FIEVT("STATUS"),FIEVT("VALUE"))=$P(DATA("ORSTS"),U,2)
S FIEVT("ORDER")=DATA("ORORDER")
S FIEVT("RELEASE DATE")=DATA("ORREL")
S FIEVT("START DATE")=DATA("ORSTRT")
S FIEVT("STOP DATE")=DATA("ORSTOP")
S FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("STOP DATE"))
Q
;
;=========================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N DATE,IND,JND,NAME,NOUT,PNAME,TEMP,TEXTOUT
S PNAME=$P(IFIEVAL("ORDER"),U,2)
S NAME="Orderable Item: "_PNAME_" = "
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S TEMP=NAME_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
. S DATE=$G(IFIEVAL(IND,"START DATE"))
. S TEMP=TEMP_" ("_$$EDATE^PXRMDATE(DATE)
. S DATE=$G(IFIEVAL(IND,"STOP DATE"))
. I DATE'="" S TEMP=TEMP_" - "_$$EDATE^PXRMDATE(DATE)
. S TEMP=TEMP_")"
. D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
S NLINES=NLINES+1,TEXT(NLINES)=""
Q
;
;=========================================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
;maintenance output.
N DATE,IND,JND,NOUT,PNAME,TEMP,TEXTOUT
S PNAME=$P(IFIEVAL("ORDER"),U,2)
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Orderable Item: "_PNAME
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S DATE=IFIEVAL(IND,"DATE")
. S TEMP=$$EDATE^PXRMDATE(DATE)
. S TEMP=TEMP_" Status: "_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
. S DATE=$G(IFIEVAL(IND,"START DATE"))
. I DATE="" S DATE="missing"
. S TEMP=TEMP_", Start date: "_$$EDATE^PXRMDATE(DATE)
. S DATE=$G(IFIEVAL(IND,"STOP DATE"))
. I DATE="" S DATE="missing"
. S TEMP=TEMP_", Stop date: "_$$EDATE^PXRMDATE(DATE)
. I $D(IFIEVAL(IND,"DURATION")) S TEMP=TEMP_" Duration: "_IFIEVAL(IND,"DURATION")_" D"
. D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
S NLINES=NLINES+1,TEXT(NLINES)=""
Q
;
PXRMORDR ; SLC/PKR - Handle orderable item findings. ;07/14/2006
+1 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
+2 ;
+3 ;=========================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate orderable item findings.
+1 DO EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
+2 QUIT
+3 ;
+4 ;=========================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate orderable item term findings
+1 ;for patient lists.
+2 DO EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
+3 QUIT
+4 ;
+5 ;=========================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate orderable item terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;=========================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified order file entry.
+1 NEW DA,DATA
+2 SET DA=$PIECE(DAS,";",1)
+3 ;DBIA #4498
+4 DO GETDATA^ORPXRM(DA,.DATA)
+5 SET (FIEVT("STATUS"),FIEVT("VALUE"))=$PIECE(DATA("ORSTS"),U,2)
+6 SET FIEVT("ORDER")=DATA("ORORDER")
+7 SET FIEVT("RELEASE DATE")=DATA("ORREL")
+8 SET FIEVT("START DATE")=DATA("ORSTRT")
+9 SET FIEVT("STOP DATE")=DATA("ORSTOP")
+10 SET FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("STOP DATE"))
+11 QUIT
+12 ;
+13 ;=========================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
+1 NEW DATE,IND,JND,NAME,NOUT,PNAME,TEMP,TEXTOUT
+2 SET PNAME=$PIECE(IFIEVAL("ORDER"),U,2)
+3 SET NAME="Orderable Item: "_PNAME_" = "
+4 SET IND=0
+5 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+6 SET TEMP=NAME_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
+7 SET DATE=$GET(IFIEVAL(IND,"START DATE"))
+8 SET TEMP=TEMP_" ("_$$EDATE^PXRMDATE(DATE)
+9 SET DATE=$GET(IFIEVAL(IND,"STOP DATE"))
+10 IF DATE'=""
SET TEMP=TEMP_" - "_$$EDATE^PXRMDATE(DATE)
+11 SET TEMP=TEMP_")"
+12 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+13 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:1
+14 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+15 QUIT
+16 ;
+17 ;=========================================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
+1 ;maintenance output.
+2 NEW DATE,IND,JND,NOUT,PNAME,TEMP,TEXTOUT
+3 SET PNAME=$PIECE(IFIEVAL("ORDER"),U,2)
+4 SET NLINES=NLINES+1
+5 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Orderable Item: "_PNAME
+6 SET IND=0
+7 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+8 SET DATE=IFIEVAL(IND,"DATE")
+9 SET TEMP=$$EDATE^PXRMDATE(DATE)
+10 SET TEMP=TEMP_" Status: "_$$LOW^XLFSTR(IFIEVAL(IND,"STATUS"))
+11 SET DATE=$GET(IFIEVAL(IND,"START DATE"))
+12 IF DATE=""
SET DATE="missing"
+13 SET TEMP=TEMP_", Start date: "_$$EDATE^PXRMDATE(DATE)
+14 SET DATE=$GET(IFIEVAL(IND,"STOP DATE"))
+15 IF DATE=""
SET DATE="missing"
+16 SET TEMP=TEMP_", Stop date: "_$$EDATE^PXRMDATE(DATE)
+17 IF $DATA(IFIEVAL(IND,"DURATION"))
SET TEMP=TEMP_" Duration: "_IFIEVAL(IND,"DURATION")_" D"
+18 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+19 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:1
+20 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+21 QUIT
+22 ;