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

PXRMRXTY.m

Go to the documentation of this file.
  1. PXRMRXTY ; SLC/PKR - Routines for RXTYPE. ;01/04/2005
  1. ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
  1. ;
  1. ;===============================================
  1. RXTYXHLP ;Rxtype executable help.
  1. N DONE,IND,TEXT
  1. S DONE=0
  1. F IND=1:1 Q:DONE D
  1. . S TEXT=$P($T(TEXT+IND),";",3)
  1. . I TEXT="**End Text**" S DONE=1 Q
  1. . W !,TEXT
  1. Q
  1. ;
  1. ;===============================================
  1. SRXTYL(FIND0,RXTYL) ;Set the Rxtype list.
  1. N IND,NTYPE,RXTY,RXTYPE
  1. K RXTYL
  1. S RXTYPE=$P(FIND0,U,13)
  1. I RXTYPE="" S (RXTYL("I"),RXTYL("N"),RXTYL("O"))="" Q
  1. S NTYPE=$L(RXTYPE,",")
  1. F IND=1:1:NTYPE D
  1. . S RXTY=$P(RXTYPE,",",IND),RXTYL(RXTY)=""
  1. I $D(RXTYL("A")) S (RXTYL("I"),RXTYL("N"),RXTYL("O"))="" K RXTYL("A")
  1. Q
  1. ;
  1. ;===============================================
  1. TEXT ;RxType executable help text.
  1. ;;RXTYPE controls the search for medications. The possible RXTYPEs are:
  1. ;; A - all
  1. ;; I - inpatient
  1. ;; N - non-VA meds
  1. ;; O - outpatient
  1. ;;
  1. ;;You may use any combination of the above in a comma separated list.
  1. ;;For example I,N would search for inpatient medications and non-VA meds.
  1. ;;
  1. ;;The default is to search for all possible types of medications. So a blank
  1. ;;RXTYPE is equivalent to A.
  1. ;;
  1. ;;**End Text**
  1. Q
  1. ;
  1. ;===============================================
  1. VRXTYPE(X) ;Rxtype input transform. Check for valid Rxtypes.
  1. N IND,NTYPE,RXTY,RXTYL,TEXT,VALID
  1. ;Do not execute as part of a verify fields.
  1. I $G(DIUTIL)="VERIFY FIELDS" Q 1
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. S VALID=1
  1. S NTYPE=$L(X,",")
  1. F IND=1:1:NTYPE D
  1. . S RXTY=$P(X,",",IND),RXTYL(RXTY)=""
  1. .;Check for valid source abbreviations.
  1. . I RXTY="A" Q
  1. . I RXTY="I" Q
  1. . I RXTY="N" Q
  1. . I RXTY="O" Q
  1. . S VALID=0
  1. . S TEXT=RXTY_" is not a valid RXTYPE"
  1. . D EN^DDIOL(TEXT)
  1. Q VALID
  1. ;