更新
This commit is contained in:
@@ -1575,9 +1575,17 @@ class AppointmentsPage(QWidget):
|
||||
)
|
||||
present_diagnosis_ai_report(self.repository, self.permissions, self, payload)
|
||||
|
||||
def _open_ai_consult(self) -> None:
|
||||
def open_selected_ai_consult(self) -> bool:
|
||||
"""Open the diagnosis-scoped assistant for the selected appointment."""
|
||||
|
||||
row = self._current_row()
|
||||
diagnosis_id = _diagnosis_id(row)
|
||||
if (
|
||||
row is None
|
||||
or diagnosis_id <= 0
|
||||
or not can_open_ai_consult(self.permissions)
|
||||
):
|
||||
return False
|
||||
present_ai_consult(
|
||||
self.repository,
|
||||
self.permissions,
|
||||
@@ -1587,6 +1595,11 @@ class AppointmentsPage(QWidget):
|
||||
seed=row,
|
||||
source_title="问诊列表",
|
||||
)
|
||||
return True
|
||||
|
||||
def _open_ai_consult(self) -> None:
|
||||
if not self.open_selected_ai_consult():
|
||||
show_toast(self, "请先选择一条有关联诊单的问诊记录。", "warning")
|
||||
|
||||
def _request_video(self) -> None:
|
||||
if not _canonical_allowed(
|
||||
|
||||
Reference in New Issue
Block a user