Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXRMDNVA

PXRMDNVA.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ;===============================================
  1. GETDATA(DAS,FIEVT) ;Return data for an non-VA med finding.
  1. ;DBIA #3793
  1. D NVA^PSOPXRM1(DAS,.FIEVT)
  1. S FIEVT("VALUE")=FIEVT("STATUS")
  1. I $G(FIEVT("START DATE"))="" S FIEVT("START DATE")=FIEVT("DOCUMENTED DATE")
  1. S FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("DISCONTINUED DATE"))
  1. Q
  1. ;
  1. ;===============================================
  1. EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate terms.
  1. D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
  1. Q
  1. ;
  1. ;====================================================
  1. MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
  1. N DATE,JND,NOUT,TEMP,TEXTOUT
  1. S TEMP="Non-VA med: "_IFIEVAL("ORDERABLE ITEM")_" = "
  1. S TEMP=TEMP_"("_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
  1. S DATE=IFIEVAL("DISCONTINUED DATE")
  1. S DATE=$S(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
  1. S TEMP=TEMP_" - "_DATE_")"
  1. D FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
  1. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
  1. Q
  1. ;
  1. ;===============================================
  1. OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
  1. ;maintenance output.
  1. N DATE,JND,NOUT,TEMP,TEXTOUT
  1. S NLINES=NLINES+1
  1. S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Non-VA med: "_IFIEVAL("ORDERABLE ITEM")
  1. S DATE=IFIEVAL("DATE")
  1. S TEMP=$$EDATE^PXRMDATE(DATE)_" Status: "_IFIEVAL("STATUS")_"\\"
  1. S TEMP=TEMP_"Start Date: "_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
  1. S DATE=IFIEVAL("DISCONTINUED DATE")
  1. S DATE=$S(DATE="":"NONE",1:$$EDATE^PXRMDATE(DATE))
  1. S TEMP=TEMP_" Discontinued Date: "_DATE
  1. I $D(IFIEVAL("DURATION")) S TEMP=TEMP_" Duration: "_IFIEVAL("DURATION")_" D"_"\\"
  1. S TEMP=TEMP_"Dosage Form: "_IFIEVAL("DOSAGE FORM")
  1. S TEMP=TEMP_" Dosage: "_IFIEVAL("DOSAGE")
  1. S TEMP=TEMP_" Medication Route: "_IFIEVAL("MEDICATION ROUTE")
  1. D FORMATS^PXRMTEXT(INDENT+1,PXRMRM,TEMP,.NOUT,.TEXTOUT)
  1. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
  1. S NLINES=NLINES+1,TEXT(NLINES)=""
  1. Q
  1. ;