Skip to main content

A client library for interacting with SNOMED CT data in Neo4j

Project description

SNOMED CT Neo4j Client

A Python client library for interacting with SNOMED CT data stored in a Neo4j database.

Installation

pip install snomed-neo4j-client

Features

  • Connect to a Neo4j database containing SNOMED CT data
  • Retrieve concepts, descriptions, and relationships
  • Navigate the SNOMED CT hierarchy (parents, children, ancestors, descendants)
  • Search for concepts by term
  • Check subsumption relationships between concepts
  • Full Pydantic model support for type safety

Usage

from snomed_neo4j_client import SnomedClient

# Initialize the client
client = SnomedClient(
    uri="bolt://localhost:7687",
    user="neo4j",
    password="password"
)

# Get a concept by ID
concept = client.get_concept("138875005")  # SNOMED CT Concept (root)
print(concept)

# Get a concept with all its details
concept_details = client.get_concept_with_details("73211009")  # Diabetes mellitus
print(f"Concept: {concept_details.id}")
print(f"Descriptions: {len(concept_details.descriptions)}")
print(f"Relationships: {len(concept_details.relationships)}")

# Get the preferred term for a concept
term = client.get_preferred_term("73211009")
print(f"Preferred term: {term}")

# Check if one concept is a subtype of another
is_subtype = client.is_a("73211009", "64572001")  # Is diabetes a disease?
print(f"Is subtype: {is_subtype}")

# Find concepts by term
results = client.find_concepts("diabetes")
for result in results:
    print(f"{result['id']}: {result['term']}")

# Close the connection when done
client.close()

Requirements

  • Python 3.9+
  • Neo4j database with SNOMED CT data
  • Neo4j Python driver
  • Pydantic 2.0+

License

MIT

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

snomed_neo4j_client-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

snomed_neo4j_client-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file snomed_neo4j_client-0.1.1.tar.gz.

File metadata

  • Download URL: snomed_neo4j_client-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for snomed_neo4j_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d5fb1be1560e76baa638ddfa1c72a3c73d7cd69ed72de63363cba7eab10f1606
MD5 299bce2b4d11c4b5b25fe1c48409fc4a
BLAKE2b-256 925fc2dc328760bf7cb9a8e5a358753b6537892e02ff9307e85ef06703ff37ac

See more details on using hashes here.

File details

Details for the file snomed_neo4j_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for snomed_neo4j_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34af5be76ac920d36fa49a7abe19f282ec71acdeb4cc027aaeeb943b8e3735e6
MD5 fc5507222952b4ce3ea31fc93b91d2d4
BLAKE2b-256 3a7da72c7f76c9feab53cdd6aaf03c11ab9d3886a98a7b1d7fd3bffeac9fa0be

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