PXRMEXAM ; SLC/PKR - Handle examination findings. ;13-Mar-2012 15:47;DU
;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
;
;=============================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate examination findings.
D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
Q
;
;=============================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate examination term findings
;for patient lists.
D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
Q
;
;=============================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate examanation terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;=============================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Exam entry.
;DBIA #4250.
D VXAM^PXPXRM(DAS,.FIEVT)
Q
;
;=============================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N EM,FIEN,IND,JND,NAME,NOUT,PNAME,RESULT,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
S TEMP=^AUTTEXAM(FIEN,0)
S PNAME=$P(TEMP,U,1)
S NAME=$$INSCHR^PXRMEXLC(INDENT," ")_"Exam: "_PNAME_" = "
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S RESULT=$G(IFIEVAL(IND,"RESULT"))
. I RESULT'="" S RESULT=$$EXTERNAL^DILFD(9000010.13,.04,"",RESULT,.EM)
. S VDATE=IFIEVAL(IND,"DATE")
. S TEMP=NAME_RESULT_" ("_$$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,RESULT,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
;IHS/MSC/MGH patch 1001 wrap with $G
S PNAME=$P($G(^AUTTEXAM(FIEN,0)),U,1)
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Exam: "_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 RESULT=$G(IFIEVAL(IND,"RESULT"))
. I RESULT'="" D
.. S TEMP=TEMP_" result - "
.. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.13,.04,"",RESULT,.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
;
PXRMEXAM ; SLC/PKR - Handle examination findings. ;13-Mar-2012 15:47;DU
+1 ;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
+2 ;
+3 ;=============================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate examination findings.
+1 DO EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
+2 QUIT
+3 ;
+4 ;=============================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate examination 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 examanation terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;=============================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Exam entry.
+1 ;DBIA #4250.
+2 DO VXAM^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,RESULT,TEMP,TEXTOUT,VDATE
+2 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+3 SET TEMP=^AUTTEXAM(FIEN,0)
+4 SET PNAME=$PIECE(TEMP,U,1)
+5 SET NAME=$$INSCHR^PXRMEXLC(INDENT," ")_"Exam: "_PNAME_" = "
+6 SET IND=0
+7 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+8 SET RESULT=$GET(IFIEVAL(IND,"RESULT"))
+9 IF RESULT'=""
SET RESULT=$$EXTERNAL^DILFD(9000010.13,.04,"",RESULT,.EM)
+10 SET VDATE=IFIEVAL(IND,"DATE")
+11 SET TEMP=NAME_RESULT_" ("_$$EDATE^PXRMDATE(VDATE)_")"
+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 EM,FIEN,IND,JND,NOUT,PNAME,RESULT,TEMP,TEXTOUT,VDATE
+3 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+4 ;IHS/MSC/MGH patch 1001 wrap with $G
+5 SET PNAME=$PIECE($GET(^AUTTEXAM(FIEN,0)),U,1)
+6 SET NLINES=NLINES+1
+7 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Exam: "_PNAME
+8 SET IND=0
+9 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+10 SET VDATE=IFIEVAL(IND,"DATE")
+11 SET TEMP=$$EDATE^PXRMDATE(VDATE)
+12 SET RESULT=$GET(IFIEVAL(IND,"RESULT"))
+13 IF RESULT'=""
Begin DoDot:2
+14 SET TEMP=TEMP_" result - "
+15 SET TEMP=TEMP_$$EXTERNAL^DILFD(9000010.13,.04,"",RESULT,.EM)
End DoDot:2
+16 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+17 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+18 IF IFIEVAL(IND,"COMMENTS")'=""
Begin DoDot:2
+19 SET TEMP="Comments: "_IFIEVAL(IND,"COMMENTS")
+20 DO FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+21 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:2
End DoDot:1
+22 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+23 QUIT
+24 ;