instance method

Future<bool> instance({
  1. required String? apiKey,
  2. required String? name,
  3. required String? patientId,
  4. required String? dob,
  5. required String? gender,
})

Create an instance - Client Validation and Patient Registration

  • apikey : API-Key
  • name : Patient name
  • patientId : Provide the current Patient Id.
  • dob : Date of Birth Format: YYYY-mm-dd
  • gender : Male/Female/Others

Implementation

Future<bool> instance(
    {required String? apiKey,
    required String? name,
    required String? patientId,
    required String? dob, //YYYY-mm-dd
    required String? gender}) async {
  await LocalStorage.init();
  final bool isClientValid = await ApiService()
      .clientValidation(apiKey!, name!, patientId!, dob!, gender!);
  if (isClientValid) {
    return isClientValid;
  }
  logger.d(isClientValid);
  return false;
}