4 Commits

Author SHA1 Message Date
787b981521 README.md aktualisiert 2025-05-14 11:49:44 +02:00
c2785e5b6f README.md aktualisiert 2025-05-14 11:12:12 +02:00
a9c54bfe11 missing file update for v1.0.1 2025-05-12 13:29:31 +02:00
d5c2d2ca64 link fix for large DB imports 2025-05-12 12:42:53 +02:00
3 changed files with 10 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ The MeDaX pipeline consists of the following components:
## ✍️ Citation
If you use the MeDaX pipeline in your research, please cite: 10.5281/zenodo.15229077 and Mazein, I and Gebhardt, T et al. [MeDaX, a knowledge graph on FHIR.](https://doi.org/10.3233/shti240423)
If you use the MeDaX pipeline in your research, please cite the software [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15229076.svg)](https://doi.org/10.5281/zenodo.15229076) and out latest paper: Mazein, I and Gebhardt, T et al. [MeDaX, a knowledge graph on FHIR.](https://doi.org/10.3233/shti240423)
## 🙏 Acknowledgements

View File

@@ -32,7 +32,10 @@ def getBundle(url: str, search: str):
if url is not None:
link = url + '?_format=json'
if '?' in url:
link = url + '&_format=json'
else:
link = url + '?_format=json'
else:
link = fhir_server + search + '&_format=json'

View File

@@ -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")