PXRMRAD ; SLC/PKR - Handle radiology findings. ;08/04/2008
;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
;
;=================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate radiology findings.
D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
Q
;
;=================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate radiology term findings
;for patient lists.
D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
Q
;
;=================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate radiology terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;=================================================
GETDATA(DAS,FIEVT) ;Return data for a RAD/NUC MED PATIENT entry.
;DBIA #3731
D EN1^RAPXRM(DAS,.FIEVT)
S (FIEVT("STATUS"),FIEVT("VALUE"))=FIEVT("EXAM STATUS")
Q
;
;=================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N CPT,CPTDATA,CODE,D0,IND,JND,NAME,NOUT,RADPROC,SNAME,TEMP,TEXTOUT
S RADPROC=$P(IFIEVAL("FINDING"),";",1)
;DBIA #118-B
S D0=^RAMIS(71,RADPROC,0)
S NAME=$P(D0,U,1)
S CPT=$P(D0,U,9)
S CPTDATA=$$CPT^ICPTCOD(CPT)
S CODE=$P(CPTDATA,U,2)
S SNAME=$P(CPTDATA,U,3)
S NAME="Radiology Procedure = "_SNAME
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S TEMP=NAME_" ("_$$EDATE^PXRMDATE(IFIEVAL(IND,"DATE"))_")"
. 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 CPT,CPTDATA,CODE,D0,IND,JND,NAME,NOUT,RADPROC,SNAME,TEMP,TEXTOUT
S RADPROC=$P(IFIEVAL("FINDING"),";",1)
;DBIA #118-B
S D0=^RAMIS(71,RADPROC,0)
S NAME=$P(D0,U,1)
S CPT=$P(D0,U,9)
S CPTDATA=$$CPT^ICPTCOD(CPT)
S CODE=$P(CPTDATA,U,2)
S SNAME=$P(CPTDATA,U,3)
S TEMP="Radiology Procedure: "_CODE_" ("_NAME_") - "_SNAME
D FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S TEMP=$$EDATE^PXRMDATE(IFIEVAL(IND,"DATE"))
. S TEMP=TEMP_" Status: "_IFIEVAL(IND,"STATUS")
. S TEMP=TEMP_"; Report Status: "_IFIEVAL(IND,"RPT STATUS")
. 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
;
PXRMRAD ; SLC/PKR - Handle radiology findings. ;08/04/2008
+1 ;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
+2 ;
+3 ;=================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate radiology findings.
+1 DO EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
+2 QUIT
+3 ;
+4 ;=================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate radiology 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 radiology terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;=================================================
GETDATA(DAS,FIEVT) ;Return data for a RAD/NUC MED PATIENT entry.
+1 ;DBIA #3731
+2 DO EN1^RAPXRM(DAS,.FIEVT)
+3 SET (FIEVT("STATUS"),FIEVT("VALUE"))=FIEVT("EXAM STATUS")
+4 QUIT
+5 ;
+6 ;=================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
+1 NEW CPT,CPTDATA,CODE,D0,IND,JND,NAME,NOUT,RADPROC,SNAME,TEMP,TEXTOUT
+2 SET RADPROC=$PIECE(IFIEVAL("FINDING"),";",1)
+3 ;DBIA #118-B
+4 SET D0=^RAMIS(71,RADPROC,0)
+5 SET NAME=$PIECE(D0,U,1)
+6 SET CPT=$PIECE(D0,U,9)
+7 SET CPTDATA=$$CPT^ICPTCOD(CPT)
+8 SET CODE=$PIECE(CPTDATA,U,2)
+9 SET SNAME=$PIECE(CPTDATA,U,3)
+10 SET NAME="Radiology Procedure = "_SNAME
+11 SET IND=0
+12 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+13 SET TEMP=NAME_" ("_$$EDATE^PXRMDATE(IFIEVAL(IND,"DATE"))_")"
+14 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+15 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:1
+16 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+17 QUIT
+18 ;
+19 ;=================================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
+1 ;maintenance output.
+2 NEW CPT,CPTDATA,CODE,D0,IND,JND,NAME,NOUT,RADPROC,SNAME,TEMP,TEXTOUT
+3 SET RADPROC=$PIECE(IFIEVAL("FINDING"),";",1)
+4 ;DBIA #118-B
+5 SET D0=^RAMIS(71,RADPROC,0)
+6 SET NAME=$PIECE(D0,U,1)
+7 SET CPT=$PIECE(D0,U,9)
+8 SET CPTDATA=$$CPT^ICPTCOD(CPT)
+9 SET CODE=$PIECE(CPTDATA,U,2)
+10 SET SNAME=$PIECE(CPTDATA,U,3)
+11 SET TEMP="Radiology Procedure: "_CODE_" ("_NAME_") - "_SNAME
+12 DO FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+13 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+14 SET IND=0
+15 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+16 SET TEMP=$$EDATE^PXRMDATE(IFIEVAL(IND,"DATE"))
+17 SET TEMP=TEMP_" Status: "_IFIEVAL(IND,"STATUS")
+18 SET TEMP=TEMP_"; Report Status: "_IFIEVAL(IND,"RPT STATUS")
+19 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+20 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:1
+21 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+22 QUIT
+23 ;