make case catalog read-only
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
医疗问诊 Agent 是医疗教学平台中的问诊训练服务。后端负责 Django 用户身份校验、病例读取、多轮问诊、检查申请、诊断治疗提交、AI 评价、评分明细、PDF 报告和历史训练记录。
|
||||
|
||||
病例库在本服务中为只读数据源。病例新增、解析、修改和删除由外部病例管理系统负责;本服务只读取已发布病例及其训练扩展、检查项和评分规则。
|
||||
|
||||
## 项目结构
|
||||
|
||||
仓库根目录可以直接部署为服务器的 `fastapi/` 目录:
|
||||
@@ -127,14 +129,14 @@ docker compose exec fastapi python scripts/check_final_schema.py
|
||||
docker compose exec fastapi python scripts/check_final_demo_readiness.py
|
||||
```
|
||||
|
||||
仅在结构检查确认缺少 Agent 所需表时,备份数据库后执行:
|
||||
以下迁移脚本只用于独立本地开发库或旧环境升级,不得用于共享生产病例库:
|
||||
|
||||
```bash
|
||||
docker compose exec fastapi python scripts/migrate_to_new_schema.py
|
||||
docker compose exec fastapi python scripts/migrate_user_department_score_detail.py
|
||||
```
|
||||
|
||||
迁移脚本使用 `create_all` 补齐 Agent 所需表,不删除 Django 或现有业务表;`migrate_to_new_schema.py` 会在缺少对应数据时写入 Demo 病例和基础数据。
|
||||
迁移脚本使用 `create_all` 补齐 Agent 所需表,不删除 Django 或现有业务表;`migrate_to_new_schema.py` 会写入 Demo 病例和基础数据。共享环境中的病例数据由外部病例管理系统维护。
|
||||
|
||||
## 部署验证
|
||||
|
||||
@@ -170,5 +172,4 @@ python -m compileall app scripts tests
|
||||
python tests\test_core_logic.py
|
||||
python tests\test_api_contract.py
|
||||
python tests\test_demo_flow.py
|
||||
python tests\test_import_source_case_sql.py
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user