import 'package:fis_jsonrpc/rpc.dart';
import 'package:vitalapp/managers/interfaces/models/patient_model_dto.dart';

import 'base.dart';

abstract class IPatientManager implements IManager {
  /// 创建居民
  ///
  /// 返回 Code
  Future<String?> create(CreatePatientRequest request);

  /// 获取居民分页列表
  Future<PageCollection<PatientModelDTO>?> getPagedList(
      PatientPageRequest request);

  /// 获取离线居民列表
  Future<List<PatientModelDTO>?> getPagedOfflineList(
      PatientPageRequest request);

  /// 获取居民详情
  Future<PatientDTO?> getDetail(String code);

  Future<bool> updatePatientAsync(UpdatePatientRequest request);

  ///创建居民健康信息
  Future<String> createPatientExtensionAsync(
      CreatePatientExtensionRequest request);

  ///获取居民健康信息
  Future<PatientExtensionDTO?> getPatientExtensionDetailByCodeAndKeyAsync(
      GetPatientExtensionByCodeAndKeyRequest request);

  ///更新居民健康信息
  Future<bool> updatePatientExtensionAsync(
      UpdatePatientExtensionRequest request);

  ///设置居民的人群分类
  Future<bool> setCrowdLabelsAsync(
      String patientCode, List<String> carowLabels);

  ///获取所有userCode等于空的数据，并赋值
  ///
  ///[userCode] 用户Code
  ///
  Future<void> resettingUsercodeIsEmptyData();
}
