SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.00549 · ICLR · 2025

EMR-AGENT: Automating Cohort and Feature Extraction from EMR Databases

Eunho Yang, Hong, Joonhyung Park, Kwanhyung Lee, Juhwan Choi, Jeonghyeop Lim, Donghwee Yoon

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 12 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2510.00549.json · badge: /api/ran/2510.00549.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
AITRICS/EMR-AGENT canonical (classifier label)
classifier basis: census
12 ran · 3 no recorded run
FunctionStatusWhere it lives
cohort_setup_logging Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/EMR_AGENT.py
code served (permissive licence) · get_code("83ccef347fe91afb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import logging
from unittest.mock import MagicMock

class Args:
    def __init__(self):
        self.llm_model = "meta/llama-2-7b"
        self.results_dir = "/tmp/results"
        self.case_name = "test_case"
        self.target_database = "mimic"
        self.database_knowledge = "full"
        self.schema_guideline = "detailed"
        self.schema_guideline_edit = "enabled"
        self.sql_observation = "enabled"
        self.sql_feedback = "enabled"
        self.trial_num = 1
        self.cohort_selection = "random"
        self.requested_features = ["age", "gender"]

ARGS = {
    "args": Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_feature_level_prf_answer_once Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/featureMap_evaluation.py
code served (permissive licence) · get_code("550e35df9200c5dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct answer_dict with the expected structure
answer_dict = {
    'sicdb': {
        'feature_1': ['code_a', 'code_b'],
        'feature_2': [['code_c', 'code_d'], ['code_e']],
        'feature_3': [None],
    },
    'mimic3': {
        'feature_1': ['code_x', 'code_y'],
    },
    'eicu': {
        'feature_1': ['name_p', 'name_q'],
    }
}

# Construct prediction_dict with trials
prediction_dict = {
    'feature_1': [
        ['code_a', 'code_b'],  # trial 0
        ['code_a', 'code_b'],  # trial 1
    ],
    'feature_2': [
        ['code_c'],  # trial 0
        ['code_c', 'code_d'],  # trial 1
    ],
    'feature_3': [
        [None],  # trial 0
        [None],  # trial 1
    ],
    'feature_4': [
        [('code_1', 'name_1'), ('code_2', 'name_2')],  # trial 0
        [('code_1', 'name_1')],  # trial 1
    ]
}

ARGS = {
    'answer_dict': answer_dict,
    'prediction_dict': prediction_dict,
    'db': 'sicdb',
    'trial': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
feature_map_setup_logging Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/EMR_AGENT.py
code served (permissive licence) · get_code("83d24c3b17a4dd7e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import logging
from types import SimpleNamespace

class MockArgs:
    def __init__(self):
        self.llm_model = "gpt-4/turbo"
        self.results_dir = "/tmp/test_results"
        self.target_database = "spider"
        self.database_knowledge = "full"
        self.schema_guideline = "yes"
        self.sql_observation = "enabled"
        self.sql_feedback = "on"
        self.trial_num = 1
        self.timeseries_feature = ["feature1", "feature2"]

args = MockArgs()

ARGS = {"args": args}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_schema_for_llm Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/utils.py
code served (permissive licence) · get_code("6272b5485ed33bb0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Analyze the function: it expects a string `text` that contains table schema information
# The function parses lines, splits by ', Column:' and formats them as LLM-friendly schema

# Create a valid input string with table schemas
text = """Table Name: Users, Column: id, Column: name, Column: email
Table Name: Orders, Column: order_id, Column: user_id, Column: total"""

ARGS = {
    "text": text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/cohort_evaluation.py
code served (permissive licence) · get_code("75234044e66ec846")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import pandas as pd
import pickle

# Create temporary directories and files for testing
temp_pkl_dir = tempfile.mkdtemp()
temp_csv_dir = tempfile.mkdtemp()

# Create a subdirectory for generated files
generated_dir = os.path.join(temp_pkl_dir, 'generated')
os.makedirs(generated_dir, exist_ok=True)

# Create some dummy pkl files
pkl_data_1 = {'sample': 'data1', 'values': [1, 2, 3]}
pkl_data_2 = {'sample': 'data2', 'values': [4, 5, 6]}

pkl_file_1 = os.path.join(generated_dir, 'data_1.pkl')
pkl_file_2 = os.path.join(generated_dir, 'data_2.pkl')

with open(pkl_file_1, 'wb') as f:
    pickle.dump(pkl_data_1, f)

with open(pkl_file_2, 'wb') as f:
    pickle.dump(pkl_data_2, f)

# Create a test CSV file
test_data = {
    'id': [1, 2, 3],
    'label': ['A', 'B', 'C'],
    'value': [10, 20, 30]
}
df_test = pd.DataFrame(test_data)
test_csv_path = os.path.join(temp_csv_dir, 'test_data.csv')
df_test.to_csv(test_csv_path, index=False)

# Define the arguments for load_data function
ARGS = {
    'pkl_path': temp_pkl_dir,
    'csv_path': temp_csv_dir,
    'generated_file': 'generated',
    'test_data_file': 'test_data.csv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_time_series_data Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/utils.py
code served (permissive licence) · get_code("f4063bbc28b208f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
from typing import List, Dict, Tuple, Optional, Any

def parse_time_series_data(text: str) -> Dict[str, str]:
    data_dict: Dict[str, str] = {}
    entries = re.split('\\n- ', text.strip())
    entries = entries[1:]
    for entry in entries:
        lines = entry.split('\n')
        key = lines[0].strip()
        value = ' '.join((line.strip() for line in lines[1:]))
        data_dict[key] = value
    return data_dict


# Setup code to construct valid arguments
text_input = """
- timestamp: 2024-01-01T10:00:00
  value: 42.5
  status: active
- timestamp: 2024-01-01T11:00:00
  value: 43.2
  status: active
- timestamp: 2024-01-01T12:00:00
  value: 41.8
  status: inactive
"""

ARGS = {
    "text": text_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
print_stream Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/react.py
code served (permissive licence) · get_code("b809858867134260")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct a stream as an iterable of dicts
# Each dict should have a 'messages' key with a list of messages
# The last message can be either a tuple or something else

stream = [
    {
        'messages': [
            {'role': 'system', 'content': 'You are helpful'},
            ('assistant', 'This is a response')
        ]
    },
    {
        'messages': [
            {'role': 'user', 'content': 'Hello'},
            {'role': 'assistant', 'content': 'Hi there'}
        ]
    },
    {
        'messages': [
            ('user', 'Question'),
            ('assistant', 'Answer')
        ]
    }
]

ARGS = {
    'stream': stream
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
search_walk Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/cohort_evaluation.py
code served (permissive licence) · get_code("e888ea2131b3023a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some test files
test_files = [
    "model.pt",
    "weights.pt",
    "config.yaml",
    "evaluation_results.pt",
    "data.pt",
]

for filename in test_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        f.write("test content")

# Create a subdirectory with more files
subdir = os.path.join(temp_dir, "subdir")
os.makedirs(subdir)
with open(os.path.join(subdir, "nested.pt"), 'w') as f:
    f.write("nested content")
with open(os.path.join(subdir, "evaluation_nested.pt"), 'w') as f:
    f.write("evaluation nested")

ARGS = {
    'info': {
        'path': temp_dir,
        'extension': '.pt'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
search_walk_path Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/cohort_evaluation.py
code served (permissive licence) · get_code("cf99704bdf821f6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory structure with some test files
temp_dir = tempfile.mkdtemp()

# Create subdirectories and files
os.makedirs(os.path.join(temp_dir, 'subdir1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'subdir2'), exist_ok=True)

# Create some test files with different extensions
with open(os.path.join(temp_dir, 'file1.txt'), 'w') as f:
    f.write('test')
with open(os.path.join(temp_dir, 'file2.txt'), 'w') as f:
    f.write('test')
with open(os.path.join(temp_dir, 'file3.py'), 'w') as f:
    f.write('test')
with open(os.path.join(temp_dir, 'subdir1', 'file4.txt'), 'w') as f:
    f.write('test')
with open(os.path.join(temp_dir, 'subdir2', 'file5.txt'), 'w') as f:
    f.write('test')

ARGS = {
    'info': {
        'path': temp_dir,
        'extension': '.txt'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
setup_logging Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/ehr_sql_pluq_style.py
code served (permissive licence) · get_code("530e4660e41c5212")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import logging
from argparse import Namespace

# Create a simple args object with all required attributes
args = Namespace(
    results_dir='/tmp/test_results/',
    agent_part='agent_v1',
    case_name='test_case',
    target_database='mysql',
    database_knowledge='full',
    llm_model='gpt4',
    trial_num=1,
    case_number=42,
    cohort_selection='age > 18',
    requested_features='height, weight, age',
    timeseries_feature='heart_rate'
)

ARGS = {
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
setup_logging Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/react.py
code served (permissive licence) · get_code("c0855d72e4fbf113")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import logging
import tempfile

class Args:
    def __init__(self):
        self.results_dir = tempfile.gettempdir() + '/'
        self.agent_part = 'sql'
        self.case_name = 'test_case'
        self.target_database = 'mimic'
        self.database_knowledge = 'full'
        self.llm_model = 'gpt4'
        self.trial_num = 1
        self.case_number = 1
        self.cohort_selection = 'all_patients'
        self.requested_features = 'age,gender'
        self.timeseries_feature = 'heart_rate,blood_pressure'

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tab2col_dictionary_join Ran
ran; our contract draft was wrong, not the code
AITRICS/EMR-AGENT/EMR-Agent/models/utils.py
code served (permissive licence) · get_code("0cb8bb306ec6533e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
from typing import List, Dict, Tuple, Optional, Any

# Construct schema_data as a list of tuples
# Each tuple represents a row with (schema, table, column) information
schema_data = [
    ('public', 'users', 'id'),
    ('public', 'users', 'name'),
    ('public', 'users', 'email'),
    ('analytics', 'events', 'event_id'),
    ('analytics', 'events', 'timestamp'),
    ('staging', 'temp_data', 'raw_value'),
]

# Construct columns list to match the schema_data tuple structure
columns = ['schema', 'table', 'column']

ARGS = {
    'schema_data': schema_data,
    'columns': columns,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
main Not yet run
unverified (harvested, no recorded run)
AITRICS/EMR-AGENT/EMR-Agent/featureMap_evaluation.py
code served (permissive licence) · get_code("c358139bc207e774")
How it ran

no invocation recorded.

setup_logging Not yet run
unverified (harvested, no recorded run)
AITRICS/EMR-AGENT/EMR-Agent/models/DIN-SQL.py
code served (permissive licence) · get_code("a7a116336ab05e5f")
How it ran

no invocation recorded.

setup_logging Not yet run
unverified (harvested, no recorded run)
AITRICS/EMR-AGENT/EMR-Agent/models/ehr_seqsql.py
code served (permissive licence) · get_code("affeee748b50d7ef")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Machine learning models for clinical prediction rely on structured data extracted from Electronic Medical Records (EMRs), yet this process remains dominated by hardcoded, database-specific pipelines for cohort definition, feature selection, and code mapping. These manual efforts limit scalability, reproducibility, and cross-institutional generalization. To address this, we introduce EMR-AGENT (Automated Generalized Extraction and Navigation Tool), an agent-based framework that replaces manual rule writing with dynamic, language model-driven interaction to extract and standardize structured clinical data. Our framework automates cohort selection, feature extraction, and code mapping through interactive querying of databases. Our modular agents iteratively observe query results and reason over schema and documentation, using SQL not just for data retrieval but also as a tool for database observation and decision making. This eliminates the need for handcrafted, schema-specific logic. To enable rigorous evaluation, we develop a benchmarking codebase for three EMR databases (MIMIC-III, eICU, SICdb), including both seen and unseen schema settings. Our results demonstrate strong performance and generalization across these databases, highlighting the feasibility of automating a process previously thought to require expert-driven design. The code will be released publicly at https://github.com/AITRICS/EMR-AGENT/tree/ main. For a demonstration, please visit our anonymous demo page: https: //anonymoususer-max600.github.io/EMR_AGENT/ * Equal contribution.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2510.00549")
get_code_for_paper("2510.00549")
have("2510.00549")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2510.00549.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2510.00549.svg)](https://syntology.ai/paper/2510.00549)

Connect an agent — have() is free.