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

LRBLPH.m

Go to the documentation of this file.
  1. LRBLPH ; IHS/DIR/FJE - PATIENT DRUG LIST 09:44 ; [ 2/18/93 ]
  1. ;;5.2;LR;;NOV 01, 1997
  1. ;
  1. ;;5.2;LAB SERVICE;;Sep 27, 1994
  1. D V^LRU S LRDPAF=1 D ^LRDPA G:LRDFN<1 END I +LRDPF'=2 W $C(7),!,"Must be entry in Patient File (2)" G LRBLPH
  1. W ! S ZTRTN="QUE^LRBLPH" D BEG^LRUTL G:POP!($D(ZTSK)) END
  1. QUE U IO K ^TMP($J) D L^LRU,S^LRU
  1. D H S LR("F")=1
  1. F X=0:0 S X=$O(^PS(55,DFN,"P",X)) Q:'X I $D(^(X,0)) S Y=+^(0) I $D(^PSRX(Y,0)) S ^TMP($J,+$P(^(0),"^",6))=0
  1. F LRX=0:0 S LRX=$O(^TMP($J,LRX)) Q:'LRX I $D(^PSDRUG(LRX,0)) D:$Y>(IOSL-6) H Q:LR("Q") W !,"OUTPATIENT PHARMACY ITEM: ",$P(^PSDRUG(LRX,0),"^")
  1. G:LR("Q") OUT K ^TMP($J) F X=0:0 S X=$O(^PS(55,DFN,"IV",X)) Q:'X F Y=0:0 S Y=$O(^PS(55,DFN,"IV",X,"AD",Y)) Q:'Y S ^TMP($J,+^(Y,0))=""
  1. F LRX=0:0 S LRX=$O(^TMP($J,LRX)) Q:'LRX I $D(^PS(52.6,LRX,0)) D:$Y>(IOSL-6) H Q:LR("Q") W !,"IV DRUG: ",$P(^PS(52.6,LRX,0),"^")
  1. G:LR("Q") OUT K ^TMP($J) F X=0:0 S X=$O(^PS(55,DFN,5,X)) Q:'X F Y=0:0 S Y=$O(^PS(55,DFN,5,X,1,Y)) Q:'Y S ^TMP($J,+^(Y,0))=""
  1. F LRX=0:0 S LRX=$O(^TMP($J,LRX)) Q:'LRX I $D(^PSDRUG(LRX,0)) D:$Y>(IOSL-6) H Q:LR("Q") W !,"INPATIENT PHARMACY ITEM: ",$P(^PSDRUG(LRX,0),"^")
  1. OUT D END^LRUTL,END Q
  1. ;
  1. H I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
  1. ;D F^LRU W !,"Medication List for ",PNM," ",SSN,!,LR("%") Q
  1. D F^LRU W !,"Medication List for ",PNM," ",HRCN,!,LR("%") Q ;IHS/ANMC/CLS 11/1/95
  1. ;
  1. END D V^LRU Q