import 'package:fis_jsonrpc/services/exam.m.dart';
import 'package:vitalapp/managers/interfaces/health_check_record.dart';
import 'package:vitalapp/rpc.dart';
import 'package:vitalapp/store/store.dart';

class HealthCheckRecordManager implements IHealthCehckRecordManager {
  @override
  Future<List<ExamRecordDTO>?> getExamRecordList(String patientCode) async {
    try {
      GetExamRecordListRequest request = GetExamRecordListRequest(
          patientCode: patientCode,
          keys: [
            "ZZYBZK",
            "SHFS",
            "ZQCT",
            "FZJC",
            "XCZYWT",
            "ZYYYFMYGHYFJZS",
            "JKPJJZD",
          ],
          token: Store.user.token);
      final result = await rpc.exam.getExamRecordListAsync(request);
      return result;
    } catch (e) {
      return null;
    }
  }
}
