Skip to content

Commit

Permalink
Improved patient page
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Nov 20, 2024
1 parent e93531e commit 8b547de
Show file tree
Hide file tree
Showing 12 changed files with 595 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BATCH_SIZE=1
CHROMA_SERVICE_HOST=chromadb-dev
CHROMA_SERVICE_PORT=8000

LLM_SERVICE_HOST=gpu033.cluster.local
LLM_SERVICE_HOST=host.docker.internal
LLM_SERVICE_PORT=8080
LLM_SERVICE_URL=http://${LLM_SERVICE_HOST}:${LLM_SERVICE_PORT}/v1

Expand Down
3 changes: 2 additions & 1 deletion adrenaline/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from api.patients.answer import initialize_llm
from api.patients.db import check_database_connection
from api.routes.answer import router as answer_router
from api.routes.auth import router as auth_router
Expand Down Expand Up @@ -49,7 +50,7 @@ async def startup_event() -> None:
await init_db()
async for session in get_async_session():
await create_initial_admin(session)
# await initialize_llm()
await initialize_llm()
except Exception as e:
logger.error(f"Startup failed: {str(e)}")
raise
Expand Down
9 changes: 9 additions & 0 deletions adrenaline/api/patients/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ class Event(BaseModel):
The numeric value of the event.
text_value : Optional[str]
The text value of the event.
event_type : Optional[str]
The type of the event.
environment : Optional[str]
The environment in which the event occurred.
details: Optional[str]
Additional details about the event.
"""

patient_id: int
Expand All @@ -123,6 +129,9 @@ class Event(BaseModel):
timestamp: Optional[datetime]
numeric_value: Optional[float]
text_value: Optional[str]
event_type: Optional[str]
environment: Optional[str]
details: Optional[str]


class PatientData(BaseModel):
Expand Down
Loading

0 comments on commit 8b547de

Please sign in to comment.