XUMVIWSC ;ALB/CMC - MPI HEALTHEVET WEB SERVICES CLIENT TOOLS ;10/6/21 10:53
;;8.0;KERNEL;**757**;Jul 10, 1995;Build 2
;Per VA Directive 6402, this routine should not be modified.
;
;**757 VAMPI-11972 (dri) - moving routine ^MPIFWSC to Kernel Namespace
ENV ; - environment check entry (first time with this patch only)"
; this tag area can be removed with future patches
; future patches can call the $$CKSETUP^XUMVIWSC entry for environment
; check
;
; if MPIF*1.0*63 already installed or the MPI, don't need to do this again
I $$PATCH^XPDUTL("MPIF*1.0*63")!($P($$SITE^VASITE,"^",3)="200M") Q
;
S X=$$CKSETUP("VISTAWEBSERVICE.WSDL")
Q
;
POSTINIT ; -- setup (first time with this patch only)
; this tag area can be removed with future patches
; future patches can call the DO SETUP^XUMVIWSC entry for post-init
; to setup a new HWSC 18.02 entry
;
; if MPIF*1.0*63 already installed or the MPI, don't need to do this again
I $$PATCH^XPDUTL("MPIF*1.0*63")!($P($$SITE^VASITE,"^",3)="200M") Q
;
D SETUP("VISTAWEBSERVICE.WSDL","MPI_PSIM_NEW EXECUTE")
Q
;
CKSETUP(MPIWSDL) ; - used to check the environment
; returns the path to be used that was verified or 0 if it fails
;
; $$DEFDIR^%ZISH,$$LIST^%ZISH - #2320
; BMES^XPDUTL - #10141
;
N MPISTAT,MPIPATH,MPIFILE
S MPIPATH=$$DEFDIR^%ZISH()
S MPIFILE(MPIWSDL)=""
S MPISTAT=$$LIST^%ZISH(MPIPATH,"MPIFILE","MPISTAT")
I 'MPISTAT!($D(MPISTAT)'=11),'$D(XPDENV) D Q 0
. D BMES^XPDUTL("**** Error cannot find file "_MPIPATH_MPIWSDL)
I 'MPISTAT!($D(MPISTAT)'=11) D Q 0
. W !!,"**** WSDL file "_MPIWSDL_" not found in "_MPIPATH_"."
. W !," You will need that prior to install."
. S XPDQUIT=2
Q MPIPATH
;
SETUP(MPIWSDL,MPISERV) ; -- call to setup hwsc
;MPIWSDL - call with the wsdl file to setup, must be in the
; kernel default directory
;
; IA# 5421 FOR $$GENPORT^XOBWLIB
; IA# 6408 FOR ALL 18.12 REFERENCES
; FOR "B" X-REF ON 18.02
;
N MPISTAT,MPIPATH,MPIARR
S MPIPATH=$$CKSETUP(MPIWSDL) I MPIPATH=0 Q
S MPIFILE(MPIWSDL)=""
S MPIARR("WSDL FILE")=MPIPATH_MPIWSDL
S MPIARR("CACHE PACKAGE NAME")="MPIPSIM"
S MPIARR("WEB SERVICE NAME")=MPISERV
S MPIARR("AVAILABILITY RESOURCE")="?wsdl"
S MPISTAT=$$GENPORT^XOBWLIB(.MPIARR)
;
I 'MPISTAT D BMES^XPDUTL("**** Error creating Web Service (#18.02)"_MPISERV),MES^XPDUTL(MPISTAT) Q
D BMES^XPDUTL(">>> "_MPISERV_" entry added to WEB SERVICE file #18.02")
;
K DD,DO
N DIC,DA,X,Y,DTOUT,DUOUT
S DIC="^XOB(18.12,",DIC(0)="ELMQZX"
S DIC("DR")="3.03///"_XPDQUES("POST1 Port Number")_";.04///"_XPDQUES("POST2 Web Server Name")_";.06///1;.07///30;1.01///1;3.01///1;3.02///encrypt_only"
S X="MPI_PSIM_NEW EXECUTE"
D FILE^DICN
K DA
S DA=+Y,DA(1)=DA
K DD,DO,DIC,X,DTOUT,DUOUT,Y
S DIC="^XOB(18.12,"_DA(1)_",100,",DIC(0)="LZ"
S DIC("P")=$P(^DD(18.12,100,0),"^",2)
S X=$O(^XOB(18.02,"B","MPI_PSIM_NEW EXECUTE",0)),DIC("DR")=".06///1"
D FILE^DICN
Q
;
;**MPIF*1.0*70 STORY 864667 adding new parameters
;**MPIF*1.0*77 VAMPI-9996 (jfw) = Added SSL Configuration Parameter (SSL/RETURN(6))
CHANGE(RETURN,USER,PASS,SWITCH,SERV,PORT,SSL) ;
;IA #6408
;Called by RPC - MPI VISTA HWS CONFIG
;PASS - PASSWORD TO BE USED FOR THE WEB SERVER MPI_PSIM_NEW EXECUTE
;SWITCH - TO SET FOR HTTP (0) OR HTTPS (1)
;SERV - SERVER IP
;PORT - SSL PORT
;SSL - SSL CONFIGURATION (File #18.12 / Field #3.02)
I $O(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))="" S RETURN(0)="-1^NO WEB SERVER ENTRY FOR MPI_PSIM_NEW EXECUTE" Q
N I,IEN F I=1:1:6 S RETURN(I)=0
S IEN=$O(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))
I $G(USER)'="" D
.S RETURN(2)="1^SUCCESS USER"
.N MPIFERR,FDA S FDA(18.12,IEN_",",200)=USER
.D FILE^DIE("E","FDA","MPIFERR") I $D(MPIFERR("DIERR")) S RETURN(2)="-1^ERROR SETTING USER" Q
I $G(PASS)'="" D
.S RETURN(1)="1^SUCCESS PASSWORD"
.N MPIFERR,FDA S FDA(18.12,IEN_",",300)=$$ENCRYP^XUSRB1(PASS)
.D FILE^DIE("E","FDA","MPIFERR") I $D(MPIFERR("DIERR")) S RETURN(1)="-1^ERROR SETTING PASSWORD" Q
;I $G(SWITCH)'="" D
;.S RETURN(3)="1^SUCCESS SWITCH"
;.N MPIFIEN,HTTPS S MPIFIEN=$O(^MPIF(984.8,"B","TWO","")) I MPIFIEN="" S RETURN(3)="-1^NO ENTRY 'TWO' IN FILE 984.8" Q
;.S HTTPS=$P($G(^MPIF(984.8,MPIFIEN,0)),"^",4)
;.I HTTPS'=SWITCH S $P(^MPIF(984.8,MPIFIEN,0),"^",4)=SWITCH S RETURN(3)="1^SUCCESSFULLY SET HTTPS TO "_SWITCH
I $G(SERV)'="" D
.S RETURN(4)="1^SUCCESS SERVER"
.N MPIFERR,FDA S FDA(18.12,IEN_",",.04)=SERV
.D FILE^DIE("E","FDA","MPIFERR") I $D(MPIFERR("DIERR")) S RETURN(4)="-1^ERROR SETTING NEW SERVER" Q
I $G(PORT)'="" D
.S RETURN(5)="1^SUCCESS SSL PORT"
.N MPIFERR,FDA S FDA(18.12,IEN_",",3.03)=PORT
.D FILE^DIE("E","FDA","MPIFERR") I $D(MPIFERR("DIERR")) S RETURN(5)="-1^ERROR SETTING NEW SSL PORT" Q
I $G(SSL)'="" D
.S RETURN(6)="1^SUCCESS SSL CONFIGURATION"
.N MPIFERR,FDA S FDA(18.12,IEN_",",3.02)=SSL
.D FILE^DIE("E","FDA","MPIFERR") I $D(MPIFERR("DIERR")) S RETURN(6)="-1^ERROR SETTING SSL CONFIGURATION" Q
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUMVIWSC 5032 printed Dec 13, 2024@02:11:21 Page 2
XUMVIWSC ;ALB/CMC - MPI HEALTHEVET WEB SERVICES CLIENT TOOLS ;10/6/21 10:53
+1 ;;8.0;KERNEL;**757**;Jul 10, 1995;Build 2
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;**757 VAMPI-11972 (dri) - moving routine ^MPIFWSC to Kernel Namespace
ENV ; - environment check entry (first time with this patch only)"
+1 ; this tag area can be removed with future patches
+2 ; future patches can call the $$CKSETUP^XUMVIWSC entry for environment
+3 ; check
+4 ;
+5 ; if MPIF*1.0*63 already installed or the MPI, don't need to do this again
+6 IF $$PATCH^XPDUTL("MPIF*1.0*63")!($PIECE($$SITE^VASITE,"^",3)="200M")
QUIT
+7 ;
+8 SET X=$$CKSETUP("VISTAWEBSERVICE.WSDL")
+9 QUIT
+10 ;
POSTINIT ; -- setup (first time with this patch only)
+1 ; this tag area can be removed with future patches
+2 ; future patches can call the DO SETUP^XUMVIWSC entry for post-init
+3 ; to setup a new HWSC 18.02 entry
+4 ;
+5 ; if MPIF*1.0*63 already installed or the MPI, don't need to do this again
+6 IF $$PATCH^XPDUTL("MPIF*1.0*63")!($PIECE($$SITE^VASITE,"^",3)="200M")
QUIT
+7 ;
+8 DO SETUP("VISTAWEBSERVICE.WSDL","MPI_PSIM_NEW EXECUTE")
+9 QUIT
+10 ;
CKSETUP(MPIWSDL) ; - used to check the environment
+1 ; returns the path to be used that was verified or 0 if it fails
+2 ;
+3 ; $$DEFDIR^%ZISH,$$LIST^%ZISH - #2320
+4 ; BMES^XPDUTL - #10141
+5 ;
+6 NEW MPISTAT,MPIPATH,MPIFILE
+7 SET MPIPATH=$$DEFDIR^%ZISH()
+8 SET MPIFILE(MPIWSDL)=""
+9 SET MPISTAT=$$LIST^%ZISH(MPIPATH,"MPIFILE","MPISTAT")
+10 IF 'MPISTAT!($DATA(MPISTAT)'=11)
IF '$DATA(XPDENV)
Begin DoDot:1
+11 DO BMES^XPDUTL("**** Error cannot find file "_MPIPATH_MPIWSDL)
End DoDot:1
QUIT 0
+12 IF 'MPISTAT!($DATA(MPISTAT)'=11)
Begin DoDot:1
+13 WRITE !!,"**** WSDL file "_MPIWSDL_" not found in "_MPIPATH_"."
+14 WRITE !," You will need that prior to install."
+15 SET XPDQUIT=2
End DoDot:1
QUIT 0
+16 QUIT MPIPATH
+17 ;
SETUP(MPIWSDL,MPISERV) ; -- call to setup hwsc
+1 ;MPIWSDL - call with the wsdl file to setup, must be in the
+2 ; kernel default directory
+3 ;
+4 ; IA# 5421 FOR $$GENPORT^XOBWLIB
+5 ; IA# 6408 FOR ALL 18.12 REFERENCES
+6 ; FOR "B" X-REF ON 18.02
+7 ;
+8 NEW MPISTAT,MPIPATH,MPIARR
+9 SET MPIPATH=$$CKSETUP(MPIWSDL)
IF MPIPATH=0
QUIT
+10 SET MPIFILE(MPIWSDL)=""
+11 SET MPIARR("WSDL FILE")=MPIPATH_MPIWSDL
+12 SET MPIARR("CACHE PACKAGE NAME")="MPIPSIM"
+13 SET MPIARR("WEB SERVICE NAME")=MPISERV
+14 SET MPIARR("AVAILABILITY RESOURCE")="?wsdl"
+15 SET MPISTAT=$$GENPORT^XOBWLIB(.MPIARR)
+16 ;
+17 IF 'MPISTAT
DO BMES^XPDUTL("**** Error creating Web Service (#18.02)"_MPISERV)
DO MES^XPDUTL(MPISTAT)
QUIT
+18 DO BMES^XPDUTL(">>> "_MPISERV_" entry added to WEB SERVICE file #18.02")
+19 ;
+20 KILL DD,DO
+21 NEW DIC,DA,X,Y,DTOUT,DUOUT
+22 SET DIC="^XOB(18.12,"
SET DIC(0)="ELMQZX"
+23 SET DIC("DR")="3.03///"_XPDQUES("POST1 Port Number")_";.04///"_XPDQUES("POST2 Web Server Name")_";.06///1;.07///30;1.01///1;3.01///1;3.02///encrypt_only"
+24 SET X="MPI_PSIM_NEW EXECUTE"
+25 DO FILE^DICN
+26 KILL DA
+27 SET DA=+Y
SET DA(1)=DA
+28 KILL DD,DO,DIC,X,DTOUT,DUOUT,Y
+29 SET DIC="^XOB(18.12,"_DA(1)_",100,"
SET DIC(0)="LZ"
+30 SET DIC("P")=$PIECE(^DD(18.12,100,0),"^",2)
+31 SET X=$ORDER(^XOB(18.02,"B","MPI_PSIM_NEW EXECUTE",0))
SET DIC("DR")=".06///1"
+32 DO FILE^DICN
+33 QUIT
+34 ;
+35 ;**MPIF*1.0*70 STORY 864667 adding new parameters
+36 ;**MPIF*1.0*77 VAMPI-9996 (jfw) = Added SSL Configuration Parameter (SSL/RETURN(6))
CHANGE(RETURN,USER,PASS,SWITCH,SERV,PORT,SSL) ;
+1 ;IA #6408
+2 ;Called by RPC - MPI VISTA HWS CONFIG
+3 ;PASS - PASSWORD TO BE USED FOR THE WEB SERVER MPI_PSIM_NEW EXECUTE
+4 ;SWITCH - TO SET FOR HTTP (0) OR HTTPS (1)
+5 ;SERV - SERVER IP
+6 ;PORT - SSL PORT
+7 ;SSL - SSL CONFIGURATION (File #18.12 / Field #3.02)
+8 IF $ORDER(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))=""
SET RETURN(0)="-1^NO WEB SERVER ENTRY FOR MPI_PSIM_NEW EXECUTE"
QUIT
+9 NEW I,IEN
FOR I=1:1:6
SET RETURN(I)=0
+10 SET IEN=$ORDER(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))
+11 IF $GET(USER)'=""
Begin DoDot:1
+12 SET RETURN(2)="1^SUCCESS USER"
+13 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",200)=USER
+14 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(2)="-1^ERROR SETTING USER"
QUIT
End DoDot:1
+15 IF $GET(PASS)'=""
Begin DoDot:1
+16 SET RETURN(1)="1^SUCCESS PASSWORD"
+17 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",300)=$$ENCRYP^XUSRB1(PASS)
+18 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(1)="-1^ERROR SETTING PASSWORD"
QUIT
End DoDot:1
+19 ;I $G(SWITCH)'="" D
+20 ;.S RETURN(3)="1^SUCCESS SWITCH"
+21 ;.N MPIFIEN,HTTPS S MPIFIEN=$O(^MPIF(984.8,"B","TWO","")) I MPIFIEN="" S RETURN(3)="-1^NO ENTRY 'TWO' IN FILE 984.8" Q
+22 ;.S HTTPS=$P($G(^MPIF(984.8,MPIFIEN,0)),"^",4)
+23 ;.I HTTPS'=SWITCH S $P(^MPIF(984.8,MPIFIEN,0),"^",4)=SWITCH S RETURN(3)="1^SUCCESSFULLY SET HTTPS TO "_SWITCH
+24 IF $GET(SERV)'=""
Begin DoDot:1
+25 SET RETURN(4)="1^SUCCESS SERVER"
+26 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",.04)=SERV
+27 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(4)="-1^ERROR SETTING NEW SERVER"
QUIT
End DoDot:1
+28 IF $GET(PORT)'=""
Begin DoDot:1
+29 SET RETURN(5)="1^SUCCESS SSL PORT"
+30 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",3.03)=PORT
+31 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(5)="-1^ERROR SETTING NEW SSL PORT"
QUIT
End DoDot:1
+32 IF $GET(SSL)'=""
Begin DoDot:1
+33 SET RETURN(6)="1^SUCCESS SSL CONFIGURATION"
+34 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",3.02)=SSL
+35 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(6)="-1^ERROR SETTING SSL CONFIGURATION"
QUIT
End DoDot:1
+36 QUIT
+37 ;