@@ -42,12 +42,13 @@ def load_hospital_graph_from_csv() -> None:
4242 )
4343
4444 LOGGER .info ("Setting uniqueness constraints on nodes" )
45- with driver .session (database = "neo4j" ) as session :
45+
46+ with driver .session () as session :
4647 for node in NODES :
4748 session .execute_write (_set_uniqueness_constraints , node )
4849
4950 LOGGER .info ("Loading hospital nodes" )
50- with driver .session (database = "neo4j" ) as session :
51+ with driver .session () as session :
5152 query = f"""
5253 LOAD CSV WITH HEADERS
5354 FROM '{ HOSPITALS_CSV_PATH } ' AS hospitals
@@ -58,7 +59,7 @@ def load_hospital_graph_from_csv() -> None:
5859 _ = session .run (query , {})
5960
6061 LOGGER .info ("Loading payer nodes" )
61- with driver .session (database = "neo4j" ) as session :
62+ with driver .session () as session :
6263 query = f"""
6364 LOAD CSV WITH HEADERS
6465 FROM '{ PAYERS_CSV_PATH } ' AS payers
@@ -68,7 +69,7 @@ def load_hospital_graph_from_csv() -> None:
6869 _ = session .run (query , {})
6970
7071 LOGGER .info ("Loading physician nodes" )
71- with driver .session (database = "neo4j" ) as session :
72+ with driver .session () as session :
7273 query = f"""
7374 LOAD CSV WITH HEADERS
7475 FROM '{ PHYSICIANS_CSV_PATH } ' AS physicians
@@ -83,7 +84,7 @@ def load_hospital_graph_from_csv() -> None:
8384 _ = session .run (query , {})
8485
8586 LOGGER .info ("Loading visit nodes" )
86- with driver .session (database = "neo4j" ) as session :
87+ with driver .session () as session :
8788 query = f"""
8889 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS visits
8990 MERGE (v:Visit {{id: toInteger(visits.visit_id),
@@ -106,7 +107,7 @@ def load_hospital_graph_from_csv() -> None:
106107 _ = session .run (query , {})
107108
108109 LOGGER .info ("Loading patient nodes" )
109- with driver .session (database = "neo4j" ) as session :
110+ with driver .session () as session :
110111 query = f"""
111112 LOAD CSV WITH HEADERS
112113 FROM '{ PATIENTS_CSV_PATH } ' AS patients
@@ -120,7 +121,7 @@ def load_hospital_graph_from_csv() -> None:
120121 _ = session .run (query , {})
121122
122123 LOGGER .info ("Loading review nodes" )
123- with driver .session (database = "neo4j" ) as session :
124+ with driver .session () as session :
124125 query = f"""
125126 LOAD CSV WITH HEADERS
126127 FROM '{ REVIEWS_CSV_PATH } ' AS reviews
@@ -134,7 +135,7 @@ def load_hospital_graph_from_csv() -> None:
134135 _ = session .run (query , {})
135136
136137 LOGGER .info ("Loading 'AT' relationships" )
137- with driver .session (database = "neo4j" ) as session :
138+ with driver .session () as session :
138139 query = f"""
139140 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS row
140141 MATCH (source: `Visit` {{ `id`: toInteger(trim(row.`visit_id`)) }})
@@ -145,7 +146,7 @@ def load_hospital_graph_from_csv() -> None:
145146 _ = session .run (query , {})
146147
147148 LOGGER .info ("Loading 'WRITES' relationships" )
148- with driver .session (database = "neo4j" ) as session :
149+ with driver .session () as session :
149150 query = f"""
150151 LOAD CSV WITH HEADERS FROM '{ REVIEWS_CSV_PATH } ' AS reviews
151152 MATCH (v:Visit {{id: toInteger(reviews.visit_id)}})
@@ -155,7 +156,7 @@ def load_hospital_graph_from_csv() -> None:
155156 _ = session .run (query , {})
156157
157158 LOGGER .info ("Loading 'TREATS' relationships" )
158- with driver .session (database = "neo4j" ) as session :
159+ with driver .session () as session :
159160 query = f"""
160161 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS visits
161162 MATCH (p:Physician {{id: toInteger(visits.physician_id)}})
@@ -165,7 +166,7 @@ def load_hospital_graph_from_csv() -> None:
165166 _ = session .run (query , {})
166167
167168 LOGGER .info ("Loading 'COVERED_BY' relationships" )
168- with driver .session (database = "neo4j" ) as session :
169+ with driver .session () as session :
169170 query = f"""
170171 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS visits
171172 MATCH (v:Visit {{id: toInteger(visits.visit_id)}})
@@ -178,7 +179,7 @@ def load_hospital_graph_from_csv() -> None:
178179 _ = session .run (query , {})
179180
180181 LOGGER .info ("Loading 'HAS' relationships" )
181- with driver .session (database = "neo4j" ) as session :
182+ with driver .session () as session :
182183 query = f"""
183184 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS visits
184185 MATCH (p:Patient {{id: toInteger(visits.patient_id)}})
@@ -188,7 +189,7 @@ def load_hospital_graph_from_csv() -> None:
188189 _ = session .run (query , {})
189190
190191 LOGGER .info ("Loading 'EMPLOYS' relationships" )
191- with driver .session (database = "neo4j" ) as session :
192+ with driver .session () as session :
192193 query = f"""
193194 LOAD CSV WITH HEADERS FROM '{ VISITS_CSV_PATH } ' AS visits
194195 MATCH (h:Hospital {{id: toInteger(visits.hospital_id)}})
0 commit comments