🔍 Code Extractor

function create_lims_pathogens

Maturity: 30

Create a new LIMS_Pathogens node

File:
/tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
Lines:
127 - 136
Complexity:
moderate

Purpose

Create a new LIMS_Pathogens node

Source Code

def create_lims_pathogens(properties):
    """Create a new LIMS_Pathogens node"""
    props_list = ', '.join([f"n.{prop} = ${prop}" for prop in properties.keys()])
    query = f"""
    CREATE (n:LIMS_Pathogens)
    SET {props_list}
    RETURN n
    """
    result = run_query(query, properties)
    return result[0] if result else None

Parameters

Name Type Default Kind
properties - - positional_or_keyword

Parameter Details

properties: Parameter of type None

Return Value

Returns unspecified type

Required Imports

from neo4j import GraphDatabase

Usage Example

# Example usage:
# result = create_lims_pathogens(properties)

Similar Components

AI-powered semantic similarity - components with related functionality:

  • function create_lims_tests4pathogens 78.4% similar

    Creates a new LIMS_Tests4Pathogens node in a Neo4j graph database with the specified properties and returns the created node.

    From: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
  • function get_lims_pathogens_by_id 66.8% similar

    Retrieves a single LIMS_Pathogens node from a Neo4j graph database by its unique identifier.

    From: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
  • function create_lims_parameters 66.2% similar

    Creates a new LIMS_Parameters node in a Neo4j graph database with the specified properties and returns the created node.

    From: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
  • function get_all_lims_pathogens 65.8% similar

    Retrieves LIMS_Pathogens nodes from a Neo4j graph database with a configurable limit on the number of results returned.

    From: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
  • function create_lims_testparameters 64.7% similar

    Creates a new LIMS_Testparameters node in a Neo4j graph database with the specified properties and returns the created node.

    From: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py
← Back to Browse