feat(miniprogram): 添加健康记录和诊断记录查看页面
- 新建 service: health-record.ts(listHealthRecords + listDiagnoses) - 新建页面: health-records/index(体检记录列表,分页+下拉刷新) - 新建页面: diagnoses/index(诊断记录列表,类型/状态标签) - 路由注册到 pkg-profile 分包 - "我的"页菜单添加健康记录、诊断记录入口
This commit is contained in:
55
apps/miniprogram/src/services/health-record.ts
Normal file
55
apps/miniprogram/src/services/health-record.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user