MPIFWSC ;ALB/CMC - MPIF HEALTHEVET WEB SERVICES CLIENT TOOLS ; 5/26/16 1:23pm
;;1.0;MASTER PATIENT INDEX VISTA;**63,70,77**;30 Apr 99;Build 1
;MPI*1.0*63 STORY 317469
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^MPIFWSC entry for environment
; check
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^MPIFHWSC entry for post-init
; to setup a new HWSC 18.02 entry
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="MPI_PSIM_NEW EXECUTE",DIC("DR")=".06///1"
S X=$O(^XOB(18.02,"B","MPI_PSIM_NEW EXECUTE",0)),DIC("DR")=".06///1"
D FILE^DICN
TST ;
I $O(^MPIF(984.8,"B","TWO",""))'="" D BMES^XPDUTL(">> Already have TWO entry in MPI ICN BUILD MANAGEMENT (#984.8) file <<") Q
D BMES^XPDUTL(">>> Adding TWO entry to the MPI ICN BUILD MANAGEMENT (#984.8) file <<<")
K DD,DO N DIC,DA,X,Y,DTOUT,DUOUT
S DIC="^MPIF(984.8,",DIC(0)="ELMQZX"
S DIC("DR")="3///0"
S X="TWO"
D FILE^DICN
Q
;
;**77 VAMPI-9996 (jfw) = Added SSL Configuration Parameter (SSL/RETURN(6))
CHANGE(RETURN,USER,PASS,SWITCH,SERV,PORT,SSL) ; **70 STORY 864667 adding new parameters
;IA #6408
;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[HMPIFWSC 4959 printed Dec 13, 2024@02:11:49 Page 2
MPIFWSC ;ALB/CMC - MPIF HEALTHEVET WEB SERVICES CLIENT TOOLS ; 5/26/16 1:23pm
+1 ;;1.0;MASTER PATIENT INDEX VISTA;**63,70,77**;30 Apr 99;Build 1
+2 ;MPI*1.0*63 STORY 317469
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^MPIFWSC entry for environment
+3 ; check
+4 SET X=$$CKSETUP("VISTAWEBSERVICE.WSDL")
+5 QUIT
+6 ;
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^MPIFHWSC entry for post-init
+3 ; to setup a new HWSC 18.02 entry
+4 DO SETUP("VISTAWEBSERVICE.WSDL","MPI_PSIM_NEW EXECUTE")
+5 QUIT
+6 ;
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 ;S X="MPI_PSIM_NEW EXECUTE",DIC("DR")=".06///1"
+32 SET X=$ORDER(^XOB(18.02,"B","MPI_PSIM_NEW EXECUTE",0))
SET DIC("DR")=".06///1"
+33 DO FILE^DICN
TST ;
+1 IF $ORDER(^MPIF(984.8,"B","TWO",""))'=""
DO BMES^XPDUTL(">> Already have TWO entry in MPI ICN BUILD MANAGEMENT (#984.8) file <<")
QUIT
+2 DO BMES^XPDUTL(">>> Adding TWO entry to the MPI ICN BUILD MANAGEMENT (#984.8) file <<<")
+3 KILL DD,DO
NEW DIC,DA,X,Y,DTOUT,DUOUT
+4 SET DIC="^MPIF(984.8,"
SET DIC(0)="ELMQZX"
+5 SET DIC("DR")="3///0"
+6 SET X="TWO"
+7 DO FILE^DICN
+8 QUIT
+9 ;
+10 ;**77 VAMPI-9996 (jfw) = Added SSL Configuration Parameter (SSL/RETURN(6))
CHANGE(RETURN,USER,PASS,SWITCH,SERV,PORT,SSL) ; **70 STORY 864667 adding new parameters
+1 ;IA #6408
+2 ;PASS - PASSWORD TO BE USED FOR THE WEB SERVER MPI_PSIM_NEW EXECUTE
+3 ;SWITCH - TO SET FOR HTTP (0) OR HTTPS (1)
+4 ;SERV - SERVER IP
+5 ;PORT - SSL PORT
+6 ;SSL - SSL CONFIGURATION (File #18.12 / Field #3.02)
+7 IF $ORDER(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))=""
SET RETURN(0)="-1^NO WEB SERVER ENTRY FOR MPI_PSIM_NEW EXECUTE"
QUIT
+8 NEW I,IEN
FOR I=1:1:6
SET RETURN(I)=0
+9 SET IEN=$ORDER(^XOB(18.12,"B","MPI_PSIM_NEW EXECUTE",""))
+10 IF $GET(USER)'=""
Begin DoDot:1
+11 SET RETURN(2)="1^SUCCESS USER"
+12 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",200)=USER
+13 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(2)="-1^ERROR SETTING USER"
QUIT
End DoDot:1
+14 IF $GET(PASS)'=""
Begin DoDot:1
+15 SET RETURN(1)="1^SUCCESS PASSWORD"
+16 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",300)=$$ENCRYP^XUSRB1(PASS)
+17 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(1)="-1^ERROR SETTING PASSWORD"
QUIT
End DoDot:1
+18 IF $GET(SWITCH)'=""
Begin DoDot:1
+19 SET RETURN(3)="1^SUCCESS SWITCH"
+20 NEW MPIFIEN,HTTPS
SET MPIFIEN=$ORDER(^MPIF(984.8,"B","TWO",""))
IF MPIFIEN=""
SET RETURN(3)="-1^NO ENTRY 'TWO' IN FILE 984.8"
QUIT
+21 SET HTTPS=$PIECE($GET(^MPIF(984.8,MPIFIEN,0)),"^",4)
+22 IF HTTPS'=SWITCH
SET $PIECE(^MPIF(984.8,MPIFIEN,0),"^",4)=SWITCH
SET RETURN(3)="1^SUCCESSFULLY SET HTTPS TO "_SWITCH
End DoDot:1
+23 IF $GET(SERV)'=""
Begin DoDot:1
+24 SET RETURN(4)="1^SUCCESS SERVER"
+25 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",.04)=SERV
+26 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(4)="-1^ERROR SETTING NEW SERVER"
QUIT
End DoDot:1
+27 IF $GET(PORT)'=""
Begin DoDot:1
+28 SET RETURN(5)="1^SUCCESS SSL PORT"
+29 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",3.03)=PORT
+30 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(5)="-1^ERROR SETTING NEW SSL PORT"
QUIT
End DoDot:1
+31 IF $GET(SSL)'=""
Begin DoDot:1
+32 SET RETURN(6)="1^SUCCESS SSL CONFIGURATION"
+33 NEW MPIFERR,FDA
SET FDA(18.12,IEN_",",3.02)=SSL
+34 DO FILE^DIE("E","FDA","MPIFERR")
IF $DATA(MPIFERR("DIERR"))
SET RETURN(6)="-1^ERROR SETTING SSL CONFIGURATION"
QUIT
End DoDot:1
+35 QUIT