-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_data_load.R
39 lines (28 loc) · 1.04 KB
/
test_data_load.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
library(dplyr)
library(dbplyr)
library(DatabaseConnector)
conn <-
DatabaseConnector::connect(
dbms = "postgresql",
server = "broadsea-atlasdb/postgres",
user = "postgres",
password = "mypass",
port = 5432
)
#checking important tables:
tbl(conn, in_schema("native", "patients"))
tbl(conn, in_schema("cdm_synthea10", "CONCEPT"))
tbl(conn, in_schema("cdm_synthea10", "vocabulary"))
tbl(conn, in_schema("cdm_synthea10", "CONCEPT"))
tbl(conn, in_schema("cdm_synthea10", "concept_ancestor"))
tbl(conn, in_schema("cdm_synthea10", "concept_class"))
tbl(conn, in_schema("cdm_synthea10", "concept_relationship"))
tbl(conn, in_schema("cdm_synthea10", "concept_synonym"))
tbl(conn, in_schema("cdm_synthea10", "person"))
tbl(conn, in_schema("cdm_synthea10", "provider"))
#look for SCD concepts
tbl(conn, in_schema("cdm_synthea10", "CONCEPT")) %>%
filter(concept_name %like% "Sickle%" |
concept_name %like% "sickle%") %>%
select(concept_id, concept_name, domain_id, vocabulary_id, concept_class_id) %>%
print(n = 100)