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

RMPR31U.m

Go to the documentation of this file.
  1. RMPR31U ;PHX/RFM-FUNCTIONS ;8/29/1994
  1. ;;3.0;PROSTHETICS;;Feb 09, 1996
  1. ITM(X) ; Displays external name of an item
  1. ; X=Internal number from 661
  1. S X=+X
  1. I '$D(^RMPR(661,X,0)) Q "Item not Found"
  1. S X=$P(^PRC(441,$P(^RMPR(661,X,0),U),0),U,2)
  1. Q X
  1. ITM1(X) ; Display # of an item
  1. ; X=Internal number from 661
  1. S X=+X
  1. I '$D(^RMPR(661,X,0)) Q "Item not Found"
  1. S X=$P(^PRC(441,$P(^RMPR(661,X,0),U),0),U,1)
  1. Q X
  1. ;
  1. VEN(X) ; Displays external name of a vendor
  1. ; X=Internal number of vendor from 440
  1. S X=+X
  1. I '$D(^PRC(440,X,0)) Q "Vendor not found"
  1. S X=$P(^PRC(440,X,0),U)
  1. Q X
  1. ;
  1. PAT(X) ; Displays name of Patient
  1. N RX
  1. S RX=X,X=$$NAMESSN^RMPRU(RX)
  1. Q $P(X,U,1)
  1. ; X=Patient IEN
  1. ;S X=+X
  1. ;II'$D(^DPT(X,0)) Q "Patient not found"
  1. ;S X=$P(^DPT(X,0),U)
  1. ;Q X
  1. ;
  1. EMP(X) ; Displays name of employee
  1. ; X=Internal number from 200
  1. S X=+X
  1. S X=$S($D(^VA(200,X,0)):$P(^(0),U),1:"")
  1. Q X
  1. ;
  1. ITEM(X) ; Displays name of item from 660
  1. ; X=IEN of record from 660
  1. S X=+X
  1. I '$D(^RMPR(660,X,0)) Q ""
  1. I '$D(^RMPR(661,+$P(^RMPR(660,X,0),U,6),0)) Q ""
  1. S X=$P(^PRC(441,$P(^RMPR(661,$P(^RMPR(660,X,0),U,6),0),U),0),U,2)
  1. Q X
  1. ITMN(X) ; Displays NUMBER of item from 660
  1. ; X=IEN of record from 660
  1. S X=+X
  1. I '$D(^RMPR(660,X,0)) Q ""
  1. I '$D(^RMPR(661,+$P(^RMPR(660,X,0),U,6),0)) Q ""
  1. S X=$P(^PRC(441,$P(^RMPR(661,$P(^RMPR(660,X,0),U,6),0),U),0),U,1)
  1. Q X
  1. SIG(X) ;Displays Printed signature bock from file 200
  1. S X=+X
  1. S X=$S($D(^VA(200,X,20)):$P(^(20),U,2),1:"")
  1. Q X
  1. STA(X) ;Displays Station Name from file Institution File
  1. S X=+X
  1. S X=$S($D(^DIC(4,X,0)):$P(^(0),U),1:"")
  1. Q X
  1. STAN(X) ;Displays Station Number from file Institution File
  1. S X=+X
  1. S X=$S($D(^DIC(4,X,99)):$P(^(99),U),1:"")
  1. Q X
  1. CODE(PZD,TYPE,SRC) ;GET ORTHOTIC OR RESTORATION CODE
  1. ;N RAM
  1. I TYPE="X",SRC="R" S AMIS=$S(+$P(RMPRAM,U,2):"134",1:$P($G(^RMPR(663,+$P(PZD,U,8),0)),U,5))_U_$S($D(RMPRGEC):$P($G(^RMPR(663,+$P(PZD,U,8),0)),U),1:+$P(PZD,U,8))
  1. I TYPE="X",SRC'="R" S AMIS=$S(+$P(RMPRAM,U,2):"138",1:$P($G(^RMPR(663,+$P(PZD,U,6),0)),U,5))_U_$S($D(RMPRGEC):$P($G(^RMPR(663,+$P(PZD,U,6),0)),U),1:+$P(PZD,U,6))
  1. I TYPE'="X",SRC'="R" S AMIS=$S(+$P(RMPRAM,U,2):"138",1:$P($G(^RMPR(663,+$P(PZD,U,5),0)),U,5))_U_$S($D(RMPRGEC):$P($G(^RMPR(663,+$P(PZD,U,5),0)),U),1:+$P(PZD,U,5))
  1. I TYPE'="X",SRC="R" S AMIS=$S(+$P(RMPRAM,U,2):"134",1:$P($G(^RMPR(663,+$P(PZD,U,7),0)),U,5))_U_$S($D(RMPRGEC):$P($G(^RMPR(663,+$P(PZD,U,7),0)),U),1:+$P(PZD,U,7))
  1. I '$D(RMPRGEC),$G(RMPRE),RMPRE'=$P(AMIS,U,2) S AMIS=""
  1. Q AMIS
  1. BLD ;BUILD TMP GLOBAL FOR LAB/RESTORATION AMIS
  1. N RI,RA,RT
  1. F RI=132,133,135,136,137 F RT=0:0 S RT=$O(^RMPR(663,"E",RI,RT)) Q:RT'>0 I $D(^RMPR(663,RT,0)) S ^TMP($J,RI_U_$P(^RMPR(663,RT,0),U))="0^0^0^0^0^0^0^0^0"
  1. F RA=134,138 F RI="01","02","03","04","05","06","07","08","09","10" S ^TMP($J,RA_U_RI)="0^0^0^0^0^0^0"
  1. Q