ANRVJP ; CED/HOIFO - Post Init Version Control ; [09-24-2004]
;;5.0;BLIND REHABILITATION;;Jun 02, 2006;Build 4
;;
EN ;
N ANRV,ANRVGUI,ANRVLST
D GETLST^XPAR(.ANRVLST,"SYS","ANRV GUI VERSION")
F ANRV=0:0 S ANRV=$O(ANRVLST(ANRV)) Q:'ANRV D
.D SETPAR("ANRV GUI VERSION",$P(ANRVLST(ANRV),"^",1),0)
S ANRVGUI="5.0.1.4" D
.D SETPAR("ANRV GUI VERSION","ANRV.EXE:"_ANRVGUI,1)
D SETPROX("ANRVAPPLICATION,PROXY USER")
D ADDOPT
Q
;
SETPAR(PAR,INS,VAL) ; [Procedure] Set the Parameter
; Input parameters
; 1. PAR [Literal/Required] No description
; 2. INS [Literal/Required] No description
; 3. VAL [Literal/Required] No description
;
D EN^XPAR("SYS",PAR,INS,VAL)
Q
;
SETPROX(PROX)
;
D ADDPROXY(PROX)
;
ADDPROXY(XOBANAME) ; add application proxy if not present
; depends on XU*8*361
NEW XOBID,XOBMSG,XOBSUBER,XOBSUBTX,XOBLINE,ANRVOPT
;
; if already present don't add
QUIT:(+$$APFIND^XUSAP(XOBANAME))>0
; add menus
S ANRVOPT("ANRVJ_BLINDREHAB")=""
S ANRVOPT("DGRR PATIENT SERVICE QUERY")=""
;
SET XOBID=$$CREATE^XUSAP(XOBANAME,"",.ANRVOPT,"")
;
IF (+XOBID)>0 DO
. SET XOBMSG(1)="Added new Application Proxy User '"_XOBANAME_"'."
. DO BMES^XPDUTL(.XOBMSG)
IF (+XOBID)=0 DO
. ; already checked if user present, should never get 0 back
. SET XOBMSG(1)=">>> Error: Could not add Application Proxy User '"_XOBANAME_"' -- Already exists."
. DO BMES^XPDUTL(.XOBMSG)
IF (+XOBID)<0 DO
. SET XOBMSG(1)=">>> Error: Could not add Application Proxy User '"_XOBANAME_"'."
. SET XOBMSG(2)=" DIERR nodes: <start of error(s)>"
. SET XOBLINE=3,XOBSUBER=0 FOR SET XOBSUBER=$O(^TMP("DIERR",$J,XOBSUBER)) QUIT:(+XOBSUBER)'>0 DO
. . SET XOBMSG(XOBLINE)=" "_^TMP("DIERR",$J,XOBSUBER),XOBLINE=XOBLINE+1
. . SET XOBSUBTX=0 FOR SET XOBSUBTX=$O(^TMP("DIERR",$J,XOBSUBER,"TEXT",XOBSUBTX)) QUIT:(+XOBSUBTX)'>0 DO
. . . SET XOBMSG(XOBLINE)=" "_^TMP("DIERR",$J,XOBSUBER,"TEXT",XOBSUBTX),XOBLINE=XOBLINE+1
. SET XOBMSG(XOBLINE+1)=" <end of error(s)>"
. DO BMES^XPDUTL(.XOBMSG)
. K ^TMP("DIERR",$J)
;
QUIT
;
ADDOPT
; this is being icluded to add foundations to the
N ANRVOPT,ANRVFDA,ANRVIEN,ANRVERR,ANRVMSG,I,J,K
S ANRVOPT=$$FIND1^DIC(19,,"QX","ANRVJ_BLINDREHAB","B")
S ANRVFDA(19.01,"?+2,"_ANRVOPT_",",.01)="DGRR GUI PATIENT LOOKUP"
S ANRVFDA(19.01,"?+3,"_ANRVOPT_",",.01)="DGRR PATIENT SERVICE QUERY"
D UPDATE^DIE("E","ANRVFDA","ANRVIEN","ANRVERR")
I $D(ANRVERR) D
. S I=0
. F J=0:0 S J=$O(ANRVERR("DIERR",J)) Q:'J F K=0:0 S K=$O(ANRVERR("DIERR",J,"TEXT",K)) Q:'K D
. . S I=I+1,ANRVMSG(I)=ANRVERR("DIERR",J,"TEXT",K)
. . Q
. S I=I+1,ANRVMSG(I)=" "
. S ANRVMSG(I+1)="The Patient Services Broker Type Options DGRR GUI PATIENT LOOKUP"
. S ANRVMSG(I+2)="and DGRR PATIENT SERVICE QUERY could not be added to the"
. S ANRVMSG(I+3)="ANRV Option ANRVJ_BLINDREHAB."
. S ANRVMSG(I+4)=" "
. S ANRVMSG(I+5)="Users of the Blind Rehabilitation application will not be able to look up"
. S ANRVMSG(I+6)="patients until this is resolved."
. D MES^XPDUTL(.ANRVMSG)
. Q
Q
;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HANRVJP 3100 printed Nov 22, 2024@17:55:33 Page 2
ANRVJP ; CED/HOIFO - Post Init Version Control ; [09-24-2004]
+1 ;;5.0;BLIND REHABILITATION;;Jun 02, 2006;Build 4
+2 ;;
EN ;
+1 NEW ANRV,ANRVGUI,ANRVLST
+2 DO GETLST^XPAR(.ANRVLST,"SYS","ANRV GUI VERSION")
+3 FOR ANRV=0:0
SET ANRV=$ORDER(ANRVLST(ANRV))
if 'ANRV
QUIT
Begin DoDot:1
+4 DO SETPAR("ANRV GUI VERSION",$PIECE(ANRVLST(ANRV),"^",1),0)
End DoDot:1
+5 SET ANRVGUI="5.0.1.4"
Begin DoDot:1
+6 DO SETPAR("ANRV GUI VERSION","ANRV.EXE:"_ANRVGUI,1)
End DoDot:1
+7 DO SETPROX("ANRVAPPLICATION,PROXY USER")
+8 DO ADDOPT
+9 QUIT
+10 ;
SETPAR(PAR,INS,VAL) ; [Procedure] Set the Parameter
+1 ; Input parameters
+2 ; 1. PAR [Literal/Required] No description
+3 ; 2. INS [Literal/Required] No description
+4 ; 3. VAL [Literal/Required] No description
+5 ;
+6 DO EN^XPAR("SYS",PAR,INS,VAL)
+7 QUIT
+8 ;
SETPROX(PROX) +1 ;
+2 DO ADDPROXY(PROX)
+3 ;
ADDPROXY(XOBANAME) ; add application proxy if not present
+1 ; depends on XU*8*361
+2 NEW XOBID,XOBMSG,XOBSUBER,XOBSUBTX,XOBLINE,ANRVOPT
+3 ;
+4 ; if already present don't add
+5 if (+$$APFIND^XUSAP(XOBANAME))>0
QUIT
+6 ; add menus
+7 SET ANRVOPT("ANRVJ_BLINDREHAB")=""
+8 SET ANRVOPT("DGRR PATIENT SERVICE QUERY")=""
+9 ;
+10 SET XOBID=$$CREATE^XUSAP(XOBANAME,"",.ANRVOPT,"")
+11 ;
+12 IF (+XOBID)>0
Begin DoDot:1
+13 SET XOBMSG(1)="Added new Application Proxy User '"_XOBANAME_"'."
+14 DO BMES^XPDUTL(.XOBMSG)
End DoDot:1
+15 IF (+XOBID)=0
Begin DoDot:1
+16 ; already checked if user present, should never get 0 back
+17 SET XOBMSG(1)=">>> Error: Could not add Application Proxy User '"_XOBANAME_"' -- Already exists."
+18 DO BMES^XPDUTL(.XOBMSG)
End DoDot:1
+19 IF (+XOBID)<0
Begin DoDot:1
+20 SET XOBMSG(1)=">>> Error: Could not add Application Proxy User '"_XOBANAME_"'."
+21 SET XOBMSG(2)=" DIERR nodes: <start of error(s)>"
+22 SET XOBLINE=3
SET XOBSUBER=0
FOR
SET XOBSUBER=$ORDER(^TMP("DIERR",$JOB,XOBSUBER))
if (+XOBSUBER)'>0
QUIT
Begin DoDot:2
+23 SET XOBMSG(XOBLINE)=" "_^TMP("DIERR",$JOB,XOBSUBER)
SET XOBLINE=XOBLINE+1
+24 SET XOBSUBTX=0
FOR
SET XOBSUBTX=$ORDER(^TMP("DIERR",$JOB,XOBSUBER,"TEXT",XOBSUBTX))
if (+XOBSUBTX)'>0
QUIT
Begin DoDot:3
+25 SET XOBMSG(XOBLINE)=" "_^TMP("DIERR",$JOB,XOBSUBER,"TEXT",XOBSUBTX)
SET XOBLINE=XOBLINE+1
End DoDot:3
End DoDot:2
+26 SET XOBMSG(XOBLINE+1)=" <end of error(s)>"
+27 DO BMES^XPDUTL(.XOBMSG)
+28 KILL ^TMP("DIERR",$JOB)
End DoDot:1
+29 ;
+30 QUIT
+31 ;
ADDOPT +1 ; this is being icluded to add foundations to the
+2 NEW ANRVOPT,ANRVFDA,ANRVIEN,ANRVERR,ANRVMSG,I,J,K
+3 SET ANRVOPT=$$FIND1^DIC(19,,"QX","ANRVJ_BLINDREHAB","B")
+4 SET ANRVFDA(19.01,"?+2,"_ANRVOPT_",",.01)="DGRR GUI PATIENT LOOKUP"
+5 SET ANRVFDA(19.01,"?+3,"_ANRVOPT_",",.01)="DGRR PATIENT SERVICE QUERY"
+6 DO UPDATE^DIE("E","ANRVFDA","ANRVIEN","ANRVERR")
+7 IF $DATA(ANRVERR)
Begin DoDot:1
+8 SET I=0
+9 FOR J=0:0
SET J=$ORDER(ANRVERR("DIERR",J))
if 'J
QUIT
FOR K=0:0
SET K=$ORDER(ANRVERR("DIERR",J,"TEXT",K))
if 'K
QUIT
Begin DoDot:2
+10 SET I=I+1
SET ANRVMSG(I)=ANRVERR("DIERR",J,"TEXT",K)
+11 QUIT
End DoDot:2
+12 SET I=I+1
SET ANRVMSG(I)=" "
+13 SET ANRVMSG(I+1)="The Patient Services Broker Type Options DGRR GUI PATIENT LOOKUP"
+14 SET ANRVMSG(I+2)="and DGRR PATIENT SERVICE QUERY could not be added to the"
+15 SET ANRVMSG(I+3)="ANRV Option ANRVJ_BLINDREHAB."
+16 SET ANRVMSG(I+4)=" "
+17 SET ANRVMSG(I+5)="Users of the Blind Rehabilitation application will not be able to look up"
+18 SET ANRVMSG(I+6)="patients until this is resolved."
+19 DO MES^XPDUTL(.ANRVMSG)
+20 QUIT
End DoDot:1
+21 QUIT
+22 ;
+23 ;