- BLE: 修复Omron设备Indication模式连接(先订阅后配CCCD + forceIndications) + 直连重连
- BLE: 设备断连实时检测(connectionState流→Provider→UI)
- 修复: 血压数据上报后端枚举不匹配(Device→DeviceSync)导致500
- 新增: DELETE /api/health-records/{id} 后端接口
- 设备管理页: 白色主题重设计 + 直连重连 + 实时状态 + Toast通知
- 设备扫描页: 白色主题 + 扫描动画居中 + 已连接等待页面
- 健康记录: 左滑删除(Dismissible) + 同时清理_allRecords和_filtered
- 导航: 修复自定义路由栈下Navigator.pop黑屏bug
- 文档: 医生端合并App完整设计文档(已确认版)
34 lines
774 B
Dart
34 lines
774 B
Dart
/// 血压测量数据模型
|
|
class BpReading {
|
|
final int systolic;
|
|
final int diastolic;
|
|
final int? pulse;
|
|
final DateTime timestamp;
|
|
final String? userId;
|
|
final bool isKpa;
|
|
final bool hasBodyMovement;
|
|
final bool hasIrregularPulse;
|
|
|
|
const BpReading({
|
|
required this.systolic,
|
|
required this.diastolic,
|
|
this.pulse,
|
|
required this.timestamp,
|
|
this.userId,
|
|
this.isKpa = false,
|
|
this.hasBodyMovement = false,
|
|
this.hasIrregularPulse = false,
|
|
});
|
|
|
|
String get display => '$systolic/$diastolic';
|
|
|
|
Map<String, dynamic> toHealthRecord() => {
|
|
'type': 'BloodPressure',
|
|
'systolic': systolic,
|
|
'diastolic': diastolic,
|
|
'source': 'DeviceSync',
|
|
'unit': 'mmHg',
|
|
'recordedAt': timestamp.toUtc().toIso8601String(),
|
|
};
|
|
}
|