- 新建 service: health-record.ts(listHealthRecords + listDiagnoses) - 新建页面: health-records/index(体检记录列表,分页+下拉刷新) - 新建页面: diagnoses/index(诊断记录列表,类型/状态标签) - 路由注册到 pkg-profile 分包 - "我的"页菜单添加健康记录、诊断记录入口
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { api } from './request';
|
|
|
|
// ---- 体检记录 (Health Record) ----
|
|
|
|
export interface HealthRecord {
|
|
id: string;
|
|
patient_id: string;
|
|
record_type: string;
|
|
record_date: string;
|
|
source?: string;
|
|
overall_assessment?: string;
|
|
report_file_url?: string;
|
|
notes?: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
version: number;
|
|
}
|
|
|
|
export async function listHealthRecords(
|
|
patientId: string,
|
|
params?: { page?: number; page_size?: number },
|
|
) {
|
|
return api.get<{ data: HealthRecord[]; total: number }>(
|
|
`/health/patients/${patientId}/health-records`,
|
|
params,
|
|
);
|
|
}
|
|
|
|
// ---- 诊断记录 (Diagnosis) ----
|
|
|
|
export interface Diagnosis {
|
|
id: string;
|
|
patient_id: string;
|
|
health_record_id?: string;
|
|
icd_code: string;
|
|
diagnosis_name: string;
|
|
diagnosis_type: string;
|
|
diagnosed_date: string;
|
|
status: string;
|
|
diagnosed_by?: string;
|
|
notes?: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
version: number;
|
|
}
|
|
|
|
export async function listDiagnoses(
|
|
patientId: string,
|
|
params?: { page?: number; page_size?: number },
|
|
) {
|
|
return api.get<{ data: Diagnosis[]; total: number }>(
|
|
`/health/patients/${patientId}/diagnoses`,
|
|
params,
|
|
);
|
|
}
|