|
|
|
|
|
from __future__ import annotations |
|
|
"""Global configuration for AI E-Consult V2. |
|
|
|
|
|
- Provider metadata (demo-only) |
|
|
- CPT demo rates/descriptors |
|
|
- Canonical paths (via src.paths) |
|
|
- Deterministic export filenames |
|
|
""" |
|
|
|
|
|
from dataclasses import dataclass |
|
|
from typing import Dict, Any |
|
|
from pathlib import Path |
|
|
from datetime import datetime, timezone |
|
|
|
|
|
from . import paths |
|
|
|
|
|
APP_NAME: str = "AI E-Consult V2" |
|
|
SCHEMA_VERSION: int = 2 |
|
|
|
|
|
|
|
|
PROVIDER: Dict[str, str] = { |
|
|
"provider_name": "Example Medical Group, Demo Only", |
|
|
"npi": "1999999999", |
|
|
"tin": "12-3456789", |
|
|
"address_line1": "123 Demo Way", |
|
|
"address_line2": "Suite 100", |
|
|
"city": "Sampleville", |
|
|
"state": "CA", |
|
|
"zip": "94000", |
|
|
"phone": "555-123-4567", |
|
|
} |
|
|
|
|
|
|
|
|
CPT: Dict[str, Dict[str, Any]] = { |
|
|
"99446": {"rate": 35, "descriptor": "Interprofessional consult; 5β10 min"}, |
|
|
"99447": {"rate": 55, "descriptor": "Interprofessional consult; 11β20 min"}, |
|
|
"99448": {"rate": 85, "descriptor": "Interprofessional consult; 21β30 min"}, |
|
|
"99449": {"rate": 110, "descriptor": "Interprofessional consult; β₯ 31 min"}, |
|
|
"99451": {"rate": 37, "descriptor": "Written report β₯ 5 min"}, |
|
|
} |
|
|
|
|
|
def utc_timestamp() -> str: |
|
|
"""Return an ISO8601-ish UTC timestamp for filenames, e.g., 20250110T142355Z.""" |
|
|
return datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ") |
|
|
|
|
|
def paths_dict() -> Dict[str, str]: |
|
|
"""Expose canonical project paths resolved for the current runtime.""" |
|
|
return { |
|
|
"base_dir": str(paths.base_dir()), |
|
|
"guidelines_dir": str(paths.guidelines_dir()), |
|
|
"faiss_index_dir": str(paths.faiss_index_dir()), |
|
|
"cases_dir": str(paths.cases_dir()), |
|
|
"exports_dir": str(paths.exports_dir()), |
|
|
"audit_dir": str(paths.audit_dir()), |
|
|
"hf_cache_dir": str(paths.hf_cache_dir()), |
|
|
} |
|
|
|
|
|
def make_export_path(case_id: str, artifact_filename: str) -> Path: |
|
|
"""Build deterministic export path: EC-{id}_{timestamp}_{artifact}.ext""" |
|
|
ts = utc_timestamp() |
|
|
out_dir = paths.exports_dir() |
|
|
out_dir.mkdir(parents=True, exist_ok=True) |
|
|
return out_dir / f"EC-{case_id}_{ts}_{artifact_filename}" |
|
|
|