Initial commit: ICU Patient Display Management System

This commit is contained in:
Atharv1705
2026-10-23 14:59:37 +05:30
commit b7b29ee033
86 changed files with 22707 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import asyncio
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
from app.models.user import User, UserRole
from app.core.security import get_password_hash
engine = create_async_engine("sqlite+aiosqlite:///./icu_local.db", echo=False)
AsyncSessionLocal = async_sessionmaker(bind=engine, expire_on_commit=False)
async def seed_user():
async with AsyncSessionLocal() as session:
user = User(
name="Demo Nurse",
email="nurse@hospital.com",
hashed_password=get_password_hash("password123"),
role=UserRole.NURSE
)
session.add(user)
await session.commit()
print("Demo user created successfully.")
asyncio.run(seed_user())