diff --git a/assets/images/svg/pending.svg b/assets/images/svg/pending.svg new file mode 100644 index 00000000..2c26afbd --- /dev/null +++ b/assets/images/svg/pending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/svg/verification_check.svg b/assets/images/svg/verification_check.svg new file mode 100644 index 00000000..1b3cdcca --- /dev/null +++ b/assets/images/svg/verification_check.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart index 4c7974a3..eacba6a5 100644 --- a/lib/models/Authentication/authenticated_user.dart +++ b/lib/models/Authentication/authenticated_user.dart @@ -61,71 +61,72 @@ class AuthenticatedUser { dynamic tempAddress; dynamic zipCode; dynamic isFamily; + dynamic cRSVerificationStatus; // dynamic patientPayType; // dynamic patientType; // dynamic status; - AuthenticatedUser({ - 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.createdBy, - this.genderDescription, - this.iR, - this.iSOCityID, - this.iSOCountryID, - this.listPrivilege, - this.marital, - this.outSA, - this.pOBox, - this.receiveHealthSummaryReport, - this.sourceType, - this.strDateofBirth, - this.tempAddress, - this.zipCode, - this.isFamily - }); + AuthenticatedUser( + {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.createdBy, + this.genderDescription, + this.iR, + this.iSOCityID, + this.iSOCountryID, + this.listPrivilege, + this.marital, + this.outSA, + this.pOBox, + this.receiveHealthSummaryReport, + this.sourceType, + this.strDateofBirth, + this.tempAddress, + this.zipCode, + this.isFamily, + this.cRSVerificationStatus}); AuthenticatedUser.fromJson(Map json) { setupID = json['SetupID']; @@ -193,6 +194,7 @@ class AuthenticatedUser { tempAddress = json['TempAddress']; zipCode = json['ZipCode']; isFamily = json['IsFamily']; + cRSVerificationStatus = json['CRSVerificationStatus']; } Map toJson() { @@ -259,6 +261,7 @@ class AuthenticatedUser { data['TempAddress'] = this.tempAddress; data['ZipCode'] = this.zipCode; data['IsFamily'] = this.isFamily; + data['CRSVerificationStatus'] = this.cRSVerificationStatus; return data; } } diff --git a/lib/models/Authentication/check_activation_code_response.dart b/lib/models/Authentication/check_activation_code_response.dart index 3a0aed65..6113fae3 100644 --- a/lib/models/Authentication/check_activation_code_response.dart +++ b/lib/models/Authentication/check_activation_code_response.dart @@ -329,67 +329,67 @@ class List { dynamic strDateofBirth; dynamic tempAddress; dynamic zipCode; - - List({ - 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.createdBy, - this.genderDescription, - this.iR, - this.iSOCityID, - this.iSOCountryID, - this.listPrivilege, - this.marital, - this.outSA, - this.pOBox, - this.receiveHealthSummaryReport, - this.sourceType, - this.strDateofBirth, - this.tempAddress, - this.zipCode, - }); + dynamic cRSVerificationStatus; + List( + {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.createdBy, + this.genderDescription, + this.iR, + this.iSOCityID, + this.iSOCountryID, + this.listPrivilege, + this.marital, + this.outSA, + this.pOBox, + this.receiveHealthSummaryReport, + this.sourceType, + this.strDateofBirth, + this.tempAddress, + this.zipCode, + this.cRSVerificationStatus}); List.fromJson(Map json) { setupID = json['SetupID']; @@ -452,6 +452,7 @@ class List { strDateofBirth = json['StrDateofBirth']; tempAddress = json['TempAddress']; zipCode = json['ZipCode']; + cRSVerificationStatus = json['CRSVerificationStatus']; } Map toJson() { @@ -516,7 +517,7 @@ class List { data['StrDateofBirth'] = this.strDateofBirth; data['TempAddress'] = this.tempAddress; data['ZipCode'] = this.zipCode; - + data['CRSVerificationStatus'] = this.cRSVerificationStatus; return data; } } diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart index 7758ce5b..38622727 100644 --- a/lib/models/Authentication/register_user_requet.dart +++ b/lib/models/Authentication/register_user_requet.dart @@ -88,7 +88,7 @@ class Patientobject { String sourceType; String preferredLanguage; String marital; - + String eHealthIDField; Patientobject( {this.tempValue, this.patientIdentificationType, @@ -96,11 +96,11 @@ class Patientobject { this.mobileNumber, this.patientOutSA, this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, this.strDateofBirth, this.dateofBirth, this.gender, @@ -109,7 +109,8 @@ class Patientobject { this.emailAddress, this.sourceType, this.preferredLanguage, - this.marital}); + this.marital, + this.eHealthIDField}); Patientobject.fromJson(Map json) { tempValue = json['TempValue']; @@ -133,6 +134,7 @@ class Patientobject { preferredLanguage = json['PreferredLanguage']; marital = json['Marital']; + eHealthIDField = json['eHealthIDField']; } Map toJson() { @@ -158,6 +160,7 @@ class Patientobject { data['PreferredLanguage'] = this.preferredLanguage; data['Marital'] = this.marital; + data['eHealthIDField'] = this.eHealthIDField; return data; } } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index b6049c0b..33c22a01 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -26,6 +26,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import '../../widgets/data_display/medical/LabResult/LineChartCurved.dart'; @@ -219,15 +220,31 @@ class _HomePageState extends State { SizedBox( height: 8, ), - Texts( - projectViewModel - .user.firstName + - " " + - projectViewModel - .user.lastName, - color: Colors.grey[100], - bold: true, - fontSize: 15, + Row( + children: [ + Texts( + projectViewModel.user + .firstName + + " " + + projectViewModel + .user.lastName, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + projectViewModel.user + .cRSVerificationStatus == + 2 + ? SvgPicture.asset( + 'assets/images/svg/verification_check.svg') + : projectViewModel + .user + .cRSVerificationStatus == + 3 + ? SvgPicture.asset( + 'assets/images/svg/pending.svg') + : SizedBox() + ], ), Texts( '${projectViewModel.user.patientID}', diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index 4ede2683..4eb06c6e 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -52,9 +52,9 @@ class _RegisterInfo extends State { String location = '1'; AuthenticatedUserObject authenticatedUserObject = - locator(); + locator(); AppointmentRateViewModel appointmentRateViewModel = - locator(); + locator(); ProjectViewModel projectViewModel; @override @@ -291,36 +291,35 @@ class _RegisterInfo extends State { dynamic request = getTempUserRequest(); GifLoaderDialogUtils.showMyDialog(context); this.authService.registerUser(request).then((result) => { - GifLoaderDialogUtils.hideDialog(context), + GifLoaderDialogUtils.hideDialog(context), // userData = result.list; //AuthenticatedUser.fromJson(result['List'][0]), - if(result is String){ - new ConfirmDialog( - context: context, - confirmMessage: result, - okText: TranslationBase.of(context).ok, - cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => { - ConfirmDialog.closeAlertDialog(context) - }, - cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}) - .showAlertDialog(context) - - }else - { - sharedPref.remove(FAMILY_FILE), - result['List'][0]['IsFamily'] = false, - sharedPref.setObject(USER_PROFILE, result['List'][0]), - this.sharedPref.setObject(MAIN_USER, result['List'][0]), - sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]), - sharedPref.setString(TOKEN, result["AuthenticationTokenID"]), - authenticatedUserObject.isLogin = true, - appointmentRateViewModel.isLogin = true, - projectViewModel.isLogin = true, - - Navigator.of(context).pushNamed(HOME), - AppToast.showSuccessToast(message: result["ErrorEndUserMessage"]) - } + if (result is String) + { + new ConfirmDialog( + context: context, + confirmMessage: result, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {ConfirmDialog.closeAlertDialog(context)}, + cancelFunction: () => { + ConfirmDialog.closeAlertDialog(context) + }).showAlertDialog(context) + } + else + { + sharedPref.remove(FAMILY_FILE), + result['List'][0]['IsFamily'] = false, + sharedPref.setObject(USER_PROFILE, result['List'][0]), + this.sharedPref.setObject(MAIN_USER, result['List'][0]), + sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]), + sharedPref.setString(TOKEN, result["AuthenticationTokenID"]), + authenticatedUserObject.isLogin = true, + appointmentRateViewModel.isLogin = true, + projectViewModel.isLogin = true, + Navigator.of(context).pushNamed(HOME), + AppToast.showSuccessToast(message: result["ErrorEndUserMessage"]) + } }); // .catchError((err) { // GifLoaderDialogUtils.hideDialog(context); @@ -366,12 +365,16 @@ class _RegisterInfo extends State { "PatientIdentificationNo": registerInfo.idNumber, "MobileNumber": registerd_data.patientMobileNumber, "PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1, - "FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr, - "FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn, - "MiddleNameN":registerInfo.secondNameAr, - "MiddleName":registerInfo.secondNameEn, - "LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr, - "LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn, + "FirstNameN": + registerInfo.firstNameAr == '-' ? "" : registerInfo.firstNameAr, + "FirstName": + registerInfo.firstNameEn == '-' ? "" : registerInfo.firstNameEn, + "MiddleNameN": registerInfo.secondNameAr, + "MiddleName": registerInfo.secondNameEn, + "LastNameN": + registerInfo.lastNameAr == '-' ? "" : registerInfo.lastNameAr, + "LastName": + registerInfo.lastNameEn == '-' ? "" : registerInfo.lastNameEn, "StrDateofBirth": registerInfo.dateOfBirth, "DateofBirth": DateUtil.convertISODateToJsonDate( registerInfo.dateOfBirth.replaceAll('/', '-')), @@ -386,6 +389,7 @@ class _RegisterInfo extends State { : registerInfo.maritalStatusCode == 'M' ? '1' : '2', + "eHealthIDField": registerInfo.healthId }, "PatientIdentificationID": registerInfo.idNumber, "PatientMobileNumber": registerd_data.patientMobileNumber,