RMPRU ;PHX/HPL- ASSORTED UTILITIES ; 10/31/1994
;;3.0;PROSTHETICS;;Feb 09, 1996
ACT ;If either Orthotic Lab and Shoe Last Clinic has been activated or
;Restoration Lab has been activated, make sure Fiscal has activated
;the appropriate Cost Center(s) or do not allow creation of Lab
;requests.
;Called from the Entry Action Field of the Option CREATE 2529-3 REQUEST.
;NO VARIABLES REQUIRED
N RMPRSITE,RMPRPRI,RMPRCP,RMPRCC,RMPRPICE
S RMPRSITE=DUZ(2),RMPRPRI=0 S RMPRPRI=$O(^RMPR(669.9,"C",DUZ(2),RMPRPRI)),RMPRCC=827300,RMPRCP=910
ACT1 S RMPRPICE=$S(RMPRCC=827300:"11",RMPRCC=827400:"12")
I $G(RMPRSITE),$P(^RMPR(669.9,RMPRPRI,0),U,RMPRPICE)>0,$P($G(^PRCD(420,RMPRSITE,1,RMPRCP,2,RMPRCC,0)),U,1)'>0 D
.S RQUIT=1
.W !!,"Cost Center ",RMPRCC," has not been activated for "_$S(RMPRCC=827300:"Orthotic Lab and Shoe Last Clinic",RMPRCC=827400:"Restoration Lab",1:"")_". ",!,"Please contact Fiscal Service."
Q:RMPRCC=827400 S RMPRCC=827400 D ACT1
Q
GTNAME(RDFN) ;UTILITY TO GET THE PATIENT'S NAME FROM THE PATIENT FILE USING
;VADPT CALLS
N DFN,VAHOW,VAROOT,RMPRNAME
S DFN=RDFN,VAROOT="RMPRNAME"
D DEM^VADPT
Q RMPRNAME(1)
GTSSN(RDFN) ;UTILITY TO GET PATIENT'S SSN FROM THE PATIENT FILE USING
;VADPT CALLS
N DFN,VAHOW,VAROOT,RMPRNAME
S DFN=RDFN,VAROOT="RMPRNAME"
D DEM^VADPT
Q $P(RMPRNAME(2),U,2)
NAMESSN(RDFN) ;Utility to get a two piece string consisting of patient name
;and social security number
N DFN,VAHOW,VAROOT,RMPRNAME
S DFN=RDFN,VAROOT="RMPRNAME"
D DEM^VADPT
Q RMPRNAME(1)_"^"_$P(RMPRNAME(2),U,2)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRU 1565 printed Dec 13, 2024@02:37:57 Page 2
RMPRU ;PHX/HPL- ASSORTED UTILITIES ; 10/31/1994
+1 ;;3.0;PROSTHETICS;;Feb 09, 1996
ACT ;If either Orthotic Lab and Shoe Last Clinic has been activated or
+1 ;Restoration Lab has been activated, make sure Fiscal has activated
+2 ;the appropriate Cost Center(s) or do not allow creation of Lab
+3 ;requests.
+4 ;Called from the Entry Action Field of the Option CREATE 2529-3 REQUEST.
+5 ;NO VARIABLES REQUIRED
+6 NEW RMPRSITE,RMPRPRI,RMPRCP,RMPRCC,RMPRPICE
+7 SET RMPRSITE=DUZ(2)
SET RMPRPRI=0
SET RMPRPRI=$ORDER(^RMPR(669.9,"C",DUZ(2),RMPRPRI))
SET RMPRCC=827300
SET RMPRCP=910
ACT1 SET RMPRPICE=$SELECT(RMPRCC=827300:"11",RMPRCC=827400:"12")
+1 IF $GET(RMPRSITE)
IF $PIECE(^RMPR(669.9,RMPRPRI,0),U,RMPRPICE)>0
IF $PIECE($GET(^PRCD(420,RMPRSITE,1,RMPRCP,2,RMPRCC,0)),U,1)'>0
Begin DoDot:1
+2 SET RQUIT=1
+3 WRITE !!,"Cost Center ",RMPRCC," has not been activated for "_$SELECT(RMPRCC=827300:"Orthotic Lab and Shoe Last Clinic",RMPRCC=827400:"Restoration Lab",1:"")_". ",!,"Please contact Fiscal Service."
End DoDot:1
+4 if RMPRCC=827400
QUIT
SET RMPRCC=827400
DO ACT1
+5 QUIT
GTNAME(RDFN) ;UTILITY TO GET THE PATIENT'S NAME FROM THE PATIENT FILE USING
+1 ;VADPT CALLS
+2 NEW DFN,VAHOW,VAROOT,RMPRNAME
+3 SET DFN=RDFN
SET VAROOT="RMPRNAME"
+4 DO DEM^VADPT
+5 QUIT RMPRNAME(1)
GTSSN(RDFN) ;UTILITY TO GET PATIENT'S SSN FROM THE PATIENT FILE USING
+1 ;VADPT CALLS
+2 NEW DFN,VAHOW,VAROOT,RMPRNAME
+3 SET DFN=RDFN
SET VAROOT="RMPRNAME"
+4 DO DEM^VADPT
+5 QUIT $PIECE(RMPRNAME(2),U,2)
NAMESSN(RDFN) ;Utility to get a two piece string consisting of patient name
+1 ;and social security number
+2 NEW DFN,VAHOW,VAROOT,RMPRNAME
+3 SET DFN=RDFN
SET VAROOT="RMPRNAME"
+4 DO DEM^VADPT
+5 QUIT RMPRNAME(1)_"^"_$PIECE(RMPRNAME(2),U,2)