예제 #1
0
def get_list_CNBPID() -> List[str]:
    """
    Return a list of all CNBPID (Key) from the database.
    :return:
    """
    # Load local database from .env file
    database_path = config_get("LocalDatabasePath")

    list_CNBPID = []

    success, result_rows = LocalDB_query.get_all(database_path,
                                                 CNBP_blueprint.table_name,
                                                 "CNBPID")

    for row in result_rows:
        list_CNBPID.append(row[0])  # MRN is the first variable requested.

    return list_CNBPID
예제 #2
0
def get_list_MRN() -> List[int]:
    """
    Return a list_return of all MRN from the database.
    :return:
    """
    # Load local database from .env file
    database_path = config_get("LocalDatabasePath")

    list_MRN = []

    success, result_rows = LocalDB_query.get_all(database_path,
                                                 CNBP_blueprint.table_name,
                                                 "MRN")

    for row in result_rows:
        list_MRN.append(row[0])  # MRN is the first variable requested.

    return (
        list_MRN
    )  # @todo: verify this is in integer? or string as that has dire consequences.
예제 #3
0
def get_list_StudyUID() -> List[List[str]]:
    """
    Return a list_return of all StudyUID listS from the database.
    :return:
    """
    # Load local database from .env file
    database_path = config_get("LocalDatabasePath")

    list_StudyUID = []

    success, result_rows = LocalDB_query.get_all(database_path,
                                                 CNBP_blueprint.table_name,
                                                 "StudyUID")

    for row in result_rows:
        list_StudyUID.append(
            row[0])  # Values are always the first variable requested.

    return (
        list_StudyUID
    )  # @todo: verify this is in integer? or string as that has dire consequences.