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

WEBVY22.m

Go to the documentation of this file.
WEBVY22 ;ALB/AS-Pre-install WEBV*1.0*22 ; 3/14/11 2:49pm
 ;;1.0;VISTAWEB;**22**;;Build 1
 ;
 Q
PRE ; Initialize pre-init routine
 ;
 N RESULT,APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT
 S APCODE="U'J+:[nVLM3sM<0'JAyI"
 S APNAME="VISTAWEB-PROD"
 S APIP="vaww.context.vistaweb.domain.ext"
 S APPORT=19989
 S APPATH="/resolve.do"
 S APCONTEXT="OR CPRS GUI CHART"
 S RESULT=$$BSESETUP(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 I '+RESULT D
 .D BMES^XPDUTL("**WARNING: Record Not Saved**")
 .D BMES^XPDUTL("PLEASE VIEW THE INSTALL FILE FOR ERROR(S)")
 .W !
 ;
 S APCODE="B3oxJ;%PB+Rga-[5W0AX"
 S APNAME="VISTAWEB-PROD2"
 S APIP="vaww.context2.vistaweb.domain.ext"
 S APPORT=19985
 S RESULT=$$BSESETUP(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 I '+RESULT D
 .D BMES^XPDUTL("**WARNING: Record Not Saved**")
 .D BMES^XPDUTL("PLEASE VIEW THE INSTALL FILE FOR ERROR(S)")
 .W !
 ;
 S APCODE="#ak5D;`EYI[ZOLtUQ[%J"
 S APNAME="VISTAWEB-UAT"
 S APIP="vaww.context.uat.domain.ext"
 S APPORT=12173
 S RESULT=$$BSESETUP(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 I '+RESULT D
 .D BMES^XPDUTL("**WARNING: Record Not Saved**")
 .D BMES^XPDUTL("PLEASE VIEW THE INSTALL FILE FOR ERROR(S)")
 .W !
 ;
 S APCODE="DlYc;3Wjyths_],1|[d$"
 S APNAME="VISTAWEB-UAT2"
 S APIP="vaww.context.uat2.domain.ext"
 S APPORT=12181
 S RESULT=$$BSESETUP(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 I '+RESULT D
 .D BMES^XPDUTL("**WARNING: Record Not Saved**")
 .D BMES^XPDUTL("PLEASE VIEW THE INSTALL FILE FOR ERROR(S)")
 .W !
 ;
 D BMES^XPDUTL("  ***INSTALL COMPLETED***  ")
 Q
 ;
BSESETUP(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 I +$$DELBSE(APCODE) D  Q $$SAVEBSE(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT)
 .D BMES^XPDUTL("ADDING NEW V/W ENTRY TO FILE (#8994.5)")
 D BMES^XPDUTL("V/W ENTRY WAS NOT SUCCESSFUL!!")
 Q 0
 ;
DELBSE(NAME) ;
 N ERR,LIST
 D BMES^XPDUTL("CHECKING FOR DUPLICATE V/W ENTRY....")
 D FIND^DIC(8994.5,"","@","X",NAME,"*","ACODE","","","LIST","ERR")
 I '+$D(LIST("DILIST",0)) D  Q 0
 .D BMES^XPDUTL("ERROR CHECKING FOR OLD V/W ENTRY...")
 .D BMES^XPDUTL(ERR("DIERR","1","TEXT",1))
 .D BMES^XPDUTL("PLEASE SUBMIT A REMEDY TICKET")
 I '+$P(LIST("DILIST",0),"^",1) D  Q 1
 .D BMES^XPDUTL("NO DUPLICATE V/W ENTRIES FOUND")
 N I,FDA S I=0
 F  S I=$O(LIST("DILIST",2,I)) Q:'I  D
 .K FDA S FDA(8994.5,LIST("DILIST",2,I)_",",.01)="@"
 .D FILE^DIE("","FDA","ERR")
 .D BMES^XPDUTL("REMOVED OLD V/W ENTRY FROM (#8994.5) ("_LIST("DILIST",2,I)_")")
 .I $D(ERR) D
 ..D BMES^XPDUTL("ERROR REMOVING OLD V/W ENTRY")
 ..D BMES^XPDUTL(ERR("DIERR","1","TEXT",1))
 ..D BMES^XPDUTL("PLEASE SUBMIT A REMEDY TICKET")
 Q 1
 ;
SAVEBSE(APCODE,APNAME,APIP,APPORT,APPATH,APCONTEXT) ;
 N FDA,ERR,INDEX
 S FDA(8994.5,"+1,",.01)=APNAME
 S INDEX=$$CPRSOPT(APCONTEXT)
 I +$G(INDEX)'>0 D  Q 0
 .D BMES^XPDUTL("COULD NOT FIND CPRS OPTION:"_""""_APCONTEXT_"""")
 S FDA(8994.5,"+1,",.02)=INDEX
 S FDA(8994.5,"+1,",.03)=APCODE
 S FDA(8994.51,"+2,+1,",.01)="H"
 S FDA(8994.51,"+2,+1,",.02)=APPORT
 S FDA(8994.51,"+2,+1,",.03)=APIP
 S FDA(8994.51,"+2,+1,",.04)=APPATH
 D BMES^XPDUTL("WRITING ENTRY TO THE REMOTE APPLICATION FILE(#8994.5)")
 D UPDATE^DIE("","FDA","","ERR")
 I +$D(ERR) D  Q 0
 .D BMES^XPDUTL("ERROR WRITING ENTRY TO FILE (#8994.5)")
 .D BMES^XPDUTL(ERR("DIERR","1","TEXT",1))
 .D BMES^XPDUTL("PLEASE SUBMIT A REMEDY TICKET")
 .W !
 D BMES^XPDUTL("VISTAWEB ENTRY SUCCESSFULLY ADDED")
 Q 1
 ;
CPRSOPT(ACONTEXT) ; FINDS THE IEN OF THE OPTION FOR A CONTEXT
 N INDEX,ERR S INDEX=$$FIND1^DIC(19,"","X",ACONTEXT,"B","","ERR")
 D BMES^XPDUTL("CHECKING FOR """_ACONTEXT_"""")
 I +$D(ERR) D  Q 0
 .D BMES^XPDUTL("ERROR CHECKING FOR OPTION!")
 ;I INDEX= D BMES^XPDUTL("OPTION """_ACONTEXT_""" FOUND")
 Q INDEX
 ;