PXRMEDU ; SLC/PKR - Handle education findings. ;08/31/2004
;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
;
;=========================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate education findings.
D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
Q
;
;=========================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate education term findings
;for patient lists.
D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
Q
;
;=========================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate education terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;=========================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Patient ED entry.
;DBIA #4250
D VPEDU^PXPXRM(DAS,.FIEVT)
Q
;
;=========================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N EM,FIEN,IND,JND,NAME,NOUT,PNAME,LOU,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
S TEMP=^AUTTEDT(FIEN,0)
S PNAME=$P(TEMP,U,4)
I $L(PNAME)'>0 S PNAME=$P(TEMP,U,1)
S NAME="Education Topic: "_PNAME_" = "
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S LOU=$G(IFIEVAL(IND,"VALUE"))
. I LOU'="" S LOU=$$EXTERNAL^DILFD(9000010.16,.06,"",LOU,.EM)
. S VDATE=IFIEVAL(IND,"DATE")
. S TEMP=NAME_LOU_" ("_$$EDATE^PXRMDATE(VDATE)_")"
. 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 EM,FIEN,IND,JND,NOUT,PNAME,LOU,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
S TEMP=^AUTTEDT(FIEN,0)
S PNAME=$P(TEMP,U,4)
I $L(PNAME)'>0 S PNAME=$P(TEMP,U,1)
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Education Topic: "_PNAME
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S VDATE=IFIEVAL(IND,"DATE")
. S TEMP=$$EDATE^PXRMDATE(VDATE)
. S LOU=$G(IFIEVAL(IND,"VALUE"))
. I LOU'="" D
.. S TEMP=TEMP_" level of understanding - "
.. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.16,.06,"",LOU,.EM)
. D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
. I IFIEVAL(IND,"COMMENTS")'="" D
.. S TEMP="Comments: "_IFIEVAL(IND,"COMMENTS")
.. D FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
.. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
S NLINES=NLINES+1,TEXT(NLINES)=""
Q
;
PXRMEDU ; SLC/PKR - Handle education findings. ;08/31/2004
+1 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
+2 ;
+3 ;=========================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate education findings.
+1 DO EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
+2 QUIT
+3 ;
+4 ;=========================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate education 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 education terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;=========================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Patient ED entry.
+1 ;DBIA #4250
+2 DO VPEDU^PXPXRM(DAS,.FIEVT)
+3 QUIT
+4 ;
+5 ;=========================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
+1 NEW EM,FIEN,IND,JND,NAME,NOUT,PNAME,LOU,TEMP,TEXTOUT,VDATE
+2 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+3 SET TEMP=^AUTTEDT(FIEN,0)
+4 SET PNAME=$PIECE(TEMP,U,4)
+5 IF $LENGTH(PNAME)'>0
SET PNAME=$PIECE(TEMP,U,1)
+6 SET NAME="Education Topic: "_PNAME_" = "
+7 SET IND=0
+8 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+9 SET LOU=$GET(IFIEVAL(IND,"VALUE"))
+10 IF LOU'=""
SET LOU=$$EXTERNAL^DILFD(9000010.16,.06,"",LOU,.EM)
+11 SET VDATE=IFIEVAL(IND,"DATE")
+12 SET TEMP=NAME_LOU_" ("_$$EDATE^PXRMDATE(VDATE)_")"
+13 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+14 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:1
+15 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+16 QUIT
+17 ;
+18 ;=========================================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
+1 ;maintenance output.
+2 NEW EM,FIEN,IND,JND,NOUT,PNAME,LOU,TEMP,TEXTOUT,VDATE
+3 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+4 SET TEMP=^AUTTEDT(FIEN,0)
+5 SET PNAME=$PIECE(TEMP,U,4)
+6 IF $LENGTH(PNAME)'>0
SET PNAME=$PIECE(TEMP,U,1)
+7 SET NLINES=NLINES+1
+8 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Education Topic: "_PNAME
+9 SET IND=0
+10 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+11 SET VDATE=IFIEVAL(IND,"DATE")
+12 SET TEMP=$$EDATE^PXRMDATE(VDATE)
+13 SET LOU=$GET(IFIEVAL(IND,"VALUE"))
+14 IF LOU'=""
Begin DoDot:2
+15 SET TEMP=TEMP_" level of understanding - "
+16 SET TEMP=TEMP_$$EXTERNAL^DILFD(9000010.16,.06,"",LOU,.EM)
End DoDot:2
+17 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+18 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+19 IF IFIEVAL(IND,"COMMENTS")'=""
Begin DoDot:2
+20 SET TEMP="Comments: "_IFIEVAL(IND,"COMMENTS")
+21 DO FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+22 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:2
End DoDot:1
+23 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+24 QUIT
+25 ;