Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
H
Harmonize_Scripts
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Uncover
Harmonize_Scripts
Commits
bae733c0
Commit
bae733c0
authored
Mar 07, 2023
by
Pepe Márquez Romero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ULSS connection
parent
f3bc2913
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
98 deletions
+104
-98
connection_parameters.R
connection_parameters.R
+12
-7
necessary_functions_connection.R
necessary_functions_connection.R
+92
-91
No files found.
connection_parameters.R
View file @
bae733c0
...
...
@@ -31,7 +31,8 @@ hospital_names <- c( #Añadir Los de Baskent y sacrocuore
"UdeA"
,
"Inantro"
,
"UNSA"
,
"UZA"
"UZA"
,
"ULSS6"
)
project_names
<-
c
(
...
...
@@ -65,7 +66,8 @@ project_names <- c(
"INS_Data"
,
"INANTRO"
,
"UnCoVer-BiH-Final"
,
"UZA"
"UZA"
,
"ULSS6"
)
resource_names
<-
c
(
...
...
@@ -99,7 +101,8 @@ resource_names <- c(
"colombia_all"
,
"20220919_INANTRO"
,
"20220919_UNSAInpatient"
,
"20220919_UZA"
"20220919_UZA"
,
"20220919_ULSS6"
)
urls
<-
c
(
...
...
@@ -133,8 +136,8 @@ urls <- c(
"https://fenfisdi.udea.edu.co/opal"
,
"https://192.168.1.200:8007"
,
"https://192.168.1.200:8008"
,
"https://uncover.itg.be"
"https://uncover.itg.be"
,
"https://opal.aulss6.veneto.it"
)
users
<-
c
(
...
...
@@ -168,7 +171,8 @@ users <- c(
"user_analisis"
,
"user_analisis"
,
"user_analisis"
,
"emertens"
"emertens"
,
"user_analisis"
)
pass
<-
c
(
...
...
@@ -202,5 +206,6 @@ pass <- c(
"Ekfl07UUgz"
,
"Ekfl07UUgz"
,
"Ekfl07UUgz"
,
"3^z4AV.)hG5~PT/]"
"3^z4AV.)hG5~PT/]"
,
"Ekfl07UUgz"
)
necessary_functions_connection.R
View file @
bae733c0
connect
<-
function
(){
cat
(
"\n\n\n----------------------------------------------------------------------------------------------------------"
)
cat
(
"\nPlease select the number corresponding to the hospital you want to analyse, if you want to do a combined analysis select multiple hospitals"
)
cat
(
"\n
Princesa -> 1
CIPH -> 2
UMF_Iasis -> 3
SMUC -> 4
HM -> 5
Porto -> 6
FJD -> 7
Coimbra -> 8
UNAV -> 9
TU -> 10
Baskent:
Ankara Impatient -> 11
Konya Impatient -> 12
Istambul Impatient -> 13
Izmir Impatient -> 14
Alanya Impatient -> 15
Adana Impatient -> 16
Ankara Outpatient -> 17
Konya Outpatient -> 18
Istambul Outpatient -> 19
Izmir Outpatient -> 20
Alanya Outpatient -> 21
Sacrocuore:
Emergency database -> 22
Employees database -> 23
Verona database -> 24
Isaric -> 25
TU Dublin -> 26
UMF Cluj -> 27
UdeA -> 28
Inantro -> 29
UNSA -> 30
UZA -> 31
"
)
inp
<-
scan
()
builder
<-
DSI
::
newDSLoginBuilder
()
hospital_names
<-
hospital_names
[
inp
]
project_names
<-
project_names
[
inp
]
resource_names
<-
resource_names
[
inp
]
urls
<-
urls
[
inp
]
users
<-
users
[
inp
]
pass
<-
pass
[
inp
]
print
(
hospital_names
)
print
(
project_names
)
print
(
resource_names
)
print
(
urls
)
print
(
users
)
print
(
pass
)
url_ctr
<-
0
for
(
i
in
1
:
length
(
urls
)){
print
(
paste
(
"Connecting to Server with URL:"
,
urls
[
i
],
sep
=
" "
))
builder
$
append
(
server
=
hospital_names
[
i
],
url
=
urls
[
i
],
user
=
users
[
i
],
password
=
pass
[
i
],
resource
=
paste
(
project_names
[
i
],
resource_names
[
i
],
sep
=
"."
),
driver
=
"OpalDriver"
,
options
=
"list(ssl_verifyhost=0,ssl_verifypeer=0)"
)
url_ctr
<-
url_ctr
+1
}
logindata
<-
builder
$
build
()
connections
<-
DSI
::
datashield.login
(
logins
=
logindata
,
assign
=
TRUE
,
symbol
=
"D"
,
failSafe
=
TRUE
)
datashield.assign.expr
(
connections
,
symbol
=
'data'
,
expr
=
quote
(
as.resource.data.frame
(
D
)))
#datashield.assign.expr(connections, symbol = 'auxDf', expr = quote(as.resource.data.frame(D)))
print
(
"Successful connection to servers."
)
return
(
list
(
connections
,
inp
))
}
connect
<-
function
(){
cat
(
"\n\n\n----------------------------------------------------------------------------------------------------------"
)
cat
(
"\nPlease select the number corresponding to the hospital you want to analyse, if you want to do a combined analysis select multiple hospitals"
)
cat
(
"\n
Princesa -> 1
CIPH -> 2
UMF_Iasis -> 3
SMUC -> 4
HM -> 5
Porto -> 6
FJD -> 7
Coimbra -> 8
UNAV -> 9
TU -> 10
Baskent:
Ankara Impatient -> 11
Konya Impatient -> 12
Istambul Impatient -> 13
Izmir Impatient -> 14
Alanya Impatient -> 15
Adana Impatient -> 16
Ankara Outpatient -> 17
Konya Outpatient -> 18
Istambul Outpatient -> 19
Izmir Outpatient -> 20
Alanya Outpatient -> 21
Sacrocuore:
Emergency database -> 22
Employees database -> 23
Verona database -> 24
Isaric -> 25
TU Dublin -> 26
UMF Cluj -> 27
UdeA -> 28
Inantro -> 29
UNSA -> 30
UZA -> 31
ULSS6 -> 32
"
)
inp
<-
scan
()
builder
<-
DSI
::
newDSLoginBuilder
()
hospital_names
<-
hospital_names
[
inp
]
project_names
<-
project_names
[
inp
]
resource_names
<-
resource_names
[
inp
]
urls
<-
urls
[
inp
]
users
<-
users
[
inp
]
pass
<-
pass
[
inp
]
print
(
hospital_names
)
print
(
project_names
)
print
(
resource_names
)
print
(
urls
)
print
(
users
)
print
(
pass
)
url_ctr
<-
0
for
(
i
in
1
:
length
(
urls
)){
print
(
paste
(
"Connecting to Server with URL:"
,
urls
[
i
],
sep
=
" "
))
builder
$
append
(
server
=
hospital_names
[
i
],
url
=
urls
[
i
],
user
=
users
[
i
],
password
=
pass
[
i
],
resource
=
paste
(
project_names
[
i
],
resource_names
[
i
],
sep
=
"."
),
driver
=
"OpalDriver"
,
options
=
"list(ssl_verifyhost=0,ssl_verifypeer=0)"
)
url_ctr
<-
url_ctr
+1
}
logindata
<-
builder
$
build
()
connections
<-
DSI
::
datashield.login
(
logins
=
logindata
,
assign
=
TRUE
,
symbol
=
"D"
,
failSafe
=
TRUE
)
datashield.assign.expr
(
connections
,
symbol
=
'data'
,
expr
=
quote
(
as.resource.data.frame
(
D
)))
#datashield.assign.expr(connections, symbol = 'auxDf', expr = quote(as.resource.data.frame(D)))
print
(
"Successful connection to servers."
)
return
(
list
(
connections
,
inp
))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment