Master Merged in to local

merge-requests/34/merge
haroon amjad 6 years ago
commit 0171664779

@ -0,0 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart"
}
]
}

@ -50,5 +50,6 @@
android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
</manifest>

@ -1,6 +1,11 @@
package com.cloud.diplomaticquarterapp
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
class MainActivity: FlutterFragmentActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -3,45 +3,65 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'dart:io';
const MAX_SMALL_SCREEN = 660;
//const BASE_URL = 'https://hmgwebservices.com/Services';
const BASE_URL = 'https://hmgweb.com/';
const GET_PROJECT = '/Lists.svc/REST/GetProject';
const BASE_URL = 'https://hmgwebservices.com/'; // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/'; // UAT Environment
//const BASE_URL = 'https://uat.hmgweb.com/'; // UAT Environment
///Doctor
const GET_MY_DOCTOR = '/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = '/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING = '/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = '/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = '/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = '/Notifications.svc/REST/SendPrescriptionEmail';
//const BASE_URL = 'https://hmgweb.com/'; // Production Environment
//const BASE_URL = 'https://uat.hmgweb.com/'; // UAT Environment
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
const GET_CLINICS_LIST_URL = "/lists.svc/REST/GetClinicCentralized";
//URL to get doctors list
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to get doctor profile
const GET_DOCTOR_PROFILE = "Services/Doctors.svc/REST/GetDocProfiles";
const GET_DOCTORS_LIST_URL = "/Doctors.svc/REST/SearchDoctorsByTime";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
const GET_DOCTOR_FREE_SLOTS = "/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
const INSERT_SPECIFIC_APPOINTMENT = "/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
const GET_PATIENT_SHARE = "/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_PATIENT_APPOINTMENT_HISTORY = "/Doctors.svc/REST/PateintHasAppoimentHistory";
//URL to confirm appointment
const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
const CONFIRM_APPOINTMENT = "/MobileNotifications.svc/REST/ConfirmAppointment";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
const CANCEL_APPOINTMENT = "/Doctors.svc/REST/CancelAppointment";
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.5;
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const GET_PHARMCY_ITEMS = "/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "/Patients.svc/REST/GetPharmcyList";
class AppGlobal {
static var context;
AppSharedPreferences sharedPref = AppSharedPreferences();
Request getPublicRequest() {
@ -50,6 +70,11 @@ class AppGlobal {
request.Channel = 3;
request.IPAdress = "10.20.10.20";
request.generalid = 'Cs2020@2016\$2958';
request.VersionID = VERSION_ID; //5.3; //3.6;
request.Channel = CHANNEL; //3;
// request.LanguageID = await sharedPref.getString(APP_LANGUAGE);
request.IPAdress = IP_ADDRESS; //"10.20.10.20";
request.generalid = GENERAL_ID; //'Cs2020@2016\$2958';
request.PatientOutSA = 0;
request.SessionID = "wEVNbagIkaNhGECWZjHaA";
request.TokenID = "@dm!n";
@ -58,10 +83,6 @@ class AppGlobal {
return request;
}
}
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.5;

@ -21,7 +21,10 @@ const Map<String, Map<String, String>> localizedValues = {
'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'},
'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'},
'nearestAppo': {'en': 'Nearest appointment', 'ar': 'أقرب موعد'},
'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},
'searchByDocText': {
'en': 'Type the name of the doctor to help you find him',
'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'
},
'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'},
'search': {'en': 'Search', 'ar': 'بحث'},
'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'},
@ -31,11 +34,17 @@ const Map<String, Map<String, String>> localizedValues = {
'gender': {'en': 'Gender', 'ar': 'الجنس'},
'nationality': {'en': 'Nationality', 'ar': 'الجنسية'},
'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'},
'confirmAppoHeading': {'en': 'Kindly confirm your Appointment', 'ar': 'يرجى تأكيد موعدك'},
'confirmAppoHeading': {
'en': 'Kindly confirm your Appointment',
'ar': 'يرجى تأكيد موعدك'
},
'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'},
'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'},
'patientShare': {'en': 'Patient Share', 'ar': 'المبلغ المستحق'},
'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق'},
'patientShareWithTax': {
'en': 'Patient Share with Tax',
'ar': 'المبلغ الإجمالي المستحق'
},
'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'},
'confirm': {'en': 'Confirm', 'ar': 'تأكيد'},
'appointment': {'en': 'Appointment', 'ar': 'الموعد'},
@ -106,10 +115,46 @@ const Map<String, Map<String, String>> localizedValues = {
"dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"},
"hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"},
"gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"},
"verify-login-with": {
"en": "Please choose one of the following options to verify",
"ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"
},
"register-user": {"en": "Register", "ar": "تسجيل"},
"verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"},
"verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"},
"verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"},
"verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"},
"last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
"last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"verify-fingerprint": {
"en":
"To activate the fingerprint login service, please verify data by using one of the following options.",
"ar":
"لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'},
'searchMedicineHere': {
'en': 'Search Medicine Here',
'ar': 'ابحث عن الدواء هنا'
},
'description': {'en': 'Description', 'ar': 'الوصف'},
'price': {'en': 'Price', 'ar': 'السعر'},
'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'},
'pleaseEnterMedicineName': {
'en': 'Please Enter Medicine Name',
'ar': 'الرجائ ادخال اسم الدواء'
},
"verification_message": {
"en": "Please enter verification code",
"ar": "الرجاء إدخال رمز التحقق"
},
"validation_message": {
"en": "The verification code expires in",
"ar": "تنتهي صلاحية رمز التحقق خلال"
},
"arabic-change": {"en": "عربي", "ar": "English"},
"notification": {"en": "Notifications", "ar": "إشعارات"},
"app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"},
"rate-app": {"en": "Rate Our App", "ar": "قيم التطبيق"}
};

@ -5,3 +5,6 @@ const PUSH_TOKEN = 'push-token';
const REGISTER_DATA_FOR_REGISTER = 'register-data-for-register';
const LOGIN_TOKEN_ID = 'register-data-for-register';
const REGISTER_DATA_FOR_LOGIIN = 'register-data-for-login';
const LAST_LOGIN = 'last-login';
const ONLY_SMS = 'only-sms';
const AUTH_DATA = 'auth-data';

@ -0,0 +1 @@
enum FilterType { Clinic, Hospital }

@ -0,0 +1,176 @@
class DoctorProfile {
int doctorID;
String doctorName;
Null doctorNameN;
int clinicID;
String clinicDescription;
Null clinicDescriptionN;
Null licenseExpiry;
int employmentType;
Null setupID;
int projectID;
String projectName;
String nationalityID;
String nationalityName;
Null nationalityNameN;
int gender;
String genderDescription;
Null genderDescriptionN;
Null doctorTitle;
Null projectNameN;
bool isAllowWaitList;
String titleDescription;
Null titleDescriptionN;
Null isRegistered;
Null isDoctorDummy;
bool isActive;
Null isDoctorAppointmentDisplayed;
bool doctorClinicActive;
Null isbookingAllowed;
String doctorCases;
Null doctorPicture;
String doctorProfileInfo;
List<String> specialty;
int actualDoctorRate;
String doctorImageURL;
int doctorRate;
String doctorTitleForProfile;
bool isAppointmentAllowed;
String nationalityFlagURL;
int noOfPatientsRate;
String qR;
int serviceID;
DoctorProfile(
{this.doctorID,
this.doctorName,
this.doctorNameN,
this.clinicID,
this.clinicDescription,
this.clinicDescriptionN,
this.licenseExpiry,
this.employmentType,
this.setupID,
this.projectID,
this.projectName,
this.nationalityID,
this.nationalityName,
this.nationalityNameN,
this.gender,
this.genderDescription,
this.genderDescriptionN,
this.doctorTitle,
this.projectNameN,
this.isAllowWaitList,
this.titleDescription,
this.titleDescriptionN,
this.isRegistered,
this.isDoctorDummy,
this.isActive,
this.isDoctorAppointmentDisplayed,
this.doctorClinicActive,
this.isbookingAllowed,
this.doctorCases,
this.doctorPicture,
this.doctorProfileInfo,
this.specialty,
this.actualDoctorRate,
this.doctorImageURL,
this.doctorRate,
this.doctorTitleForProfile,
this.isAppointmentAllowed,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.serviceID});
DoctorProfile.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
clinicID = json['ClinicID'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
licenseExpiry = json['LicenseExpiry'];
employmentType = json['EmploymentType'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
nationalityID = json['NationalityID'];
nationalityName = json['NationalityName'];
nationalityNameN = json['NationalityNameN'];
gender = json['Gender'];
genderDescription = json['Gender_Description'];
genderDescriptionN = json['Gender_DescriptionN'];
doctorTitle = json['DoctorTitle'];
projectNameN = json['ProjectNameN'];
isAllowWaitList = json['IsAllowWaitList'];
titleDescription = json['Title_Description'];
titleDescriptionN = json['Title_DescriptionN'];
isRegistered = json['IsRegistered'];
isDoctorDummy = json['IsDoctorDummy'];
isActive = json['IsActive'];
isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed'];
doctorClinicActive = json['DoctorClinicActive'];
isbookingAllowed = json['IsbookingAllowed'];
doctorCases = json['DoctorCases'];
doctorPicture = json['DoctorPicture'];
doctorProfileInfo = json['DoctorProfileInfo'];
specialty = json['Specialty'].cast<String>();
actualDoctorRate = json['ActualDoctorRate'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];
doctorTitleForProfile = json['DoctorTitleForProfile'];
isAppointmentAllowed = json['IsAppointmentAllowed'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['ClinicID'] = this.clinicID;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['LicenseExpiry'] = this.licenseExpiry;
data['EmploymentType'] = this.employmentType;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['NationalityID'] = this.nationalityID;
data['NationalityName'] = this.nationalityName;
data['NationalityNameN'] = this.nationalityNameN;
data['Gender'] = this.gender;
data['Gender_Description'] = this.genderDescription;
data['Gender_DescriptionN'] = this.genderDescriptionN;
data['DoctorTitle'] = this.doctorTitle;
data['ProjectNameN'] = this.projectNameN;
data['IsAllowWaitList'] = this.isAllowWaitList;
data['Title_Description'] = this.titleDescription;
data['Title_DescriptionN'] = this.titleDescriptionN;
data['IsRegistered'] = this.isRegistered;
data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsActive'] = this.isActive;
data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed;
data['DoctorClinicActive'] = this.doctorClinicActive;
data['IsbookingAllowed'] = this.isbookingAllowed;
data['DoctorCases'] = this.doctorCases;
data['DoctorPicture'] = this.doctorPicture;
data['DoctorProfileInfo'] = this.doctorProfileInfo;
data['Specialty'] = this.specialty;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitleForProfile'] = this.doctorTitleForProfile;
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['ServiceID'] = this.serviceID;
return data;
}
}

@ -0,0 +1,32 @@
class DoctorRating {
Null projectID;
Null clinicID;
int doctorID;
int patientNumber;
int doctorRate;
DoctorRating(
{this.projectID,
this.clinicID,
this.doctorID,
this.patientNumber,
this.doctorRate});
DoctorRating.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
patientNumber = json['PatientNumber'];
doctorRate = json['DoctorRate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['PatientNumber'] = this.patientNumber;
data['DoctorRate'] = this.doctorRate;
return data;
}
}

@ -0,0 +1,325 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientDoctorAppointment {
String setupID;
int projectID;
int appointmentNo;
DateTime appointmentDate;
String appointmentDateN;
bool appointmentType;
DateTime bookDate;
bool patientType;
int patientID;
int clinicID;
int doctorID;
DateTime endDate;
String startTime;
String endTime;
bool status;
bool visitType;
String visitFor;
String patientStatusType;
String actualVisitStartTime;
String actualVisitEndTime;
bool isReminderActivated;
String reminderDisplayInterval;
String reminderDisplayIntervalUnit;
String mainAppointmentNo;
String notes;
int companyID;
String dHCCPatApptRef;
String bookedBy;
DateTime bookedOn;
String confirmedBy;
DateTime confirmedOn;
String arrivalChangedBy;
DateTime arrivedOn;
String rescheduledBy;
String rescheduledOn;
String mRStatus;
String mRSentBy;
String mRSentOn;
String mRReceiptBy;
String mRReceiptOn;
String isDocumentScanned;
String documentScanDateTime;
String documentScannedUser;
String editedBy;
String editedOn;
String isRecordedByNurse;
String isCheckedByDoctor;
String isVisitClosed;
String isRecurring;
String isPersonallyConfirmed;
String confirmationBy;
String relationId;
int appointmentDays;
int isActive;
int actualDoctorRate;
String clinicName;
String doctorCases;
String doctorImageURL;
String doctorInfo;
String doctorName;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isAppointmentAllowed;
bool isDoctorAllowVedioCall;
String nationalityFlagURL;
String nationalityID;
String nationalityName;
int noOfPatientsRate;
String projectName;
String qR;
List<String> speciality;
PatientDoctorAppointment(
{this.setupID,
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientType,
this.patientID,
this.clinicID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitType,
this.visitFor,
this.patientStatusType,
this.actualVisitStartTime,
this.actualVisitEndTime,
this.isReminderActivated,
this.reminderDisplayInterval,
this.reminderDisplayIntervalUnit,
this.mainAppointmentNo,
this.notes,
this.companyID,
this.dHCCPatApptRef,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.rescheduledBy,
this.rescheduledOn,
this.mRStatus,
this.mRSentBy,
this.mRSentOn,
this.mRReceiptBy,
this.mRReceiptOn,
this.isDocumentScanned,
this.documentScanDateTime,
this.documentScannedUser,
this.editedBy,
this.editedOn,
this.isRecordedByNurse,
this.isCheckedByDoctor,
this.isVisitClosed,
this.isRecurring,
this.isPersonallyConfirmed,
this.confirmationBy,
this.relationId,
this.appointmentDays,
this.isActive,
this.actualDoctorRate,
this.clinicName,
this.doctorCases,
this.doctorImageURL,
this.doctorInfo,
this.doctorName,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isAppointmentAllowed,
this.isDoctorAllowVedioCall,
this.nationalityFlagURL,
this.nationalityID,
this.nationalityName,
this.noOfPatientsRate,
this.projectName,
this.qR,
this.speciality});
PatientDoctorAppointment.fromJson(Map<String, dynamic> json) {
try {
setupID = json['SetupID'];
projectID = json['ProjectID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']);
appointmentDateN = json['AppointmentDateN'];
appointmentType = json['AppointmentType'];
bookDate = DateUtil.convertStringToDate(json['BookDate']);
patientType = json['PatientType'];
patientID = json['PatientID'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
endDate = DateUtil.convertStringToDate(json['EndDate']);
startTime = json['StartTime'];
endTime = json['EndTime'];
status = json['Status'];
visitType = json['VisitType'];
visitFor = json['VisitFor'];
patientStatusType = json['PatientStatusType'];
actualVisitStartTime = json['ActualVisitStartTime'];
actualVisitEndTime = json['ActualVisitEndTime'];
isReminderActivated = json['IsReminderActivated'];
reminderDisplayInterval = json['ReminderDisplayInterval'];
reminderDisplayIntervalUnit = json['ReminderDisplayIntervalUnit'];
mainAppointmentNo = json['MainAppointmentNo'];
notes = json['Notes'];
companyID = json['CompanyID'];
dHCCPatApptRef = json['DHCCPatApptRef'];
bookedBy = json['BookedBy'];
// bookedOn = DateUtil.convertStringToDate(json['BookedOn']);
confirmedBy = json['ConfirmedBy'];
// confirmedOn = DateUtil.convertStringToDate(json['ConfirmedOn']);
arrivalChangedBy = json['ArrivalChangedBy'];
// arrivedOn = DateUtil.convertStringToDate(json['ArrivedOn']);
rescheduledBy = json['RescheduledBy'];
rescheduledOn = json['RescheduledOn'];
mRStatus = json['MRStatus'];
mRSentBy = json['MRSentBy'];
mRSentOn = json['MRSentOn'];
mRReceiptBy = json['MRReceiptBy'];
mRReceiptOn = json['MRReceiptOn'];
isDocumentScanned = json['IsDocumentScanned'];
documentScanDateTime = json['DocumentScanDateTime'];
documentScannedUser = json['DocumentScannedUser'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
isRecordedByNurse = json['IsRecordedByNurse'];
isCheckedByDoctor = json['IsCheckedByDoctor'];
isVisitClosed = json['IsVisitClosed'];
isRecurring = json['IsRecurring'];
isPersonallyConfirmed = json['IsPersonallyConfirmed'];
confirmationBy = json['ConfirmationBy'];
relationId = json['RelationId'];
appointmentDays = json['AppointmentDays'];
isActive = json['IsActive'];
actualDoctorRate = json['ActualDoctorRate'];
clinicName = json['ClinicName'];
doctorCases = json['DoctorCases'];
doctorImageURL = json['DoctorImageURL'];
doctorInfo = json['DoctorInfo'];
doctorName = json['DoctorName'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isAppointmentAllowed = json['IsAppointmentAllowed'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
nationalityFlagURL = json['NationalityFlagURL'];
nationalityID = json['NationalityID'];
nationalityName = json['NationalityName'];
noOfPatientsRate = json['NoOfPatientsRate'];
projectName = json['ProjectName'];
qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
} catch (e) {
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentDateN'] = this.appointmentDateN;
data['AppointmentType'] = this.appointmentType;
data['BookDate'] = this.bookDate;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['EndDate'] = this.endDate;
data['StartTime'] = this.startTime;
data['EndTime'] = this.endTime;
data['Status'] = this.status;
data['VisitType'] = this.visitType;
data['VisitFor'] = this.visitFor;
data['PatientStatusType'] = this.patientStatusType;
data['ActualVisitStartTime'] = this.actualVisitStartTime;
data['ActualVisitEndTime'] = this.actualVisitEndTime;
data['IsReminderActivated'] = this.isReminderActivated;
data['ReminderDisplayInterval'] = this.reminderDisplayInterval;
data['ReminderDisplayIntervalUnit'] = this.reminderDisplayIntervalUnit;
data['MainAppointmentNo'] = this.mainAppointmentNo;
data['Notes'] = this.notes;
data['CompanyID'] = this.companyID;
data['DHCCPatApptRef'] = this.dHCCPatApptRef;
data['BookedBy'] = this.bookedBy;
data['BookedOn'] = this.bookedOn;
data['ConfirmedBy'] = this.confirmedBy;
data['ConfirmedOn'] = this.confirmedOn;
data['ArrivalChangedBy'] = this.arrivalChangedBy;
data['ArrivedOn'] = this.arrivedOn;
data['RescheduledBy'] = this.rescheduledBy;
data['RescheduledOn'] = this.rescheduledOn;
data['MRStatus'] = this.mRStatus;
data['MRSentBy'] = this.mRSentBy;
data['MRSentOn'] = this.mRSentOn;
data['MRReceiptBy'] = this.mRReceiptBy;
data['MRReceiptOn'] = this.mRReceiptOn;
data['IsDocumentScanned'] = this.isDocumentScanned;
data['DocumentScanDateTime'] = this.documentScanDateTime;
data['DocumentScannedUser'] = this.documentScannedUser;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['IsRecordedByNurse'] = this.isRecordedByNurse;
data['IsCheckedByDoctor'] = this.isCheckedByDoctor;
data['IsVisitClosed'] = this.isVisitClosed;
data['IsRecurring'] = this.isRecurring;
data['IsPersonallyConfirmed'] = this.isPersonallyConfirmed;
data['ConfirmationBy'] = this.confirmationBy;
data['RelationId'] = this.relationId;
data['AppointmentDays'] = this.appointmentDays;
data['IsActive'] = this.isActive;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['ClinicName'] = this.clinicName;
data['DoctorCases'] = this.doctorCases;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorInfo'] = this.doctorInfo;
data['DoctorName'] = this.doctorName;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NationalityID'] = this.nationalityID;
data['NationalityName'] = this.nationalityName;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['ProjectName'] = this.projectName;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
return data;
}
}
class PatientDoctorAppointmentList{
String filterName ="";
List<PatientDoctorAppointment> patientDoctorAppointmentList = List();
PatientDoctorAppointmentList({this.filterName,PatientDoctorAppointment patientDoctorAppointment}){
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -0,0 +1,76 @@
class RequestPatientDoctorAppointment {
int top;
double versionID;
int beforeDays;
int exludType;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
RequestPatientDoctorAppointment(
{this.top,
this.versionID,
this.beforeDays,
this.exludType,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientDoctorAppointment.fromJson(Map<String, dynamic> json) {
top = json['Top'];
versionID = json['VersionID'];
beforeDays = json['beforeDays'];
exludType = json['exludType'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Top'] = this.top;
data['VersionID'] = this.versionID;
data['beforeDays'] = this.beforeDays;
data['exludType'] = this.exludType;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,72 @@
class RequestDoctorProfile {
int doctorID;
bool license;
bool isRegistered;
int projectID;
int clinicID;
int patientID;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
RequestDoctorProfile(
{this.doctorID,
this.license,
this.isRegistered,
this.projectID,
this.clinicID,
this.patientID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
RequestDoctorProfile.fromJson(Map<String, dynamic> json) {
doctorID = json['doctorID'];
license = json['License'];
isRegistered = json['IsRegistered'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
patientID = json['PatientID'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['doctorID'] = this.doctorID;
data['License'] = this.license;
data['IsRegistered'] = this.isRegistered;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['PatientID'] = this.patientID;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,52 @@
class RequestDoctorRating {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int doctorID;
RequestDoctorRating(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.doctorID});
RequestDoctorRating.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
doctorID = json['DoctorID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['DoctorID'] = this.doctorID;
return data;
}
}

@ -14,22 +14,46 @@ class PharmaciesListModel {
int editedBy;
int projectID;
int clinicID;
double price;
String imageLocation;
String desLocation;
String itemDes;
String phoneNumber;
String longitude;
String latitude;
PharmaciesListModel({
this.itemID,
this.patientTypeID = 1,
this.languageID = 2,
this.stamp = '2020-04-23T21:01:21.492Z',
this.iPAdress = '11.11.11.11',
this.versionID = 1.2,
this.tokenID,
this.sessionID = 'e29zoooEJ4',
this.isLoginForDoctorApp = true,
this.channel = 9,
//this.patientOutSA = true,
});
PharmaciesListModel(
{this.itemID,
this.patientTypeID,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.channel,
this.editedBy,
this.doctorID,
this.patientOutSA,
this.clinicID,
this.projectID,
this.price,
this.imageLocation,
this.desLocation,
this.itemDes,
this.phoneNumber,
this.longitude,
this.latitude});
PharmaciesListModel.fromJson(Map<String, dynamic> json) {
longitude = json['Longitude'];
latitude = json['Latitude'];
phoneNumber = json['PhoneNumber'];
itemDes = json['ItemDescription'];
desLocation = json['LocationDescription'];
imageLocation = json['ProjectImageURL'];
price = json['SellingPrice'];
itemID = json['ItemID'];
patientTypeID = json['PatientTypeID'];
languageID = json['LanguageID'];

@ -20,6 +20,7 @@ class PharmaciesModel {
bool isLoginForDoctorApp;
String itemDes;
String productImage;
int itemID;
PharmaciesModel(
{this.pHRItemName,
@ -42,9 +43,12 @@ class PharmaciesModel {
this.stamp,
this.itemDes,
this.productImage,
this.isLoginForDoctorApp});
this.isLoginForDoctorApp,
this.itemID});
PharmaciesModel.fromJson(Map<String, dynamic> json) {
itemID = json['ItemID'];
productImage = json['ProductImageBase64'];
itemDes = json['ItemDescription'];
pHRItemName = json['PHR_itemName'];

@ -0,0 +1,155 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class Prescriptions {
String setupID;
int projectID;
int patientID;
int appointmentNo;
String appointmentDate;
String doctorName;
String clinicDescription;
String name;
int episodeID;
int actualDoctorRate;
int admission;
int clinicID;
String companyName;
String despensedStatus;
DateTime dischargeDate;
int dischargeNo;
int doctorID;
String doctorImageURL;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isInsurancePatient;
String nationalityFlagURL;
int noOfPatientsRate;
String qR;
List<String> speciality;
Prescriptions(
{this.setupID,
this.projectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
this.doctorName,
this.clinicDescription,
this.name,
this.episodeID,
this.actualDoctorRate,
this.admission,
this.clinicID,
this.companyName,
this.despensedStatus,
this.dischargeDate,
this.dischargeNo,
this.doctorID,
this.doctorImageURL,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isInsurancePatient,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.speciality});
Prescriptions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
doctorName = json['DoctorName'];
clinicDescription = json['ClinicDescription'];
name = json['Name'];
episodeID = json['EpisodeID'];
actualDoctorRate = json['ActualDoctorRate'];
admission = json['Admission'];
clinicID = json['ClinicID'];
companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status'];
dischargeDate = DateUtil.convertStringToDate(json['DischargeDate']);
dischargeNo = json['DischargeNo'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isInsurancePatient = json['IsInsurancePatient'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['DoctorName'] = this.doctorName;
data['ClinicDescription'] = this.clinicDescription;
data['Name'] = this.name;
data['EpisodeID'] = this.episodeID;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['Admission'] = this.admission;
data['ClinicID'] = this.clinicID;
data['CompanyName'] = this.companyName;
data['Despensed_Status'] = this.despensedStatus;
data['DischargeDate'] = this.dischargeDate;
data['DischargeNo'] = this.dischargeNo;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsInsurancePatient'] = this.isInsurancePatient;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
return data;
}
}
class PrescriptionsList {
String filterName = "";
List<Prescriptions> prescriptionsList = List();
PrescriptionsList({this.filterName, Prescriptions prescriptions}) {
prescriptionsList.add(prescriptions);
}
}

@ -0,0 +1,127 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PrescriptionReport {
int patientID;
String patientName;
String patientAge;
String patientGender;
String address;
String phoneOffice;
String itemDescription;
int doseTimingID;
int frequencyID;
int routeID;
String clinic;
String doctorName;
String route;
String frequency;
String remarks;
String name;
int days;
String startDate;
String orderDate;
int doseDailyQuantity;
int itemID;
Null productImage;
String sKU;
String itemDescriptionN;
String routeN;
String frequencyN;
String imageSRCUrl;
String imageThumbUrl;
PrescriptionReport(
{this.patientID,
this.patientName,
this.patientAge,
this.patientGender,
this.address,
this.phoneOffice,
this.itemDescription,
this.doseTimingID,
this.frequencyID,
this.routeID,
this.clinic,
this.doctorName,
this.route,
this.frequency,
this.remarks,
this.name,
this.days,
this.startDate,
this.orderDate,
this.doseDailyQuantity,
this.itemID,
this.productImage,
this.sKU,
this.itemDescriptionN,
this.routeN,
this.frequencyN,
this.imageSRCUrl,
this.imageThumbUrl});
PrescriptionReport.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
patientName = json['PatientName'];
patientAge = json['PatientAge'];
patientGender = json['PatientGender'];
address = json['Address'];
phoneOffice = json['PhoneOffice'];
itemDescription = json['ItemDescription'];
doseTimingID = json['DoseTimingID'];
frequencyID = json['FrequencyID'];
routeID = json['RouteID'];
clinic = json['Clinic'];
doctorName = json['DoctorName'];
route = json['Route'];
frequency = json['Frequency'];
remarks = json['Remarks'];
name = json['Name'];
days = json['Days'];
startDate = json['StartDate'];
orderDate = json['OrderDate'];
doseDailyQuantity = json['DoseDailyQuantity'];
itemID = json['ItemID'];
productImage = json['ProductImage'];
sKU = json['SKU'];
itemDescriptionN = json['ItemDescriptionN'];
routeN = json['RouteN'];
frequencyN = json['FrequencyN'];
imageSRCUrl = json['ImageSRCUrl'];
imageThumbUrl = json['ImageThumbUrl'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['PatientAge'] = this.patientAge;
data['PatientGender'] = this.patientGender;
data['Address'] = this.address;
data['PhoneOffice'] = this.phoneOffice;
data['ItemDescription'] = this.itemDescription;
data['DoseTimingID'] = this.doseTimingID;
data['FrequencyID'] = this.frequencyID;
data['RouteID'] = this.routeID;
data['Clinic'] = this.clinic;
data['DoctorName'] = this.doctorName;
data['Route'] = this.route;
data['Frequency'] = this.frequency;
data['Remarks'] = this.remarks;
data['Name'] = this.name;
data['Days'] = this.days;
data['StartDate'] = this.startDate;
data['OrderDate'] = this.orderDate;
data['DoseDailyQuantity'] = this.doseDailyQuantity;
data['ItemID'] = this.itemID;
data['ProductImage'] = this.productImage;
data['SKU'] = this.sKU;
data['ItemDescriptionN'] = this.itemDescriptionN;
data['RouteN'] = this.routeN;
data['FrequencyN'] = this.frequencyN;
data['ImageSRCUrl'] = this.imageSRCUrl;
data['ImageThumbUrl'] = this.imageThumbUrl;
data['hasPlan'] = false;
return data;
}
}

@ -0,0 +1,134 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PrescriptionsOrder {
int iD;
String patientID;
bool patientOutSA;
bool isOutPatient;
int projectID;
int nearestProjectID;
double longitude;
double latitude;
String appointmentNo;
String dischargeID;
int lineItemNo;
int status;
String description;
String descriptionN;
DateTime createdOn;
int serviceID;
int createdBy;
DateTime editedOn;
int editedBy;
int channel;
String clientRequestID;
bool returnedToQueue;
Null pickupDateTime;
Null pickupLocationName;
Null dropoffLocationName;
int realRRTHaveTransactions;
String nearestProjectDescription;
String nearestProjectDescriptionN;
String projectDescription;
String projectDescriptionN;
PrescriptionsOrder(
{this.iD,
this.patientID,
this.patientOutSA,
this.isOutPatient,
this.projectID,
this.nearestProjectID,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeID,
this.lineItemNo,
this.status,
this.description,
this.descriptionN,
this.createdOn,
this.serviceID,
this.createdBy,
this.editedOn,
this.editedBy,
this.channel,
this.clientRequestID,
this.returnedToQueue,
this.pickupDateTime,
this.pickupLocationName,
this.dropoffLocationName,
this.realRRTHaveTransactions,
this.nearestProjectDescription,
this.nearestProjectDescriptionN,
this.projectDescription,
this.projectDescriptionN});
PrescriptionsOrder.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
isOutPatient = json['IsOutPatient'];
projectID = json['ProjectID'];
nearestProjectID = json['NearestProjectID'];
longitude = json['Longitude'];
latitude = json['Latitude'];
appointmentNo = json['AppointmentNo'];
dischargeID = json['DischargeID'];
lineItemNo = json['LineItemNo'];
status = json['Status'];
description = json['Description'];
descriptionN = json['DescriptionN'];
createdOn = DateUtil.convertStringToDate(json['CreatedOn']);
serviceID = json['ServiceID'];
createdBy = json['CreatedBy'];
editedOn = DateUtil.convertStringToDate(json['EditedOn']);
editedBy = json['EditedBy'];
channel = json['Channel'];
clientRequestID = json['ClientRequestID'];
returnedToQueue = json['ReturnedToQueue'];
pickupDateTime = json['PickupDateTime'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
nearestProjectDescription = json['NearestProjectDescription'];
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
projectDescription = json['ProjectDescription'];
projectDescriptionN = json['ProjectDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['ProjectID'] = this.projectID;
data['NearestProjectID'] = this.nearestProjectID;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
data['AppointmentNo'] = this.appointmentNo;
data['DischargeID'] = this.dischargeID;
data['LineItemNo'] = this.lineItemNo;
data['Status'] = this.status;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['CreatedOn'] = this.createdOn;
data['ServiceID'] = this.serviceID;
data['CreatedBy'] = this.createdBy;
data['EditedOn'] = this.editedOn;
data['EditedBy'] = this.editedBy;
data['Channel'] = this.channel;
data['ClientRequestID'] = this.clientRequestID;
data['ReturnedToQueue'] = this.returnedToQueue;
data['PickupDateTime'] = this.pickupDateTime;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
data['NearestProjectDescription'] = this.nearestProjectDescription;
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
data['ProjectDescription'] = this.projectDescription;
data['ProjectDescriptionN'] = this.projectDescriptionN;
return data;
}
}

@ -0,0 +1,88 @@
class RequestPrescriptionReport {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int appointmentNo;
String setupID;
int episodeID;
int clinicID;
int projectID;
int dischargeNo;
RequestPrescriptionReport(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.appointmentNo,
this.setupID,
this.episodeID,
this.clinicID,
this.projectID,
this.dischargeNo});
RequestPrescriptionReport.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
appointmentNo = json['AppointmentNo'];
setupID = json['SetupID'];
episodeID = json['EpisodeID'];
clinicID = json['ClinicID'];
projectID = json['ProjectID'];
dischargeNo = json['DischargeNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['AppointmentNo'] = this.appointmentNo;
data['SetupID'] = this.setupID;
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo;
return data;
}
}

@ -0,0 +1,64 @@
class RequestPrescriptions {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
RequestPrescriptions(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPrescriptions.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,52 @@
class RequestPrescriptionsOrders {
int patientID;
int patientOutSA;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
RequestPrescriptionsOrders(
{this.patientID,
this.patientOutSA,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
RequestPrescriptionsOrders.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,112 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
class RequestSendPrescriptionEmail {
String appointmentDate;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
String to;
String dateofBirth;
String patientIditificationNum;
String patientMobileNumber;
String patientName;
String setupID;
String clinicName;
String doctorName;
int projectID;
List<PrescriptionReport> listPrescriptions;
RequestSendPrescriptionEmail(
{this.appointmentDate,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.to,
this.dateofBirth,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.setupID,
this.clinicName,
this.doctorName,
this.projectID});
RequestSendPrescriptionEmail.fromJson(Map<String, dynamic> json) {
appointmentDate = json['AppointmentDate'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
to = json['To'];
dateofBirth = json['DateofBirth'];
patientIditificationNum = json['PatientIditificationNum'];
patientMobileNumber = json['PatientMobileNumber'];
patientName = json['PatientName'];
setupID = json['SetupID'];
clinicName = json['ClinicName'];
doctorName = json['DoctorName'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentDate'] = this.appointmentDate;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['To'] = this.to;
data['DateofBirth'] = this.dateofBirth;
data['PatientIditificationNum'] = this.patientIditificationNum;
data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientName'] = this.patientName;
data['SetupID'] = this.setupID;
if (this.listPrescriptions != null) {
data['ListPrescriptions'] =
this.listPrescriptions.map((v) => v.toJson()).toList();
}
data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;
return data;
}
}

@ -41,10 +41,15 @@ class BaseAppClient {
} else {
var parsed = json.decode(response.body.toString());
if (!parsed['IsAuthenticated']) {
if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode);
}
// await helpers.logout();
//helpers.showErrorToast('Your session expired Please login agian');
var asd ="";
// TODO create logout fun
} else if (parsed['MessageStatus'] == 1) {
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],

@ -0,0 +1,102 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_appointmentt.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class MyDoctorService extends BaseService {
List<PatientDoctorAppointment> patientDoctorAppointmentList = List();
DoctorProfile doctorProfile;
DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
RequestPatientDoctorAppointment(
top: 0,
versionID: 5.5,
beforeDays: 0,
exludType: 4,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'TMRhVmkGhOsvamErw',
isDentalAllowedBackend: false,
deviceTypeID: 1,
patientID: 1231755,
tokenID: '@dm!n',
patientType: 1,
patientTypeID: 1);
RequestDoctorRating _requestDoctorRating = RequestDoctorRating(
channel: 3,
deviceTypeID: 2,
doctorID: 2477,
iPAdress: '10.20.10.20',
languageID: 2,
patientOutSA: 0,
sessionID: 'CvsUFeJkyLDnFQqw',
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false);
Future getPatientDoctorAppointmentList() async {
await baseAppClient.post(GET_MY_DOCTOR,
onSuccess: (dynamic response, int statusCode) {
patientDoctorAppointmentList.clear();
response['PatientDoctorAppointmentResultList'].forEach((hospital) {
patientDoctorAppointmentList
.add(PatientDoctorAppointment.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patientDoctorAppointmentRequest.toJson());
}
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
doctorID: 2477,
license: true,
isRegistered: true,
projectID: 12,
clinicID: 501,
patientID: 1231755,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'nstatCtNEmuwxeuVAOUmw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
);
Future getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID;
_requestDoctorProfile.patientID = projectID;
hasError = false;
await baseAppClient.post(GET_DOCTOR_PROFILE,
onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestDoctorProfile.toJson());
///GET DOCTOR RATING
//_requestDoctorRating.doctorID = doctorId;
await baseAppClient.post(GET_DOCTOR_RATING,
onSuccess: (dynamic response, int statusCode) {
doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestDoctorRating.toJson());
}
}

@ -0,0 +1,149 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();
RequestPrescriptions _requestPrescriptions = RequestPrescriptions(
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
List<PrescriptionsOrder> prescriptionsOrderList = List();
RequestPrescriptionsOrders _requestPrescriptionsOrders =
RequestPrescriptionsOrders(
patientID: 1231755,
patientOutSA: 0,
versionID: 5.5,
channel: 3,
languageID: 1,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2);
Future getPrescriptions() async {
hasError = false;
await baseAppClient.post(PRESCRIPTIONS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptions.toJson());
}
Future getPrescriptionsOrders() async {
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionsOrders.toJson());
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0,
channel: 3,
clinicID: 4,
deviceTypeID: 2,
dischargeNo: 2018003246,
episodeID: 0,
iPAdress: '10.20.10.20',
languageID: 1,
patientID: 1231755,
patientOutSA: 0,
patientType: 1,
patientTypeID: 1,
projectID: 12,
sessionID: 'wgKuHpsPsEuLnlJhAYCQ',
tokenID: '@dm!n',
setupID: "91877",
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({int dischargeNo}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo;
await baseAppClient.post(GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReport.toJson());
}
RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail(
versionID: 5.5,
languageID: 2,
channel: 3,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'twIUmHfOHqFdDfVcyw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1,
to: 'aljammalzmohammad@outlook.com',
dateofBirth: '/Date(536743800000+0300)/',
patientIditificationNum: '2344670985',
patientMobileNumber: '537503378',
patientName: 'TAMER FANASHEH',
setupID: '91877');
Future sendPrescriptionEmail(String appointmentDate, int patientID,
String clinicName, String doctorName, int projectID) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID;
hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL,
onSuccess: (dynamic response, int statusCode){
var asd = "";
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
}

@ -2,17 +2,23 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
class PharmacyService extends BaseService {
List<PharmaciesModel> _pharmaciesList = List();
List<PharmaciesModel> _medicineItem = List();
List<PharmaciesListModel> _pharmaciesList = List();
List<PharmaciesModel> get medicineItem => _medicineItem;
List<PharmaciesListModel> get pharmaciesList => _pharmaciesList;
List<PharmaciesModel> get pharmaciesList => _pharmaciesList;
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
void clearPharmaciesLis() {
void clearMedicineList() {
_medicineItem.clear();
}
void clearPharmaciesList() {
_pharmaciesList.clear();
}
@ -35,17 +41,33 @@ class PharmacyService extends BaseService {
sessionID: "BlUSkYymTt",
stamp: "2020-04-27T12:17:17.721Z",
tokenID: "6EfeKCLRu0GPdFutIt3m7Q==",
versionID: 5.3);
versionID: 8.3);
Future getMedicine({String drugName}) async {
PharmaciesListModel _pharmaciesListModel = PharmaciesListModel(
patientTypeID: 1,
languageID: 2,
stamp: '2020-04-23T21:01:21.492Z',
iPAdress: '11.11.11.11',
versionID: 8.3,
sessionID: 'e29zoooEJ4',
isLoginForDoctorApp: true,
channel: 9,
editedBy: 1485,
doctorID: 1485,
patientOutSA: 0,
clinicID: 1,
projectID: 15,
);
Future getMedicineList({String drugName}) async {
hasError = false;
_requestGetPharmaciesModel.pHRItemName = drugName ?? 'panadol';
_requestGetPharmaciesModel.pHRItemName = drugName;
try {
await baseAppClient.post(GET_PHARMCY_ITEMS,
onSuccess: (dynamic response, int statusCode) {
_pharmaciesList.clear();
_medicineItem.clear();
response['ListPharmcy_Region'].forEach((item) {
_pharmaciesList.add(PharmaciesModel.fromJson(item));
_medicineItem.add(PharmaciesModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -56,17 +78,22 @@ class PharmacyService extends BaseService {
}
}
Future getMedicineList({String name}) async {
_requestGetPharmaciesModel.pHRItemName = name ?? 'panadol';
await baseAppClient.post(GET_PHARMACY_LIST,
onSuccess: (dynamic response, int statusCode) {
_pharmaciesList.clear();
response['PharmList'].forEach((item) {
_pharmaciesList.add(PharmaciesModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestGetPharmaciesModel.toJson());
Future getPharmaciesList({int itemID}) async {
_pharmaciesListModel.itemID = itemID;
try {
await baseAppClient.post(GET_PHARMACY_LIST,
onSuccess: (dynamic response, int statusCode) {
_pharmaciesList.clear();
response['PharmList'].forEach((item) {
_pharmaciesList.add(PharmaciesListModel.fromJson(item));
hasError = false;
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _pharmaciesListModel.toJson());
} catch (error) {
throw error;
}
}
}

@ -0,0 +1,97 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class MyDoctorViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
MyDoctorService _myDoctorService = locator<MyDoctorService>();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListClinic =
List();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
List<PatientDoctorAppointmentList> get patientDoctorAppointmentList =>
filterType == FilterType.Clinic
? _patientDoctorAppointmentListClinic
: _patientDoctorAppointmentListHospital;
DoctorProfile get doctorProfile => _myDoctorService.doctorProfile;
DoctorRating get doctorRating => _myDoctorService.doctorRating;
void getMyDoctor() async {
setState(ViewState.Busy);
await _myDoctorService.getPatientDoctorAppointmentList();
if (_myDoctorService.hasError) {
error = _myDoctorService.error;
setState(ViewState.Error);
} else {
_myDoctorService.patientDoctorAppointmentList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByClinic =
_patientDoctorAppointmentListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicName)
.toList();
if (doctorByClinic.length != 0) {
_patientDoctorAppointmentListClinic[
_patientDoctorAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListClinic.add(PatientDoctorAppointmentList(
filterName: element.clinicName,
patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
}
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
void getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
setState(ViewState.Busy);
await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID);
if (_myDoctorService.hasError) {
error = _myDoctorService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,128 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
import '../../../core/model/prescriptions/Prescriptions.dart';
import '../../../core/service/medical/prescriptions_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class PrescriptionsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
PrescriptionsService _prescriptionsService = locator<PrescriptionsService>();
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
getPrescriptions() async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions();
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
_filterList();
await _getPrescriptionsOrders();
setState(ViewState.Idle);
}
}
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
}
});
}
_getPrescriptionsOrders() async {
await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
getPrescriptionReport({int dischargeNo}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
sendPrescriptionEmail(
{String appointmentDate,
int patientID,
String clinicName,
String doctorName,
int projectID}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(
appointmentDate, patientID, clinicName, doctorName, projectID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
AppToast.showSuccessToast(message: error);
} else {
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
setState(ViewState.Idle);
}
}
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
@ -10,23 +11,26 @@ class PharmacyViewModel extends BaseViewModel {
String errorMsg = '';
PharmacyService _pharmacyService = locator<PharmacyService>();
List<PharmaciesModel> get pharmacy => _pharmacyService.pharmaciesList;
List<PharmaciesModel> get pharmacy => _pharmacyService.medicineItem;
List<PharmaciesListModel> get pharmacyList => _pharmacyService.pharmaciesList;
Future getMedicine() async {
Future getPharmacies({int id}) async {
setState(ViewState.Busy);
await _pharmacyService.getMedicine();
await _pharmacyService.getPharmaciesList(itemID: id);
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
//_pharmacyService.clearPharmaciesList();
}
Future getMedicine2({String name}) async {
Future getMedicine({String name}) async {
hasError = false;
_pharmacyService.clearPharmaciesLis();
_pharmacyService.clearMedicineList();
setState(ViewState.BusyLocal);
await _pharmacyService.getMedicine(drugName: name);
await _pharmacyService.getMedicineList(drugName: name);
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.ErrorLocal);

@ -1,7 +1,11 @@
import 'package:get_it/get_it.dart';
import 'core/service/hospital_service.dart';
import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart';
@ -12,8 +16,12 @@ void setupLocator() {
/// Services
locator.registerLazySingleton(() => HospitalService());
locator.registerLazySingleton(() => PharmacyService());
locator.registerLazySingleton(() => MyDoctorService());
locator.registerLazySingleton(() => PrescriptionsService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => PharmacyViewModel());
locator.registerFactory(() => MyDoctorViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
}

@ -54,6 +54,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
canvasColor: Colors.white,
@ -64,7 +65,7 @@ class MyApp extends StatelessWidget {
cursorColor: Color.fromRGBO(78, 62, 253, 1.0),
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey,
color: Colors.grey[700],
brightness: Brightness.light,
elevation: 0.0,
actionsIconTheme: IconThemeData(

@ -0,0 +1,282 @@
class AuthenticatedUser {
String setupID;
int patientType;
int patientID;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int relationshipID;
int gender;
String dateofBirth;
Null dateofBirthN;
String nationalityID;
Null phoneResi;
Null phoneOffice;
String mobileNumber;
Null faxNumber;
String emailAddress;
Null bloodGroup;
Null rHFactor;
bool isEmailAlertRequired;
bool isSMSAlertRequired;
String preferredLanguage;
bool isPrivilegedMember;
Null memberID;
Null expiryDate;
Null isHmgEmployee;
Null employeeID;
Null emergencyContactName;
Null emergencyContactNo;
int patientPayType;
Null dHCCPatientRefID;
bool isPatientDummy;
int status;
Null isStatusCleared;
int patientIdentificationType;
String patientIdentificationNo;
int projectID;
int infoSourceID;
Null address;
int age;
String ageDesc;
int areaID;
int createdBy;
String genderDescription;
Null iR;
Null iSOCityID;
Null iSOCountryID;
List<ListPrivilege> listPrivilege;
Null marital;
int outSA;
Null pOBox;
bool receiveHealthSummaryReport;
int sourceType;
Null strDateofBirth;
Null tempAddress;
Null zipCode;
// Null patientPayType;
// Null patientType;
// Null 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,
});
AuthenticatedUser.fromJson(Map<String, dynamic> json) {
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'];
createdBy = json['CreatedBy'];
genderDescription = json['GenderDescription'];
iR = json['IR'];
iSOCityID = json['ISOCityID'];
iSOCountryID = json['ISOCountryID'];
if (json['ListPrivilege'] != null) {
listPrivilege = new List<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'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['RelationshipID'] = this.relationshipID;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['DateofBirthN'] = this.dateofBirthN;
data['NationalityID'] = this.nationalityID;
data['PhoneResi'] = this.phoneResi;
data['PhoneOffice'] = this.phoneOffice;
data['MobileNumber'] = this.mobileNumber;
data['FaxNumber'] = this.faxNumber;
data['EmailAddress'] = this.emailAddress;
data['BloodGroup'] = this.bloodGroup;
data['RHFactor'] = this.rHFactor;
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
data['PreferredLanguage'] = this.preferredLanguage;
data['IsPrivilegedMember'] = this.isPrivilegedMember;
data['MemberID'] = this.memberID;
data['ExpiryDate'] = this.expiryDate;
data['IsHmgEmployee'] = this.isHmgEmployee;
data['EmployeeID'] = this.employeeID;
data['EmergencyContactName'] = this.emergencyContactName;
data['EmergencyContactNo'] = this.emergencyContactNo;
data['PatientPayType'] = this.patientPayType;
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
data['IsPatientDummy'] = this.isPatientDummy;
data['Status'] = this.status;
data['IsStatusCleared'] = this.isStatusCleared;
data['PatientIdentificationType'] = this.patientIdentificationType;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['ProjectID'] = this.projectID;
data['InfoSourceID'] = this.infoSourceID;
data['Address'] = this.address;
data['Age'] = this.age;
data['AgeDesc'] = this.ageDesc;
data['AreaID'] = this.areaID;
data['CreatedBy'] = this.createdBy;
data['GenderDescription'] = this.genderDescription;
data['IR'] = this.iR;
data['ISOCityID'] = this.iSOCityID;
data['ISOCountryID'] = this.iSOCountryID;
if (this.listPrivilege != null) {
data['ListPrivilege'] =
this.listPrivilege.map((v) => v.toJson()).toList();
}
data['Marital'] = this.marital;
data['OutSA'] = this.outSA;
data['POBox'] = this.pOBox;
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
data['SourceType'] = this.sourceType;
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
return data;
}
}
class ListPrivilege {
int iD;
String serviceName;
bool previlege;
Null region;
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
ListPrivilege.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
serviceName = json['ServiceName'];
previlege = json['Previlege'];
region = json['Region'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ServiceName'] = this.serviceName;
data['Previlege'] = this.previlege;
data['Region'] = this.region;
return data;
}
}

@ -0,0 +1,104 @@
class CheckActivationCodeReq {
int patientMobileNumber;
String mobileNo;
String deviceToken;
int projectOutSA;
int loginType;
String zipCode;
bool isRegister;
String logInTokenID;
int searchType;
int patientID;
String nationalID;
String patientIdentificationID;
String activationCode;
bool isSilentLogin;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
Null sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
CheckActivationCodeReq(
{this.patientMobileNumber,
this.mobileNo,
this.deviceToken,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.activationCode,
this.isSilentLogin,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
CheckActivationCodeReq.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber'];
mobileNo = json['MobileNo'];
deviceToken = json['DeviceToken'];
projectOutSA = json['ProjectOutSA'];
loginType = json['LoginType'];
zipCode = json['ZipCode'];
isRegister = json['isRegister'];
logInTokenID = json['LogInTokenID'];
searchType = json['SearchType'];
patientID = json['PatientID'];
nationalID = json['NationalID'];
patientIdentificationID = json['PatientIdentificationID'];
activationCode = json['activationCode'];
isSilentLogin = json['IsSilentLogin'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMobileNumber'] = this.patientMobileNumber;
data['MobileNo'] = this.mobileNo;
data['DeviceToken'] = this.deviceToken;
data['ProjectOutSA'] = this.projectOutSA;
data['LoginType'] = this.loginType;
data['ZipCode'] = this.zipCode;
data['isRegister'] = this.isRegister;
data['LogInTokenID'] = this.logInTokenID;
data['SearchType'] = this.searchType;
data['PatientID'] = this.patientID;
data['NationalID'] = this.nationalID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['activationCode'] = this.activationCode;
data['IsSilentLogin'] = this.isSilentLogin;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,547 @@
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
class CheckActivationCode {
Null date;
int languageID;
int serviceName;
Null time;
Null androidLink;
String authenticationTokenID;
Null data;
bool dataw;
int dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
int errorType;
int foodCategory;
Null iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null doctorInformationList;
Null getAllPendingRecordsList;
Null getAllSharedRecordsByStatusList;
Null getResponseFileList;
bool isHMGPatient;
bool isLoginSuccessfully;
bool isNeedUpdateIdintificationNo;
bool kioskSendSMS;
AuthenticatedUser list;
Null listAskHabibMobileLoginInfo;
Null listAskHabibPatientFile;
Null listMergeFiles;
Null listMobileLoginInfo;
Null listPatientCount;
Null logInTokenID;
Null mohemmPrivilegeList;
int pateintID;
Null patientBloodType;
bool patientHasFile;
Null patientMergedIDs;
bool patientOutSA;
int patientShareRequestID;
int patientType;
int projectIDOut;
Null returnMessage;
bool sMSLoginRequired;
Null servicePrivilegeList;
Null sharePatientName;
Null verificationCode;
Null email;
Null errorList;
bool hasFile;
bool isActiveCode;
bool isMerged;
bool isNeedUserAgreement;
bool isSMSSent;
Null memberList;
Null message;
int statusCode;
CheckActivationCode(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.doctorInformationList,
this.getAllPendingRecordsList,
this.getAllSharedRecordsByStatusList,
this.getResponseFileList,
this.isHMGPatient,
this.isLoginSuccessfully,
this.isNeedUpdateIdintificationNo,
this.kioskSendSMS,
this.list,
this.listAskHabibMobileLoginInfo,
this.listAskHabibPatientFile,
this.listMergeFiles,
this.listMobileLoginInfo,
this.listPatientCount,
this.logInTokenID,
this.mohemmPrivilegeList,
this.pateintID,
this.patientBloodType,
this.patientHasFile,
this.patientMergedIDs,
this.patientOutSA,
this.patientShareRequestID,
this.patientType,
this.projectIDOut,
this.returnMessage,
this.sMSLoginRequired,
this.servicePrivilegeList,
this.sharePatientName,
this.verificationCode,
this.email,
this.errorList,
this.hasFile,
this.isActiveCode,
this.isMerged,
this.isNeedUserAgreement,
this.isSMSSent,
this.memberList,
this.message,
this.statusCode});
CheckActivationCode.fromJson(Map<String, dynamic> json) {
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 = new 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() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
data['Time'] = this.time;
data['AndroidLink'] = this.androidLink;
data['AuthenticationTokenID'] = this.authenticationTokenID;
data['Data'] = this.data;
data['Dataw'] = this.dataw;
data['DietType'] = this.dietType;
data['ErrorCode'] = this.errorCode;
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
data['ErrorMessage'] = this.errorMessage;
data['ErrorType'] = this.errorType;
data['FoodCategory'] = this.foodCategory;
data['IOSLink'] = this.iOSLink;
data['IsAuthenticated'] = this.isAuthenticated;
data['MealOrderStatus'] = this.mealOrderStatus;
data['MealType'] = this.mealType;
data['MessageStatus'] = this.messageStatus;
data['NumberOfResultRecords'] = this.numberOfResultRecords;
data['PatientBlodType'] = this.patientBlodType;
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['DoctorInformation_List'] = this.doctorInformationList;
data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList;
data['GetAllSharedRecordsByStatusList'] =
this.getAllSharedRecordsByStatusList;
data['GetResponseFileList'] = this.getResponseFileList;
data['IsHMGPatient'] = this.isHMGPatient;
data['IsLoginSuccessfully'] = this.isLoginSuccessfully;
data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo;
data['KioskSendSMS'] = this.kioskSendSMS;
if (this.list != null) {
data['List'] = this.list;
}
data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo;
data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile;
data['List_MergeFiles'] = this.listMergeFiles;
data['List_MobileLoginInfo'] = this.listMobileLoginInfo;
data['List_PatientCount'] = this.listPatientCount;
data['LogInTokenID'] = this.logInTokenID;
data['MohemmPrivilege_List'] = this.mohemmPrivilegeList;
data['PateintID'] = this.pateintID;
data['PatientBloodType'] = this.patientBloodType;
data['PatientHasFile'] = this.patientHasFile;
data['PatientMergedIDs'] = this.patientMergedIDs;
data['PatientOutSA'] = this.patientOutSA;
data['PatientShareRequestID'] = this.patientShareRequestID;
data['PatientType'] = this.patientType;
data['ProjectIDOut'] = this.projectIDOut;
data['ReturnMessage'] = this.returnMessage;
data['SMSLoginRequired'] = this.sMSLoginRequired;
data['ServicePrivilege_List'] = this.servicePrivilegeList;
data['SharePatientName'] = this.sharePatientName;
data['VerificationCode'] = this.verificationCode;
data['email'] = this.email;
data['errorList'] = this.errorList;
data['hasFile'] = this.hasFile;
data['isActiveCode'] = this.isActiveCode;
data['isMerged'] = this.isMerged;
data['isNeedUserAgreement'] = this.isNeedUserAgreement;
data['isSMSSent'] = this.isSMSSent;
data['memberList'] = this.memberList;
data['message'] = this.message;
data['statusCode'] = this.statusCode;
return data;
}
}
class List {
String setupID;
int patientType;
int patientID;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int relationshipID;
int gender;
String dateofBirth;
Null dateofBirthN;
String nationalityID;
Null phoneResi;
Null phoneOffice;
String mobileNumber;
Null faxNumber;
String emailAddress;
Null bloodGroup;
Null rHFactor;
bool isEmailAlertRequired;
bool isSMSAlertRequired;
String preferredLanguage;
bool isPrivilegedMember;
Null memberID;
Null expiryDate;
Null isHmgEmployee;
Null employeeID;
Null emergencyContactName;
Null emergencyContactNo;
int patientPayType;
Null dHCCPatientRefID;
bool isPatientDummy;
int status;
Null isStatusCleared;
int patientIdentificationType;
String patientIdentificationNo;
int projectID;
int infoSourceID;
Null address;
int age;
String ageDesc;
int areaID;
int createdBy;
String genderDescription;
Null iR;
Null iSOCityID;
Null iSOCountryID;
ListPrivilege listPrivilege;
Null marital;
int outSA;
Null pOBox;
bool receiveHealthSummaryReport;
int sourceType;
Null strDateofBirth;
Null tempAddress;
Null 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,
});
List.fromJson(Map<String, dynamic> json) {
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'];
createdBy = json['CreatedBy'];
genderDescription = json['GenderDescription'];
iR = json['IR'];
iSOCityID = json['ISOCityID'];
iSOCountryID = json['ISOCountryID'];
if (json['ListPrivilege'] != null) {
listPrivilege = ListPrivilege.fromJson(json['ListPrivilege']);
}
marital = json['Marital'];
outSA = json['OutSA'];
pOBox = json['POBox'];
receiveHealthSummaryReport = json['ReceiveHealthSummaryReport'];
sourceType = json['SourceType'];
strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['RelationshipID'] = this.relationshipID;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['DateofBirthN'] = this.dateofBirthN;
data['NationalityID'] = this.nationalityID;
data['PhoneResi'] = this.phoneResi;
data['PhoneOffice'] = this.phoneOffice;
data['MobileNumber'] = this.mobileNumber;
data['FaxNumber'] = this.faxNumber;
data['EmailAddress'] = this.emailAddress;
data['BloodGroup'] = this.bloodGroup;
data['RHFactor'] = this.rHFactor;
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
data['PreferredLanguage'] = this.preferredLanguage;
data['IsPrivilegedMember'] = this.isPrivilegedMember;
data['MemberID'] = this.memberID;
data['ExpiryDate'] = this.expiryDate;
data['IsHmgEmployee'] = this.isHmgEmployee;
data['EmployeeID'] = this.employeeID;
data['EmergencyContactName'] = this.emergencyContactName;
data['EmergencyContactNo'] = this.emergencyContactNo;
data['PatientPayType'] = this.patientPayType;
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
data['IsPatientDummy'] = this.isPatientDummy;
data['Status'] = this.status;
data['IsStatusCleared'] = this.isStatusCleared;
data['PatientIdentificationType'] = this.patientIdentificationType;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['ProjectID'] = this.projectID;
data['InfoSourceID'] = this.infoSourceID;
data['Address'] = this.address;
data['Age'] = this.age;
data['AgeDesc'] = this.ageDesc;
data['AreaID'] = this.areaID;
data['CreatedBy'] = this.createdBy;
data['GenderDescription'] = this.genderDescription;
data['IR'] = this.iR;
data['ISOCityID'] = this.iSOCityID;
data['ISOCountryID'] = this.iSOCountryID;
if (this.listPrivilege != null) {
data['ListPrivilege'] = this.listPrivilege;
}
data['Marital'] = this.marital;
data['OutSA'] = this.outSA;
data['POBox'] = this.pOBox;
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
data['SourceType'] = this.sourceType;
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
return data;
}
}
class ListPrivilege {
int iD;
String serviceName;
bool previlege;
Null region;
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
ListPrivilege.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
serviceName = json['ServiceName'];
previlege = json['Previlege'];
region = json['Region'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ServiceName'] = this.serviceName;
data['Previlege'] = this.previlege;
data['Region'] = this.region;
return data;
}
}

@ -0,0 +1,96 @@
class GetMobileLoginInfoRequest {
int patientMobileNumber;
String mobileNo;
String deviceToken;
int projectOutSA;
int loginType;
String zipCode;
bool isRegister;
String logInTokenID;
int searchType;
int patientID;
String nationalID;
String patientIdentificationID;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
Null sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
GetMobileLoginInfoRequest(
{this.patientMobileNumber,
this.mobileNo,
this.deviceToken,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
GetMobileLoginInfoRequest.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber'];
mobileNo = json['MobileNo'];
deviceToken = json['DeviceToken'];
projectOutSA = json['ProjectOutSA'];
loginType = json['LoginType'];
zipCode = json['ZipCode'];
isRegister = json['isRegister'];
logInTokenID = json['LogInTokenID'];
searchType = json['SearchType'];
patientID = json['PatientID'];
nationalID = json['NationalID'];
patientIdentificationID = json['PatientIdentificationID'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMobileNumber'] = this.patientMobileNumber;
data['MobileNo'] = this.mobileNo;
data['DeviceToken'] = this.deviceToken;
data['ProjectOutSA'] = this.projectOutSA;
data['LoginType'] = this.loginType;
data['ZipCode'] = this.zipCode;
data['isRegister'] = this.isRegister;
data['LogInTokenID'] = this.logInTokenID;
data['SearchType'] = this.searchType;
data['PatientID'] = this.patientID;
data['NationalID'] = this.nationalID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,292 @@
class GetMobileLoginInfoResponse {
Null date;
int languageID;
int serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
bool dataw;
int dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
int errorType;
int foodCategory;
Null iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null doctorInformationList;
Null getAllPendingRecordsList;
Null getAllSharedRecordsByStatusList;
Null getResponseFileList;
bool isHMGPatient;
bool isLoginSuccessfully;
bool isNeedUpdateIdintificationNo;
bool kioskSendSMS;
Null list;
Null listAskHabibMobileLoginInfo;
Null listAskHabibPatientFile;
Null listMergeFiles;
List<ListMobileLoginInfo> listMobileLoginInfo;
Null listPatientCount;
String logInTokenID;
Null mohemmPrivilegeList;
int pateintID;
Null patientBloodType;
bool patientHasFile;
Null patientMergedIDs;
bool patientOutSA;
int patientShareRequestID;
int patientType;
int projectIDOut;
Null returnMessage;
bool sMSLoginRequired;
Null servicePrivilegeList;
Null sharePatientName;
Null verificationCode;
Null email;
Null errorList;
bool hasFile;
bool isActiveCode;
bool isMerged;
bool isNeedUserAgreement;
bool isSMSSent;
Null memberList;
Null message;
int statusCode;
GetMobileLoginInfoResponse(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.doctorInformationList,
this.getAllPendingRecordsList,
this.getAllSharedRecordsByStatusList,
this.getResponseFileList,
this.isHMGPatient,
this.isLoginSuccessfully,
this.isNeedUpdateIdintificationNo,
this.kioskSendSMS,
this.list,
this.listAskHabibMobileLoginInfo,
this.listAskHabibPatientFile,
this.listMergeFiles,
this.listMobileLoginInfo,
this.listPatientCount,
this.logInTokenID,
this.mohemmPrivilegeList,
this.pateintID,
this.patientBloodType,
this.patientHasFile,
this.patientMergedIDs,
this.patientOutSA,
this.patientShareRequestID,
this.patientType,
this.projectIDOut,
this.returnMessage,
this.sMSLoginRequired,
this.servicePrivilegeList,
this.sharePatientName,
this.verificationCode,
this.email,
this.errorList,
this.hasFile,
this.isActiveCode,
this.isMerged,
this.isNeedUserAgreement,
this.isSMSSent,
this.memberList,
this.message,
this.statusCode});
GetMobileLoginInfoResponse.fromJson(Map<String, dynamic> json) {
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'];
list = json['List'];
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
listMergeFiles = json['List_MergeFiles'];
if (json['List_MobileLoginInfo'] != null) {
listMobileLoginInfo = new List<ListMobileLoginInfo>();
json['List_MobileLoginInfo'].forEach((v) {
listMobileLoginInfo.add(new ListMobileLoginInfo.fromJson(v));
});
}
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() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
data['Time'] = this.time;
data['AndroidLink'] = this.androidLink;
data['AuthenticationTokenID'] = this.authenticationTokenID;
data['Data'] = this.data;
data['Dataw'] = this.dataw;
data['DietType'] = this.dietType;
data['ErrorCode'] = this.errorCode;
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
data['ErrorMessage'] = this.errorMessage;
data['ErrorType'] = this.errorType;
data['FoodCategory'] = this.foodCategory;
data['IOSLink'] = this.iOSLink;
data['IsAuthenticated'] = this.isAuthenticated;
data['MealOrderStatus'] = this.mealOrderStatus;
data['MealType'] = this.mealType;
data['MessageStatus'] = this.messageStatus;
data['NumberOfResultRecords'] = this.numberOfResultRecords;
data['PatientBlodType'] = this.patientBlodType;
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['DoctorInformation_List'] = this.doctorInformationList;
data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList;
data['GetAllSharedRecordsByStatusList'] =
this.getAllSharedRecordsByStatusList;
data['GetResponseFileList'] = this.getResponseFileList;
data['IsHMGPatient'] = this.isHMGPatient;
data['IsLoginSuccessfully'] = this.isLoginSuccessfully;
data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo;
data['KioskSendSMS'] = this.kioskSendSMS;
data['List'] = this.list;
data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo;
data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile;
data['List_MergeFiles'] = this.listMergeFiles;
if (this.listMobileLoginInfo != null) {
data['List_MobileLoginInfo'] =
this.listMobileLoginInfo.map((v) => v.toJson()).toList();
}
data['List_PatientCount'] = this.listPatientCount;
data['LogInTokenID'] = this.logInTokenID;
data['MohemmPrivilege_List'] = this.mohemmPrivilegeList;
data['PateintID'] = this.pateintID;
data['PatientBloodType'] = this.patientBloodType;
data['PatientHasFile'] = this.patientHasFile;
data['PatientMergedIDs'] = this.patientMergedIDs;
data['PatientOutSA'] = this.patientOutSA;
data['PatientShareRequestID'] = this.patientShareRequestID;
data['PatientType'] = this.patientType;
data['ProjectIDOut'] = this.projectIDOut;
data['ReturnMessage'] = this.returnMessage;
data['SMSLoginRequired'] = this.sMSLoginRequired;
data['ServicePrivilege_List'] = this.servicePrivilegeList;
data['SharePatientName'] = this.sharePatientName;
data['VerificationCode'] = this.verificationCode;
data['email'] = this.email;
data['errorList'] = this.errorList;
data['hasFile'] = this.hasFile;
data['isActiveCode'] = this.isActiveCode;
data['isMerged'] = this.isMerged;
data['isNeedUserAgreement'] = this.isNeedUserAgreement;
data['isSMSSent'] = this.isSMSSent;
data['memberList'] = this.memberList;
data['message'] = this.message;
data['statusCode'] = this.statusCode;
return data;
}
}
class ListMobileLoginInfo {
int iD;
int loginType;
ListMobileLoginInfo({this.iD, this.loginType});
ListMobileLoginInfo.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
loginType = json['LoginType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['LoginType'] = this.loginType;
return data;
}
}

@ -0,0 +1,323 @@
class INSERTDeviceIMEIRequest {
String setupID;
int patientType;
int patientID;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int relationshipID;
int gender;
String dateofBirth;
Null dateofBirthN;
String nationalityID;
Null phoneResi;
Null phoneOffice;
String mobileNumber;
Null faxNumber;
String emailAddress;
Null bloodGroup;
Null rHFactor;
bool isEmailAlertRequired;
bool isSMSAlertRequired;
int preferredLanguage;
bool isPrivilegedMember;
Null memberID;
Null expiryDate;
Null isHmgEmployee;
Null employeeID;
Null emergencyContactName;
Null emergencyContactNo;
int patientPayType;
Null dHCCPatientRefID;
bool isPatientDummy;
int status;
Null isStatusCleared;
int patientIdentificationType;
String patientIdentificationNo;
int projectID;
int infoSourceID;
Null address;
int age;
String ageDesc;
int areaID;
int createdBy;
String genderDescription;
Null iR;
Null iSOCityID;
Null iSOCountryID;
List<ListPrivilege> listPrivilege;
Null marital;
bool outSA;
Null pOBox;
bool receiveHealthSummaryReport;
int sourceType;
Null strDateofBirth;
Null tempAddress;
String zipCode;
String patientName;
String identificationNo;
Null email;
String mobileNo;
bool patientOutSA;
String tokenID;
Null patientBloodType;
String iMEI;
bool biometricEnabled;
int logInTypeID;
INSERTDeviceIMEIRequest(
{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.patientName,
this.identificationNo,
this.email,
this.mobileNo,
this.patientOutSA,
this.tokenID,
this.patientBloodType,
this.iMEI,
this.biometricEnabled,
this.logInTypeID});
INSERTDeviceIMEIRequest.fromJson(Map<String, dynamic> json) {
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'];
createdBy = json['CreatedBy'];
genderDescription = json['GenderDescription'];
iR = json['IR'];
iSOCityID = json['ISOCityID'];
iSOCountryID = json['ISOCountryID'];
if (json['ListPrivilege'] != null) {
listPrivilege = new List<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'];
patientName = json['PatientName'];
identificationNo = json['IdentificationNo'];
email = json['Email'];
mobileNo = json['MobileNo'];
patientOutSA = json['PatientOutSA'];
tokenID = json['TokenID'];
patientBloodType = json['PatientBloodType'];
iMEI = json['IMEI'];
biometricEnabled = json['BiometricEnabled'];
logInTypeID = json['LogInTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['RelationshipID'] = this.relationshipID;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['DateofBirthN'] = this.dateofBirthN;
data['NationalityID'] = this.nationalityID;
data['PhoneResi'] = this.phoneResi;
data['PhoneOffice'] = this.phoneOffice;
data['MobileNumber'] = this.mobileNumber;
data['FaxNumber'] = this.faxNumber;
data['EmailAddress'] = this.emailAddress;
data['BloodGroup'] = this.bloodGroup;
data['RHFactor'] = this.rHFactor;
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
data['PreferredLanguage'] = this.preferredLanguage;
data['IsPrivilegedMember'] = this.isPrivilegedMember;
data['MemberID'] = this.memberID;
data['ExpiryDate'] = this.expiryDate;
data['IsHmgEmployee'] = this.isHmgEmployee;
data['EmployeeID'] = this.employeeID;
data['EmergencyContactName'] = this.emergencyContactName;
data['EmergencyContactNo'] = this.emergencyContactNo;
data['PatientPayType'] = this.patientPayType;
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
data['IsPatientDummy'] = this.isPatientDummy;
data['Status'] = this.status;
data['IsStatusCleared'] = this.isStatusCleared;
data['PatientIdentificationType'] = this.patientIdentificationType;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['ProjectID'] = this.projectID;
data['InfoSourceID'] = this.infoSourceID;
data['Address'] = this.address;
data['Age'] = this.age;
data['AgeDesc'] = this.ageDesc;
data['AreaID'] = this.areaID;
data['CreatedBy'] = this.createdBy;
data['GenderDescription'] = this.genderDescription;
data['IR'] = this.iR;
data['ISOCityID'] = this.iSOCityID;
data['ISOCountryID'] = this.iSOCountryID;
if (this.listPrivilege != null) {
data['ListPrivilege'] =
this.listPrivilege.map((v) => v.toJson()).toList();
}
data['Marital'] = this.marital;
data['OutSA'] = this.outSA;
data['POBox'] = this.pOBox;
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
data['SourceType'] = this.sourceType;
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['PatientName'] = this.patientName;
data['IdentificationNo'] = this.identificationNo;
data['Email'] = this.email;
data['MobileNo'] = this.mobileNo;
data['PatientOutSA'] = this.patientOutSA;
data['TokenID'] = this.tokenID;
data['PatientBloodType'] = this.patientBloodType;
data['IMEI'] = this.iMEI;
data['BiometricEnabled'] = this.biometricEnabled;
data['LogInTypeID'] = this.logInTypeID;
return data;
}
}
class ListPrivilege {
int iD;
String serviceName;
bool previlege;
Null region;
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
ListPrivilege.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
serviceName = json['ServiceName'];
previlege = json['Previlege'];
region = json['Region'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ServiceName'] = this.serviceName;
data['Previlege'] = this.previlege;
data['Region'] = this.region;
return data;
}
}

@ -0,0 +1,100 @@
class SendActivationRequest {
int patientMobileNumber;
String mobileNo;
String deviceToken;
int projectOutSA;
int loginType;
String zipCode;
bool isRegister;
String logInTokenID;
int searchType;
int patientID;
String nationalID;
String patientIdentificationID;
int oTPSendType;
int languageID;
double versionID;
int channel;
String iPAdress;
String generalid;
int patientOutSA;
Null sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
SendActivationRequest(
{this.patientMobileNumber,
this.mobileNo,
this.deviceToken,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.oTPSendType,
this.languageID,
this.versionID,
this.channel,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
SendActivationRequest.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber'];
mobileNo = json['MobileNo'];
deviceToken = json['DeviceToken'];
projectOutSA = json['ProjectOutSA'];
loginType = json['LoginType'];
zipCode = json['ZipCode'];
isRegister = json['isRegister'];
logInTokenID = json['LogInTokenID'];
searchType = json['SearchType'];
patientID = json['PatientID'];
nationalID = json['NationalID'];
patientIdentificationID = json['PatientIdentificationID'];
oTPSendType = json['OTP_SendType'];
languageID = json['LanguageID'];
versionID = json['VersionID'];
channel = json['Channel'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMobileNumber'] = this.patientMobileNumber;
data['MobileNo'] = this.mobileNo;
data['DeviceToken'] = this.deviceToken;
data['ProjectOutSA'] = this.projectOutSA;
data['LoginType'] = this.loginType;
data['ZipCode'] = this.zipCode;
data['isRegister'] = this.isRegister;
data['LogInTokenID'] = this.logInTokenID;
data['SearchType'] = this.searchType;
data['PatientID'] = this.patientID;
data['NationalID'] = this.nationalID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['OTP_SendType'] = this.oTPSendType;
data['LanguageID'] = this.languageID;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:loading_dialog/loading_dialog.dart';
import 'package:table_calendar/table_calendar.dart';
import '../../../uitl/date_uitl.dart';

@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import '../base/base_view.dart';
@ -18,7 +19,7 @@ class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>(
// onModelReady: (model) => model.getMedicine(),
onModelReady: (model) => model.getMedicine(),
builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold(
baseViewModel: model,

@ -1,17 +1,15 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/auth/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/landing/replay_page.dart';
import 'package:diplomaticquarterapp/providers/auth_provider.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/medicine_search_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'home_page.dart';
class LandingPage extends StatefulWidget {
@ -24,7 +22,6 @@ class _LandingPageState extends State<LandingPage> {
PageController pageController;
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
_changeCurrentTab(int tab) {
setState(() {
currentTab = tab;
@ -72,13 +69,7 @@ class _LandingPageState extends State<LandingPage> {
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(),
ReplayPage(),
Container(),
ToDo(),
BookingOptions(),
]
children: [Container(), MedicalProfilePage(), MyAdmissionsPage(), ToDo()],
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab),
);
@ -102,6 +93,10 @@ class _LandingPageState extends State<LandingPage> {
void checkUserStatus(token) {
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => print(value));
.then((SelectDeviceIMEIRES value) => setUserValues(value));
}
void setUserValues(value) {
print(value);
}
}

@ -0,0 +1,573 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:flutter/services.dart';
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
import 'package:local_auth/local_auth.dart';
class ConfirmLogin extends StatefulWidget {
@override
_ConfirmLogin createState() => _ConfirmLogin();
}
class _ConfirmLogin extends State<ConfirmLogin> {
final LocalAuthentication auth = LocalAuthentication();
List _availableBiometrics;
var sharedPref = new AppSharedPreferences();
bool authenticated;
final authService = new AuthProvider();
int mobileNumber;
String errorMsg = '';
var user;
bool isLoading = false;
CheckPatientAuthenticationReq registerd_data;
var zipCode;
var patientOutSA;
var loginTokenID;
var loginType;
var deviceToken;
var lastLogin;
int selectedOption;
bool onlySMSBox = false;
var userData;
@override
void initState() {
_getAvailableBiometrics();
setDefault();
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true,
body: isLoading == false
? SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(20),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(
children: <Widget>[
Expanded(
flex: 3,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/habib-logo.png',
height: 80,
width: 80,
),
this.onlySMSBox == false
? AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize:
SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left,
)
: AppText(
TranslationBase.of(context)
.verifyFingerprint2,
fontSize:
SizeConfig.textMultiplier * 2.5,
textAlign: TextAlign.left,
),
])),
Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
3,
BiometricType
.face.index)
},
child: RoundedContainer(
backgroundColor:
BiometricType.face
.index ==
1
? Colors.white
: Colors.white
.withOpacity(
.7),
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding:
EdgeInsets.fromLTRB(
20, 10, 20, 10),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.center,
children: <Widget>[
Image.asset(
'assets/images/login/101.png',
height: SizeConfig
.imageSizeMultiplier *
13,
width: SizeConfig
.imageSizeMultiplier *
16,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(
context)
.verifyFaceID,
fontSize: SizeConfig
.textMultiplier *
2,
)
],
),
)))),
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
2,
BiometricType
.fingerprint
.index)
},
child: RoundedContainer(
backgroundColor:
BiometricType
.fingerprint
.index ==
1
? Colors.white
: Colors.white
.withOpacity(
.7),
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding:
EdgeInsets.fromLTRB(
25, 10, 25, 10),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/login/102.png',
height: SizeConfig
.imageSizeMultiplier *
13,
width: SizeConfig
.imageSizeMultiplier *
16,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(
context)
.verifyFingerprint,
fontSize: SizeConfig
.textMultiplier *
2,
)
],
),
))))
],
)
: SizedBox(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () =>
{authenticateUser(1, true)},
child: RoundedContainer(
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding: EdgeInsets.fromLTRB(
20, 10, 20, 10),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.center,
children: <Widget>[
Image.asset(
'assets/images/login/103.png',
height: SizeConfig
.imageSizeMultiplier *
13,
width: SizeConfig
.imageSizeMultiplier *
16,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(
context)
.verifySMS,
fontSize: SizeConfig
.textMultiplier *
2,
)
],
),
)))),
Expanded(
child: InkWell(
onTap: () =>
{authenticateUser(4, true)},
child: RoundedContainer(
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding: EdgeInsets.fromLTRB(
25, 10, 25, 10),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/login/104.png',
height: SizeConfig
.imageSizeMultiplier *
13,
width: SizeConfig
.imageSizeMultiplier *
16,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(
context)
.verifyWhatsApp,
fontSize: SizeConfig
.textMultiplier *
2,
)
],
),
))))
],
),
]),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
// Row(
// children: <Widget>[
// Expanded(
// child: RaisedButton(
// color: Colors.grey,
// textColor: Colors.white,
// child:
// Text(TranslationBase.of(context).registerNow),
// onPressed: () => {
// Navigator.of(context).pushNamed(
// REGISTER,
// )
// },
// ))
// ],
// ),
],
))
],
)))
: AppCircularProgressIndicator());
}
Future<void> _getAvailableBiometrics() async {
var availableBiometrics;
try {
availableBiometrics = await auth.getAvailableBiometrics();
} on PlatformException catch (e) {
print(e);
}
if (!mounted) return;
setState(() {
_availableBiometrics = availableBiometrics;
});
}
authenticateUser(type, isActive) {
this.selectedOption =
type; //this.selectedOption && !this.onlySMSBox ? this.selectedOption : this.fingrePrintBefore ? this.fingrePrintBefore : el.value;
switch (type) {
case 1:
this.loginWithSMS(type, isActive);
break;
case 2:
this.loginWithFingurePrintFace(type, isActive);
break;
case 3:
this.loginWithFingurePrintFace(type, isActive);
break;
case 4:
this.loginWithSMS(type, isActive);
break;
default:
break;
}
sharedPref.setInt(LAST_LOGIN,
type); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
}
loginWithSMS(type, isActive) {
//if (!el.disabled) {
if (this.user != null && this.registerd_data != null) {
this.checkUserAuthentication(type);
} else {
if (this.loginTokenID != null) {
this.sendActivationCode(type);
} else {
this.checkUserAuthentication(type);
}
}
}
checkUserAuthentication(type) {}
sendActivationCode(type) {
var request = this.getCommonRequest();
loading(true);
this.authService.sendActivationCode(request).then((result) => {
if (result['isSMSSent'] == true)
{loading(false), this.startSMSService(type)}
else
{}
});
}
startSMSService(type) {
new SMSOTP(
context,
type,
this.mobileNumber,
(value) => {this.checkActivationCode(value: value)},
() => {
print('Faild..'),
},
).displayDialog(context);
}
loginWithFingurePrintFace(type, isActive) async {
if (isActive == 1) {
// this.startBiometricLoginIfAvailable();
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true);
print(authenticated);
if (authenticated == true) {
var request = this.getCommonRequest();
this.getMobileInfo(request);
}
}
}
getMobileInfo(request) {
this.authService.getLoginInfo(request).then((result) => {
if (!result['SMSLoginRequired'])
{
this.loginTokenID = result.logInTokenID,
this.patientOutSA = result.patientOutSA,
// sms for register the biometric
if (result.isSMSSent)
{
this.onlySMSBox = false,
//this.button();
}
else
{checkActivationCode()}
}
else
{
if (result['IsAuthenticated'])
{
setState(() {
this.onlySMSBox = true;
}),
//sharedPref.setBool(ONLY_SMS, true),
// this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
//this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE);
// this.cs.confirmLogin();
//this.button();
}
// else
// {
// // this.cs.presentAlert(result.ErrorEndUserMessage);
// }
}
});
}
setDefault() async {
// this.user = this.cs.sharedService.getSharedData(
// AuthenticationService.IMEI_USER_DATA,
// false
// );
this.registerd_data = CheckPatientAuthenticationReq.fromJson(
await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
this.mobileNumber = this.registerd_data != null
? this.registerd_data.patientMobileNumber
: int.parse(this.user.Mobile);
this.zipCode = this.registerd_data != null
? this.registerd_data.zipCode
: this.user.OutSA ? "971" : "966";
this.patientOutSA = this.registerd_data != null
? this.registerd_data.zipCode == "966" ? 0 : 1
: this.user.OutSA;
if (this.registerd_data != null) {
this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
this.loginType = this.registerd_data.searchType;
}
this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
this.lastLogin = await sharedPref.getInt(
LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
}
getCommonRequest() {
var request = SendActivationRequest();
request.patientMobileNumber = this.mobileNumber;
request.mobileNo = '0' + this.mobileNumber.toString();
request.deviceToken = this.deviceToken;
request.projectOutSA = this.patientOutSA;
request.loginType = this.selectedOption;
request.oTPSendType = this.selectedOption == 1 ? 1 : 2;
request.zipCode = this.zipCode;
request.isRegister = false;
request.logInTokenID = this.loginTokenID ?? "";
if (this.registerd_data != null) {
request.searchType = this.registerd_data.searchType == 1
? this.registerd_data.searchType
: 1;
request.patientID = this.registerd_data.patientID != 0
? this.registerd_data.patientID
: 0;
request.patientIdentificationID =
request.nationalID = this.registerd_data.patientIdentificationID;
} else {
request.searchType = request.searchType == 1 ? request.searchType : 2;
request.patientID = int.parse(this.user.PatientID);
request.patientID = request.nationalID =
request.nationalID != null ? request.nationalID : 0;
}
return request;
}
checkActivationCode({value}) {
loading(true);
var request = this.getCommonRequest().toJson();
this.authService.checkActivationCode(request, value).then((result) => {
this.userData =
result.list, //AuthenticatedUser.fromJson(result['List'][0]),
this.sharedPref.setObject(USER_PROFILE, result.list),
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
this.checkIfUserAgreedBefore(result),
loading(false)
});
}
checkIfUserAgreedBefore(CheckActivationCode result) {
print(result);
if (result.isNeedUserAgreement) {
//move to agreement page.
} else {
goToHome();
}
}
goToHome() {
authService.insertDeviceImei().then((value) => print(value));
// Navigator.of(context).pushNamed(HOME);
// const request = new LoginRequest();
// if (this.loginType === AuthenticationService.IDENTIFCIATION_LOGIN_TYPE) {
// request.PatientID = 0;
// } else {
// request.PatientID = Number(this.id);
// }
// this.newRating(request);
// }
// public newRating(request: any) {
// this.authService
// .checkIfRated(
// request,
// () => {
// this.gotoHome();
// },
// this.ts.trPK("general", "retry")
// )
// .subscribe((result: CheckUserRatingResponse) => {
// if (this.cs.validResponse(result)) {
// this.cs.sharedService.setSharedData(result, AuthenticationService.SURVEY_DATA);
// if (result.IsLastAppoitmentRatedList.length === 0) {
// this.cs.openHome();
// } else {
// this.ProjectID = result.IsLastAppoitmentRatedList[0].ProjectID;
// this.AppointmentNo = result.IsLastAppoitmentRatedList[0].AppointmentNo;
// this.cs.sharedService.setSharedData(true, "ratePage");
// this.showRateModal();
// }
// }
// });
}
loading(flag) {
setState(() {
isLoading = flag;
});
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
@ -128,7 +129,7 @@ class LoginType extends StatelessWidget {
},
child: AppText(
TranslationBase.of(context).forgotPassword,
fontSize: SizeConfig.textMultiplier * 3,
fontSize: SizeConfig.textMultiplier * 2.5,
margin: 10,
underline: true)))
]),
@ -141,12 +142,9 @@ class LoginType extends StatelessWidget {
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
color: Colors.grey,
textColor: Colors.white,
child:
Text(TranslationBase.of(context).registerNow),
onPressed: () => {
child: DefaultButton(
TranslationBase.of(context).registerNow,
() => {
Navigator.of(context).pushNamed(
REGISTER,
)

@ -1,17 +1,20 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/auth/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/providers/auth_provider.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -30,73 +33,77 @@ class _Login extends State<Login> {
bool isButtonDisabled = true;
final authService = new AuthProvider();
var sharedPref = new AppSharedPreferences();
bool isLoading = false;
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20),
height: SizeConfig.realScreenHeight * .8,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left,
)),
Expanded(
flex: 2,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
MobileNo(
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Container(
child: TextFields(
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
prefixIcon: Icon(
loginType == 1
? Icons.chrome_reader_mode
: Icons.receipt,
color: Colors.red),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: loginType == 1
? TranslationBase.of(context).nationalID
: TranslationBase.of(context).fileNo,
))
],
),
),
Expanded(
flex: 2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
body: isLoading == true
? AppCircularProgressIndicator()
: SingleChildScrollView(
child: Container(
padding:
EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Expanded(
flex: 2,
child: AppText(
TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left,
)),
Expanded(
flex: 3,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Expanded(
child: RaisedButton(
color: isButtonDisabled == true
? Colors.grey
: Colors.grey[600],
textColor: Colors.white,
child: Text(TranslationBase.of(context).login),
onPressed: () => {this.startLogin()},
MobileNo(
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Container(
child: TextFields(
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
prefixIcon: Icon(
loginType == 1
? Icons.chrome_reader_mode
: Icons.receipt,
color: Colors.red),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: loginType == 1
? TranslationBase.of(context).nationalID
: TranslationBase.of(context).fileNo,
))
],
),
],
))
]),
)));
),
Expanded(
flex: 3,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).login,
() => {this.startLogin()},
color: isButtonDisabled == true
? Colors.grey
: Colors.grey[600],
textColor: Colors.white,
))
],
),
],
))
]),
)));
}
startLogin() {
@ -132,6 +139,7 @@ class _Login extends State<Login> {
}
checkUserAuthentication() {
showLoader(true);
var request = CheckPatientAuthenticationReq();
request.isRegister = false;
request.patientMobileNumber = int.parse(mobileNo);
@ -147,10 +155,12 @@ class _Login extends State<Login> {
}
sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
authService.checkPatientAuthentication(request).then((value) => {
if (value.isSMSSent)
showLoader(false),
if (value['isSMSSent'])
{
sharedPref.setString(LOGIN_TOKEN_ID, value.LogInTokenID),
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request),
Navigator.of(context).pushNamed(CONFIRM_LOGIN)
}
else
{
@ -160,4 +170,9 @@ class _Login extends State<Login> {
}
checkActivationCode() {}
showLoader(bool isTrue) {
setState(() {
isLoading = isTrue;
});
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
@ -25,19 +26,19 @@ class _Register extends State<Register> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).login,
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20),
height: SizeConfig.realScreenHeight * .8,
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3.5,
fontSize: SizeConfig.textMultiplier * 3,
textAlign: TextAlign.left,
)),
Expanded(
@ -111,11 +112,9 @@ class _Register extends State<Register> {
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
color: Colors.grey,
textColor: Colors.white,
child: Text(TranslationBase.of(context).login),
onPressed: () => {},
child: DefaultButton(
TranslationBase.of(context).login,
() => {},
))
],
),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -17,7 +18,7 @@ class WelcomeLogin extends StatelessWidget {
child: Column(
children: <Widget>[
Expanded(
flex: 3,
flex: 6,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
@ -41,35 +42,39 @@ class WelcomeLogin extends StatelessWidget {
TranslationBase.of(context).welcomeText2,
style: TextStyle(fontSize: 24),
textAlign: TextAlign.left,
),
SizedBox(
height: SizeConfig.realScreenHeight * .2,
)
]),
),
Expanded(
flex: 2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
//mainAxisAlignment: MainAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
color: Colors.red[900],
textColor: Colors.white,
child: Text(TranslationBase.of(context).yes),
onPressed: () => {
child: DefaultButton(
TranslationBase.of(context).yes,
() => {
Navigator.of(context).pushNamed(
LOGIN_TYPE,
)
),
},
color: Colors.red[900],
textColor: Colors.white,
))
],
),
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
child: Text(TranslationBase.of(context).no),
onPressed: () => {
child: DefaultButton(
TranslationBase.of(context).no,
() => {
Navigator.of(context).pushNamed(
REGISTER,
)

@ -0,0 +1,110 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
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:intl/intl.dart';
import 'doctor_profile_page.dart';
class DoctorHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<MyDoctorViewModel>(
onModelReady: (model) => model.getMyDoctor(),
builder: (context, MyDoctorViewModel model, widget) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: 'My Doctors',
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
widthFactor: 1.0,
child: Center(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile(
title: const Text('Clinic'),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
activeColor: Colors.red[800],
onChanged: (FilterType value) {
model.setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile(
title: const Text('Hospital'),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
activeColor: Colors.red[800],
onChanged: (FilterType value) =>
model.setFilterType(value),
),
),
),
)
],
),
...List.generate(
model.patientDoctorAppointmentList.length,
(index) => AppExpandableNotifier(
title: model
.patientDoctorAppointmentList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model.patientDoctorAppointmentList[index]
.patientDoctorAppointmentList
.map((doctor) {
return InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DoctorProfilePage(
patientDoctorAppointment: doctor,
),
),
);
},
child: DoctorCard(
name: doctor.doctorName,
profileUrl: doctor.doctorImageURL,
rat: doctor.doctorRate.toDouble(),
subName: DateUtil.getMonthDayYearDateFormatted(
doctor.appointmentDate),
),
);
}).toList(),
)),
)
],
),
),
),
),
),
);
}
}

@ -0,0 +1,199 @@
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DoctorInformation extends StatefulWidget {
final DoctorProfile doctorProfile;
const DoctorInformation({Key key, this.doctorProfile}) : super(key: key);
@override
_DoctorInformationState createState() => _DoctorInformationState();
}
class _DoctorInformationState extends State<DoctorInformation> {
bool _isShowInfo = true;
bool _isScientificQualification = true;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[200],
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 10, right: 10, left: 10),
padding: EdgeInsets.all(10.0),
width: double.infinity,
//height: 250,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10.0)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Icon(
Icons.person,
size: 25,
color: Colors.red[700],
),
SizedBox(
width: 10,
),
Expanded(child: Texts(widget.doctorProfile.doctorName)),
InkWell(
onTap: () {
setState(() {
_isShowInfo = !_isShowInfo;
});
},
child: Container(
margin: EdgeInsets.all(5),
decoration:
BoxDecoration(shape: BoxShape.circle, boxShadow: [
BoxShadow(
color: Colors.red[700],
blurRadius: 1.0,
spreadRadius: 0.0,
)
]),
child: Icon(
_isShowInfo
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down ,
size: 25,
color: Colors.white,
)),
),
],
),
if (_isShowInfo)
AnimatedContainer(
duration: Duration(milliseconds: 7000),
margin: EdgeInsets.only(top: 20),
// height: 150,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('Gender'),
Texts(
widget.doctorProfile.genderDescription,
variant: 'overline',
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('Nationality'),
Texts(
widget.doctorProfile.nationalityName,
variant: 'overline',
),
],
),
],
),
SizedBox(
height: 5,
),
Divider(
height: 3,
color: Colors.grey,
),
SizedBox(
height: 5,
),
Texts('Clinic'),
Texts(
widget.doctorProfile.clinicDescription,
variant: 'overline',
),
],
),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 10, right: 10, left: 10),
padding: EdgeInsets.all(10.0),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10.0)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Icon(
Icons.local_play,
size: 25,
color: Colors.red[700],
),
SizedBox(
width: 10,
),
Expanded(child: Texts(widget.doctorProfile.doctorName)),
InkWell(
onTap: () {
setState(() {
_isScientificQualification =
!_isScientificQualification;
});
},
child: Container(
margin: EdgeInsets.all(5),
decoration:
BoxDecoration(shape: BoxShape.circle, boxShadow: [
BoxShadow(
color: Colors.red[700],
blurRadius: 1.0,
spreadRadius: 0.0,
)
]),
child: Icon(
_isScientificQualification
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
size: 25,
color: Colors.white,
)),
),
],
),
if (_isScientificQualification)
AnimatedContainer(
duration: Duration(milliseconds: 7000),
margin: EdgeInsets.only(top: 20),
// height: 150,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(widget.doctorProfile.doctorProfileInfo,)
],
),
)
],
),
)
],
),
),
);
}
}

@ -0,0 +1,181 @@
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'doctor_information_page.dart';
class DoctorProfilePage extends StatefulWidget {
final PatientDoctorAppointment patientDoctorAppointment;
DoctorProfilePage({this.patientDoctorAppointment});
@override
_DoctorProfilePageState createState() =>
_DoctorProfilePageState(patientDoctorAppointment);
}
class _DoctorProfilePageState extends State<DoctorProfilePage>
with SingleTickerProviderStateMixin {
TabController _tabController;
final PatientDoctorAppointment patientDoctorAppointment;
_DoctorProfilePageState(this.patientDoctorAppointment);
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this);
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<MyDoctorViewModel>(
onModelReady: (model) => model.getDoctorProfileAndRating(
doctorId: widget.patientDoctorAppointment.doctorID,
clinicID: widget.patientDoctorAppointment.clinicID,
projectID: widget.patientDoctorAppointment.projectID),
builder: (context, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: 'Doctor Profile',
baseViewModel: model,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(5),
width: 50,
height: 50,
decoration:
BoxDecoration(shape: BoxShape.circle,
color: Colors.grey
),
child: Icon(
Icons.calendar_view_day,
size: 25,
color: Colors.white,
)),
ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(
patientDoctorAppointment.doctorImageURL,
fit: BoxFit.fill,
height: 120.0,
width: 120.0),
),
Container(
margin: EdgeInsets.all(5),
width: 50,
height: 50,
decoration:
BoxDecoration(shape: BoxShape.circle,
color: Colors.grey
),
child: Icon(
Icons.format_list_bulleted,
size: 25,
color: Colors.white,
)),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(patientDoctorAppointment.doctorName,
style: TextStyle(
fontSize: 20.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(patientDoctorAppointment.clinicName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
model.doctorRating.doctorRate.toDouble() ??
0.0,
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(${model.doctorRating.patientNumber ?? 0} Reviews)",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
),
),
TabBar(
indicatorColor: Colors.red[800],
indicatorWeight: 3.0,
tabs: [
Tab(
child: Text(
'Doctor Information',
style: TextStyle(color: Colors.black))),
Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
),
Container(
height: MediaQuery.of(context).size.height * 0.8,
child: TabBarView(
physics: BouncingScrollPhysics(),
children: [DoctorInformation(doctorProfile: model.doctorProfile,), Container()],
controller: _tabController,
),
),
],
),
),
],
),
),
));
}
}

@ -0,0 +1,146 @@
import 'dart:math';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'doctor/doctor_home_page.dart';
class MedicalProfilePage extends StatefulWidget {
@override
_MedicalProfilePageState createState() => _MedicalProfilePageState();
}
class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override
Widget build(BuildContext context) {
return AppScaffold(
body: CustomScrollView(
physics: BouncingScrollPhysics(),
key: PageStorageKey("medical"),
slivers: <Widget>[
SliverPersistentHeader(
delegate: SliverAppBarDelegate(
maxHeight: 200.0,
minHeight: 200.0,
child: Container(
width: double.infinity,
height: 200,
color: Colors.grey,
),
),
),
SliverPersistentHeader(
delegate: SliverAppBarDelegate(
maxHeight: double.maxFinite,
minHeight: double.maxFinite,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 12.0),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: (){
Navigator.push(context, FadePage(page: DoctorHomePage()));
},
child: MedicalProfileItem(
title: 'My Doctor',
imagePath: 'doctor_icon.png',
subTitle: 'List',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: (){
},
child: MedicalProfileItem(
title: 'Lab',
imagePath: 'lab_result_icon.png',
subTitle: 'Result',
),
),
)
],
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Radiology',
imagePath: 'radiology_icon.png',
subTitle: 'Service',
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: (){
Navigator.push(context, FadePage(page: HomePrescriptionsPage()));
},
child: MedicalProfileItem(
title: 'Medicines',
imagePath: 'prescription_icon.png',
subTitle: 'Prescriptions',
),
),
)
],
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Insurance',
imagePath: 'insurance_card_icon.png',
subTitle: 'Card',
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Insurance',
imagePath: 'insurance_approvals_icon.png',
subTitle: 'Approvals',
),
)
],
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Medical',
imagePath: 'medical_history_icon.png',
subTitle: 'Reports',
),
),
Expanded(
flex: 1,
child: Container(),
)
],
),
],
),
),
),
),
],
),
);
}
}

@ -0,0 +1,61 @@
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
class MyAdmissionsPage extends StatefulWidget {
@override
_MyAdmissionsPageState createState() => _MyAdmissionsPageState();
}
class _MyAdmissionsPageState extends State<MyAdmissionsPage> {
@override
Widget build(BuildContext context) {
return AppScaffold(
body: ListView(
children: <Widget>[
AppExpandableNotifier(
title: 'Arryan Hospital',
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
DoctorCard(
name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020',
profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 3.8,
subName: 'Jammal',
),
DoctorCard(
name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020',
profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 3.8,
subName: 'Jammal',
),
],
),
),
AppExpandableNotifier(
title: 'Arryan Hospital',
bodyWidget: DoctorCard(
onTap: () {
//TODO when we need it
},
name: 'Dr Mohammad Aljammal',
date: 'Feb 14, 2020',
profileUrl:
'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB',
rat: 4.8,
subName: 'Jammal',
),
),
],
),
);
}
}

@ -0,0 +1,175 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport;
PrescriptionDetailsPage({Key key, this.prescriptionReport});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Prescription Details',
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
prescriptionReport.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(prescriptionReport.itemDescription)),
),
),
],
),
),
Container(
margin: EdgeInsets.all(8),
child: InkWell(
onTap: () {},
child: Center(
child: Column(
children: <Widget>[
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle
),
child: Column(
children: <Widget>[
Icon(
Icons.pin_drop,
color: Colors.red[800],
size: 55,
),
],
),
),
SizedBox(height: 5,),
Texts('Ports')
],
),
)),
),
Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
children: [
TableRow(
children: [
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Way'))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Average'))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Daily doses'))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Period'))),
],
),
TableRow(
children: [
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text(prescriptionReport.routeN))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(prescriptionReport.frequencyN))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(
'${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text('${prescriptionReport.days}')))
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(5),
child: Center(
child: Column(
children: <Widget>[
Texts('Notes'),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[300],
),
SizedBox(
height: 5,
),
Texts(' '),
],
),
),
)
],
),
),
);
}
}

@ -0,0 +1,112 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
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';
class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions;
PrescriptionItemsPage({Key key, this.prescriptions});
@override
Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) =>
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: 'Items',
baseViewModel: model,
body: Container(
height: MediaQuery.of(context).size.height * 0.8,
child: ListView.builder(
itemBuilder: (context, index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: model.prescriptionReportList[index],
),
),
),
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(model
.prescriptionReportList[index].itemDescription)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
),
itemCount: model.prescriptionReportList.length,
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.2,
color: Colors.grey[100],
child: Column(
children: <Widget>[
Divider(),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Send Copy',
onTap: () => model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate,
patientID: prescriptions.patientID,
clinicName: prescriptions.companyName,
doctorName: prescriptions.doctorName,
projectID: prescriptions.projectID),
loading: model.state == ViewState.BusyLocal,
),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Resend order & deliver',
backgroundColor: Colors.green[200],
))
],
),
),
),
);
}
}

@ -0,0 +1,13 @@
import 'package:flutter/cupertino.dart';
class PrescriptionsHistory extends StatefulWidget {
@override
_PrescriptionsHistoryState createState() => _PrescriptionsHistoryState();
}
class _PrescriptionsHistoryState extends State<PrescriptionsHistory> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -0,0 +1,122 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class HomePrescriptionsPage extends StatefulWidget {
@override
_HomePrescriptionsPageState createState() => _HomePrescriptionsPageState();
}
class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
@override
Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: 'My Doctors',
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.7),
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts('Prescriptions'),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts('History'),
),
),
],
),
),
),
),
],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
PrescriptionsPage(prescriptionsViewModel: model,),
PrescriptionsHistory()
],
),
)
],
),
),
),
);
}
}

@ -0,0 +1,102 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
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';
class PrescriptionsPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel;
const PrescriptionsPage({Key key, this.prescriptionsViewModel})
: super(key: key);
@override
Widget build(BuildContext context) {
return AppScaffold(
baseViewModel: prescriptionsViewModel,
body: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () =>
prescriptionsViewModel.setFilterType(FilterType.Clinic),
child: ListTile(
title: const Text('Clinic'),
leading: Radio(
value: FilterType.Clinic,
groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800],
onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => prescriptionsViewModel
.setFilterType(FilterType.Hospital),
child: ListTile(
title: const Text('Hospital'),
leading: Radio(
value: FilterType.Hospital,
groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800],
onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value);
},
),
),
),
)
],
),
...List.generate(
prescriptionsViewModel.prescriptionsOrderList.length,
(index) => AppExpandableNotifier(
title: prescriptionsViewModel
.prescriptionsOrderList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: prescriptionsViewModel
.prescriptionsOrderList[index].prescriptionsList
.map((prescriptions) {
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(prescriptions: prescriptions,),
),
),
child: DoctorCard(
name: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL,
rat: prescriptions.doctorRate.toDouble(),
subName: prescriptions.name,
date: DateUtil.getMonthDayYearDateFormatted(
prescriptions.dischargeDate),
),
);
}).toList(),
)),
)
],
),
),
);
}
}

@ -11,18 +11,11 @@ import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/buttons/BottomButton.dart';
import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart';
import '../../locator.dart';
import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart';
class MedicineSearch extends StatefulWidget {
@override
_MedicineSearchState createState() => _MedicineSearchState();
}
class _MedicineSearchState extends State<MedicineSearch> {
class MedicineSearch extends StatelessWidget {
final textController = TextEditingController();
final _formKey = GlobalKey<FormState>();
@override
@ -31,115 +24,121 @@ class _MedicineSearchState extends State<MedicineSearch> {
builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold(
baseViewModel: model,
appBarTitle: 'Search Medicine',
body: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 1,
right: SizeConfig.heightMultiplier * 2.5,
top: SizeConfig.heightMultiplier * 4,
left: SizeConfig.heightMultiplier * 2.5,
),
child: Form(
key: _formKey,
child: TextFields(
hintText: 'Search Medicine here ',
inputAction: TextInputAction.search,
onSaved: (value) {},
onSubmit: (value) {
searchMedicine(model);
},
controller: textController,
validator: (value) {
if (value.isEmpty) {
return 'please enter medicine name';
}
return null;
},
appBarTitle: TranslationBase.of(context).searchMedicine,
body: Container(
height: SizeConfig.screenHeight,
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 1,
right: SizeConfig.heightMultiplier * 2.5,
top: SizeConfig.heightMultiplier * 4,
left: SizeConfig.heightMultiplier * 2.5,
),
),
),
Container(
margin: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 0.0,
right: SizeConfig.heightMultiplier * 5,
top: SizeConfig.heightMultiplier * 1,
left: SizeConfig.heightMultiplier * 5,
),
child: Wrap(
children: <Widget>[
Container(
child: Button(
loading: model.state == ViewState.BusyLocal,
label: 'Search',
onTap: () {
searchMedicine(model);
}),
width: 350.0,
child: Form(
key: _formKey,
child: TextFields(
hintText:
TranslationBase.of(context).searchMedicineHere,
inputAction: TextInputAction.search,
onSaved: (value) {},
onSubmit: (value) {
searchMedicine(model, context);
},
controller: textController,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context)
.pleaseEnterMedicineName;
}
return null;
},
),
],
),
),
),
Container(
margin:
EdgeInsets.only(left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
'You Can Find ' +
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}'
' Item In Search ',
),
],
Container(
margin: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 0.0,
right: SizeConfig.heightMultiplier * 5,
top: SizeConfig.heightMultiplier * 1,
left: SizeConfig.heightMultiplier * 5,
),
child: Wrap(
children: <Widget>[
Container(
child: Button(
loading: model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).search,
onTap: () {
searchMedicine(model, context);
}),
width: 350.0,
),
],
),
),
),
if (model.state == ViewState.ErrorLocal)
Container(
child: Texts(model.error),
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
'You Can Find ' +
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}'
' Item In Search ',
),
],
),
),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.85,
//child: _getHospitals(model.pharmacy),
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pharmacy == null
? 0
: model.pharmacy.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model.pharmacy[index].itemDes,
url: model.pharmacy[index].productImage),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PharmaciesList()),
);
},
);
}),
if (model.state == ViewState.ErrorLocal)
Container(
child: Texts(model.error),
),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.85,
//child: _getHospitals(model.pharmacy),
child: ListView.builder(
//physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pharmacy == null
? 0
: model.pharmacy.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model.pharmacy[index].itemDes,
url: model.pharmacy[index].productImage),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PharmaciesList(
medicineID:
model.pharmacy[index].itemID,
imageURL: model
.pharmacy[index].productImage,
medicineDescription:
model.pharmacy[index].itemDes),
),
);
},
);
}),
),
),
)
],
],
),
)),
);
}
searchMedicine(PharmacyViewModel model) {
searchMedicine(PharmacyViewModel model, BuildContext context) {
Utils.hideKeyboard(context);
if (_formKey.currentState.validate())
model.getMedicine2(name: textController.text);
model.getMedicine(name: textController.text);
}
Widget _getHospitals(List<PharmaciesModel> hospitals) => ListView.builder(
itemCount: hospitals.length,
itemBuilder: (BuildContext context, int index) => Container(
child: Texts(hospitals[index].itemDes),
),
);
}

@ -1,99 +1,191 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:maps_launcher/maps_launcher.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'dart:typed_data';
import 'dart:convert';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
class PharmaciesList extends StatefulWidget {
String medicineID;
int url;
PharmaciesList({this.url, this.medicineID});
@override
_PharmaciesListState createState() => _PharmaciesListState();
class PharmaciesList extends StatelessWidget {
final int medicineID;
final String imageURL;
final String medicineDescription;
//
}
PharmaciesList({this.medicineID, this.imageURL, this.medicineDescription});
class _PharmaciesListState extends State<PharmaciesList> {
@override
Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>(
//onModelReady: (model) => model.getMedicine(),
onModelReady: (model) => model.getPharmacies(id: medicineID),
builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold(
appBarTitle: 'Pharmacies List',
body: !model.isFinished
? AppCircularProgressIndicator()
: model.hasError
? Center(
child: Text(
model.errorMsg,
style: TextStyle(color: Colors.red),
appBarTitle: TranslationBase.of(context).pharmaciesList,
baseViewModel: model,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: AlwaysScrollableScrollPhysics(),
children: <Widget>[
RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius: BorderRadius.all(
Radius.circular(7),
),
child: Image.memory(
dataFromBase64String(imageURL),
height: SizeConfig.imageSizeMultiplier * 19,
width: SizeConfig.imageSizeMultiplier * 18,
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 3,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 6.8, vertical: 3.5),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Texts(
TranslationBase.of(context).description,
),
Texts(
medicineDescription,
),
Texts(
TranslationBase.of(context).price,
marginRight: 10,
marginLeft: 10,
marginBottom: 2.0,
),
if (model.pharmacyList.length > 0)
Texts(
model.pharmacyList[0].price.toString(),
),
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 2.0,
bottom: SizeConfig.widthMultiplier * 3.0,
right: SizeConfig.widthMultiplier * 4.0,
left: SizeConfig.widthMultiplier * 2.5,
),
child: Align(
alignment: Alignment.center,
child: Texts(
TranslationBase.of(context).youCanFindItIn,
),
),
alignment: Alignment.topRight,
),
Container(
width: SizeConfig.screenWidth * 1.0,
child: ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: model.pharmacyList == null
? 0
: model.pharmacyList.length,
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.network(
model.pharmacyList[index].imageLocation,
height: SizeConfig.imageSizeMultiplier * 13.0,
width: SizeConfig.imageSizeMultiplier * 11.0,
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 4,
child: Padding(
padding: EdgeInsets.all(9.0),
child: Texts(
model.pharmacyList[index].desLocation,
),
),
),
)
: Container(
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: AlwaysScrollableScrollPhysics(),
children: <Widget>[
RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius: BorderRadius.all(
Radius.circular(7),
),
child: Image.memory(
dataFromBase64String(
widget.url.toString()),
height:
SizeConfig.imageSizeMultiplier * 19,
width:
SizeConfig.imageSizeMultiplier * 18,
fit: BoxFit.cover,
),
Expanded(
flex: 2,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(6.0),
child: InkWell(
child: Icon(
Icons.phone,
color: Colors.red,
),
onTap: () => launch("tel://" +
model.pharmacyList[index].phoneNumber),
),
Expanded(
flex: 3,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[],
),
Padding(
padding: EdgeInsets.all(6.0),
child: InkWell(
child: Icon(
Icons.local_pharmacy,
color: Colors.red,
),
)
],
))
],
),
)),
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
model.pharmacyList[index].latitude),
double.parse(model
.pharmacyList[index].longitude),
);
},
),
),
],
),
)
],
),
);
},
),
),
],
),
),
),
);
}
Image imageFromBase64String(String base64String) {
return Image.memory(base64Decode(base64String));
}
Uint8List dataFromBase64String(String base64String) {
return base64Decode(base64String);
}
String base64String(Uint8List data) {
return base64Encode(data);
}
}

@ -1,124 +0,0 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/auth/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/core/model/auth/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
// SharedPreferences sharedPref = new SharedPreferences();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = new AppSharedPreferences();
const String INSERT_DEVICE_IMEI = '/Patients.svc/REST/Patient_INSERTDeviceIMEI';
const String SELECT_DEVICE_IMEI =
'/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String CHECK_PATIENT_AUTH =
'/Authentication.svc/REST/CheckPatientAuthentication';
class AuthProvider with ChangeNotifier {
bool isLogin = false;
bool isLoading = true;
AuthProvider() {
getUserAuthentication();
}
void getUserAuthentication() async {
Map profile = await sharedPref.getObject(USER_PROFILE);
if (profile != null) {
isLoading = false;
isLogin = true;
} else {
isLoading = false;
isLogin = false;
}
notifyListeners();
}
APP_STATUS get stutas {
if (isLoading) {
return APP_STATUS.LOADING;
} else {
if (this.isLogin) {
return APP_STATUS.AUTHENTICATED;
} else {
return APP_STATUS.UNAUTHENTICATED;
}
}
}
// Future<dynamic> login(UserModel userInfo) async {
// try {
// dynamic localRes;
// await BaseAppClient.post(LOGIN_URL,
// onSuccess: (dynamic response, int statusCode) {
// localRes = response;
// }, onFailure: (String error, int statusCode) {
// throw error;
// }, body: userInfo.toJson());
// return Future.value(localRes);
// } catch (error) {
// print(error);
// throw error;
// }
// }
Future<dynamic> insertDeviceImei(imei) async {
try {
dynamic localRes;
await new BaseAppClient().post(INSERT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: imei);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
try {
dynamic localRes;
await new BaseAppClient().post(SELECT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: imei);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> checkPatientAuthentication(
CheckPatientAuthenticationReq request) async {
request.versionID = VERSION_ID;
request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID;
request.languageID = 2;
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/forgot-password.dart';
import 'package:diplomaticquarterapp/pages/login/welcome.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
@ -14,6 +15,7 @@ const String LOGIN_TYPE = 'login-type';
const String LOGIN_PAGE = 'login-page';
const String FORGOT_PASSWORD = 'forgot-password';
const String REGISTER = 'register';
const String CONFIRM_LOGIN = 'confrim-login';
var routes = {
// ROOT: (_) => RootPage(),
HOME: (_) => LandingPage(),
@ -21,5 +23,6 @@ var routes = {
LOGIN_TYPE: (_) => LoginType(),
LOGIN_PAGE: (_) => Login(),
FORGOT_PASSWORD: (_) => ForgotPassword(),
REGISTER: (_) => Register()
REGISTER: (_) => Register(),
CONFIRM_LOGIN: (_) => ConfirmLogin()
};

@ -0,0 +1,239 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_mobile_info_request.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_mobile_info_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/insert_device_imei_request.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
// SharedPreferences sharedPref = new SharedPreferences();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = new AppSharedPreferences();
const String INSERT_DEVICE_IMEI = '/Patients.svc/REST/Patient_INSERTDeviceIMEI';
const String SELECT_DEVICE_IMEI =
'/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String CHECK_PATIENT_AUTH =
'/Authentication.svc/REST/CheckPatientAuthentication';
const GET_MOBILE_INFO = '/Authentication.svc/REST/GetMobileLoginInfo';
const SEND_ACTIVATION_CODE =
'/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
const CHECK_ACTIVATION_CODE = '/Authentication.svc/REST/CheckActivationCode';
class AuthProvider with ChangeNotifier {
bool isLogin = false;
bool isLoading = true;
var authenticatedUser;
AuthProvider() {
getUserAuthentication();
}
void getUserAuthentication() async {
Map profile = await sharedPref.getObject(USER_PROFILE);
if (profile != null) {
isLoading = false;
isLogin = true;
} else {
isLoading = false;
isLogin = false;
}
notifyListeners();
}
APP_STATUS get stutas {
if (isLoading) {
return APP_STATUS.LOADING;
} else {
if (this.isLogin) {
return APP_STATUS.AUTHENTICATED;
} else {
return APP_STATUS.UNAUTHENTICATED;
}
}
}
// Future<dynamic> login(UserModel userInfo) async {
// try {
// dynamic localRes;
// await BaseAppClient.post(LOGIN_URL,
// onSuccess: (dynamic response, int statusCode) {
// localRes = response;
// }, onFailure: (String error, int statusCode) {
// throw error;
// }, body: userInfo.toJson());
// return Future.value(localRes);
// } catch (error) {
// print(error);
// throw error;
// }
// }
Future<dynamic> insertDeviceImei() async {
try {
dynamic localRes;
var lastLogin = await sharedPref.getInt(
LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
var request =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var newRequest = INSERTDeviceIMEIRequest();
var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) {
newRequest.iMEI = imei;
newRequest.firstName = request.firstName + " " + request.lastName;
newRequest.firstNameN = request.firstNameN + " " + request.lastNameN;
newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false;
newRequest.preferredLanguage = int.parse(request.preferredLanguage) ?? 1;
newRequest.logInTypeID = lastLogin ?? 1;
// }
await new BaseAppClient().post(INSERT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: newRequest.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
try {
dynamic localRes;
Map<String, dynamic> request = {};
request['IMEI'] = imei;
await new BaseAppClient().post(SELECT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> checkPatientAuthentication(
CheckPatientAuthenticationReq request) async {
request.versionID = VERSION_ID;
request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID;
request.languageID = 2;
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> getLoginInfo(request) async {
request.versionID = VERSION_ID;
request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID;
request.languageID = 2;
request.deviceTypeID = DeviceTypeID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
request.isDentalAllowedBackend = false;
try {
dynamic localRes;
await new BaseAppClient().post(GET_MOBILE_INFO,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> sendActivationCode(request) async {
request.versionID = VERSION_ID;
request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID;
request.languageID = 2;
request.deviceTypeID = DeviceTypeID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
request.isDentalAllowedBackend = false;
try {
var localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
authenticatedUser = localRes;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<CheckActivationCode> checkActivationCode(request, value) async {
var neRequest = CheckActivationCodeReq.fromJson(request);
neRequest.activationCode = value ?? "0000";
neRequest.isSilentLogin = value != null ? false : true;
neRequest.isRegister = false;
neRequest.versionID = VERSION_ID;
neRequest.channel = CHANNEL;
neRequest.iPAdress = IP_ADDRESS;
neRequest.generalid = GENERAL_ID;
neRequest.languageID = 2;
neRequest.deviceTypeID = DeviceTypeID;
neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1;
neRequest.isDentalAllowedBackend = false;
try {
dynamic localRes;
await new BaseAppClient().post(CHECK_ACTIVATION_CODE,
onSuccess: (dynamic response, int statusCode) {
localRes = CheckActivationCode.fromJson(response);
}, onFailure: (String error, int statusCode) {
throw error;
}, body: neRequest.toJson());
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
AuthenticatedUser getAuthenticatedUser() {
this.isLogin = true;
return authenticatedUser;
}
}

@ -156,6 +156,22 @@ class TranslationBase {
String get gregorianDate =>
localizedValues['gregorian-date'][locale.languageCode];
String get verifyLoginWith =>
localizedValues['verify-login-with'][locale.languageCode];
String get register => localizedValues['register-user'][locale.languageCode];
String get verifyFingerprint =>
localizedValues['verify-with-fingerprint'][locale.languageCode];
String get verifyFaceID =>
localizedValues['verify-with-faceid'][locale.languageCode];
String get verifySMS =>
localizedValues['verify-with-sms'][locale.languageCode];
String get verifyWhatsApp =>
localizedValues['verify-with-whatsapp'][locale.languageCode];
String get lastLoginAt => localizedValues['last-login'][locale.languageCode];
String get lastLoginWith =>
localizedValues['last-login-with'][locale.languageCode];
String get verifyFingerprint2 =>
localizedValues['verify-fingerprint'][locale.languageCode];
String get searchMedicine =>
localizedValues['searchMedicine'][locale.languageCode];
@ -225,6 +241,24 @@ class TranslationBase {
String get cancelAppoMsg =>
localizedValues['cancelAppoMsg'][locale.languageCode];
String get pharmaciesList =>
localizedValues['pharmaciesList'][locale.languageCode];
String get description => localizedValues['description'][locale.languageCode];
String get price => localizedValues['price'][locale.languageCode];
String get youCanFindItIn =>
localizedValues['youCanFindItIn'][locale.languageCode];
String get pleaseEnterMedicineName =>
localizedValues['pleaseEnterMedicineName'][locale.languageCode];
String get verificationMessage =>
localizedValues['verification_message'][locale.languageCode];
String get validationMessage =>
localizedValues['validation_message'][locale.languageCode];
String get arabicChange =>
localizedValues['arabic-change'][locale.languageCode];
String get notification =>
localizedValues['notification'][locale.languageCode];
String get appsetting => localizedValues['app-settings'][locale.languageCode];
String get rateApp => localizedValues['rate-app'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -16,9 +16,9 @@ class LargeAvatar extends StatelessWidget {
@required this.name,
this.url,
this.disableProfileView: false,
this.radius = 60.0,
this.width = 90,
this.height = 90,
this.radius = 70.0,
this.width = 70,
this.height = 60,
this.onTap})
: super(key: key);
@ -71,7 +71,7 @@ class LargeAvatar extends StatelessWidget {
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(50.0)),
borderRadius: BorderRadius.all(Radius.circular(radius)),
),
width: width,
height: height,

@ -22,7 +22,7 @@ class BottomNavigationItem extends StatelessWidget {
Widget build(BuildContext context) {
return Expanded(
child: SizedBox(
height: 70.0,
// height: 72.0,
child: Material(
type: MaterialType.transparency,
child: InkWell(
@ -54,7 +54,7 @@ class BottomNavigationItem extends StatelessWidget {
color: currentIndex == index
? Theme.of(context).primaryColor
: Theme.of(context).dividerColor,
fontSize: 12,
fontSize: 11,
),
],
),

@ -13,6 +13,7 @@ class Button extends StatefulWidget {
this.label: "",
this.icon,
this.onTap,
this.backgroundColor,
this.loading: false,
this.elevation: true})
: super(key: key);
@ -22,6 +23,7 @@ class Button extends StatefulWidget {
final VoidCallback onTap;
final bool loading;
final bool elevation;
final Color backgroundColor;
@override
_ButtonState createState() => _ButtonState();
@ -103,7 +105,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
: 19),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Hexcolor('#515b5d'),
color: widget.backgroundColor ?? Hexcolor('#515b5d'),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(

@ -0,0 +1,26 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
class DefaultButton extends StatelessWidget {
final String text;
final Function onPress;
final Color textColor;
final Color color;
DefaultButton(this.text, this.onPress, {this.color, this.textColor});
@override
Widget build(BuildContext context) {
return Container(
height: 60,
child: RaisedButton(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
color: color != null ? color : Colors.grey[700],
textColor: color != null ? textColor : Colors.white,
child: Text(
this.text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
),
onPressed: () => this.onPress()));
}
}

@ -0,0 +1,149 @@
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class DoctorCard extends StatelessWidget {
final String name;
final String subName;
final double rat;
final String date;
final String profileUrl;
final String billNo;
final Function onTap;
DoctorCard(
{this.name,
this.subName,
this.rat,
this.date,
this.profileUrl,
this.billNo,
this.onTap});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Theme.of(context).primaryColor,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: InkWell(
onTap: onTap,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Container(
width: 20,
height: date ==null ?100 : 130,
decoration: BoxDecoration(
color: Colors.red[900],
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8))),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
"Calendar",
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: name,
url: profileUrl,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
name,
bold: true,
),
Texts(
subName,
variant: 'caption3',
),
billNo != null
? Row(
children: <Widget>[
Texts(
'Bill No: ',
variant: 'caption3',
),
Texts(
billNo,
variant: 'caption3',
)
],
)
: StarRating(
totalAverage: rat,
forceStars: true),
],
),
),
),
],
),
),
if (date != null)
Divider(
height: 8,
color: Colors.grey[400],
),
if (date != null)
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/Icon-awesome-calendar.png',
width: 30,
height: 30,
),
Expanded(
child: Texts(
date,
variant: 'bodyText',
),
)
],
)
],
),
)
],
),
],
),
),
);
}
}

@ -0,0 +1,53 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class MedicalProfileItem extends StatelessWidget {
MedicalProfileItem({
@required this.imagePath,
@required this.title,
@required this.subTitle,
});
final String imagePath;
final String title;
final String subTitle;
@override
Widget build(BuildContext context) {
return RoundedContainer(
child: Container(
padding: EdgeInsets.all(5),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'),
fontWeight: FontWeight.bold),
),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(text: subTitle),
],
),
),
Align(
alignment: Alignment.bottomRight,
child: Image.asset(
"assets/images/medical/$imagePath",
height: SizeConfig.heightMultiplier * 7,
),
)
],
),
),
);
}
}

@ -16,6 +16,11 @@ class Texts extends StatefulWidget {
final bool allowExpand;
final double fontSize;
final String fontWeight;
final double margin;
final double marginTop;
final double marginRight;
final double marginBottom;
final double marginLeft;
Texts(this.text,
{Key key,
@ -32,7 +37,12 @@ class Texts extends StatefulWidget {
this.readMore = false,
this.style,
this.fontSize,
this.fontWeight})
this.fontWeight,
this.margin,
this.marginBottom,
this.marginLeft,
this.marginRight,
this.marginTop})
: super(key: key);
@override
@ -228,7 +238,7 @@ class _TextsState extends State<Texts> {
Theme.of(context).backgroundColor.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter),
),
height: 30,
height: 30.0,
),
)
],

@ -1,7 +1,12 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart';
import '../../config/size_config.dart';
@ -13,9 +18,18 @@ class AppDrawer extends StatefulWidget {
}
class _AppDrawerState extends State<AppDrawer> {
@override
void initState() {
super.initState();
checkUserData();
}
var sharedPref = new AppSharedPreferences();
AuthenticatedUser user;
@override
Widget build(BuildContext context) {
return FlexibleContainer(
return SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
child: Container(
color: Colors.white,
child: Drawer(
@ -27,53 +41,140 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero,
children: <Widget>[
Container(
height: SizeConfig.heightMultiplier * 50,
height: SizeConfig.screenHeight * .25,
child: InkWell(
child: DrawerHeader(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: Image.asset('assets/images/logo.png'),
margin: EdgeInsets.all(20),
),
SizedBox(
height: 1,
child: Container(
color: Colors.black26,
),
margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4),
),
SizedBox(height: 15),
// CircleAvatar(
// radius: SizeConfig.imageSizeMultiplier * 12,
// backgroundColor: Colors.white,
// //TODO add backgroundImage: NetworkImage(''),
// ),
// Padding(
// padding: EdgeInsets.only(top: 10),
// child: Texts(
// 'Patient',
// color: Colors.black,
// fontSize: SizeConfig.textMultiplier * 2,
// )),
user != null
? Padding(
padding: EdgeInsets.all(15),
child: Column(children: <Widget>[
Row(
children: <Widget>[
Padding(
padding:
EdgeInsets.only(right: 5),
child: Icon(
Icons.account_circle,
color: Colors.red,
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Colors.red,
)
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, top: 5),
child: Column(
children: <Widget>[
AppText(
'File No:' +
user.patientID
.toString(),
color: Colors.red,
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(),
],
),
),
onTap: () {
//TODO add fun
},
),
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).loginregister,
Icons.lock),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase.of(context).arabicChange,
Icons.translate),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
user != null
? Column(
children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.notification,
Icons.notifications),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
Icons.lock_open),
onTap: () {
logout();
},
)
],
)
: InkWell(
child: DrawerItem(
TranslationBase.of(context).loginregister,
Icons.lock_open),
onTap: () {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
},
),
],
)
],
),
),
@ -111,4 +212,19 @@ class _AppDrawerState extends State<AppDrawer> {
drawerNavigator(context, routeName) {
Navigator.of(context).pushNamed(routeName);
}
checkUserData() async {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
setState(() {
this.user = data;
print(this.user);
});
}
logout() async {
this.sharedPref.remove(USER_PROFILE);
this.user = null;
Navigator.of(context).pushNamed(HOME);
}
}

@ -25,19 +25,27 @@ class _DrawerItemState extends State<DrawerItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 5, bottom: 15, left: 10, right: 10),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
)),
margin: EdgeInsets.only(left: 10, right: 10, top: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(
widget.icon,
color: widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
),
Padding(
padding: widget.subTitle == ''
? EdgeInsets.only(top: 20)
: EdgeInsets.only(top: 0),
padding: EdgeInsets.only(bottom: 30),
child: Icon(
widget.icon,
color: widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
)),
Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[

@ -0,0 +1,39 @@
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
class StarRating extends StatelessWidget {
final double totalAverage;
final double size;
final int totalCount;
final bool forceStars;
StarRating({Key key, this.totalAverage: 0.0, this.size: 16.0, this.totalCount, this.forceStars = false}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget> [
if (!forceStars && (totalAverage==null || totalAverage==0))
Texts("New", style: "caption"),
if (forceStars || (totalAverage!=null && totalAverage>0))
...List.generate(5, (index) =>
Padding(
padding: EdgeInsets.only(right: 1.0),
child: Icon(
(index+1) <= (totalAverage ?? 0) ? EvaIcons.star : EvaIcons.starOutline,
size: size,
color: (index+1) <= (totalAverage ?? 0) ? Color.fromRGBO(255, 186, 0, 1.0) : Theme.of(context).hintColor
),
)
),
if (totalCount!=null)
SizedBox(width: 9.0),
if (totalCount!=null)
Texts("("+totalCount.toString()+")", style: "overline", color: Colors.grey[400],)
]
);
}
}

@ -19,7 +19,7 @@ class AppExpandableNotifier extends StatelessWidget {
Widget build(BuildContext context) {
return ExpandableNotifier(
child: Padding(
padding: const EdgeInsets.all(10),
padding: const EdgeInsets.only(left: 10,right: 10,top: 4),
child: Card(
clipBehavior: Clip.antiAlias,
child: Column(
@ -39,14 +39,14 @@ class AppExpandableNotifier extends StatelessWidget {
padding: EdgeInsets.all(10),
child: Text(
title,
style: TextStyle(fontWeight: FontWeight.bold),
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 22,),
),
),
collapsed: collapsed,
collapsed: collapsed ?? Container(),
expanded: bodyWidget,
builder: (_, collapsed, expanded) {
return Padding(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
padding: EdgeInsets.only(left: 5, right: 5, bottom: 5),
child: Expandable(
collapsed: collapsed,
expanded: expanded,

@ -0,0 +1,71 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/*
*@author: Mohammad Aljammal
*@Date:27/4/2020
*@param: Widget
*@return:
*@desc: Card With Bg Widget
*/
class CardWithBgWidget extends StatelessWidget {
final Widget child;
CardWithBgWidget({@required this.child});
@override
Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
return Container(
margin: EdgeInsets.symmetric(vertical: 5.0),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey, width: 1.0),
),
child: Material(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
child: Stack(
children: [
if (projectProvider.isArabic)
Positioned(
child: Container(
width: 10,
color: Colors.red[800],
),
bottom: 0,
top: 0,
right: 0,
)
else
Positioned(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(9.0),
bottomLeft: Radius.circular(9.0),
),color: Colors.blueAccent,
),
width: 15,
),
bottom: 0,
top: 0,
left: 0,
),
Container(
padding: EdgeInsets.all(15.0),
margin: EdgeInsets.only(left: 10),
child: child)
],
),
),
);
}
}

@ -0,0 +1,86 @@
import 'package:flutter/material.dart';
/// DESCRIPTION : Custom widget for rounded container and custom decoration
class RoundedContainer extends StatefulWidget {
final double width;
final double height;
final double raduis;
final Color backgroundColor;
final double margin;
final double elevation;
final bool showBorder;
final Color borderColor;
final bool customCornerRaduis;
final double topLeft;
final double bottomRight;
final double topRight;
final double bottomLeft;
final Widget child;
final double borderWidth;
RoundedContainer(
{@required this.child,
this.width,
this.height,
this.raduis = 10,
this.backgroundColor = Colors.white,
this.margin = 10,
this.elevation = 1,
this.showBorder = false,
this.borderColor = Colors.grey,
this.customCornerRaduis = false,
this.topLeft = 0,
this.topRight = 0,
this.bottomRight = 0,
this.bottomLeft = 0,
this.borderWidth = 1});
@override
_RoundedContainerState createState() => _RoundedContainerState();
}
class _RoundedContainerState extends State<RoundedContainer> {
@override
Widget build(BuildContext context) {
return Container(
width: widget.width,
height: widget.height,
margin: EdgeInsets.all(widget.margin),
decoration: widget.showBorder == true
? BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(
color: widget.borderColor, width: widget.borderWidth),
borderRadius: widget.customCornerRaduis
? BorderRadius.only(
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
: BorderRadius.circular(widget.raduis),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.1),
spreadRadius: 10,
blurRadius: 5,
offset: Offset(0, 5), // changes position of shadow
),
])
: null,
child: Card(
margin: EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: widget.customCornerRaduis
? BorderRadius.only(
topLeft: Radius.circular(widget.topLeft),
topRight: Radius.circular(widget.topRight),
bottomRight: Radius.circular(widget.bottomRight),
bottomLeft: Radius.circular(widget.bottomLeft))
: BorderRadius.circular(widget.raduis),
),
color: widget.backgroundColor,
child: widget.child,
));
}
}

@ -0,0 +1,34 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
class SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
SliverAppBarDelegate({
@required this.minHeight,
@required this.maxHeight,
@required this.child,
});
final double minHeight;
final double maxHeight;
final Widget child;
@override
double get minExtent => minHeight;
@override
double get maxExtent => max(maxHeight, minHeight);
@override
Widget build(
BuildContext context,
double shrinkOffset,
bool overlapsContent)
{
return new SizedBox.expand(child: child);
}
@override
bool shouldRebuild(SliverAppBarDelegate oldDelegate) {
return false;
}
}

@ -0,0 +1,280 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'dart:math';
class SMSOTP {
final type;
final mobileNo;
final Function onSuccess;
final Function onFailure;
final context;
int remainingTime = 600;
Future<Null> timer;
SMSOTP(
this.context,
this.type,
this.mobileNo,
this.onSuccess,
this.onFailure,
);
Map verifyAccountFormValue = {
'digit1': null,
'digit2': null,
'digit3': null,
'digit4': null,
};
final focusD1 = FocusNode();
final focusD2 = FocusNode();
final focusD3 = FocusNode();
final focusD4 = FocusNode();
String errorMsg;
String displayTime = '';
displayDialog(BuildContext context) async {
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
IconButton(
icon: Icon(Icons.close),
onPressed: () => {Navigator.pop(context), this.onSuccess()},
)
],
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0))),
content: StatefulBuilder(builder: (context, setState) {
if (displayTime == '') {
startTimer(setState);
}
return Container(
color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8,
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
type == 1
? Image.asset('assets/images/login/103.png')
: Image.asset('assets/images/login/104.png'),
Padding(
padding: EdgeInsets.only(top: 20),
child: AppText(
TranslationBase.of(context).verificationMessage +
' XXXXXX' +
mobileNo
.toString()
.substring(mobileNo.toString().length - 3),
textAlign: TextAlign.center,
)),
Padding(
padding: EdgeInsets.only(top: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField(
textInputAction: TextInputAction.next,
style: buildTextStyle(),
autofocus: true,
maxLength: 1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
validator: validateCodeDigit,
onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusD2);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context).requestFocus(focusD2);
verifyAccountFormValue['digit1'] = val;
checkValue();
}
},
),
),
Container(
width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField(
focusNode: focusD2,
textInputAction: TextInputAction.next,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusD3);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD3);
verifyAccountFormValue['digit2'] = val;
checkValue();
}
},
validator: validateCodeDigit),
),
Container(
width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField(
focusNode: focusD3,
textInputAction: TextInputAction.next,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD4);
verifyAccountFormValue['digit3'] = val;
checkValue();
}
},
validator: validateCodeDigit)),
Container(
width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField(
focusNode: focusD4,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
verifyAccountFormValue['digit4'] = val;
checkValue();
}
},
validator: validateCodeDigit)),
],
),
),
Padding(
padding: EdgeInsets.only(top: 10),
child: AppText(
TranslationBase.of(context).validationMessage +
' ' +
displayTime,
color: Colors.red,
textAlign: TextAlign.center,
))
],
)),
);
}),
);
});
}
TextStyle buildTextStyle() {
return TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
);
}
InputDecoration buildInputDecoration(BuildContext context) {
return InputDecoration(
// ts/images/password_icon.png
contentPadding: EdgeInsets.only(top: 20, bottom: 20),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).primaryColor),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
),
);
}
String validateCodeDigit(value) {
if (value.isEmpty) {
return 'Please enter your Password';
} else if (value.length == 3) {
print(value);
} else {
return null;
}
}
checkValue() {
//print(verifyAccountFormValue);
if (verifyAccountFormValue['digit1'] != null &&
verifyAccountFormValue['digit2'] != null &&
verifyAccountFormValue['digit3'] != null &&
verifyAccountFormValue['digit4'] != null) {
onSuccess(verifyAccountFormValue['digit1'] +
verifyAccountFormValue['digit2'] +
verifyAccountFormValue['digit3'] +
verifyAccountFormValue['digit4']);
}
}
getSecondsAsDigitalClock(int inputSeconds) {
var sec_num =
int.parse(inputSeconds.toString()); // don't forget the second param
var hours = (sec_num / 3600).floor();
var minutes = ((sec_num - hours * 3600) / 60).floor();
var seconds = sec_num - hours * 3600 - minutes * 60;
var minutesString = "";
var secondsString = "";
minutesString =
minutes < 10 ? "0" + minutes.toString() : minutes.toString();
secondsString =
seconds < 10 ? "0" + seconds.toString() : seconds.toString();
return minutesString + ":" + secondsString;
}
startTimer(setState) {
this.remainingTime--;
setState(() {
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
});
timer = Future.delayed(Duration(seconds: 1), () {
if (this.remainingTime > 0) {
startTimer(setState);
} else {
Navigator.pop(context);
}
});
}
}

@ -29,7 +29,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
@override
Widget build(BuildContext context) {
return new RoundedContainer(
height: SizeConfig.heightMultiplier * 10.5,
height: SizeConfig.heightMultiplier * 12.9,
child: Padding(
padding: const EdgeInsets.all(2.0),
child: Row(
@ -38,8 +38,8 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
children: <Widget>[
if (widget.url != null)
Container(
height: 39,
width: 39,
height: 39.0,
width: 39.0,
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(7)),
child: Image.memory(
@ -51,11 +51,15 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(3),
child: Align(
alignment: Alignment.centerLeft,
child: Texts(widget.label),
child: Center(
child: Padding(
padding: EdgeInsets.all(2.5),
child: Align(
alignment: Alignment.centerLeft,
child: Texts(
widget.label,
),
),
),
),
)
@ -70,15 +74,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
);
}
Image imageFromBase64String(String base64String) {
return Image.memory(base64Decode(base64String));
}
Uint8List dataFromBase64String(String base64String) {
return base64Decode(base64String);
}
String base64String(Uint8List data) {
return base64Encode(data);
}
}

@ -86,6 +86,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
@ -99,7 +100,9 @@ flutter:
# assets:
assets:
- assets/images/
- assets/images/medical/
- assets/images/new-design/
- assets/images/login/
- assets/json/
fonts:

Loading…
Cancel
Save