From a9c54bfe11da26fdacfc48bf903d88be831897a8 Mon Sep 17 00:00:00 2001 From: Tom Gebhardt Date: Mon, 12 May 2025 13:29:31 +0200 Subject: [PATCH] missing file update for v1.0.1 --- import_fhir_to_nx_diGraph.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/import_fhir_to_nx_diGraph.py b/import_fhir_to_nx_diGraph.py index 7250cd3..dcfb17d 100644 --- a/import_fhir_to_nx_diGraph.py +++ b/import_fhir_to_nx_diGraph.py @@ -24,18 +24,21 @@ from fhirImport import getPatientEverything, getBundle def load_multiple_fhir_patients(n): #graph = nx.DiGraph() init = True + initLoad = True ids = [] #get n ids nextIds = True while len(ids) < n and nextIds: - if init: + if initLoad: complex = os.getenv('COMPLEX_PATIENTS') if complex and complex.upper() != 'TRUE': bundle = getBundle(None, '/Patient?_count=' + str(n)) else: bundle = getBundle(None, '/Patient?_has:Observation:subject:status=final&_count=' + str(n)) + initLoad = False else: - bundle = getBundle(None, nextLink) + print("NEXT LINK: ", nextLink, flush=True) + bundle = getBundle(nextLink, None) if not 'entry' in bundle.json(): print("ERROR -- No data found in the fhir bundle. Check the request and if the server is up and responding")