feat(subjects): add visit drawer and editable screening dates
This commit is contained in:
@@ -10,6 +10,7 @@ from app.crud.visit import (
|
||||
validate_early_termination_date,
|
||||
)
|
||||
from app.schemas.study import StudyUpdate
|
||||
from app.schemas.visit import VisitCreate
|
||||
|
||||
|
||||
def test_build_visit_schedule_dates_uses_per_visit_windows():
|
||||
@@ -105,6 +106,19 @@ def test_study_update_allows_multiple_visits_with_same_baseline_offset():
|
||||
assert [item.visit_code for item in payload.visit_schedule or []] == ["筛选访视", "基线访视"]
|
||||
|
||||
|
||||
def test_visit_create_accepts_actual_date_and_notes_for_shared_drawer_create_flow():
|
||||
payload = VisitCreate(
|
||||
subject_id="00000000-0000-0000-0000-000000000001",
|
||||
visit_code="V4",
|
||||
planned_date=date(2026, 6, 1),
|
||||
actual_date=date(2026, 6, 2),
|
||||
notes="现场已完成",
|
||||
)
|
||||
|
||||
assert payload.actual_date == date(2026, 6, 2)
|
||||
assert payload.notes == "现场已完成"
|
||||
|
||||
|
||||
def test_sort_visits_for_display_follows_configured_visit_order_without_dates():
|
||||
visits = [
|
||||
SimpleNamespace(visit_code="V1", planned_date=None),
|
||||
|
||||
Reference in New Issue
Block a user