12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import 'package:vitalapp/database/entities/defines.dart';
- import 'package:vitalapp/database/entities/patient.dart';
- import 'package:vitalapp/managers/interfaces/base.dart';
- import 'models/common.dart';
- import 'models/data_sync.dart';
- /// 数据同步Mananger
- abstract class IDataSyncManager implements IManager {
- /// 获取病人分页列表
- ///
- /// [pageIndex] 当前页,从 `1` 开始
- ///
- /// [pageSize] 页码,默认 `50`
- ///
- /// [syncStates] 同步状态,为空时查询全部状态
- ///
- /// [isReturnCountOnly] 是否只返回数量
- Future<PagedDataCollection<PatientEntity>> getPatientPagedList(
- int pageIndex, {
- int pageSize = 50,
- List<OfflineDataSyncState>? syncStates,
- bool isReturnCountOnly = false,
- });
- /// 获取所有待上传居民列表
- Future<List<PatientEntity>> getPatientWaitUploadAllList();
- /// 同步病人所有模块数据
- Future<bool> syncPatientAllData(String patientCode);
- /// 校验同步是否完成
- bool checkPatientSyncCompleted(PatientEntity entity);
- /// 同步病人
- Future<bool> syncPatient(PatientEntity entity);
- /// 同步居民的健康检测数据
- Future<int> syncPatientDiagnosis(String patientCode);
- /// 同步居民的随访数据
- Future<int> syncPatientFollowUp(String patientCode);
- /// 同步居民的健康体检
- Future<int> syncPatientExam(String patientCode);
- /// 同步居民的中医体质
- Future<int> syncPatientTCMConsitution(String patientCode);
- }
|