import 'package:fis_jsonrpc/rpc.dart';

import 'base.dart';

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

  /// 获取居民分页列表
  Future<PageCollection<PatientDTO>?> getPagedList(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);
}

/// 病人存储适配器
abstract class IPatientStoreAdapter implements IPatientManager {
  // TODO:[melon] 偷懒了，此Manager没有太多查询，适配器直接实现此接口
}
