-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
40 lines (34 loc) · 1.25 KB
/
example.py
File metadata and controls
40 lines (34 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
from dotenv import load_dotenv
from MedCP import run_medcp
# Load environment variables from .env file
load_dotenv()
claude_api_key = os.getenv("CLAUDE_API_KEY")
kg_uri = os.getenv("KNOWLEDGE_GRAPH_URI")
kg_username = os.getenv("KNOWLEDGE_GRAPH_USERNAME")
kg_password = os.getenv("KNOWLEDGE_GRAPH_PASSWORD")
kg_database = os.getenv("KNOWLEDGE_GRAPH_DATABASE", "spoke")
clinical_server = os.getenv("CLINICAL_RECORDS_SERVER")
clinical_database = os.getenv("CLINICAL_RECORDS_DATABASE")
clinical_username = os.getenv("CLINICAL_RECORDS_USERNAME")
clinical_password = os.getenv("CLINICAL_RECORDS_PASSWORD")
log_level = os.getenv("MEDCP_LOG_LEVEL", "INFO")
namespace = os.getenv("MEDCP_NAMESPACE", "MedCP")
result = run_medcp(
question_name="test",
question_text="How many patients received any statin in the past year??",
claude_api_key=claude_api_key,
kg_uri=kg_uri,
kg_username=kg_username,
kg_password=kg_password,
clinical_server=clinical_server,
clinical_database=clinical_database,
clinical_username=clinical_username,
clinical_password=clinical_password,
kg_database=kg_database,
log_level=log_level,
namespace=namespace,
use_clinical_records=True,
use_knowledge_graph=True,
output_dir="results"
)