PXRMDNVA ;SLC/PKR - Handle non-VA med findings. ;07/08/2010
;;2.0;CLINICAL REMINDERS;**4,6,17,18**;Feb 04, 2005;Build 152
;
;===============================================
GETDATA(DAS,FIEVT) ;Return data for an non-VA med finding.
;DBIA #3793
D NVA^PSOPXRM1(DAS,.FIEVT)
S FIEVT("VALUE")=FIEVT("STATUS")
I $G(FIEVT("START DATE"))="" S FIEVT("START DATE")=FIEVT("DOCUMENTED DATE")
S FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("DISCONTINUED DATE"))
Q
;
;===============================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate terms.
D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
Q
;
;====================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
N DATE,JND,NOUT,TEMP,TEXTOUT
S TEMP="Non-VA med: "_IFIEVAL("ORDERABLE ITEM")_" = "
S TEMP=TEMP_"("_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
S DATE=IFIEVAL("DISCONTINUED DATE")
S DATE=$S(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
S TEMP=TEMP_" - "_DATE_")"
D FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
Q
;
;===============================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
;maintenance output.
N DATE,JND,NOUT,TEMP,TEXTOUT
S NLINES=NLINES+1
S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Non-VA med: "_IFIEVAL("ORDERABLE ITEM")
S DATE=IFIEVAL("DATE")
S TEMP=$$EDATE^PXRMDATE(DATE)_" Status: "_IFIEVAL("STATUS")_"\\"
S TEMP=TEMP_"Start Date: "_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
S DATE=IFIEVAL("DISCONTINUED DATE")
S DATE=$S(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
S TEMP=TEMP_" Discontinued Date: "_DATE
I $D(IFIEVAL("DURATION")) S TEMP=TEMP_" Duration: "_IFIEVAL("DURATION")_" D"_"\\"
S TEMP=TEMP_"Dosage Form: "_IFIEVAL("DOSAGE FORM")
S TEMP=TEMP_" Dosage: "_IFIEVAL("DOSAGE")
S TEMP=TEMP_" Medication Route: "_IFIEVAL("MEDICATION ROUTE")
D FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
S NLINES=NLINES+1,TEXT(NLINES)=""
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMDNVA 2156 printed Dec 13, 2024@01:44:14 Page 2
PXRMDNVA ;SLC/PKR - Handle non-VA med findings. ;07/08/2010
+1 ;;2.0;CLINICAL REMINDERS;**4,6,17,18**;Feb 04, 2005;Build 152
+2 ;
+3 ;===============================================
GETDATA(DAS,FIEVT) ;Return data for an non-VA med finding.
+1 ;DBIA #3793
+2 DO NVA^PSOPXRM1(DAS,.FIEVT)
+3 SET FIEVT("VALUE")=FIEVT("STATUS")
+4 IF $GET(FIEVT("START DATE"))=""
SET FIEVT("START DATE")=FIEVT("DOCUMENTED DATE")
+5 SET FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("DISCONTINUED DATE"))
+6 QUIT
+7 ;
+8 ;===============================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate terms.
+1 DO EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
+2 QUIT
+3 ;
+4 ;====================================================
MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
+1 NEW DATE,JND,NOUT,TEMP,TEXTOUT
+2 SET TEMP="Non-VA med: "_IFIEVAL("ORDERABLE ITEM")_" = "
+3 SET TEMP=TEMP_"("_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
+4 SET DATE=IFIEVAL("DISCONTINUED DATE")
+5 SET DATE=$SELECT(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
+6 SET TEMP=TEMP_" - "_DATE_")"
+7 DO FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+8 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+9 QUIT
+10 ;
+11 ;===============================================
OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
+1 ;maintenance output.
+2 NEW DATE,JND,NOUT,TEMP,TEXTOUT
+3 SET NLINES=NLINES+1
+4 SET TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Non-VA med: "_IFIEVAL("ORDERABLE ITEM")
+5 SET DATE=IFIEVAL("DATE")
+6 SET TEMP=$$EDATE^PXRMDATE(DATE)_" Status: "_IFIEVAL("STATUS")_"\\"
+7 SET TEMP=TEMP_"Start Date: "_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
+8 SET DATE=IFIEVAL("DISCONTINUED DATE")
+9 SET DATE=$SELECT(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
+10 SET TEMP=TEMP_" Discontinued Date: "_DATE
+11 IF $DATA(IFIEVAL("DURATION"))
SET TEMP=TEMP_" Duration: "_IFIEVAL("DURATION")_" D"_"\\"
+12 SET TEMP=TEMP_"Dosage Form: "_IFIEVAL("DOSAGE FORM")
+13 SET TEMP=TEMP_" Dosage: "_IFIEVAL("DOSAGE")
+14 SET TEMP=TEMP_" Medication Route: "_IFIEVAL("MEDICATION ROUTE")
+15 DO FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
+16 FOR JND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(JND)
+17 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+18 QUIT
+19 ;