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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snomed_neo4j_client-0.1.0.tar.gz.
File metadata
- Download URL: snomed_neo4j_client-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb6d2cee05a3d0f2d0e5cfee1995390805c04f33c307ea912548bd9f2a7d2b45
|
|
| MD5 |
08cc8bb07d4cb26b7deaa9216f260bc9
|
|
| BLAKE2b-256 |
3d36d6b0c5320a9647c64f5de5f3fd8a1a7ce3617d03fddfeeaebd931b03c2e1
|
File details
Details for the file snomed_neo4j_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: snomed_neo4j_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
484e330136a00fab988ec4f833ac3d751002e9665a6c572daea39f9ad324689f
|
|
| MD5 |
8e7885743f880e5839a3fbee45e90b65
|
|
| BLAKE2b-256 |
b1c541adc930113cffea1a1b5c190de68824ef0f94b30079ac4ea82b90e9be67
|