patient.dart 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import 'package:fis_jsonrpc/rpc.dart';
  2. import 'package:vitalapp/managers/interfaces/models/patient_model_dto.dart';
  3. import 'package:vitalapp/pages/patient/info/widgets/ext_model.dart';
  4. import 'base.dart';
  5. import 'models/patient.dart';
  6. abstract class IPatientManager implements IManager {
  7. /// 创建居民
  8. ///
  9. /// 返回 Code
  10. Future<String?> create(CreatePatientRequest2 request);
  11. /// 获取居民分页列表
  12. Future<PageCollection<PatientModelDTO>?> getPagedList(
  13. PatientPageRequest request);
  14. /// 获取离线居民列表
  15. Future<List<PatientModelDTO>?> getPagedOfflineList(
  16. String? keyword,
  17. DateTime? startTime,
  18. DateTime? endTime,
  19. );
  20. ///创建病人扩展信息
  21. Future<String> createPatientExtension(
  22. String patientCode,
  23. PatientHealthInfoModel healthInfo,
  24. PatientDetailInfoModel detailInfo,
  25. String healthCode);
  26. /// 获取居民详情
  27. ///
  28. /// [isValidOperationDoctor] 是否根据操作医生验证
  29. ///
  30. /// [allowOfflineData] 允许离线数据
  31. Future<PatientDTO?> getDetail(
  32. String code, {
  33. bool isValidOperationDoctor = true,
  34. bool allowOfflineData = true,
  35. });
  36. /// 获取完整的离线居民数据
  37. Future<PatientFullInfoModel?> getOfflineFullInfo(String code);
  38. Future<bool> updatePatientAsync(UpdatePatientRequest2 request);
  39. ///创建居民健康信息
  40. Future<String> createPatientExtensionAsync(
  41. CreatePatientExtensionRequest request);
  42. ///获取居民健康信息
  43. Future<PatientExtensionDTO?> getPatientExtensionDetailByCodeAndKeyAsync(
  44. GetPatientExtensionByCodeAndKeyRequest request);
  45. ///更新居民健康信息
  46. Future<bool> updatePatientExtensionAsync(
  47. UpdatePatientExtensionRequest request);
  48. List<String> crowdLabelsConvert(List<String> labels);
  49. ///设置居民的人群分类
  50. Future<bool> setCrowdLabelsAsync(
  51. String patientCode, List<String> carowLabels);
  52. List<String> convertLabelsFormDto(List<String> labels);
  53. ///获取所有userCode等于空的数据,并赋值
  54. ///
  55. ///[userCode] 用户Code
  56. ///
  57. Future<void> resettingUsercodeIsEmptyData();
  58. /// 切换当前选中居民
  59. Future<void> switchCurrentPatient(PatientDTO dto);
  60. /// 根据code切换当前选中居民
  61. Future<void> switchCurrentPatientByCode(String code);
  62. /// 根据体检号获取体检者信息
  63. Future<RegisterPersonInfoDTO?>
  64. getRegisterPersonInfoByPhysicalExamNumberAsync({
  65. required String physicalExamNumber,
  66. });
  67. // /// 更新离线记录为同步成功
  68. // Future<void> updateOfflineSyncDone();
  69. /// 删除居民
  70. Future<bool> removePatient(String code);
  71. /// 获取统计信息
  72. Future<PatientStatisticDTO> getStatistic();
  73. }