brand: remove all poona references and standardize on XYZ Hospital
This commit is contained in:
@@ -2,7 +2,7 @@ import logging
|
||||
from sqlalchemy.engine import Engine
|
||||
from ..models import Base
|
||||
|
||||
logger = logging.getLogger("poona_ams")
|
||||
logger = logging.getLogger("xyz_ams")
|
||||
|
||||
|
||||
def run_sqlite_migrations(engine: Engine) -> None:
|
||||
|
||||
+3
-3
@@ -43,7 +43,7 @@ logging.basicConfig(
|
||||
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
|
||||
level=logging.INFO,
|
||||
)
|
||||
logger = logging.getLogger("poona_ams")
|
||||
logger = logging.getLogger("xyz_ams")
|
||||
|
||||
|
||||
def _scheduled_alert_job() -> None:
|
||||
@@ -86,7 +86,7 @@ async def lifespan(app: FastAPI):
|
||||
scheduler.start()
|
||||
logger.info("APScheduler daily alert check started (06:00 %s).", app_settings.TIMEZONE)
|
||||
|
||||
logger.info("Poona Hospital AMS started.")
|
||||
logger.info("XYZ Hospital AMS started.")
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
@@ -96,7 +96,7 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
|
||||
app = FastAPI(
|
||||
title="Poona Hospital AMS",
|
||||
title="XYZ Hospital AMS",
|
||||
version="0.1.0",
|
||||
docs_url="/docs",
|
||||
lifespan=lifespan,
|
||||
|
||||
@@ -5,4 +5,4 @@ router = APIRouter(tags=["health"])
|
||||
|
||||
@router.get("/health")
|
||||
def health_check():
|
||||
return {"status": "ok", "service": "Poona Hospital AMS", "version": "0.1.0"}
|
||||
return {"status": "ok", "service": "XYZ Hospital AMS", "version": "0.1.0"}
|
||||
|
||||
+15
-15
@@ -65,7 +65,7 @@ def _make_placeholder_jpeg(dest: Path, label: str, bg_rgb: tuple[int, int, int])
|
||||
img = Image.new("RGB", (640, 480), color=bg_rgb)
|
||||
draw = ImageDraw.Draw(img)
|
||||
draw.rectangle([20, 20, 620, 460], outline=(255, 255, 255), width=3)
|
||||
draw.text((40, 200), "Poona Hospital & Research Centre", fill=(255, 255, 255))
|
||||
draw.text((40, 200), "XYZ Hospital", fill=(255, 255, 255))
|
||||
draw.text((40, 240), label, fill=(240, 240, 240))
|
||||
img.save(dest, format="JPEG", quality=80)
|
||||
return dest.stat().st_size
|
||||
@@ -205,17 +205,17 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
# 7. Users (11: 5 demo + 6 realistic hospital staff)
|
||||
demo_pw_hash = hash_password("Demo@123")
|
||||
user_specs = [
|
||||
("Dr. Rajesh Kulkarni", "admin@poona.demo", "system_admin", None),
|
||||
("Suresh Deshmukh", "bio@poona.demo", "biomedical", None),
|
||||
("Sister Kavita Joshi", "dept@poona.demo", "department_user", departments[0].id), # ICU
|
||||
("Dr. Anjali Gokhale", "mgmt@poona.demo", "management", None),
|
||||
("Priya Patwardhan", "coord@poona.demo", "coordinator", None),
|
||||
("Vikram Shinde", "vikram.shinde@poona.demo", "biomedical", None),
|
||||
("Sneha Kulkarni", "sneha.kulkarni@poona.demo", "biomedical", None),
|
||||
("Dr. Amit Bhosale", "dr.amit.bhosale@poona.demo", "department_user", departments[1].id), # OT
|
||||
("Meera Nair", "meera.nair@poona.demo", "department_user", departments[2].id), # RAD
|
||||
("Rohit Deshpande", "rohit.deshpande@poona.demo", "department_user", departments[3].id), # CARD
|
||||
("Neha Chavan", "neha.chavan@poona.demo", "coordinator", None),
|
||||
("Dr. Rajesh Kulkarni", "admin@xyz.demo", "system_admin", None),
|
||||
("Suresh Deshmukh", "bio@xyz.demo", "biomedical", None),
|
||||
("Sister Kavita Joshi", "dept@xyz.demo", "department_user", departments[0].id), # ICU
|
||||
("Dr. Anjali Gokhale", "mgmt@xyz.demo", "management", None),
|
||||
("Priya Patwardhan", "coord@xyz.demo", "coordinator", None),
|
||||
("Vikram Shinde", "vikram.shinde@xyz.demo", "biomedical", None),
|
||||
("Sneha Kulkarni", "sneha.kulkarni@xyz.demo", "biomedical", None),
|
||||
("Dr. Amit Bhosale", "dr.amit.bhosale@xyz.demo", "department_user", departments[1].id), # OT
|
||||
("Meera Nair", "meera.nair@xyz.demo", "department_user", departments[2].id), # RAD
|
||||
("Rohit Deshpande", "rohit.deshpande@xyz.demo", "department_user", departments[3].id), # CARD
|
||||
("Neha Chavan", "neha.chavan@xyz.demo", "coordinator", None),
|
||||
]
|
||||
users: list[User] = []
|
||||
for uname, uemail, urole, udept in user_specs:
|
||||
@@ -337,7 +337,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
criticality=criticality,
|
||||
requires_calibration=needs_cal,
|
||||
insurance_applicable=needs_ins,
|
||||
remarks="Procured under Poona Hospital capital equipment budget." if not is_rented else "Leased medical equipment on monthly rental.",
|
||||
remarks="Procured under XYZ Hospital capital equipment budget." if not is_rented else "Leased medical equipment on monthly rental.",
|
||||
created_by_id=admin_user.id,
|
||||
updated_by_id=admin_user.id,
|
||||
)
|
||||
@@ -716,7 +716,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
description=issue_descriptions[idx % len(issue_descriptions)],
|
||||
breakdown_details=f"Reported by {asset.department.code} nursing/technical staff during routine shift.",
|
||||
priority=priority,
|
||||
notes="Logged via Poona AMS helpdesk.",
|
||||
notes="Logged via XYZ AMS helpdesk.",
|
||||
registered_at=reg_at,
|
||||
registered_by_id=reg_user.id,
|
||||
received_by_id=recv_user.id,
|
||||
@@ -820,7 +820,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
for p in range(6):
|
||||
fname = f"seed_doc_{p + 1:02d}.pdf"
|
||||
fpath = target_upload_dir / fname
|
||||
pdf_bytes = _make_minimal_pdf(f"Poona Hospital Service / Calibration Report #{p + 1}")
|
||||
pdf_bytes = _make_minimal_pdf(f"XYZ Hospital Service / Calibration Report #{p + 1}")
|
||||
fpath.write_bytes(pdf_bytes)
|
||||
db.add(
|
||||
Attachment(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Poona Hospital Asset Management System
|
||||
XYZ Hospital Asset Management System
|
||||
Bulk Import Template Builders for Contracts, Calibration Plans, and Insurance Policies.
|
||||
"""
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ def _write_styled_sheet(ws, report_payload: dict[str, Any]) -> None:
|
||||
# Explicitly show grid lines in Excel view
|
||||
ws.views.sheetView[0].showGridLines = True
|
||||
|
||||
title_text = f"Poona Hospital & Research Centre \u2014 {report_payload['title']}"
|
||||
title_text = f"XYZ Hospital \u2014 {report_payload['title']}"
|
||||
meta_text = (
|
||||
f"Generated: {format_datetime(utc_now())} IST | "
|
||||
f"Filters: {_format_filters_echo(report_payload.get('filters_applied', {}))}"
|
||||
@@ -218,7 +218,7 @@ def _write_styled_sheet(ws, report_payload: dict[str, Any]) -> None:
|
||||
ws.page_setup.fitToHeight = 0
|
||||
ws.sheet_properties.pageSetUpPr.fitToPage = True
|
||||
ws.print_title_rows = f"{header_row}:{header_row}"
|
||||
ws.oddHeader.left.text = "&BPoona Hospital & Research Centre&B"
|
||||
ws.oddHeader.left.text = "&BXYZ Hospital&B"
|
||||
ws.oddHeader.right.text = report_payload.get("title", "Operational Report")
|
||||
ws.oddFooter.left.text = "Confidential • Biomedical Asset Management System"
|
||||
ws.oddFooter.right.text = "Page &P of &N"
|
||||
@@ -315,7 +315,7 @@ def build_csv(report_payload: dict[str, Any]) -> BytesIO:
|
||||
sio = StringIO()
|
||||
writer = csv.writer(sio)
|
||||
|
||||
writer.writerow([f"Poona Hospital & Research Centre - {report_payload['title']}"])
|
||||
writer.writerow([f"XYZ Hospital - {report_payload['title']}"])
|
||||
writer.writerow(
|
||||
[
|
||||
f"Generated: {format_datetime(utc_now())} IST",
|
||||
|
||||
@@ -262,7 +262,7 @@ SETTINGS_SCHEMA: list[dict[str, Any]] = [
|
||||
"type": "str",
|
||||
"default": "",
|
||||
"label": "SMTP Host",
|
||||
"description": "Hospital outbound mail server hostname (e.g. smtp.poonahospital.org).",
|
||||
"description": "Hospital outbound mail server hostname (e.g. smtp.xyzhospital.org).",
|
||||
"min": None,
|
||||
"max": None,
|
||||
"options": None,
|
||||
@@ -280,7 +280,7 @@ SETTINGS_SCHEMA: list[dict[str, Any]] = [
|
||||
{
|
||||
"key": "smtp_from_email",
|
||||
"type": "str",
|
||||
"default": "ams-alerts@poonahospital.org",
|
||||
"default": "ams-alerts@xyzhospital.org",
|
||||
"label": "SMTP From Email Address",
|
||||
"description": "Sender email address displayed on alert notifications.",
|
||||
"min": None,
|
||||
|
||||
Reference in New Issue
Block a user