PXRMIMM ; SLC/PKR - Handle immunization findings. ;29-Feb-2012 09:25;DU
;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
;IHS/MSC/MGH Patch 1001 wrap lookup with $G
;
;=======================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate immunization findings.
D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
Q
;
;=======================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate immunization term findings
;for patient lists.
D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
Q
;
;=======================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate immunization terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;=======================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Immunization entry.
;DBIA #4250
D VIMM^PXPXRM(DAS,.FIEVT)
Q
;
;=======================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
;maintenance output.
N EM,FIEN,IND,JND,NAME,NOUT,PNAME,REACTION,SERIES,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
;IHS/MSC/MGH Patch 1001 wrap with $G
S PNAME=$P($G(^AUTTIMM(FIEN,0)),U,1)
S NAME="Immunization: "_PNAME_" = "
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S SERIES=$G(IFIEVAL(IND,"SERIES"))
. I SERIES'="" S SERIES=$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
. I $G(IFIEVAL(IND,"CONTRAINDICATED")) S SERIES=SERIES_"; - CONTRAINDICATED"
. S VDATE=IFIEVAL(IND,"DATE")
. S TEMP=NAME_SERIES_" ("_$$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,REACTION,SERIES,TEMP,TEXTOUT,VDATE
S FIEN=$P(IFIEVAL("FINDING"),";",1)
;IHS/MSC/MGH Patch 1001 Wrap with $G
S PNAME=$P($G(^AUTTIMM(FIEN,0)),U,1)
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Immunization: "_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 REACTION=$G(IFIEVAL(IND,"REACTION"))
. S SERIES=$G(IFIEVAL(IND,"SERIES"))
. I SERIES'="" D
.. S TEMP=TEMP_" series - "
.. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
. I REACTION'="" D
.. S TEMP=TEMP_" reaction - "
.. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.06,"",REACTION,.EM)
. I $G(IFIEVAL(IND,"CONTRAINDICATED")) S TEMP=TEMP_"; - CONTRAINDICATED"
. 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
;
PXRMIMM ; SLC/PKR - Handle immunization findings. ;29-Feb-2012 09:25;DU
+1 ;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
+2 ;IHS/MSC/MGH Patch 1001 wrap lookup with $G
+3 ;
+4 ;=======================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate immunization findings.
+1 DO EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
+2 QUIT
+3 ;
+4 ;=======================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate immunization 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 immunization terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;=======================================================
GETDATA(DAS,FIEVT) ;Return data, for a specified V Immunization entry.
+1 ;DBIA #4250
+2 DO VIMM^PXPXRM(DAS,.FIEVT)
+3 QUIT
+4 ;
+5 ;=======================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
+1 ;maintenance output.
+2 NEW EM,FIEN,IND,JND,NAME,NOUT,PNAME,REACTION,SERIES,TEMP,TEXTOUT,VDATE
+3 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+4 ;IHS/MSC/MGH Patch 1001 wrap with $G
+5 SET PNAME=$PIECE($GET(^AUTTIMM(FIEN,0)),U,1)
+6 SET NAME="Immunization: "_PNAME_" = "
+7 SET IND=0
+8 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+9 SET SERIES=$GET(IFIEVAL(IND,"SERIES"))
+10 IF SERIES'=""
SET SERIES=$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
+11 IF $GET(IFIEVAL(IND,"CONTRAINDICATED"))
SET SERIES=SERIES_"; - CONTRAINDICATED"
+12 SET VDATE=IFIEVAL(IND,"DATE")
+13 SET TEMP=NAME_SERIES_" ("_$$EDATE^PXRMDATE(VDATE)_")"
+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 EM,FIEN,IND,JND,NOUT,PNAME,REACTION,SERIES,TEMP,TEXTOUT,VDATE
+3 SET FIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+4 ;IHS/MSC/MGH Patch 1001 Wrap with $G
+5 SET PNAME=$PIECE($GET(^AUTTIMM(FIEN,0)),U,1)
+6 SET NLINES=NLINES+1
+7 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Immunization: "_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 REACTION=$GET(IFIEVAL(IND,"REACTION"))
+13 SET SERIES=$GET(IFIEVAL(IND,"SERIES"))
+14 IF SERIES'=""
Begin DoDot:2
+15 SET TEMP=TEMP_" series - "
+16 SET TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
End DoDot:2
+17 IF REACTION'=""
Begin DoDot:2
+18 SET TEMP=TEMP_" reaction - "
+19 SET TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.06,"",REACTION,.EM)
End DoDot:2
+20 IF $GET(IFIEVAL(IND,"CONTRAINDICATED"))
SET TEMP=TEMP_"; - CONTRAINDICATED"
+21 DO FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+22 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+23 IF IFIEVAL(IND,"COMMENTS")'=""
Begin DoDot:2
+24 SET TEMP="Comments: "_IFIEVAL(IND,"COMMENTS")
+25 DO FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+26 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
End DoDot:2
End DoDot:1
+27 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+28 QUIT
+29 ;