RMPR178P ;CEP-JAH/OIFO - PATCH 178 POST INSTALLATION ;02/26/16
;;3.0;Prosthetics;**178**;13/27/08;Build 14
;;
Q
EN ;
D MSG("Starting Post Install") ;TODO: IS THIS NEEDED?
D MSG("Checking for existance of PRGIP Site Parameter")
I '$$FIND1^DIC(8989.51,"","","PRGIP","","","RMPRERR") D Q
. D MSG("PRGIP Site Parameter does not exist - Good To Go!")
D MSG("Removing PRGIP Site Parameter")
D XPARDEL("PRGIP",0)
Q
;
MSG(TEXT) ; [Procedure] Display message to user
; Input parameters
; 1. TEXT [Literal/Required] Text to display to the user
;
D BMES^XPDUTL(" "_TEXT_"...")
Q ""
;
XPARDEL(RMPRPAR,VALUES) ; [Procedure] Remove a parameter for XPAR
; VALUES determines the mode of deletion.
; 0: Will delete *BOTH* the values and the parameter definition (DEFAULT)
; 1: Will only delete the values of the parameter
;
; Input parameters
; 1. RMPRPAR [Literal/Required] Name of the parameter definition
; 2. VALUES [Literal/] Values Only 0/1
;
; Variables:
; DA: [Private] Fileman variable
; DIK: [Private] Fileman variable
; RMPRENT: [Private] Parameter entity
NEW DA,DIK,RMPRENT,RMPRERR
S VALUES=$G(VALUES,0)
K ^TMP("RMPRPOST",$J)
D ENVAL^XPAR($NA(^TMP("RMPRPOST",$J)),RMPRPAR,"","",1)
S RMPRENT="" F S RMPRENT=$O(^TMP("RMPRPOST",$J,RMPRENT)) Q:RMPRENT="" D
. D NDEL^XPAR(RMPRENT,RMPRPAR,.RMPRERR)
. I +$G(RMPRERR) D
.. D MSG(RMPRPAR_": "_RMPRERR)
. E D
.. D MSG(RMPRPAR_" Site Parameter Value was deleted")
Q:VALUES
S DA=$$FIND1^DIC(8989.51,"","",RMPRPAR,"B")
I DA'>0 D MSG(RMPRPAR_" Site Parameter Definition was not found") Q
S DIK="^XTV(8989.51," D ^DIK
D MSG(RMPRPAR_" Site Parameter Definition was deleted")
Q
;
;ALL BELOW FOR TESTING PURPOSES ONLY
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRGIPDEF ;ADDS PRGIP PARAMETER DEFINITION
;FOR TESTING PURPOSES ONLY
;SOME SITES ADDED PRGIP SITE PARAMETER THAT NOW NEEDS TO BE DELETED
;THIS FUNCTION CREATES THE SITE PARAMETER TO FACILITATE TESTING ITS DELETION
;;;;;;;;;;
I $$FIND1^DIC(8989.51,"","","PRGIP","","","RMPRERR") D Q
. D MSG("PARAMETER VALUE ALREADY EXISTED")
N RMPR,RMPRIEN,RMPRMSG
S RMPR(8989.51,"+1,",.01)="PRGIP"
S RMPR(8989.51,"+1,",.02)="Prosthetics GIP IN USE SITE PARAMETER"
S RMPR(8989.51,"+1,",.03)=0
S RMPR(8989.51,"+1,",.06)=0
S RMPR(8989.51,"+1,",1.1)="Y"
D UPDATE^DIE("","RMPR","RMPRIEN","RMPRMSG")
D MSG($G(RMPRMSG))
Q
SETPAR(PAR,INS,VAL,ERR) ; [Procedure] Set value into XPAR parameter
; Input parameters
; NOT PART OF P178 BUT INCLUDED FOR TESTING PURPOSES FOR ADDING "PRGIP" SITE PARAM
; 1. PAR [Literal/Required] Parameter
; 2. INS [Literal/Required] Instance
; 3. VAL [Literal/Required] New value
; 4. ERR (CALL BY REF) ERROR ARRAY
;
D EN^XPAR("SYS",PAR,INS,VAL,.ERR)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPR178P 3030 printed Dec 13, 2024@02:31:51 Page 2
RMPR178P ;CEP-JAH/OIFO - PATCH 178 POST INSTALLATION ;02/26/16
+1 ;;3.0;Prosthetics;**178**;13/27/08;Build 14
+2 ;;
+3 QUIT
EN ;
+1 ;TODO: IS THIS NEEDED?
DO MSG("Starting Post Install")
+2 DO MSG("Checking for existance of PRGIP Site Parameter")
+3 IF '$$FIND1^DIC(8989.51,"","","PRGIP","","","RMPRERR")
Begin DoDot:1
+4 DO MSG("PRGIP Site Parameter does not exist - Good To Go!")
End DoDot:1
QUIT
+5 DO MSG("Removing PRGIP Site Parameter")
+6 DO XPARDEL("PRGIP",0)
+7 QUIT
+8 ;
MSG(TEXT) ; [Procedure] Display message to user
+1 ; Input parameters
+2 ; 1. TEXT [Literal/Required] Text to display to the user
+3 ;
+4 DO BMES^XPDUTL(" "_TEXT_"...")
+5 QUIT ""
+6 ;
XPARDEL(RMPRPAR,VALUES) ; [Procedure] Remove a parameter for XPAR
+1 ; VALUES determines the mode of deletion.
+2 ; 0: Will delete *BOTH* the values and the parameter definition (DEFAULT)
+3 ; 1: Will only delete the values of the parameter
+4 ;
+5 ; Input parameters
+6 ; 1. RMPRPAR [Literal/Required] Name of the parameter definition
+7 ; 2. VALUES [Literal/] Values Only 0/1
+8 ;
+9 ; Variables:
+10 ; DA: [Private] Fileman variable
+11 ; DIK: [Private] Fileman variable
+12 ; RMPRENT: [Private] Parameter entity
+13 NEW DA,DIK,RMPRENT,RMPRERR
+14 SET VALUES=$GET(VALUES,0)
+15 KILL ^TMP("RMPRPOST",$JOB)
+16 DO ENVAL^XPAR($NAME(^TMP("RMPRPOST",$JOB)),RMPRPAR,"","",1)
+17 SET RMPRENT=""
FOR
SET RMPRENT=$ORDER(^TMP("RMPRPOST",$JOB,RMPRENT))
if RMPRENT=""
QUIT
Begin DoDot:1
+18 DO NDEL^XPAR(RMPRENT,RMPRPAR,.RMPRERR)
+19 IF +$GET(RMPRERR)
Begin DoDot:2
+20 DO MSG(RMPRPAR_": "_RMPRERR)
End DoDot:2
+21 IF '$TEST
Begin DoDot:2
+22 DO MSG(RMPRPAR_" Site Parameter Value was deleted")
End DoDot:2
End DoDot:1
+23 if VALUES
QUIT
+24 SET DA=$$FIND1^DIC(8989.51,"","",RMPRPAR,"B")
+25 IF DA'>0
DO MSG(RMPRPAR_" Site Parameter Definition was not found")
QUIT
+26 SET DIK="^XTV(8989.51,"
DO ^DIK
+27 DO MSG(RMPRPAR_" Site Parameter Definition was deleted")
+28 QUIT
+29 ;
+30 ;ALL BELOW FOR TESTING PURPOSES ONLY
+31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PRGIPDEF ;ADDS PRGIP PARAMETER DEFINITION
+1 ;FOR TESTING PURPOSES ONLY
+2 ;SOME SITES ADDED PRGIP SITE PARAMETER THAT NOW NEEDS TO BE DELETED
+3 ;THIS FUNCTION CREATES THE SITE PARAMETER TO FACILITATE TESTING ITS DELETION
+4 ;;;;;;;;;;
+5 IF $$FIND1^DIC(8989.51,"","","PRGIP","","","RMPRERR")
Begin DoDot:1
+6 DO MSG("PARAMETER VALUE ALREADY EXISTED")
End DoDot:1
QUIT
+7 NEW RMPR,RMPRIEN,RMPRMSG
+8 SET RMPR(8989.51,"+1,",.01)="PRGIP"
+9 SET RMPR(8989.51,"+1,",.02)="Prosthetics GIP IN USE SITE PARAMETER"
+10 SET RMPR(8989.51,"+1,",.03)=0
+11 SET RMPR(8989.51,"+1,",.06)=0
+12 SET RMPR(8989.51,"+1,",1.1)="Y"
+13 DO UPDATE^DIE("","RMPR","RMPRIEN","RMPRMSG")
+14 DO MSG($GET(RMPRMSG))
+15 QUIT
SETPAR(PAR,INS,VAL,ERR) ; [Procedure] Set value into XPAR parameter
+1 ; Input parameters
+2 ; NOT PART OF P178 BUT INCLUDED FOR TESTING PURPOSES FOR ADDING "PRGIP" SITE PARAM
+3 ; 1. PAR [Literal/Required] Parameter
+4 ; 2. INS [Literal/Required] Instance
+5 ; 3. VAL [Literal/Required] New value
+6 ; 4. ERR (CALL BY REF) ERROR ARRAY
+7 ;
+8 DO EN^XPAR("SYS",PAR,INS,VAL,.ERR)
+9 QUIT
+10 ;