PXRMDGEN ; SLC/PKR - Handle VA GENERIC drug findings. ;06/08/2006
;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
;
;=====================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate VA GENERIC (file #50.6)
;findings.
D EVALFI^PXRMDRGR(DFN,.DEFARR,ENODE,"AND",.FIEVAL)
Q
;
;=====================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate VA GENERIC
;(file #50.6) terms.
D EVALTERM^PXRMDRGR(DFN,.FINDPA,ENODE,"AND",.TERMARR,.TFIEVAL)
Q
;
;=====================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate VA GENERIC terms for
;building patient lists.
D EVALPL^PXRMDRGR(.FINDPA,ENODE,"AND",.TERMARR,.PLIST)
Q
;
;=====================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N FTYPE,IND,NAME,PFIEVAL,TEMP,VAGEN,VAGIEN
S VAGIEN=$P(IFIEVAL("FINDING"),";",1)
;DBIA #2531
S VAGEN=$$VAGN^PSNAPIS(VAGIEN)
S NLINES=NLINES+1,TEXT(NLINES)="VA Generic: "_VAGEN
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S TEMP=IFIEVAL(IND,"FINDING")
. S FTYPE=$P(TEMP,";",2)
. K PFIEVAL M PFIEVAL=IFIEVAL(IND)
. I FTYPE="PS(55," D MHVOUT^PXRMDIN(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
. I FTYPE="PS(55NVA," D MHVOUT^PXRMDNVA(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
. I FTYPE="PSRX(" D MHVOUT^PXRMDOUT(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
S NLINES=NLINES+1,TEXT(NLINES)=""
Q
;
;=====================================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
;maintenance output.
N IND,PFIEVAL,TEMP,VAGEN,VAGIEN
S VAGIEN=$P(IFIEVAL("FINDING"),";",1)
;DBIA #2531
S VAGEN=$$VAGN^PSNAPIS(VAGIEN)
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"VA Generic: "_VAGEN
S IND=0
F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
. S TEMP=IFIEVAL(IND,"FINDING")
. S FTYPE=$P(TEMP,";",2)
. K PFIEVAL M PFIEVAL=IFIEVAL(IND)
. I FTYPE="PS(55," D OUTPUT^PXRMDIN(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
. I FTYPE="PS(55NVA," D OUTPUT^PXRMDNVA(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
. I FTYPE="PSRX(" D OUTPUT^PXRMDOUT(INDENT+1,.PFIEVAL,.NLINES,.TEXT) Q
Q
;
PXRMDGEN ; SLC/PKR - Handle VA GENERIC drug findings. ;06/08/2006
+1 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
+2 ;
+3 ;=====================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate VA GENERIC (file #50.6)
+1 ;findings.
+2 DO EVALFI^PXRMDRGR(DFN,.DEFARR,ENODE,"AND",.FIEVAL)
+3 QUIT
+4 ;
+5 ;=====================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate VA GENERIC
+1 ;(file #50.6) terms.
+2 DO EVALTERM^PXRMDRGR(DFN,.FINDPA,ENODE,"AND",.TERMARR,.TFIEVAL)
+3 QUIT
+4 ;
+5 ;=====================================================
EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate VA GENERIC terms for
+1 ;building patient lists.
+2 DO EVALPL^PXRMDRGR(.FINDPA,ENODE,"AND",.TERMARR,.PLIST)
+3 QUIT
+4 ;
+5 ;=====================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
+1 NEW FTYPE,IND,NAME,PFIEVAL,TEMP,VAGEN,VAGIEN
+2 SET VAGIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+3 ;DBIA #2531
+4 SET VAGEN=$$VAGN^PSNAPIS(VAGIEN)
+5 SET NLINES=NLINES+1
SET TEXT(NLINES)="VA Generic: "_VAGEN
+6 SET IND=0
+7 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+8 SET TEMP=IFIEVAL(IND,"FINDING")
+9 SET FTYPE=$PIECE(TEMP,";",2)
+10 KILL PFIEVAL
MERGE PFIEVAL=IFIEVAL(IND)
+11 IF FTYPE="PS(55,"
DO MHVOUT^PXRMDIN(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
+12 IF FTYPE="PS(55NVA,"
DO MHVOUT^PXRMDNVA(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
+13 IF FTYPE="PSRX("
DO MHVOUT^PXRMDOUT(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
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 IND,PFIEVAL,TEMP,VAGEN,VAGIEN
+3 SET VAGIEN=$PIECE(IFIEVAL("FINDING"),";",1)
+4 ;DBIA #2531
+5 SET VAGEN=$$VAGN^PSNAPIS(VAGIEN)
+6 SET NLINES=NLINES+1
+7 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"VA Generic: "_VAGEN
+8 SET IND=0
+9 FOR
SET IND=+$ORDER(IFIEVAL(IND))
IF IND=0
QUIT
Begin DoDot:1
+10 SET TEMP=IFIEVAL(IND,"FINDING")
+11 SET FTYPE=$PIECE(TEMP,";",2)
+12 KILL PFIEVAL
MERGE PFIEVAL=IFIEVAL(IND)
+13 IF FTYPE="PS(55,"
DO OUTPUT^PXRMDIN(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
+14 IF FTYPE="PS(55NVA,"
DO OUTPUT^PXRMDNVA(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
+15 IF FTYPE="PSRX("
DO OUTPUT^PXRMDOUT(INDENT+1,.PFIEVAL,.NLINES,.TEXT)
QUIT
End DoDot:1
+16 QUIT
+17 ;