feat(core): HealthDataProvider 新增 get_upcoming_appointments + get_medication_list
This commit is contained in:
@@ -39,6 +39,20 @@ pub trait HealthDataProvider: Send + Sync {
|
||||
metrics: &[String],
|
||||
range: &TimeRange,
|
||||
) -> AppResult<TrendAnalysisDto>;
|
||||
|
||||
/// 获取患者即将到来的预约
|
||||
async fn get_upcoming_appointments(
|
||||
&self,
|
||||
tenant_id: Uuid,
|
||||
patient_id: Uuid,
|
||||
) -> AppResult<Vec<AppointmentSummaryDto>>;
|
||||
|
||||
/// 获取患者当前用药列表
|
||||
async fn get_medication_list(
|
||||
&self,
|
||||
tenant_id: Uuid,
|
||||
patient_id: Uuid,
|
||||
) -> AppResult<Vec<MedicationSummaryDto>>;
|
||||
}
|
||||
|
||||
// === DTO 定义 ===
|
||||
@@ -152,3 +166,21 @@ pub struct AnomalyInfo {
|
||||
pub std_dev: f64,
|
||||
pub deviation: f64,
|
||||
}
|
||||
|
||||
// === Agent 新增 DTO ===
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AppointmentSummaryDto {
|
||||
pub id: Uuid,
|
||||
pub department: String,
|
||||
pub doctor_name: String,
|
||||
pub scheduled_at: String,
|
||||
pub status: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct MedicationSummaryDto {
|
||||
pub name: String,
|
||||
pub dosage: String,
|
||||
pub frequency: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user