Skip to main content

Semantic web representation for the Synthea.

Project description

🕸️ SYNTHEA RDF

KnAcc Lab License: GPL v3

Semantic web representation for the SyntheaTM and CSVs to Turtle (.ttl) conversion tool.

synthea_ontology

:hammer: Usage

Installation

pip install synthea-rdf

Single CSV

from pathlib import Path
from synthea_rdf.graph import GraphBuilder

MODEL_PATH = "./synthea_ontology/synthea_ontology.ttl"
CSV_DIR = "./csv"
DEST_PATH = "./result"

builder = GraphBuilder(CSV_DIR, MODEL_PATH)
builder.convertEncounter()
builder.serialize(destination=Path(DEST_PATH)/"encounter.ttl")

Convert method list:

  • convertAllergy()
  • convertCarePlan()
  • convertClaim()
  • convertClaimTransaction()
  • convertCondition()
  • convertDevice()
  • convertEncounter()
  • convertImagingStudy()
  • convertImmunization()
  • convertMedication()
  • convertObservation()
  • convertOrganization()
  • convertPatient()
  • convertPayer()
  • convertPayerTransition()
  • convertProcedure()
  • convertProvider()
  • convertSupply()

All CSV

from pathlib import Path
from synthea_rdf.graph import GraphBuilder

MODEL_PATH = "./synthea_ontology/synthea_ontology.ttl"
CSV_DIR = "./csv"
DEST_PATH = "./result"

builder = GraphBuilder(CSV_DIR, MODEL_PATH)
graph = builder.build()
graph.serialize(destination=Path(DEST_PATH) / "all.ttl")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synthea-rdf-0.1.4.tar.gz (558.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synthea_rdf-0.1.4-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file synthea-rdf-0.1.4.tar.gz.

File metadata

  • Download URL: synthea-rdf-0.1.4.tar.gz
  • Upload date:
  • Size: 558.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for synthea-rdf-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ebf2ce013b20d6aa2c7e03e704033ba32657935b0bf2ce4e14dd552edd44d9b6
MD5 7dde35ec6d064e98eacd02e770c5ee01
BLAKE2b-256 6e629e1a9c508f07a9108cfbfac747a90ddd9d046229cca4a184ee2f7ef4786e

See more details on using hashes here.

File details

Details for the file synthea_rdf-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: synthea_rdf-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for synthea_rdf-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b0b5ad465a15d8547d137ac85f3775e1ee198fdb92b252998dcfac87b348389
MD5 edb47dfa6589da65ab5a6266df077174
BLAKE2b-256 67e0937c2d760ec0261c010e0267f6874de8a1261f6737f54dcdcfb715718dc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page