Merge branch 'dev_aamir' of http://34.17.52.180/Haroon6138/HMG_Patient_App_New into dev_sultan

pull/14/head
Sultan khan 2 months ago
commit 61d10068ca

@ -106,7 +106,7 @@ class ApiClientImp implements ApiClient {
} }
} }
try { try {
var user = _appState.getAuthenticatedUser; var user = _appState.getAuthenticatedUser();
Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}; Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
if (!isExternal) { if (!isExternal) {
String? token = _appState.appAuthToken; String? token = _appState.appAuthToken;
@ -136,10 +136,12 @@ class ApiClientImp implements ApiClient {
// TODO : These should be from the appState // TODO : These should be from the appState
if (user != null) { if (user != null) {
body['TokenID'] = body['TokenID'] ?? token; body['TokenID'] = body['TokenID'] ?? token;
body['PatientID'] = body['PatientID'] ?? user.patientID; body['PatientID'] = body['PatientID'] ?? user.patientId;
body['PatientOutSA'] = body.containsKey('PatientOutSA') ? body['PatientOutSA'] ?? user.outSA : user.outSA; body['PatientOutSA'] = body.containsKey('PatientOutSA') ? body['PatientOutSA'] ?? user.outSa : user.outSa;
body['SessionID'] = getSessionId(body['TokenID'] ?? ""); //getSe // body['SessionID'] = body['TokenID'] == null
// ? ApiConsts.sessionID //Added By Aamir
// : getSessionId(body['TokenID'] ?? ""); //getSe
} }
} }
} }

@ -765,10 +765,13 @@ class ApiConsts {
static final String sendActivationCodeRegister = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; static final String sendActivationCodeRegister = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration';
static final String checkActivationCode = 'Services/Authentication.svc/REST/CheckActivationCode'; static final String checkActivationCode = 'Services/Authentication.svc/REST/CheckActivationCode';
static final String checkActivationCodeRegister = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration'; static final String checkActivationCodeRegister = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration';
static final String checkUsageAgreement = 'Services/Patients.svc/REST/CheckForUsageAgreement';
static final String getUserAgreementContent = 'Services/Patients.svc/REST/GetUsageAgreementText';
// static values for Api // static values for Api
static final double appVersionID = 18.7; static final double appVersionID = 18.7;
static final int appChannelId = 3; static final int appChannelId = 3;
static final String appIpAddress = "10.20.10.20"; static final String appIpAddress = "10.20.10.20";
static final String appGeneralId = "Cs2020@2016\$2958"; static final String appGeneralId = "Cs2020@2016\$2958";
static final String sessionID = 'TMRhVmkGhOsvamErw';
} }

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart';
@ -20,15 +22,34 @@ class AppState {
int getLanguageID() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode == "ar" ? 1 : 2; int getLanguageID() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode == "ar" ? 1 : 2;
int getDeviceTypeID() => Platform.isIOS ? 1 : 2;
String? getLanguageCode() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode; String? getLanguageCode() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode;
AuthenticatedUser? _authenticatedUser; AuthenticatedUser? _authenticatedRootUser;
AuthenticatedUser? _authenticatedChildUser;
void setAuthenticatedUser(AuthenticatedUser authenticatedUser, {bool isFamily = false}) {
if (isFamily) {
_authenticatedChildUser = authenticatedUser;
} else {
_authenticatedRootUser = authenticatedUser;
}
}
void setAuthenticatedUser(AuthenticatedUser authenticatedUser) { AuthenticatedUser? getAuthenticatedUser({bool isFamily = false}) {
_authenticatedUser = authenticatedUser; if (isFamily) {
return _authenticatedChildUser;
} else {
return _authenticatedRootUser;
}
} }
AuthenticatedUser? get getAuthenticatedUser => _authenticatedUser; String _userBloodGroup = "";
String get getUserBloodGroup => _userBloodGroup;
set setUserBloodGroup(String value) => _userBloodGroup = value;
SelectDeviceByImeiRespModelElement? _selectDeviceByImeiRespModelElement; SelectDeviceByImeiRespModelElement? _selectDeviceByImeiRespModelElement;

@ -1,5 +1,9 @@
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/features/authentication/models/request_models/send_activation_request_model.dart'; import 'package:hmg_patient_app_new/features/authentication/models/request_models/send_activation_request_model.dart';
import 'package:hmg_patient_app_new/features/common/models/commong_authanticated_req_model.dart';
class RequestUtils { class RequestUtils {
static dynamic getPatientAuthenticationRequest({ static dynamic getPatientAuthenticationRequest({
@ -50,7 +54,7 @@ class RequestUtils {
required bool patientOutSA, required bool patientOutSA,
required String? loginTokenID, required String? loginTokenID,
required var registeredData, required var registeredData,
required int? patientId, int? patientId,
required String nationIdText, required String nationIdText,
required String countryCode, required String countryCode,
}) { }) {
@ -128,4 +132,24 @@ class RequestUtils {
request.deviceTypeID = request.searchType; request.deviceTypeID = request.searchType;
return request; return request;
} }
static getAuthanticatedCommonRequest() {
AppState _appState = getIt.get<AppState>();
var request = CommonAuthanticatedRequest();
request.sessionId = ApiConsts.sessionID;
request.latitude = _appState.userLat;
request.longitude = _appState.userLong;
request.languageId = _appState.getLanguageID();
request.versionId = ApiConsts.appVersionID;
request.ipAdress = ApiConsts.appIpAddress;
request.deviceTypeId = _appState.getDeviceTypeID();
request.patientTypeId = _appState.getAuthenticatedUser()?.patientType;
request.patientType = _appState.getAuthenticatedUser()?.patientType;
request.generalid = ApiConsts.appGeneralId;
request.channel = ApiConsts.appChannelId;
request.patientId = _appState.getAuthenticatedUser()!.patientId;
request.patientOutSa = _appState.getAuthenticatedUser()!.outSa;
request.tokenId = null;
return request;
}
} }

@ -5,27 +5,25 @@ import 'package:hmg_patient_app_new/core/api/api_client.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/features/authentication/models/request_models/check_activation_code_register_request_model.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart';
import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class AuthenticationRepo { abstract class AuthenticationRepo {
Future<Either<Failure, GenericApiModel<SelectDeviceByImeiRespModelElement>>> selectDeviceByImei({ Future<Either<Failure, GenericApiModel<SelectDeviceByImeiRespModelElement>>> selectDeviceByImei({required String firebaseToken});
required String firebaseToken,
});
Future<Either<Failure, GenericApiModel<dynamic>>> checkPatientAuthentication({required dynamic checkPatientAuthenticationReq}); Future<Either<Failure, GenericApiModel<dynamic>>> checkPatientAuthentication({required dynamic checkPatientAuthenticationReq});
Future<Either<Failure, GenericApiModel<dynamic>>> sendActivationCodeRepo({ Future<Either<Failure, GenericApiModel<dynamic>>> sendActivationCodeRepo({required dynamic sendActivationCodeReq, String? languageID, bool isRegister = false});
required dynamic sendActivationCodeReq,
String? languageID,
bool isRegister = false,
});
Future<Either<Failure, GenericApiModel<dynamic>>> checkActivationCodeRepo({ Future<Either<Failure, GenericApiModel<dynamic>>> checkActivationCodeRepo(
required dynamic newRequest, // could be CheckActivationCodeReq or CheckActivationCodeRegisterReq {required dynamic newRequest, // could be CheckActivationCodeReq or CheckActivationCodeRegisterReq
required String? activationCode, required String? activationCode,
required bool isRegister, required bool isRegister});
});
Future<Either<Failure, GenericApiModel<dynamic>>> checkIfUserAgreed({required dynamic commonAuthanticatedRequest});
Future<Either<Failure, GenericApiModel<dynamic>>> getUserAgreementContent({required dynamic commonAuthanticatedRequest});
} }
class AuthenticationRepoImp implements AuthenticationRepo { class AuthenticationRepoImp implements AuthenticationRepo {
@ -198,4 +196,74 @@ class AuthenticationRepoImp implements AuthenticationRepo {
return Left(UnknownFailure(e.toString())); return Left(UnknownFailure(e.toString()));
} }
} }
@override
Future<Either<Failure, GenericApiModel<dynamic>>> checkIfUserAgreed({required dynamic commonAuthanticatedRequest}) async {
commonAuthanticatedRequest['Region'] = 1;
print("dsfsdd");
try {
GenericApiModel<dynamic>? apiResponse;
Failure? failure;
await apiClient.post(
ApiConsts.checkUsageAgreement,
body: commonAuthanticatedRequest,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
apiResponse = GenericApiModel<dynamic>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: response,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
@override
Future<Either<Failure, GenericApiModel<dynamic>>> getUserAgreementContent({required dynamic commonAuthanticatedRequest}) async {
commonAuthanticatedRequest['Region'] = 1;
print("dsfsdd");
try {
GenericApiModel<dynamic>? apiResponse;
Failure? failure;
await apiClient.post(
ApiConsts.getUserAgreementContent,
body: commonAuthanticatedRequest,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
apiResponse = GenericApiModel<dynamic>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: response,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
} }

@ -10,6 +10,7 @@ import 'package:hmg_patient_app_new/core/utils/request_utils.dart';
import 'package:hmg_patient_app_new/core/utils/validation_utils.dart'; import 'package:hmg_patient_app_new/core/utils/validation_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_repo.dart'; import 'package:hmg_patient_app_new/features/authentication/authentication_repo.dart';
import 'package:hmg_patient_app_new/features/authentication/models/request_models/check_activation_code_register_request_model.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/check_activation_code_resp_model.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/check_activation_code_resp_model.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
@ -19,6 +20,8 @@ import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'models/resp_models/authenticated_user_resp_model.dart';
class AuthenticationViewModel extends ChangeNotifier { class AuthenticationViewModel extends ChangeNotifier {
final AuthenticationRepo _authenticationRepo; final AuthenticationRepo _authenticationRepo;
final AppState _appState; final AppState _appState;
@ -87,7 +90,7 @@ class AuthenticationViewModel extends ChangeNotifier {
} }
} }
void clearDefaults() { void clearDefaultInputValues() {
nationalIdController.clear(); nationalIdController.clear();
phoneNumberController.clear(); phoneNumberController.clear();
dobController.clear(); dobController.clear();
@ -227,7 +230,7 @@ class AuthenticationViewModel extends ChangeNotifier {
patientOutSA: false, patientOutSA: false,
otpTypeEnum: otpTypeEnum, otpTypeEnum: otpTypeEnum,
patientId: 0, patientId: 0,
zipCode: '966', zipCode: selectedCountrySignup.countryCode,
); );
final result = await _authenticationRepo.checkPatientAuthentication(checkPatientAuthenticationReq: checkPatientAuthenticationReq); final result = await _authenticationRepo.checkPatientAuthentication(checkPatientAuthenticationReq: checkPatientAuthenticationReq);
@ -248,6 +251,7 @@ class AuthenticationViewModel extends ChangeNotifier {
} else { } else {
if (apiResponse.data['IsAuthenticated']) { if (apiResponse.data['IsAuthenticated']) {
await checkActivationCode( await checkActivationCode(
otpTypeEnum: otpTypeEnum,
onWrongActivationCode: (String? message) {}, onWrongActivationCode: (String? message) {},
activationCode: 0000, activationCode: 0000,
); );
@ -267,7 +271,7 @@ class AuthenticationViewModel extends ChangeNotifier {
otpTypeEnum: otpTypeEnum, otpTypeEnum: otpTypeEnum,
mobileNumber: phoneNumber, mobileNumber: phoneNumber,
selectedLoginType: otpTypeEnum.toInt(), selectedLoginType: otpTypeEnum.toInt(),
zipCode: "966", zipCode: selectedCountrySignup.countryCode,
nationalId: nationalIdOrFileNumber, nationalId: nationalIdOrFileNumber,
isFileNo: false, isFileNo: false,
patientId: 0, patientId: 0,
@ -317,18 +321,18 @@ class AuthenticationViewModel extends ChangeNotifier {
Future<void> checkActivationCode({ Future<void> checkActivationCode({
required int activationCode, required int activationCode,
required OTPTypeEnum otpTypeEnum,
required Function(String? message) onWrongActivationCode, required Function(String? message) onWrongActivationCode,
}) async { }) async {
final request = RequestUtils.getCommonRequestWelcome( final request = RequestUtils.getCommonRequestWelcome(
phoneNumber: '0567184134', phoneNumber: phoneNumberController.text,
otpTypeEnum: OTPTypeEnum.sms, otpTypeEnum: otpTypeEnum,
deviceToken: 'dummyDeviceToken123', deviceToken: _appState.deviceToken,
patientOutSA: true, patientOutSA: true,
loginTokenID: 'dummyLoginToken456', loginTokenID: _appState.appLoginTokenID,
registeredData: null, registeredData: null,
patientId: 12345, nationIdText: nationalIdController.text,
nationIdText: '1234567890', countryCode: selectedCountrySignup.countryCode,
countryCode: 'SA',
).toJson(); ).toJson();
bool isForRegister = healthId != null || isDubai; bool isForRegister = healthId != null || isDubai;
@ -337,11 +341,7 @@ class AuthenticationViewModel extends ChangeNotifier {
request['HealthId'] = healthId; request['HealthId'] = healthId;
request['IsHijri'] = isHijri; request['IsHijri'] = isHijri;
final resultEither = await _authenticationRepo.checkActivationCodeRepo( final resultEither = await _authenticationRepo.checkActivationCodeRepo(newRequest: request, activationCode: activationCode.toString(), isRegister: true);
newRequest: request,
activationCode: activationCode.toString(),
isRegister: true,
);
resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) { resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) {
final activation = CheckActivationCode.fromJson(apiResponse.data as Map<String, dynamic>); final activation = CheckActivationCode.fromJson(apiResponse.data as Map<String, dynamic>);
@ -353,13 +353,13 @@ class AuthenticationViewModel extends ChangeNotifier {
}); });
} else { } else {
final resultEither = await _authenticationRepo.checkActivationCodeRepo( final resultEither = await _authenticationRepo.checkActivationCodeRepo(
newRequest: request, newRequest: CheckActivationCodeRegisterReq.fromJson(request),
activationCode: activationCode.toString(), activationCode: activationCode.toString(),
isRegister: false, isRegister: false,
); );
resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) { resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) async {
final activation = CheckActivationCode.fromJson(resultEither as Map<String, dynamic>); final activation = CheckActivationCode.fromJson(apiResponse.data as Map<String, dynamic>);
if (activation.errorCode == '699') { if (activation.errorCode == '699') {
// Todo: Hide Loader // Todo: Hide Loader
// GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
@ -370,6 +370,19 @@ class AuthenticationViewModel extends ChangeNotifier {
// Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)); // Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew));
return; return;
} else { } else {
if (activation.list != null && activation.list!.isNotEmpty) {
_appState.setAuthenticatedUser(activation.list!.first);
}
_appState.setUserBloodGroup = (activation.patientBlodType ?? "");
_appState.setAppLoginTokenID = activation.authenticationTokenId;
final request = RequestUtils.getAuthanticatedCommonRequest().toJson();
bool isUserAgreedBefore = await checkIfUserAgreedBefore(request: request);
clearDefaultInputValues();
if (isUserAgreedBefore) {
navigateToHomeScreen();
} else {
getUserAgreementContent(request: request);
}
// TODO: setPreferences and stuff // TODO: setPreferences and stuff
// sharedPref.remove(FAMILY_FILE); // sharedPref.remove(FAMILY_FILE);
// activation.list!.isFamily = false; // activation.list!.isFamily = false;
@ -382,22 +395,62 @@ class AuthenticationViewModel extends ChangeNotifier {
// loginTokenID = activation.logInTokenID; // loginTokenID = activation.logInTokenID;
// await sharedPref.setObject(LOGIN_TOKEN_ID, activation.logInTokenID); // await sharedPref.setObject(LOGIN_TOKEN_ID, activation.logInTokenID);
// await sharedPref.setString(TOKEN, activation.authenticationTokenID!); // await sharedPref.setString(TOKEN, activation.authenticationTokenID!);
// checkIfUserAgreedBefore(activation);
// projectViewModel.analytics.loginRegistration.login_successful(); // projectViewModel.analytics.loginRegistration.login_successful();
} }
}); });
} }
} }
Future<bool> checkIfUserAgreedBefore({required dynamic request}) async {
bool isAgreed = false;
if (havePrivilege(109)) {
final resultEither = await _authenticationRepo.checkIfUserAgreed(commonAuthanticatedRequest: request);
resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) {
if (apiResponse.data['IsPatientAlreadyAgreed']) {
return true;
}
});
}
return isAgreed;
}
Future<void> getUserAgreementContent({required dynamic request}) async {
final resultEither = await _authenticationRepo.getUserAgreementContent(commonAuthanticatedRequest: request);
resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) async {
// _navigationService.pushAndReplace(routeName)
//TODO: Add User Agreement Page Here
});
}
bool havePrivilege(int id) {
bool isHavePrivilege = false;
try {
for (var element in _appState.getAuthenticatedUser()!.listPrivilege!) {
if (element.id == id) isHavePrivilege = element.previlege!;
}
} catch (e) {
print(e);
}
return isHavePrivilege;
}
Future<void> navigateToHomeScreen() async {
_navigationService.pushAndReplace(AppRoutes.landingScreen);
}
Future<void> navigateToOTPScreen({required OTPTypeEnum otpTypeEnum, required String phoneNumber}) async { Future<void> navigateToOTPScreen({required OTPTypeEnum otpTypeEnum, required String phoneNumber}) async {
_navigationService.pushToOtpScreen( _navigationService.pushToOtpScreen(
phoneNumber: phoneNumber, phoneNumber: phoneNumber,
checkActivationCode: (int activationCode) async { checkActivationCode: (int activationCode) async {
await checkActivationCode( await checkActivationCode(
activationCode: activationCode, activationCode: activationCode,
otpTypeEnum: otpTypeEnum,
onWrongActivationCode: (String? value) { onWrongActivationCode: (String? value) {
onWrongActivationCode(message: value); onWrongActivationCode(message: value);
}); });
// Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => RegisterNewStep2(null, {"nationalID": "12345678654321"})));
}, },
onResendOTPPressed: (String phoneNumber) {}, onResendOTPPressed: (String phoneNumber) {},
); );

@ -1,292 +1,321 @@
import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'dart:convert';
class AuthenticatedUser { class AuthenticatedUser {
String? setupID; String? setupId;
int? patientType; int? patientType;
int? patientID; int? patientId;
String? firstName; String? firstName;
String? middleName; String? middleName;
String? lastName; String? lastName;
String? firstNameN; String? firstNameN;
String? middleNameN; String? middleNameN;
String? lastNameN; String? lastNameN;
int? relationshipID; int? relationshipId;
int? gender; int? gender;
String? dateofBirth; String? dateofBirth;
DateTime? dateofBirthDataTime;
dynamic dateofBirthN; dynamic dateofBirthN;
String? nationalityID; String? nationalityId;
dynamic phoneResi; String? phoneResi;
dynamic phoneOffice; String? phoneOffice;
String? mobileNumber; String? mobileNumber;
dynamic faxNumber; String? faxNumber;
String? emailAddress; String? emailAddress;
dynamic bloodGroup; dynamic bloodGroup;
dynamic rHFactor; dynamic rhFactor;
bool? isEmailAlertRequired; bool? isEmailAlertRequired;
bool? isSMSAlertRequired; bool? isSmsAlertRequired;
String? preferredLanguage; String? preferredLanguage;
bool? isPrivilegedMember; bool? isPrivilegedMember;
dynamic memberID; dynamic memberId;
dynamic expiryDate; dynamic expiryDate;
dynamic isHmgEmployee; dynamic isHmgEmployee;
dynamic employeeID; dynamic employeeId;
dynamic emergencyContactName; String? emergencyContactName;
dynamic emergencyContactNo; String? emergencyContactNo;
int? patientPayType; int? patientPayType;
dynamic dHCCPatientRefID; dynamic dhccPatientRefId;
bool? isPatientDummy; bool? isPatientDummy;
int? status; int? status;
dynamic isStatusCleared; dynamic isStatusCleared;
int? patientIdentificationType; int? patientIdentificationType;
String? patientIdentificationNo; String? patientIdentificationNo;
int? projectID; int? projectId;
int? infoSourceID; int? infoSourceId;
dynamic address; dynamic address;
int? age; int? age;
String? ageDesc; String? ageDesc;
int? areaID; int? areaId;
int? crsVerificationStatus;
String? crsVerificationStatusDesc;
String? crsVerificationStatusDescN;
int? createdBy; int? createdBy;
String? genderDescription; String? genderDescription;
dynamic iR; String? healthIdFromNhicViaVida;
dynamic iSOCityID; dynamic ir;
dynamic iSOCountryID; dynamic isoCityId;
dynamic isoCountryId;
bool? isVerfiedFromNhic;
List<ListPrivilege>? listPrivilege; List<ListPrivilege>? listPrivilege;
dynamic marital; dynamic marital;
int? outSA; dynamic occupationId;
dynamic pOBox; int? outSa;
dynamic poBox;
bool? receiveHealthSummaryReport; bool? receiveHealthSummaryReport;
int? sourceType; int? sourceType;
dynamic strDateofBirth; dynamic strDateofBirth;
dynamic tempAddress; dynamic tempAddress;
dynamic zipCode; dynamic zipCode;
dynamic isFamily; dynamic eHealthIdField;
dynamic cRSVerificationStatus; dynamic authenticatedUserPatientPayType;
// dynamic patientPayType; dynamic authenticatedUserPatientType;
// dynamic patientType; dynamic authenticatedUserStatus;
// dynamic status;
AuthenticatedUser( AuthenticatedUser({
{this.setupID, this.setupId,
this.patientType, this.patientType,
this.patientID, this.patientId,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN, this.firstNameN,
this.middleNameN, this.middleNameN,
this.lastNameN, this.lastNameN,
this.relationshipID, this.relationshipId,
this.gender, this.gender,
this.dateofBirth, this.dateofBirth,
this.dateofBirthN, this.dateofBirthN,
this.nationalityID, this.nationalityId,
this.phoneResi, this.phoneResi,
this.phoneOffice, this.phoneOffice,
this.mobileNumber, this.mobileNumber,
this.faxNumber, this.faxNumber,
this.emailAddress, this.emailAddress,
this.bloodGroup, this.bloodGroup,
this.rHFactor, this.rhFactor,
this.isEmailAlertRequired, this.isEmailAlertRequired,
this.isSMSAlertRequired, this.isSmsAlertRequired,
this.preferredLanguage, this.preferredLanguage,
this.isPrivilegedMember, this.isPrivilegedMember,
this.memberID, this.memberId,
this.expiryDate, this.expiryDate,
this.isHmgEmployee, this.isHmgEmployee,
this.employeeID, this.employeeId,
this.emergencyContactName, this.emergencyContactName,
this.emergencyContactNo, this.emergencyContactNo,
this.patientPayType, this.patientPayType,
this.dHCCPatientRefID, this.dhccPatientRefId,
this.isPatientDummy, this.isPatientDummy,
this.status, this.status,
this.isStatusCleared, this.isStatusCleared,
this.patientIdentificationType, this.patientIdentificationType,
this.patientIdentificationNo, this.patientIdentificationNo,
this.projectID, this.projectId,
this.infoSourceID, this.infoSourceId,
this.address, this.address,
this.age, this.age,
this.ageDesc, this.ageDesc,
this.areaID, this.areaId,
this.createdBy, this.crsVerificationStatus,
this.genderDescription, this.crsVerificationStatusDesc,
this.iR, this.crsVerificationStatusDescN,
this.iSOCityID, this.createdBy,
this.iSOCountryID, this.genderDescription,
this.listPrivilege, this.healthIdFromNhicViaVida,
this.marital, this.ir,
this.outSA, this.isoCityId,
this.pOBox, this.isoCountryId,
this.receiveHealthSummaryReport, this.isVerfiedFromNhic,
this.sourceType, this.listPrivilege,
this.strDateofBirth, this.marital,
this.tempAddress, this.occupationId,
this.zipCode, this.outSa,
this.isFamily, this.poBox,
this.cRSVerificationStatus}); this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
this.eHealthIdField,
this.authenticatedUserPatientPayType,
this.authenticatedUserPatientType,
this.authenticatedUserStatus,
});
AuthenticatedUser.fromJson(Map<String, dynamic> json) { factory AuthenticatedUser.fromRawJson(String str) => AuthenticatedUser.fromJson(json.decode(str));
setupID = json['SetupID'];
patientType = json['PatientType'];
patientID = json['PatientID'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
relationshipID = json['RelationshipID'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
dateofBirthDataTime = DateUtil.convertStringToDate(json['DateofBirth']);
dateofBirthN = json['DateofBirthN'];
nationalityID = json['NationalityID'];
phoneResi = json['PhoneResi'];
phoneOffice = json['PhoneOffice'];
mobileNumber = json['MobileNumber'];
faxNumber = json['FaxNumber'];
emailAddress = json['EmailAddress'];
bloodGroup = json['BloodGroup'];
rHFactor = json['RHFactor'];
isEmailAlertRequired = json['IsEmailAlertRequired'];
isSMSAlertRequired = json['IsSMSAlertRequired'];
preferredLanguage = json['PreferredLanguage'];
isPrivilegedMember = json['IsPrivilegedMember'];
memberID = json['MemberID'];
expiryDate = json['ExpiryDate'];
isHmgEmployee = json['IsHmgEmployee'];
employeeID = json['EmployeeID'];
emergencyContactName = json['EmergencyContactName'];
emergencyContactNo = json['EmergencyContactNo'];
patientPayType = json['PatientPayType'];
dHCCPatientRefID = json['DHCCPatientRefID'];
isPatientDummy = json['IsPatientDummy'];
status = json['Status'];
isStatusCleared = json['IsStatusCleared'];
patientIdentificationType = json['PatientIdentificationType'];
patientIdentificationNo = json['PatientIdentificationNo'];
projectID = json['ProjectID'];
infoSourceID = json['InfoSourceID'];
address = json['Address'];
age = json['Age'];
ageDesc = json['AgeDesc'];
areaID = json['AreaID'];
createdBy = json['CreatedBy'];
genderDescription = json['GenderDescription'];
iR = json['IR'];
iSOCityID = json['ISOCityID'];
iSOCountryID = json['ISOCountryID'];
if (json['ListPrivilege'] != null) {
listPrivilege = [];
json['ListPrivilege'].forEach((v) {
listPrivilege!.add(new ListPrivilege.fromJson(v));
});
}
marital = json['Marital'];
outSA = json['OutSA'];
pOBox = json['POBox'];
receiveHealthSummaryReport = json['ReceiveHealthSummaryReport'];
sourceType = json['SourceType'];
strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map<String, dynamic> toJson() { String toRawJson() => json.encode(toJson());
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID; factory AuthenticatedUser.fromJson(Map<String, dynamic> json) => AuthenticatedUser(
data['PatientType'] = this.patientType; setupId: json["SetupID"],
data['PatientID'] = this.patientID; patientType: json["PatientType"],
data['FirstName'] = this.firstName; patientId: json["PatientID"],
data['MiddleName'] = this.middleName; firstName: json["FirstName"],
data['LastName'] = this.lastName; middleName: json["MiddleName"],
data['FirstNameN'] = this.firstNameN; lastName: json["LastName"],
data['MiddleNameN'] = this.middleNameN; firstNameN: json["FirstNameN"],
data['LastNameN'] = this.lastNameN; middleNameN: json["MiddleNameN"],
data['RelationshipID'] = this.relationshipID; lastNameN: json["LastNameN"],
data['Gender'] = this.gender; relationshipId: json["RelationshipID"],
data['DateofBirth'] = this.dateofBirth; gender: json["Gender"],
data['DateofBirthN'] = this.dateofBirthN; dateofBirth: json["DateofBirth"],
data['NationalityID'] = this.nationalityID; dateofBirthN: json["DateofBirthN"],
data['PhoneResi'] = this.phoneResi; nationalityId: json["NationalityID"],
data['PhoneOffice'] = this.phoneOffice; phoneResi: json["PhoneResi"],
data['MobileNumber'] = this.mobileNumber; phoneOffice: json["PhoneOffice"],
data['FaxNumber'] = this.faxNumber; mobileNumber: json["MobileNumber"],
data['EmailAddress'] = this.emailAddress; faxNumber: json["FaxNumber"],
data['BloodGroup'] = this.bloodGroup; emailAddress: json["EmailAddress"],
data['RHFactor'] = this.rHFactor; bloodGroup: json["BloodGroup"],
data['IsEmailAlertRequired'] = this.isEmailAlertRequired; rhFactor: json["RHFactor"],
data['IsSMSAlertRequired'] = this.isSMSAlertRequired; isEmailAlertRequired: json["IsEmailAlertRequired"],
data['PreferredLanguage'] = this.preferredLanguage; isSmsAlertRequired: json["IsSMSAlertRequired"],
data['IsPrivilegedMember'] = this.isPrivilegedMember; preferredLanguage: json["PreferredLanguage"],
data['MemberID'] = this.memberID; isPrivilegedMember: json["IsPrivilegedMember"],
data['ExpiryDate'] = this.expiryDate; memberId: json["MemberID"],
data['IsHmgEmployee'] = this.isHmgEmployee; expiryDate: json["ExpiryDate"],
data['EmployeeID'] = this.employeeID; isHmgEmployee: json["IsHmgEmployee"],
data['EmergencyContactName'] = this.emergencyContactName; employeeId: json["EmployeeID"],
data['EmergencyContactNo'] = this.emergencyContactNo; emergencyContactName: json["EmergencyContactName"],
data['PatientPayType'] = this.patientPayType; emergencyContactNo: json["EmergencyContactNo"],
data['DHCCPatientRefID'] = this.dHCCPatientRefID; patientPayType: json["PatientPayType"],
data['IsPatientDummy'] = this.isPatientDummy; dhccPatientRefId: json["DHCCPatientRefID"],
data['Status'] = this.status; isPatientDummy: json["IsPatientDummy"],
data['IsStatusCleared'] = this.isStatusCleared; status: json["Status"],
data['PatientIdentificationType'] = this.patientIdentificationType; isStatusCleared: json["IsStatusCleared"],
data['PatientIdentificationNo'] = this.patientIdentificationNo; patientIdentificationType: json["PatientIdentificationType"],
data['ProjectID'] = this.projectID; patientIdentificationNo: json["PatientIdentificationNo"],
data['InfoSourceID'] = this.infoSourceID; projectId: json["ProjectID"],
data['Address'] = this.address; infoSourceId: json["InfoSourceID"],
data['Age'] = this.age; address: json["Address"],
data['AgeDesc'] = this.ageDesc; age: json["Age"],
data['AreaID'] = this.areaID; ageDesc: json["AgeDesc"],
data['CreatedBy'] = this.createdBy; areaId: json["AreaID"],
data['GenderDescription'] = this.genderDescription; crsVerificationStatus: json["CRSVerificationStatus"],
data['IR'] = this.iR; crsVerificationStatusDesc: json["CRSVerificationStatusDesc"],
data['ISOCityID'] = this.iSOCityID; crsVerificationStatusDescN: json["CRSVerificationStatusDescN"],
data['ISOCountryID'] = this.iSOCountryID; createdBy: json["CreatedBy"],
if (this.listPrivilege != null) { genderDescription: json["GenderDescription"],
data['ListPrivilege'] = healthIdFromNhicViaVida: json["HealthIDFromNHICViaVida"],
this.listPrivilege!.map((v) => v.toJson()).toList(); ir: json["IR"],
} isoCityId: json["ISOCityID"],
data['Marital'] = this.marital; isoCountryId: json["ISOCountryID"],
data['OutSA'] = this.outSA; isVerfiedFromNhic: json["IsVerfiedFromNHIC"],
data['POBox'] = this.pOBox; listPrivilege: json["ListPrivilege"] == null ? [] : List<ListPrivilege>.from(json["ListPrivilege"]!.map((x) => ListPrivilege.fromJson(x))),
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport; marital: json["Marital"],
data['SourceType'] = this.sourceType; occupationId: json["OccupationID"],
data['StrDateofBirth'] = this.strDateofBirth; outSa: json["OutSA"],
data['TempAddress'] = this.tempAddress; poBox: json["POBox"],
data['ZipCode'] = this.zipCode; receiveHealthSummaryReport: json["ReceiveHealthSummaryReport"],
data['IsFamily'] = this.isFamily; sourceType: json["SourceType"],
data['CRSVerificationStatus'] = this.cRSVerificationStatus; strDateofBirth: json["StrDateofBirth"],
return data; tempAddress: json["TempAddress"],
} zipCode: json["ZipCode"],
eHealthIdField: json["eHealthIDField"],
authenticatedUserPatientPayType: json["patientPayType"],
authenticatedUserPatientType: json["patientType"],
authenticatedUserStatus: json["status"],
);
Map<String, dynamic> toJson() => {
"SetupID": setupId,
"PatientType": patientType,
"PatientID": patientId,
"FirstName": firstName,
"MiddleName": middleName,
"LastName": lastName,
"FirstNameN": firstNameN,
"MiddleNameN": middleNameN,
"LastNameN": lastNameN,
"RelationshipID": relationshipId,
"Gender": gender,
"DateofBirth": dateofBirth,
"DateofBirthN": dateofBirthN,
"NationalityID": nationalityId,
"PhoneResi": phoneResi,
"PhoneOffice": phoneOffice,
"MobileNumber": mobileNumber,
"FaxNumber": faxNumber,
"EmailAddress": emailAddress,
"BloodGroup": bloodGroup,
"RHFactor": rhFactor,
"IsEmailAlertRequired": isEmailAlertRequired,
"IsSMSAlertRequired": isSmsAlertRequired,
"PreferredLanguage": preferredLanguage,
"IsPrivilegedMember": isPrivilegedMember,
"MemberID": memberId,
"ExpiryDate": expiryDate,
"IsHmgEmployee": isHmgEmployee,
"EmployeeID": employeeId,
"EmergencyContactName": emergencyContactName,
"EmergencyContactNo": emergencyContactNo,
"PatientPayType": patientPayType,
"DHCCPatientRefID": dhccPatientRefId,
"IsPatientDummy": isPatientDummy,
"Status": status,
"IsStatusCleared": isStatusCleared,
"PatientIdentificationType": patientIdentificationType,
"PatientIdentificationNo": patientIdentificationNo,
"ProjectID": projectId,
"InfoSourceID": infoSourceId,
"Address": address,
"Age": age,
"AgeDesc": ageDesc,
"AreaID": areaId,
"CRSVerificationStatus": crsVerificationStatus,
"CRSVerificationStatusDesc": crsVerificationStatusDesc,
"CRSVerificationStatusDescN": crsVerificationStatusDescN,
"CreatedBy": createdBy,
"GenderDescription": genderDescription,
"HealthIDFromNHICViaVida": healthIdFromNhicViaVida,
"IR": ir,
"ISOCityID": isoCityId,
"ISOCountryID": isoCountryId,
"IsVerfiedFromNHIC": isVerfiedFromNhic,
"ListPrivilege": listPrivilege == null ? [] : List<dynamic>.from(listPrivilege!.map((x) => x.toJson())),
"Marital": marital,
"OccupationID": occupationId,
"OutSA": outSa,
"POBox": poBox,
"ReceiveHealthSummaryReport": receiveHealthSummaryReport,
"SourceType": sourceType,
"StrDateofBirth": strDateofBirth,
"TempAddress": tempAddress,
"ZipCode": zipCode,
"eHealthIDField": eHealthIdField,
"patientPayType": authenticatedUserPatientPayType,
"patientType": authenticatedUserPatientType,
"status": authenticatedUserStatus,
};
} }
class ListPrivilege { class ListPrivilege {
int? iD; int? id;
String? serviceName; String? serviceName;
bool? previlege; bool? previlege;
dynamic region; dynamic region;
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); ListPrivilege({
this.id,
this.serviceName,
this.previlege,
this.region,
});
factory ListPrivilege.fromRawJson(String str) => ListPrivilege.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
ListPrivilege.fromJson(Map<String, dynamic> json) { factory ListPrivilege.fromJson(Map<String, dynamic> json) => ListPrivilege(
iD = json['ID']; id: json["ID"],
serviceName = json['ServiceName']; serviceName: json["ServiceName"],
previlege = json['Previlege']; previlege: json["Previlege"],
region = json['Region']; region: json["Region"],
} );
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() => {
final Map<String, dynamic> data = new Map<String, dynamic>(); "ID": id,
data['ID'] = this.iD; "ServiceName": serviceName,
data['ServiceName'] = this.serviceName; "Previlege": previlege,
data['Previlege'] = this.previlege; "Region": region,
data['Region'] = this.region; };
return data;
}
} }

@ -1,22 +1,26 @@
import 'dart:convert';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart';
class CheckActivationCode { class CheckActivationCode {
dynamic date; dynamic date;
int? languageID; int? languageId;
int? serviceName; int? serviceName;
dynamic time; dynamic time;
dynamic androidLink; dynamic androidLink;
String? authenticationTokenID; String? authenticationTokenId;
dynamic data; dynamic data;
bool? dataw; bool? dataw;
int? dietType; int? dietType;
int? dietTypeId;
dynamic errorCode; dynamic errorCode;
dynamic errorEndUserMessage; dynamic errorEndUserMessage;
dynamic errorEndUserMessageN; dynamic errorEndUserMessageN;
dynamic errorMessage; dynamic errorMessage;
int? errorStatusCode;
int? errorType; int? errorType;
int? foodCategory; int? foodCategory;
dynamic iOSLink; dynamic iosLink;
bool? isAuthenticated; bool? isAuthenticated;
int? mealOrderStatus; int? mealOrderStatus;
int? mealType; int? mealType;
@ -25,34 +29,46 @@ class CheckActivationCode {
dynamic patientBlodType; dynamic patientBlodType;
dynamic successMsg; dynamic successMsg;
dynamic successMsgN; dynamic successMsgN;
dynamic vidaUpdatedResponse;
dynamic doctorInformationList; dynamic doctorInformationList;
dynamic getAllPendingRecordsList; dynamic getAllPendingRecordsList;
dynamic getAllSharedRecordsByStatusList; dynamic getAllSharedRecordsByStatusList;
dynamic getMaritalstatusLst;
dynamic getOccupationLst;
dynamic getResponseFileList; dynamic getResponseFileList;
bool? isHMGPatient; dynamic hisPatientModelVpPortal;
bool? isHmgPatient;
bool? isLoginSuccessfully; bool? isLoginSuccessfully;
bool? isNeedUpdateIdintificationNo; bool? isNeedUpdateIdintificationNo;
bool? kioskSendSMS; bool? isPatientAuthorized;
AuthenticatedUser? list; bool? isVidaPlus;
bool? kioskSendSms;
List<AuthenticatedUser>? list;
dynamic listAskHabibMobileLoginInfo; dynamic listAskHabibMobileLoginInfo;
dynamic listAskHabibPatientFile; dynamic listAskHabibPatientFile;
dynamic listFamilyRelationships;
dynamic listMergeFiles; dynamic listMergeFiles;
dynamic listMobileLoginInfo; dynamic listMobileLoginInfo;
dynamic listPatientCount; dynamic listPatientCount;
dynamic logInTokenID; dynamic logInTokenId;
dynamic mohemmPrivilegeList; dynamic mohemmPrivilegeList;
int? pateintID; int? pateintId;
String? patientBloodType; dynamic patientBloodType;
dynamic patientErAdminDriverFileList;
dynamic patientErAdminFile;
dynamic patientErDriverFile;
dynamic patientErDriverFileList;
bool? patientHasFile; bool? patientHasFile;
dynamic patientMergedIDs; dynamic patientMergedIDs;
bool? patientOutSA; bool? patientOutSa;
int? patientShareRequestID; int? patientShareRequestId;
int? patientType; int? patientType;
int? projectIDOut; int? projectIdOut;
dynamic returnMessage; dynamic returnMessage;
bool? sMSLoginRequired; bool? smsLoginRequired;
dynamic servicePrivilegeList; dynamic servicePrivilegeList;
dynamic sharePatientName; dynamic sharePatientName;
bool? userAccountIsActivated;
dynamic verificationCode; dynamic verificationCode;
dynamic email; dynamic email;
dynamic errorList; dynamic errorList;
@ -60,236 +76,572 @@ class CheckActivationCode {
bool? isActiveCode; bool? isActiveCode;
bool? isMerged; bool? isMerged;
bool? isNeedUserAgreement; bool? isNeedUserAgreement;
bool? isSMSSent; bool? isSmsSent;
dynamic memberList; dynamic memberList;
dynamic message; dynamic message;
int? statusCode; int? statusCode;
CheckActivationCode( CheckActivationCode({
{this.date, this.date,
this.languageID, this.languageId,
this.serviceName, this.serviceName,
this.time, this.time,
this.androidLink, this.androidLink,
this.authenticationTokenID, this.authenticationTokenId,
this.data, this.data,
this.dataw, this.dataw,
this.dietType, this.dietType,
this.errorCode, this.dietTypeId,
this.errorEndUserMessage, this.errorCode,
this.errorEndUserMessageN, this.errorEndUserMessage,
this.errorMessage, this.errorEndUserMessageN,
this.errorType, this.errorMessage,
this.foodCategory, this.errorStatusCode,
this.iOSLink, this.errorType,
this.isAuthenticated, this.foodCategory,
this.mealOrderStatus, this.iosLink,
this.mealType, this.isAuthenticated,
this.messageStatus, this.mealOrderStatus,
this.numberOfResultRecords, this.mealType,
this.patientBlodType, this.messageStatus,
this.successMsg, this.numberOfResultRecords,
this.successMsgN, this.patientBlodType,
this.doctorInformationList, this.successMsg,
this.getAllPendingRecordsList, this.successMsgN,
this.getAllSharedRecordsByStatusList, this.vidaUpdatedResponse,
this.getResponseFileList, this.doctorInformationList,
this.isHMGPatient, this.getAllPendingRecordsList,
this.isLoginSuccessfully, this.getAllSharedRecordsByStatusList,
this.isNeedUpdateIdintificationNo, this.getMaritalstatusLst,
this.kioskSendSMS, this.getOccupationLst,
this.list, this.getResponseFileList,
this.listAskHabibMobileLoginInfo, this.hisPatientModelVpPortal,
this.listAskHabibPatientFile, this.isHmgPatient,
this.listMergeFiles, this.isLoginSuccessfully,
this.listMobileLoginInfo, this.isNeedUpdateIdintificationNo,
this.listPatientCount, this.isPatientAuthorized,
this.logInTokenID, this.isVidaPlus,
this.mohemmPrivilegeList, this.kioskSendSms,
this.pateintID, this.list,
this.patientBloodType, this.listAskHabibMobileLoginInfo,
this.patientHasFile, this.listAskHabibPatientFile,
this.patientMergedIDs, this.listFamilyRelationships,
this.patientOutSA, this.listMergeFiles,
this.patientShareRequestID, this.listMobileLoginInfo,
this.patientType, this.listPatientCount,
this.projectIDOut, this.logInTokenId,
this.returnMessage, this.mohemmPrivilegeList,
this.sMSLoginRequired, this.pateintId,
this.servicePrivilegeList, this.patientBloodType,
this.sharePatientName, this.patientErAdminDriverFileList,
this.verificationCode, this.patientErAdminFile,
this.email, this.patientErDriverFile,
this.errorList, this.patientErDriverFileList,
this.hasFile, this.patientHasFile,
this.isActiveCode, this.patientMergedIDs,
this.isMerged, this.patientOutSa,
this.isNeedUserAgreement, this.patientShareRequestId,
this.isSMSSent, this.patientType,
this.memberList, this.projectIdOut,
this.message, this.returnMessage,
this.statusCode}); this.smsLoginRequired,
this.servicePrivilegeList,
this.sharePatientName,
this.userAccountIsActivated,
this.verificationCode,
this.email,
this.errorList,
this.hasFile,
this.isActiveCode,
this.isMerged,
this.isNeedUserAgreement,
this.isSmsSent,
this.memberList,
this.message,
this.statusCode,
});
factory CheckActivationCode.fromRawJson(String str) => CheckActivationCode.fromJson(json.decode(str));
CheckActivationCode.fromJson(Map<String, dynamic> json) { String toRawJson() => json.encode(toJson());
date = json['Date'];
languageID = json['LanguageID'];
serviceName = json['ServiceName'];
time = json['Time'];
androidLink = json['AndroidLink'];
authenticationTokenID = json['AuthenticationTokenID'];
data = json['Data'];
dataw = json['Dataw'];
dietType = json['DietType'];
errorCode = json['ErrorCode'];
errorEndUserMessage = json['ErrorEndUserMessage'];
errorEndUserMessageN = json['ErrorEndUserMessageN'];
errorMessage = json['ErrorMessage'];
errorType = json['ErrorType'];
foodCategory = json['FoodCategory'];
iOSLink = json['IOSLink'];
isAuthenticated = json['IsAuthenticated'];
mealOrderStatus = json['MealOrderStatus'];
mealType = json['MealType'];
messageStatus = json['MessageStatus'];
numberOfResultRecords = json['NumberOfResultRecords'];
patientBlodType = json['PatientBlodType'];
successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN'];
doctorInformationList = json['DoctorInformation_List'];
getAllPendingRecordsList = json['GetAllPendingRecordsList'];
getAllSharedRecordsByStatusList = json['GetAllSharedRecordsByStatusList'];
getResponseFileList = json['GetResponseFileList'];
isHMGPatient = json['IsHMGPatient'];
isLoginSuccessfully = json['IsLoginSuccessfully'];
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
kioskSendSMS = json['KioskSendSMS'];
if (json['List'] != null) {
list = AuthenticatedUser.fromJson(json['List'][0]);
}
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
listMergeFiles = json['List_MergeFiles'];
listMobileLoginInfo = json['List_MobileLoginInfo'];
listPatientCount = json['List_PatientCount'];
logInTokenID = json['LogInTokenID'];
mohemmPrivilegeList = json['MohemmPrivilege_List'];
pateintID = json['PateintID'];
patientBloodType = json['PatientBloodType'];
patientHasFile = json['PatientHasFile'];
patientMergedIDs = json['PatientMergedIDs'];
patientOutSA = json['PatientOutSA'];
patientShareRequestID = json['PatientShareRequestID'];
patientType = json['PatientType'];
projectIDOut = json['ProjectIDOut'];
returnMessage = json['ReturnMessage'];
sMSLoginRequired = json['SMSLoginRequired'];
servicePrivilegeList = json['ServicePrivilege_List'];
sharePatientName = json['SharePatientName'];
verificationCode = json['VerificationCode'];
email = json['email'];
errorList = json['errorList'];
hasFile = json['hasFile'];
isActiveCode = json['isActiveCode'];
isMerged = json['isMerged'];
isNeedUserAgreement = json['isNeedUserAgreement'];
isSMSSent = json['isSMSSent'];
memberList = json['memberList'];
message = json['message'];
statusCode = json['statusCode'];
}
Map<String, dynamic> toJson() { factory CheckActivationCode.fromJson(Map<String, dynamic> json) => CheckActivationCode(
final Map<String, dynamic> data = <String, dynamic>{}; date: json["Date"],
data['Date'] = date; languageId: json["LanguageID"],
data['LanguageID'] = languageID; serviceName: json["ServiceName"],
data['ServiceName'] = serviceName; time: json["Time"],
data['Time'] = time; androidLink: json["AndroidLink"],
data['AndroidLink'] = androidLink; authenticationTokenId: json["AuthenticationTokenID"],
data['AuthenticationTokenID'] = authenticationTokenID; data: json["Data"],
data['Data'] = this.data; dataw: json["Dataw"],
data['Dataw'] = dataw; dietType: json["DietType"],
data['DietType'] = dietType; dietTypeId: json["DietTypeID"],
data['ErrorCode'] = errorCode; errorCode: json["ErrorCode"],
data['ErrorEndUserMessage'] = errorEndUserMessage; errorEndUserMessage: json["ErrorEndUserMessage"],
data['ErrorEndUserMessageN'] = errorEndUserMessageN; errorEndUserMessageN: json["ErrorEndUserMessageN"],
data['ErrorMessage'] = errorMessage; errorMessage: json["ErrorMessage"],
data['ErrorType'] = errorType; errorStatusCode: json["ErrorStatusCode"],
data['FoodCategory'] = foodCategory; errorType: json["ErrorType"],
data['IOSLink'] = iOSLink; foodCategory: json["FoodCategory"],
data['IsAuthenticated'] = isAuthenticated; iosLink: json["IOSLink"],
data['MealOrderStatus'] = mealOrderStatus; isAuthenticated: json["IsAuthenticated"],
data['MealType'] = mealType; mealOrderStatus: json["MealOrderStatus"],
data['MessageStatus'] = messageStatus; mealType: json["MealType"],
data['NumberOfResultRecords'] = numberOfResultRecords; messageStatus: json["MessageStatus"],
data['PatientBlodType'] = patientBlodType; numberOfResultRecords: json["NumberOfResultRecords"],
data['SuccessMsg'] = successMsg; patientBlodType: json["PatientBlodType"],
data['SuccessMsgN'] = successMsgN; successMsg: json["SuccessMsg"],
data['DoctorInformation_List'] = doctorInformationList; successMsgN: json["SuccessMsgN"],
data['GetAllPendingRecordsList'] = getAllPendingRecordsList; vidaUpdatedResponse: json["VidaUpdatedResponse"],
data['GetAllSharedRecordsByStatusList'] = getAllSharedRecordsByStatusList; doctorInformationList: json["DoctorInformation_List"],
data['GetResponseFileList'] = getResponseFileList; getAllPendingRecordsList: json["GetAllPendingRecordsList"],
data['IsHMGPatient'] = isHMGPatient; getAllSharedRecordsByStatusList: json["GetAllSharedRecordsByStatusList"],
data['IsLoginSuccessfully'] = isLoginSuccessfully; getMaritalstatusLst: json["GetMaritalstatusLst"],
data['IsNeedUpdateIdintificationNo'] = isNeedUpdateIdintificationNo; getOccupationLst: json["GetOccupationLst"],
data['KioskSendSMS'] = kioskSendSMS; getResponseFileList: json["GetResponseFileList"],
if (list != null) { hisPatientModelVpPortal: json["HIS_PatientModel_VPPortal"],
data['List'] = list; isHmgPatient: json["IsHMGPatient"],
} isLoginSuccessfully: json["IsLoginSuccessfully"],
data['List_AskHabibMobileLoginInfo'] = listAskHabibMobileLoginInfo; isNeedUpdateIdintificationNo: json["IsNeedUpdateIdintificationNo"],
data['List_AskHabibPatientFile'] = listAskHabibPatientFile; isPatientAuthorized: json["IsPatientAuthorized"],
data['List_MergeFiles'] = listMergeFiles; isVidaPlus: json["IsVidaPlus"],
data['List_MobileLoginInfo'] = listMobileLoginInfo; kioskSendSms: json["KioskSendSMS"],
data['List_PatientCount'] = listPatientCount; list: json["List"] == null ? [] : List<AuthenticatedUser>.from(json["List"]!.map((x) => AuthenticatedUser.fromJson(x))),
data['LogInTokenID'] = logInTokenID; listAskHabibMobileLoginInfo: json["List_AskHabibMobileLoginInfo"],
data['MohemmPrivilege_List'] = mohemmPrivilegeList; listAskHabibPatientFile: json["List_AskHabibPatientFile"],
data['PateintID'] = pateintID; listFamilyRelationships: json["List_FamilyRelationships"],
data['PatientBloodType'] = patientBloodType; listMergeFiles: json["List_MergeFiles"],
data['PatientHasFile'] = patientHasFile; listMobileLoginInfo: json["List_MobileLoginInfo"],
data['PatientMergedIDs'] = patientMergedIDs; listPatientCount: json["List_PatientCount"],
data['PatientOutSA'] = patientOutSA; logInTokenId: json["LogInTokenID"],
data['PatientShareRequestID'] = patientShareRequestID; mohemmPrivilegeList: json["MohemmPrivilege_List"],
data['PatientType'] = patientType; pateintId: json["PateintID"],
data['ProjectIDOut'] = projectIDOut; patientBloodType: json["PatientBloodType"],
data['ReturnMessage'] = returnMessage; patientErAdminDriverFileList: json["PatientER_AdminDriverFileList"],
data['SMSLoginRequired'] = sMSLoginRequired; patientErAdminFile: json["PatientER_AdminFile"],
data['ServicePrivilege_List'] = servicePrivilegeList; patientErDriverFile: json["PatientER_DriverFile"],
data['SharePatientName'] = sharePatientName; patientErDriverFileList: json["PatientER_DriverFileList"],
data['VerificationCode'] = verificationCode; patientHasFile: json["PatientHasFile"],
data['email'] = email; patientMergedIDs: json["PatientMergedIDs"],
data['errorList'] = errorList; patientOutSa: json["PatientOutSA"],
data['hasFile'] = hasFile; patientShareRequestId: json["PatientShareRequestID"],
data['isActiveCode'] = isActiveCode; patientType: json["PatientType"],
data['isMerged'] = isMerged; projectIdOut: json["ProjectIDOut"],
data['isNeedUserAgreement'] = isNeedUserAgreement; returnMessage: json["ReturnMessage"],
data['isSMSSent'] = isSMSSent; smsLoginRequired: json["SMSLoginRequired"],
data['memberList'] = memberList; servicePrivilegeList: json["ServicePrivilege_List"],
data['message'] = message; sharePatientName: json["SharePatientName"],
data['statusCode'] = statusCode; userAccountIsActivated: json["UserAccountIsActivated"],
return data; verificationCode: json["VerificationCode"],
} email: json["email"],
errorList: json["errorList"],
hasFile: json["hasFile"],
isActiveCode: json["isActiveCode"],
isMerged: json["isMerged"],
isNeedUserAgreement: json["isNeedUserAgreement"],
isSmsSent: json["isSMSSent"],
memberList: json["memberList"],
message: json["message"],
statusCode: json["statusCode"],
);
Map<String, dynamic> toJson() => {
"Date": date,
"LanguageID": languageId,
"ServiceName": serviceName,
"Time": time,
"AndroidLink": androidLink,
"AuthenticationTokenID": authenticationTokenId,
"Data": data,
"Dataw": dataw,
"DietType": dietType,
"DietTypeID": dietTypeId,
"ErrorCode": errorCode,
"ErrorEndUserMessage": errorEndUserMessage,
"ErrorEndUserMessageN": errorEndUserMessageN,
"ErrorMessage": errorMessage,
"ErrorStatusCode": errorStatusCode,
"ErrorType": errorType,
"FoodCategory": foodCategory,
"IOSLink": iosLink,
"IsAuthenticated": isAuthenticated,
"MealOrderStatus": mealOrderStatus,
"MealType": mealType,
"MessageStatus": messageStatus,
"NumberOfResultRecords": numberOfResultRecords,
"PatientBlodType": patientBlodType,
"SuccessMsg": successMsg,
"SuccessMsgN": successMsgN,
"VidaUpdatedResponse": vidaUpdatedResponse,
"DoctorInformation_List": doctorInformationList,
"GetAllPendingRecordsList": getAllPendingRecordsList,
"GetAllSharedRecordsByStatusList": getAllSharedRecordsByStatusList,
"GetMaritalstatusLst": getMaritalstatusLst,
"GetOccupationLst": getOccupationLst,
"GetResponseFileList": getResponseFileList,
"HIS_PatientModel_VPPortal": hisPatientModelVpPortal,
"IsHMGPatient": isHmgPatient,
"IsLoginSuccessfully": isLoginSuccessfully,
"IsNeedUpdateIdintificationNo": isNeedUpdateIdintificationNo,
"IsPatientAuthorized": isPatientAuthorized,
"IsVidaPlus": isVidaPlus,
"KioskSendSMS": kioskSendSms,
"List": list == null ? [] : List<AuthenticatedUser>.from(list!.map((x) => x.toJson())),
"List_AskHabibMobileLoginInfo": listAskHabibMobileLoginInfo,
"List_AskHabibPatientFile": listAskHabibPatientFile,
"List_FamilyRelationships": listFamilyRelationships,
"List_MergeFiles": listMergeFiles,
"List_MobileLoginInfo": listMobileLoginInfo,
"List_PatientCount": listPatientCount,
"LogInTokenID": logInTokenId,
"MohemmPrivilege_List": mohemmPrivilegeList,
"PateintID": pateintId,
"PatientBloodType": patientBloodType,
"PatientER_AdminDriverFileList": patientErAdminDriverFileList,
"PatientER_AdminFile": patientErAdminFile,
"PatientER_DriverFile": patientErDriverFile,
"PatientER_DriverFileList": patientErDriverFileList,
"PatientHasFile": patientHasFile,
"PatientMergedIDs": patientMergedIDs,
"PatientOutSA": patientOutSa,
"PatientShareRequestID": patientShareRequestId,
"PatientType": patientType,
"ProjectIDOut": projectIdOut,
"ReturnMessage": returnMessage,
"SMSLoginRequired": smsLoginRequired,
"ServicePrivilege_List": servicePrivilegeList,
"SharePatientName": sharePatientName,
"UserAccountIsActivated": userAccountIsActivated,
"VerificationCode": verificationCode,
"email": email,
"errorList": errorList,
"hasFile": hasFile,
"isActiveCode": isActiveCode,
"isMerged": isMerged,
"isNeedUserAgreement": isNeedUserAgreement,
"isSMSSent": isSmsSent,
"memberList": memberList,
"message": message,
"statusCode": statusCode,
};
}
class ListElement {
String? setupId;
int? patientType;
int? patientId;
String? firstName;
String? middleName;
String? lastName;
String? firstNameN;
String? middleNameN;
String? lastNameN;
int? relationshipId;
int? gender;
String? dateofBirth;
dynamic dateofBirthN;
String? nationalityId;
String? phoneResi;
String? phoneOffice;
String? mobileNumber;
String? faxNumber;
String? emailAddress;
dynamic bloodGroup;
dynamic rhFactor;
bool? isEmailAlertRequired;
bool? isSmsAlertRequired;
String? preferredLanguage;
bool? isPrivilegedMember;
dynamic memberId;
dynamic expiryDate;
dynamic isHmgEmployee;
dynamic employeeId;
String? emergencyContactName;
String? emergencyContactNo;
int? patientPayType;
dynamic dhccPatientRefId;
bool? isPatientDummy;
int? status;
dynamic isStatusCleared;
int? patientIdentificationType;
String? patientIdentificationNo;
int? projectId;
int? infoSourceId;
dynamic address;
int? age;
String? ageDesc;
int? areaId;
int? crsVerificationStatus;
String? crsVerificationStatusDesc;
String? crsVerificationStatusDescN;
int? createdBy;
String? genderDescription;
String? healthIdFromNhicViaVida;
dynamic ir;
dynamic isoCityId;
dynamic isoCountryId;
bool? isVerfiedFromNhic;
List<ListPrivilege>? listPrivilege;
dynamic marital;
dynamic occupationId;
int? outSa;
dynamic poBox;
bool? receiveHealthSummaryReport;
int? sourceType;
dynamic strDateofBirth;
dynamic tempAddress;
dynamic zipCode;
dynamic eHealthIdField;
dynamic listPatientPayType;
dynamic listPatientType;
dynamic listStatus;
ListElement({
this.setupId,
this.patientType,
this.patientId,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.relationshipId,
this.gender,
this.dateofBirth,
this.dateofBirthN,
this.nationalityId,
this.phoneResi,
this.phoneOffice,
this.mobileNumber,
this.faxNumber,
this.emailAddress,
this.bloodGroup,
this.rhFactor,
this.isEmailAlertRequired,
this.isSmsAlertRequired,
this.preferredLanguage,
this.isPrivilegedMember,
this.memberId,
this.expiryDate,
this.isHmgEmployee,
this.employeeId,
this.emergencyContactName,
this.emergencyContactNo,
this.patientPayType,
this.dhccPatientRefId,
this.isPatientDummy,
this.status,
this.isStatusCleared,
this.patientIdentificationType,
this.patientIdentificationNo,
this.projectId,
this.infoSourceId,
this.address,
this.age,
this.ageDesc,
this.areaId,
this.crsVerificationStatus,
this.crsVerificationStatusDesc,
this.crsVerificationStatusDescN,
this.createdBy,
this.genderDescription,
this.healthIdFromNhicViaVida,
this.ir,
this.isoCityId,
this.isoCountryId,
this.isVerfiedFromNhic,
this.listPrivilege,
this.marital,
this.occupationId,
this.outSa,
this.poBox,
this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
this.eHealthIdField,
this.listPatientPayType,
this.listPatientType,
this.listStatus,
});
factory ListElement.fromRawJson(String str) => ListElement.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory ListElement.fromJson(Map<String, dynamic> json) => ListElement(
setupId: json["SetupID"],
patientType: json["PatientType"],
patientId: json["PatientID"],
firstName: json["FirstName"],
middleName: json["MiddleName"],
lastName: json["LastName"],
firstNameN: json["FirstNameN"],
middleNameN: json["MiddleNameN"],
lastNameN: json["LastNameN"],
relationshipId: json["RelationshipID"],
gender: json["Gender"],
dateofBirth: json["DateofBirth"],
dateofBirthN: json["DateofBirthN"],
nationalityId: json["NationalityID"],
phoneResi: json["PhoneResi"],
phoneOffice: json["PhoneOffice"],
mobileNumber: json["MobileNumber"],
faxNumber: json["FaxNumber"],
emailAddress: json["EmailAddress"],
bloodGroup: json["BloodGroup"],
rhFactor: json["RHFactor"],
isEmailAlertRequired: json["IsEmailAlertRequired"],
isSmsAlertRequired: json["IsSMSAlertRequired"],
preferredLanguage: json["PreferredLanguage"],
isPrivilegedMember: json["IsPrivilegedMember"],
memberId: json["MemberID"],
expiryDate: json["ExpiryDate"],
isHmgEmployee: json["IsHmgEmployee"],
employeeId: json["EmployeeID"],
emergencyContactName: json["EmergencyContactName"],
emergencyContactNo: json["EmergencyContactNo"],
patientPayType: json["PatientPayType"],
dhccPatientRefId: json["DHCCPatientRefID"],
isPatientDummy: json["IsPatientDummy"],
status: json["Status"],
isStatusCleared: json["IsStatusCleared"],
patientIdentificationType: json["PatientIdentificationType"],
patientIdentificationNo: json["PatientIdentificationNo"],
projectId: json["ProjectID"],
infoSourceId: json["InfoSourceID"],
address: json["Address"],
age: json["Age"],
ageDesc: json["AgeDesc"],
areaId: json["AreaID"],
crsVerificationStatus: json["CRSVerificationStatus"],
crsVerificationStatusDesc: json["CRSVerificationStatusDesc"],
crsVerificationStatusDescN: json["CRSVerificationStatusDescN"],
createdBy: json["CreatedBy"],
genderDescription: json["GenderDescription"],
healthIdFromNhicViaVida: json["HealthIDFromNHICViaVida"],
ir: json["IR"],
isoCityId: json["ISOCityID"],
isoCountryId: json["ISOCountryID"],
isVerfiedFromNhic: json["IsVerfiedFromNHIC"],
listPrivilege: json["ListPrivilege"] == null ? [] : List<ListPrivilege>.from(json["ListPrivilege"]!.map((x) => ListPrivilege.fromJson(x))),
marital: json["Marital"],
occupationId: json["OccupationID"],
outSa: json["OutSA"],
poBox: json["POBox"],
receiveHealthSummaryReport: json["ReceiveHealthSummaryReport"],
sourceType: json["SourceType"],
strDateofBirth: json["StrDateofBirth"],
tempAddress: json["TempAddress"],
zipCode: json["ZipCode"],
eHealthIdField: json["eHealthIDField"],
listPatientPayType: json["patientPayType"],
listPatientType: json["patientType"],
listStatus: json["status"],
);
Map<String, dynamic> toJson() => {
"SetupID": setupId,
"PatientType": patientType,
"PatientID": patientId,
"FirstName": firstName,
"MiddleName": middleName,
"LastName": lastName,
"FirstNameN": firstNameN,
"MiddleNameN": middleNameN,
"LastNameN": lastNameN,
"RelationshipID": relationshipId,
"Gender": gender,
"DateofBirth": dateofBirth,
"DateofBirthN": dateofBirthN,
"NationalityID": nationalityId,
"PhoneResi": phoneResi,
"PhoneOffice": phoneOffice,
"MobileNumber": mobileNumber,
"FaxNumber": faxNumber,
"EmailAddress": emailAddress,
"BloodGroup": bloodGroup,
"RHFactor": rhFactor,
"IsEmailAlertRequired": isEmailAlertRequired,
"IsSMSAlertRequired": isSmsAlertRequired,
"PreferredLanguage": preferredLanguage,
"IsPrivilegedMember": isPrivilegedMember,
"MemberID": memberId,
"ExpiryDate": expiryDate,
"IsHmgEmployee": isHmgEmployee,
"EmployeeID": employeeId,
"EmergencyContactName": emergencyContactName,
"EmergencyContactNo": emergencyContactNo,
"PatientPayType": patientPayType,
"DHCCPatientRefID": dhccPatientRefId,
"IsPatientDummy": isPatientDummy,
"Status": status,
"IsStatusCleared": isStatusCleared,
"PatientIdentificationType": patientIdentificationType,
"PatientIdentificationNo": patientIdentificationNo,
"ProjectID": projectId,
"InfoSourceID": infoSourceId,
"Address": address,
"Age": age,
"AgeDesc": ageDesc,
"AreaID": areaId,
"CRSVerificationStatus": crsVerificationStatus,
"CRSVerificationStatusDesc": crsVerificationStatusDesc,
"CRSVerificationStatusDescN": crsVerificationStatusDescN,
"CreatedBy": createdBy,
"GenderDescription": genderDescription,
"HealthIDFromNHICViaVida": healthIdFromNhicViaVida,
"IR": ir,
"ISOCityID": isoCityId,
"ISOCountryID": isoCountryId,
"IsVerfiedFromNHIC": isVerfiedFromNhic,
"ListPrivilege": listPrivilege == null ? [] : List<dynamic>.from(listPrivilege!.map((x) => x.toJson())),
"Marital": marital,
"OccupationID": occupationId,
"OutSA": outSa,
"POBox": poBox,
"ReceiveHealthSummaryReport": receiveHealthSummaryReport,
"SourceType": sourceType,
"StrDateofBirth": strDateofBirth,
"TempAddress": tempAddress,
"ZipCode": zipCode,
"eHealthIDField": eHealthIdField,
"patientPayType": listPatientPayType,
"patientType": listPatientType,
"status": listStatus,
};
} }
class ListPrivilege { class ListPrivilege {
int? iD; int? id;
String? serviceName; String? serviceName;
bool? previlege; bool? previlege;
dynamic region; dynamic region;
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); ListPrivilege({
this.id,
this.serviceName,
this.previlege,
this.region,
});
factory ListPrivilege.fromRawJson(String str) => ListPrivilege.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
ListPrivilege.fromJson(Map<String, dynamic> json) { factory ListPrivilege.fromJson(Map<String, dynamic> json) => ListPrivilege(
iD = json['ID']; id: json["ID"],
serviceName = json['ServiceName']; serviceName: json["ServiceName"],
previlege = json['Previlege']; previlege: json["Previlege"],
region = json['Region']; region: json["Region"],
} );
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() => {
final Map<String, dynamic> data = <String, dynamic>{}; "ID": id,
data['ID'] = iD; "ServiceName": serviceName,
data['ServiceName'] = serviceName; "Previlege": previlege,
data['Previlege'] = previlege; "Region": region,
data['Region'] = region; };
return data;
}
} }

@ -218,11 +218,12 @@ class _OTPVerificationScreenState extends State<OTPVerificationScreen> {
final otp = _controllers.map((c) => c.text).join(); final otp = _controllers.map((c) => c.text).join();
debugPrint('Verifying OTP: $otp'); debugPrint('Verifying OTP: $otp');
ScaffoldMessenger.of(context).showSnackBar( widget.checkActivationCode(int.parse(otp));
SnackBar(content: Text('Verifying OTP: $otp')), // ScaffoldMessenger.of(context).showSnackBar(
); // SnackBar(content: Text('Verifying OTP: $otp')),
// );
Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => RegisterNewStep2(null, {"nationalID": "12345678654321"}))); // Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => RegisterNewStep2(null, {"nationalID": "12345678654321"})));
} }
/// Auto fill OTP into text fields /// Auto fill OTP into text fields

@ -0,0 +1,73 @@
import 'dart:convert';
class CommonAuthanticatedRequest {
String? sessionId;
double? versionId;
int? channel;
int? languageId;
String? ipAdress;
String? generalid;
double? latitude;
double? longitude;
int? deviceTypeId;
int? patientType;
int? patientTypeId;
String? tokenId;
int? patientId;
int? patientOutSa;
CommonAuthanticatedRequest({
this.sessionId,
this.versionId,
this.channel,
this.languageId,
this.ipAdress,
this.generalid,
this.latitude,
this.longitude,
this.deviceTypeId,
this.patientType,
this.patientTypeId,
this.tokenId,
this.patientId,
this.patientOutSa,
});
factory CommonAuthanticatedRequest.fromRawJson(String str) => CommonAuthanticatedRequest.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory CommonAuthanticatedRequest.fromJson(Map<String, dynamic> json) => CommonAuthanticatedRequest(
sessionId: json["SessionID"],
versionId: json["VersionID"]?.toDouble(),
channel: json["Channel"],
languageId: json["LanguageID"],
ipAdress: json["IPAdress"],
generalid: json["generalid"],
latitude: json["Latitude"],
longitude: json["Longitude"],
deviceTypeId: json["DeviceTypeID"],
patientType: json["PatientType"],
patientTypeId: json["PatientTypeID"],
tokenId: json["TokenID"],
patientId: json["PatientID"],
patientOutSa: json["PatientOutSA"],
);
Map<String, dynamic> toJson() => {
"SessionID": sessionId,
"VersionID": versionId,
"Channel": channel,
"LanguageID": languageId,
"IPAdress": ipAdress,
"generalid": generalid,
"Latitude": latitude,
"Longitude": longitude,
"DeviceTypeID": deviceTypeId,
"PatientType": patientType,
"PatientTypeID": patientTypeId,
"TokenID": tokenId,
"PatientID": patientId,
"PatientOutSA": patientOutSa,
};
}

@ -43,7 +43,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
authVM!.clearDefaults(); authVM!.clearDefaultInputValues();
} }
@override @override
@ -53,7 +53,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
appBar: CustomAppBar( appBar: CustomAppBar(
onBackPressed: () { onBackPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
authVM!.clearDefaults(); authVM!.clearDefaultInputValues();
}, },
onLanguageChanged: (lang) {}, onLanguageChanged: (lang) {},
hideLogoAndLang: true, hideLogoAndLang: true,
@ -263,7 +263,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
icon: AppAssets.cancel, icon: AppAssets.cancel,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
authVM!.clearDefaults(); authVM!.clearDefaultInputValues();
}, },
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,

@ -1,14 +1,17 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
import 'package:hmg_patient_app_new/presentation/home/landing_page.dart';
import 'package:hmg_patient_app_new/splashPage.dart'; import 'package:hmg_patient_app_new/splashPage.dart';
class AppRoutes { class AppRoutes {
static const String initialRoute = '/initialRoute'; static const String initialRoute = '/initialRoute';
static const String loginScreen = '/loginScreen'; static const String loginScreen = '/loginScreen';
static const String registerNewScreen = '/registerNewScreen'; static const String registerNewScreen = '/registerNewScreen';
static const String landingScreen = '/landingScreen';
static Map<String, WidgetBuilder> get routes => { static Map<String, WidgetBuilder> get routes => {
initialRoute: (context) => SplashPage(), initialRoute: (context) => SplashPage(),
loginScreen: (context) => LoginScreen(), loginScreen: (context) => LoginScreen(),
landingScreen: (context) => LandingPage(),
}; };
} }

@ -18,6 +18,10 @@ class NavigationService {
navigatorKey.currentState?.popUntil(ModalRoute.withName(routeName)); navigatorKey.currentState?.popUntil(ModalRoute.withName(routeName));
} }
void pushAndReplace(String routeName) {
navigatorKey.currentState?.pushReplacementNamed(routeName);
}
Future<T?> pushToOtpScreen<T>({ Future<T?> pushToOtpScreen<T>({
required String phoneNumber, required String phoneNumber,
required Function(int code) checkActivationCode, required Function(int code) checkActivationCode,

@ -65,7 +65,7 @@ dependencies:
google_api_availability: ^5.0.1 google_api_availability: ^5.0.1
firebase_analytics: ^11.5.1 firebase_analytics: ^11.5.1
jiffy: ^6.4.3 jiffy: ^6.4.3
hijri_gregorian_calendar: ^0.0.4 hijri_gregorian_calendar: ^0.1.0
web: any web: any
flutter_staggered_animations: ^1.1.1 flutter_staggered_animations: ^1.1.1
@ -81,6 +81,7 @@ flutter:
uses-material-design: true uses-material-design: true
assets: assets:
- assets/ - assets/
- assets/json/
- assets/fonts/ - assets/fonts/
- assets/langs/ - assets/langs/
- assets/images/ - assets/images/

Loading…
Cancel
Save