diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 30575eb9..884c7e09 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -6,6 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
+
diff --git a/android/build.gradle b/android/build.gradle
index e2e8a05f..8e56476b 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.4.2'
+ classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 296b146b..5660070d 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Jun 23 08:50:38 CEST 2017
+#Thu Sep 03 16:26:30 EEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/assets/images/report.jpg b/assets/images/report.jpg
new file mode 100644
index 00000000..5846cd53
Binary files /dev/null and b/assets/images/report.jpg differ
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index c1c5e34c..5ba52820 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -356,7 +356,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -433,7 +432,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -489,7 +487,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
diff --git a/lib/config/config.dart b/lib/config/config.dart
index a5210914..63ff8954 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -28,8 +28,8 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
-const GET_Patient_LAB_SPECIAL_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const GET_Patient_LAB_RESULT = '/Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@@ -43,7 +43,8 @@ const SEND_RAD_REPORT_EMAIL =
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory =
- 'Services/Doctors.svc/REST/PateintHasAppoimentHistory';
+ 'Services'
+ '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
const GET_PATIENT_VITAL_SIGN =
@@ -77,9 +78,15 @@ const GET_QR_PARKING = '/Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
+//URL to get projects list
+const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
+
//URL to get doctors list
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
+//URL to dental doctors list
+const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
+
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
@@ -149,13 +156,17 @@ const CANCEL_LIVECARE_REQUEST =
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
+
+const GET_USER_TERMS ='/Services/Patients.svc/REST/GetUserTermsAndConditions';
+const UPDATE_HEALTH_TERMS ='/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+
//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.6;
const SETUP_ID = '91877';
-const LANGUAGE = 1;
+const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
@@ -169,6 +180,8 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
+const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index ca6ec86d..7a4f0acb 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -343,7 +343,10 @@ const Map> localizedValues = {
"en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني'
},
- "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
+ "OffersAndPackages": {
+ "en": "Online transfer request",
+ 'ar': 'طلب التحويل الالكتروني'
+ },
"ComprehensiveMedicalCheckup": {
"en": "Comprehensive Medical Check up",
'ar': 'فحص طبي شامل'
@@ -379,4 +382,80 @@ const Map> localizedValues = {
"locationa":{"en":"location:","ar":"الموقع"},
"ambulancerequest":{"en":"Ambulance :","ar":"طلب نقل "},
"requestA":{"en":"Request:","ar":"اسعاف"},
+ "MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
+ "NoBookedAppointments": {
+ "en": "No Booked Appointments",
+ "ar": "لا توجد مواعيد محجوزة"
+ },
+ "NoConfirmedAppointments": {
+ "en": "No Confirmed Appointments",
+ "ar": "لا توجد مواعيد مؤكدة"
+ },
+ "noArrivedAppointments": {
+ "en": "No Arrived Appointments",
+ "ar": "لم تصل المواعيد"
+ },
+ "MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"},
+ "Radiology": {"en": "Radiology", "ar": "الأشعة"},
+ "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"},
+ "Lab": {"en": "Lab", "ar": "تحليل المختبر"},
+ "LabSubtitle": {"en": "Result", "ar": "نتائج"},
+ "Medicines": {"en": "Medicines", "ar": "الوصفات"},
+ "MedicinesSubtitle": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
+ "VitalSigns": {"en": "Vital Signs", "ar": "المؤشرات الحيوية"},
+ "VitalSignsSubTitle": {"en": "Reports", "ar": "قراءات"},
+ "MyMedical": {"en": "Active", "ar": "قراءات"},
+ "MyMedicalSubtitle": {"en": "Medications", "ar": "النشطة"},
+ "MyDoctor": {"en": "My Doctor", "ar": "اطبائي"},
+ "MyDoctorSubtitle": {"en": "List", "ar": "قمت بزيارتهم"},
+ "Eye": {"en": "Eye", "ar": "قياسات"},
+ "EyeSubtitle": {"en": "Measurement", "ar": "النظر"},
+ "Insurance": {"en": "Insurance", "ar": "بطاقة"},
+ "InsuranceSubtitle": {"en": "Card", "ar": "التأمين"},
+ "UpdateInsurance": {"en": "Update Insurance", "ar": "تحديث التأمين"},
+ "UpdateInsuranceSubtitle": {"en": "Card", "ar": "التأمين"},
+ "InsuranceApproval": {"en": "Insurance Approval", "ar": "موافقات"},
+ "InsuranceApprovalSubtitle": {"en": "Approvals", "ar": "موافقات التأمين"},
+ "Allergies": {"en": "Approvals", "ar": "الحساسية"},
+ "AllergiesSubtitle": {"en": "Diagnosed", "ar": "مسجلة"},
+ "MyVaccines": {"en": "My Vaccines", "ar": "تطعيماتي"},
+ "MyVaccinesSubtitle": {"en": "List", "ar": "قائمة"},
+ "Medical": {"en": "Medical", "ar": "التقارير"},
+ "MedicalSubtitle": {"en": "Report", "ar": "الطبية"},
+ "Monthly": {"en": "Monthly", "ar": "تقارير"},
+ "MonthlySubtitle": {"en": "Report", "ar": "الشهرية"},
+ "Sick": {"en": "Sick", "ar": "الإجازات"},
+ "SickSubtitle": {"en": "Leaves", "ar": "المرضية"},
+ "MyBalance": {"en": "My Balance", "ar": "ارصدتي"},
+ "MyBalanceSubtitle": {"en": "Credit", "ar": "المبالغ"},
+ "PatientCall": {"en": "Patient Call", "ar": "النداء للموعد"},
+ "PatientCallSubtitle": {"en": "Service", "ar": "خدمة"},
+ "SmartWatches": {"en": "Smart Watches", "ar": "الساعة الذكية"},
+ "SmartWatchesSubtitle": {"en": "Pairing", "ar": "ربط البيانات"},
+ "MyTrackers": {"en": "My Trackers", "ar": "تتبع قراءاتي"},
+ "MyTrackersSubtitle": {"en": "Service", "ar": "الطبية"},
+ "AskYour": {"en": "Ask Your", "ar": "إرسل طبيبك"},
+ "AskYourSubtitle": {"en": "Doctor", "ar": "خدمة"},
+ "Internet": {"en": "Internet", "ar": "الاتصال"},
+ "InternetSubtitle": {"en": "Pairing", "ar": "بالإنترنت"},
+ "Chatbot": {"en": "Chatbot", "ar": "تاشت بوت"},
+ "ChatbotSubtitle": {"en": "", "ar": ""},
+ "TimeLine": {"en": "Time Line", "ar": "الجدول الزمني"},
+ "LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"},
+ "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
+ "Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
+ "History": {"en": "History", "ar": "السجل"},
+ "OrderNo": {"en": "Order No", "ar": "رقم الطلب"},
+ "OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"},
+ "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
+ "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
+ "km":{"en":"KMs:","ar":"كم"},
+ "PatientHealthSummaryReport":{"en":"Patient Health Summary Report","ar":" ملخص التقارير الشهرية"},
+ "ToViewTheTermsAndConditions":{"en":"To View The Terms And Conditions Report","ar":" عرض الشروط والأحكام "},
+ "ClickHere":{"en":"Click here","ar":"أنقر هنا"},
+ "IAgreeToTheTermsAndConditions":{"en":"I agree to the terms and conditions ","ar":"أوافق على الشروط والاحكام "},
+ "IAgreeToTheTermsAndConditionsSubtitle":{"en":"I agree to the terms and conditions ","ar":"هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية"},
+ "Save":{"en":"Save","ar":"حفظ "},
+ "UserAgreement":{"en":"User Agreement","ar":"اتفاقية الخصوصية "},
+ "UpdateSuccessfully":{"en":"Update Successfully","ar":"تم التحديث بنجاح"},
};
diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart
new file mode 100644
index 00000000..23b3363d
--- /dev/null
+++ b/lib/core/model/labs/lab_result.dart
@@ -0,0 +1,88 @@
+class LabResult {
+ String description;
+ Null femaleInterpretativeData;
+ int gender;
+ int lineItemNo;
+ Null maleInterpretativeData;
+ String notes;
+ String packageID;
+ int patientID;
+ String projectID;
+ String referanceRange;
+ String resultValue;
+ String sampleCollectedOn;
+ String sampleReceivedOn;
+ String setupID;
+ Null superVerifiedOn;
+ String testCode;
+ String uOM;
+ String verifiedOn;
+ Null verifiedOnDateTime;
+
+ LabResult(
+ {this.description,
+ this.femaleInterpretativeData,
+ this.gender,
+ this.lineItemNo,
+ this.maleInterpretativeData,
+ this.notes,
+ this.packageID,
+ this.patientID,
+ this.projectID,
+ this.referanceRange,
+ this.resultValue,
+ this.sampleCollectedOn,
+ this.sampleReceivedOn,
+ this.setupID,
+ this.superVerifiedOn,
+ this.testCode,
+ this.uOM,
+ this.verifiedOn,
+ this.verifiedOnDateTime});
+
+ LabResult.fromJson(Map json) {
+ description = json['Description'];
+ femaleInterpretativeData = json['FemaleInterpretativeData'];
+ gender = json['Gender'];
+ lineItemNo = json['LineItemNo'];
+ maleInterpretativeData = json['MaleInterpretativeData'];
+ notes = json['Notes'];
+ packageID = json['PackageID'];
+ patientID = json['PatientID'];
+ projectID = json['ProjectID'];
+ referanceRange = json['ReferanceRange'];
+ resultValue = json['ResultValue'];
+ sampleCollectedOn = json['SampleCollectedOn'];
+ sampleReceivedOn = json['SampleReceivedOn'];
+ setupID = json['SetupID'];
+ superVerifiedOn = json['SuperVerifiedOn'];
+ testCode = json['TestCode'];
+ uOM = json['UOM'];
+ verifiedOn = json['VerifiedOn'];
+ verifiedOnDateTime = json['VerifiedOnDateTime'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Description'] = this.description;
+ data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
+ data['Gender'] = this.gender;
+ data['LineItemNo'] = this.lineItemNo;
+ data['MaleInterpretativeData'] = this.maleInterpretativeData;
+ data['Notes'] = this.notes;
+ data['PackageID'] = this.packageID;
+ data['PatientID'] = this.patientID;
+ data['ProjectID'] = this.projectID;
+ data['ReferanceRange'] = this.referanceRange;
+ data['ResultValue'] = this.resultValue;
+ data['SampleCollectedOn'] = this.sampleCollectedOn;
+ data['SampleReceivedOn'] = this.sampleReceivedOn;
+ data['SetupID'] = this.setupID;
+ data['SuperVerifiedOn'] = this.superVerifiedOn;
+ data['TestCode'] = this.testCode;
+ data['UOM'] = this.uOM;
+ data['VerifiedOn'] = this.verifiedOn;
+ data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
+ return data;
+ }
+}
diff --git a/lib/core/model/vaccine/my_vaccine.dart b/lib/core/model/vaccine/my_vaccine.dart
new file mode 100644
index 00000000..dc921c12
--- /dev/null
+++ b/lib/core/model/vaccine/my_vaccine.dart
@@ -0,0 +1,152 @@
+class VaccineModel {
+ String setupID;
+ int projectID;
+ int patientID;
+ int invoiceNo;
+ String procedureID;
+ String vaccineName;
+ Null vaccineNameN;
+ String invoiceDate;
+ int doctorID;
+ int clinicID;
+ String firstName;
+ String middleName;
+ String lastName;
+ Null firstNameN;
+ Null middleNameN;
+ Null lastNameN;
+ String dateofBirth;
+ int actualDoctorRate;
+ String age;
+ String clinicName;
+ String doctorImageURL;
+ String doctorName;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isDoctorAllowVedioCall;
+ bool isExecludeDoctor;
+ int noOfPatientsRate;
+ String patientName;
+ String projectName;
+ String qR;
+ List speciality;
+ String vaccinationDate;
+
+ VaccineModel(
+ {this.setupID,
+ this.projectID,
+ this.patientID,
+ this.invoiceNo,
+ this.procedureID,
+ this.vaccineName,
+ this.vaccineNameN,
+ this.invoiceDate,
+ this.doctorID,
+ this.clinicID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.dateofBirth,
+ this.actualDoctorRate,
+ this.age,
+ this.clinicName,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isDoctorAllowVedioCall,
+ this.isExecludeDoctor,
+ this.noOfPatientsRate,
+ this.patientName,
+ this.projectName,
+ this.qR,
+ this.speciality,
+ this.vaccinationDate});
+
+ VaccineModel.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ patientID = json['PatientID'];
+ invoiceNo = json['InvoiceNo'];
+ procedureID = json['ProcedureID'];
+ vaccineName = json['VaccineName'];
+ vaccineNameN = json['VaccineNameN'];
+ invoiceDate = json['InvoiceDate'];
+ doctorID = json['DoctorID'];
+ clinicID = json['ClinicID'];
+ firstName = json['FirstName'];
+ middleName = json['MiddleName'];
+ lastName = json['LastName'];
+ firstNameN = json['FirstNameN'];
+ middleNameN = json['MiddleNameN'];
+ lastNameN = json['LastNameN'];
+ dateofBirth = json['DateofBirth'];
+ actualDoctorRate = json['ActualDoctorRate'];
+ age = json['Age'];
+ clinicName = json['ClinicName'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ patientName = json['PatientName'];
+ projectName = json['ProjectName'];
+ qR = json['QR'];
+ speciality = json['Speciality'].cast();
+ vaccinationDate = json['VaccinationDate'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['PatientID'] = this.patientID;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['ProcedureID'] = this.procedureID;
+ data['VaccineName'] = this.vaccineName;
+ data['VaccineNameN'] = this.vaccineNameN;
+ data['InvoiceDate'] = this.invoiceDate;
+ data['DoctorID'] = this.doctorID;
+ data['ClinicID'] = this.clinicID;
+ 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['DateofBirth'] = this.dateofBirth;
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['Age'] = this.age;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ 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['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['PatientName'] = this.patientName;
+ data['ProjectName'] = this.projectName;
+ data['QR'] = this.qR;
+ data['Speciality'] = this.speciality;
+ data['VaccinationDate'] = this.vaccinationDate;
+ return data;
+ }
+}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index f45fe22b..8fde2166 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -2,14 +2,11 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
-import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
-import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
-import '../../../locator.dart';
import '../../../routes.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
@@ -33,12 +30,12 @@ class BaseAppClient {
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
var user = await sharedPref.getObject(USER_PROFILE);
- body['SetupID'] = body.containsKey('SetupID')
- ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
- : SETUP_ID;
- body['VersionID'] = body.containsKey('VersionID')
- ? body['VersionID'] != null ? body['VersionID'] : VERSION_ID
- : VERSION_ID;
+ if (body.containsKey('SetupID')) {
+ body['SetupID'] = body.containsKey('SetupID')
+ ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
+ : SETUP_ID;
+ }
+ body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
@@ -46,16 +43,28 @@ class BaseAppClient {
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA
: PATIENT_OUT_SA;
- body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
+
+ if (body.containsKey('isDentalAllowedBackend')) {
+ body['isDentalAllowedBackend'] =
+ body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
+ }
+
body['DeviceTypeID'] = DeviceTypeID;
+
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE
: PATIENT_TYPE;
+
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
+
if (user != null) {
body['TokenID'] = token;
body['PatientID'] =
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 8850e953..7fee6615 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -1,8 +1,13 @@
import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
+import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class InsuranceCardService extends BaseService {
List _cardList = List();
@@ -15,6 +20,9 @@ class InsuranceCardService extends BaseService {
List get insuranceApproval => _insuranceApproval;
+ GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse();
+
clearInsuranceCard() {
_cardList.clear();
}
@@ -101,7 +109,7 @@ class InsuranceCardService extends BaseService {
Future getInsuranceApproval({int appointmentNo}) async {
hasError = false;
// _cardList.clear();
- if(appointmentNo != null) {
+ if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null;
@@ -124,4 +132,35 @@ class InsuranceCardService extends BaseService {
super.error = error;
}, body: _insuranceApprovalModel.toJson());
}
+
+ Future getFamilyFiles() async {
+ var myFamily = await sharedPref.getObject(FAMILY_FILE);
+ if (myFamily != null) {
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
+ } else {
+ getSharedRecordByStatus();
+ }
+ }
+
+ Future getSharedRecordByStatus() async {
+ try {
+ dynamic localRes;
+ var request = GetAllSharedRecordsByStatusReq();
+ request.status = 0;
+ await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS,
+ onSuccess: (dynamic response, int statusCode) {
+ localRes = response;
+ }, onFailure: (String error, int statusCode) {
+ AppToast.showErrorToast(message: error);
+ throw error;
+ }, body: request.toJson());
+ sharedPref.setObject(FAMILY_FILE, localRes);
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(localRes);
+ } catch (error) {
+ print(error);
+ throw error;
+ }
+ }
}
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
index 98f8110e..c1ad65f3 100644
--- a/lib/core/service/medical/labs_service.dart
+++ b/lib/core/service/medical/labs_service.dart
@@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
@@ -28,6 +29,7 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult();
List patientLabSpecialResult = List();
+ List labResultList = List();
Future getLaboratoryResult(
{String projectID,
@@ -52,6 +54,27 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson());
}
+ Future getPatientLabResult({PatientLabOrders patientLabOrder}) async {
+ hasError = false;
+ Map body = Map();
+ body['InvoiceNo'] = patientLabOrder.invoiceNo;
+ body['OrderNo'] = patientLabOrder.orderNo;
+ body['Procedure'] = "U/A";
+ body['ProjectID'] = patientLabOrder.projectID;
+ body['ClinicID'] = patientLabOrder.clinicID;
+ //TODO Check the res
+ await baseAppClient.post(GET_Patient_LAB_RESULT,
+ onSuccess: (dynamic response, int statusCode) {
+ patientLabSpecialResult.clear();
+ response['ListPLR'].forEach((lab) {
+ labResultList.add(LabResult.fromJson(lab));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail();
diff --git a/lib/core/service/medical/my_doctor_service.dart b/lib/core/service/medical/my_doctor_service.dart
index 349d7ace..4df3ce8a 100644
--- a/lib/core/service/medical/my_doctor_service.dart
+++ b/lib/core/service/medical/my_doctor_service.dart
@@ -1,15 +1,16 @@
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';
+import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
class MyDoctorService extends BaseService {
- List patientDoctorAppointmentList = List();
+ List patientDoctorAppointmentList = List();
DoctorProfile doctorProfile;
+ DoctorList doctorList;
DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
@@ -49,7 +50,7 @@ class MyDoctorService extends BaseService {
patientDoctorAppointmentList.clear();
response['PatientDoctorAppointmentResultList'].forEach((hospital) {
patientDoctorAppointmentList
- .add(PatientDoctorAppointment.fromJson(hospital));
+ .add(DoctorList.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@@ -58,7 +59,6 @@ class MyDoctorService extends BaseService {
}
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
- doctorID: 2477,
license: true,
isRegistered: true,
projectID: 12,
@@ -79,11 +79,18 @@ class MyDoctorService extends BaseService {
///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID;
- _requestDoctorProfile.patientID = projectID;
+ _requestDoctorProfile.projectID = projectID;
hasError = false;
await baseAppClient.post(GET_DOCTOR_PROFILE,
onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]);
+ doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]);
+ doctorList.clinicName = doctorProfile.clinicDescription;
+ doctorList.doctorTitle = doctorProfile.doctorTitleForProfile;
+ doctorList.name = doctorProfile.doctorName;
+ doctorList.projectName = doctorProfile.projectName;
+
+
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
diff --git a/lib/core/service/medical/reports_monthly_service.dart b/lib/core/service/medical/reports_monthly_service.dart
new file mode 100644
index 00000000..5e643669
--- /dev/null
+++ b/lib/core/service/medical/reports_monthly_service.dart
@@ -0,0 +1,83 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
+import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
+
+class ReportsMonthlyService extends BaseService {
+ List reportsList = List();
+ List appointHistoryList = List();
+
+ RequestReports _requestReports = RequestReports(
+ isReport: true,
+ encounterType: 1,
+ requestType: 1,
+ 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);
+
+ Future getReports() async {
+ hasError = false;
+ await baseAppClient.post(REPORTS,
+ onSuccess: (dynamic response, int statusCode) {
+ reportsList.clear();
+ response['GetPatientMedicalStatus'].forEach((reports) {
+ reportsList.add(Reports.fromJson(reports));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestReports.toJson());
+ }
+
+ Future getPatentAppointmentHistory() async {
+ hasError = false;
+ Map body = new Map();
+ body['IsForMedicalReport'] = true;
+ await baseAppClient.post(GET_PATIENT_AppointmentHistory,
+ onSuccess: (dynamic response, int statusCode) {
+ appointHistoryList = [];
+ response['AppoimentAllHistoryResultList'].forEach((appoint) {
+ appointHistoryList.add(AppointmentHistory.fromJson(appoint));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future insertRequestForMedicalReport(
+ AppointmentHistory appointmentHistory) async {
+ Map body = new Map();
+ body['ClinicID'] = appointmentHistory.clinicID;
+ body['DoctorID'] = appointmentHistory.doctorID;
+ body['SetupID'] = appointmentHistory.setupID;
+ body['EncounterNo'] = appointmentHistory.appointmentNo;
+ body['EncounterType'] = 1;// appointmentHistory.appointmentType;
+ body['IsActive'] = appointmentHistory.isActiveDoctor;
+ body['ProjectID'] = appointmentHistory.projectID;
+ body['Remarks'] = "";
+ body['ProcedureId'] = "";
+ body['RequestType'] = 1;
+ body['Source'] = 2;
+ body['Status'] = 1;
+ body['CreatedBy'] = 102;
+ hasError = false;
+ await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart
index b8e5f426..316872ed 100644
--- a/lib/core/service/medical/reports_service.dart
+++ b/lib/core/service/medical/reports_service.dart
@@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
class ReportsService extends BaseService {
List reportsList = List();
List appointHistoryList = List();
-
+ String userAgreementContent = "";
RequestReports _requestReports = RequestReports(
isReport: true,
encounterType: 1,
@@ -44,7 +44,7 @@ class ReportsService extends BaseService {
hasError = false;
Map body = new Map();
body['IsForMedicalReport'] = true;
- await baseAppClient.post(GET_PATIENT_AppointmentHistory,
+ await baseAppClient.post(GET_PATIENT_AppointmentHistory,
onSuccess: (dynamic response, int statusCode) {
appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) {
@@ -56,6 +56,33 @@ class ReportsService extends BaseService {
}, body: body);
}
+ Future getUserTermsAndConditions() async {
+ hasError = false;
+ await baseAppClient.post(GET_USER_TERMS,
+ onSuccess: (dynamic response, int statusCode) {
+ userAgreementContent = response['UserAgreementContent'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+
+ Future updatePatientHealthSummaryReport({bool isSummary}) async {
+ Map body = Map();
+ body['RSummaryReport'] = isSummary;
+ hasError = false;
+ await baseAppClient.post(UPDATE_HEALTH_TERMS,
+ onSuccess: (dynamic response, int statusCode) {
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+
+
Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async {
Map body = new Map();
@@ -63,7 +90,7 @@ class ReportsService extends BaseService {
body['DoctorID'] = appointmentHistory.doctorID;
body['SetupID'] = appointmentHistory.setupID;
body['EncounterNo'] = appointmentHistory.appointmentNo;
- body['EncounterType'] = 1;// appointmentHistory.appointmentType;
+ body['EncounterType'] = 1; // appointmentHistory.appointmentType;
body['IsActive'] = appointmentHistory.isActiveDoctor;
body['ProjectID'] = appointmentHistory.projectID;
body['Remarks'] = "";
@@ -73,7 +100,7 @@ class ReportsService extends BaseService {
body['Status'] = 1;
body['CreatedBy'] = 102;
hasError = false;
- await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
+ await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart
new file mode 100644
index 00000000..9904b838
--- /dev/null
+++ b/lib/core/service/vaccine_service.dart
@@ -0,0 +1,48 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
+
+class VaccineService extends BaseService {
+ List _vaccineList = List();
+
+ List get vaccineList => _vaccineList;
+
+ Future getMyVaccine() async {
+ Map body = Map();
+ body['To'] = "0";
+ body['From'] = "0";
+ hasError = false;
+ _vaccineList.clear();
+ await baseAppClient.post(GET_VACCINES,
+ onSuccess: (dynamic response, int statusCode) {
+ response['List_DoneVaccines'].forEach((item) {
+ _vaccineList.add(VaccineModel.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future sendEmail() async {
+
+ Map body = Map();
+ body['ListVaccines'] = vaccineList.map((v) => v.toJson()).toList();
+ body['ListVaccines'] = user.emailAddress;
+ body['DateofBirth'] = user.dateofBirth;
+ body['PatientIditificationNum'] = user.patientIdentificationNo;
+ body['PatientMobileNumber'] = user.mobileNumber;
+ body['PatientName'] = user.firstName + " "+ user.lastName;
+
+ hasError = false;
+
+ await baseAppClient.post(GET_VACCINES,
+ onSuccess: (dynamic response, int statusCode) {
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+
+ }
+}
diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart
index a6975360..e99a53f6 100644
--- a/lib/core/viewModels/insurance_card_View_model.dart
+++ b/lib/core/viewModels/insurance_card_View_model.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dar
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@@ -20,6 +21,9 @@ class InsuranceViewModel extends BaseViewModel {
List get insuranceApproval =>
_insuranceCardService.insuranceApproval;
+ GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse =>
+ _insuranceCardService.getAllSharedRecordsByStatusResponse;
+
Future getInsurance() async {
hasError = false;
_insuranceCardService.clearInsuranceCard();
@@ -41,7 +45,7 @@ class InsuranceViewModel extends BaseViewModel {
error = _insuranceCardService.error;
setState(ViewState.ErrorLocal);
} else
- setState(ViewState.Idle);
+ getFamilyFiles();
}
Future getInsuranceApproval({int appointmentNo}) async {
@@ -59,4 +63,13 @@ class InsuranceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
+ Future getFamilyFiles() async {
+ await _insuranceCardService.getFamilyFiles();
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
}
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 1efdfb7c..032aeb1e 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -1,6 +1,6 @@
-
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
@@ -78,13 +78,32 @@ class LabsViewModel extends BaseViewModel {
List get patientLabSpecialResult =>
_labsService.patientLabSpecialResult;
+ List get labResultList => _labsService.labResultList;
+
getLaboratoryResult(
{String projectID,
int clinicID,
String invoiceNo,
String orderNo}) async {
setState(ViewState.Busy);
- await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,orderNo: orderNo,projectID: projectID,clinicID: clinicID);
+ await _labsService.getLaboratoryResult(
+ invoiceNo: invoiceNo,
+ orderNo: orderNo,
+ projectID: projectID,
+ clinicID: clinicID);
+ if (_labsService.hasError) {
+ error = _labsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ getPatientLabResult({PatientLabOrders patientLabOrder}) async {
+ setState(ViewState.Busy);
+ await _labsService.getPatientLabResult(
+ patientLabOrder: patientLabOrder
+ );
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
diff --git a/lib/core/viewModels/medical/my_doctor_view_model.dart b/lib/core/viewModels/medical/my_doctor_view_model.dart
index e04f9bdd..266157ff 100644
--- a/lib/core/viewModels/medical/my_doctor_view_model.dart
+++ b/lib/core/viewModels/medical/my_doctor_view_model.dart
@@ -2,8 +2,8 @@ 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 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
@@ -22,6 +22,9 @@ class MyDoctorViewModel extends BaseViewModel {
? _patientDoctorAppointmentListClinic
: _patientDoctorAppointmentListHospital;
+ DoctorList get doctorList=> _myDoctorService.doctorList;
+
+
DoctorProfile get doctorProfile => _myDoctorService.doctorProfile;
DoctorRating get doctorRating => _myDoctorService.doctorRating;
@@ -61,9 +64,7 @@ class MyDoctorViewModel extends BaseViewModel {
.toList();
if (doctorByHospital.length != 0) {
- _patientDoctorAppointmentListHospital[
- _patientDoctorAppointmentListHospital
- .indexOf(doctorByHospital[0])]
+ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
@@ -83,7 +84,7 @@ class MyDoctorViewModel extends BaseViewModel {
notifyListeners();
}
- void getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
+ Future getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
setState(ViewState.Busy);
await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID);
if (_myDoctorService.hasError) {
diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart
new file mode 100644
index 00000000..3ae196f5
--- /dev/null
+++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart
@@ -0,0 +1,46 @@
+import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+import '../../../core/enum/reportfilter_type.dart';
+import '../../../core/enum/viewstate.dart';
+import '../../../core/model/reports/Reports.dart';
+import '../../../core/service/medical/reports_service.dart';
+import '../../../locator.dart';
+import '../base_view_model.dart';
+
+class ReportsMonthlyViewModel extends BaseViewModel {
+ ReportFilterType filterType = ReportFilterType.Requested;
+
+ ReportsService _reportsService = locator();
+
+
+
+ String get userAgreementContent => _reportsService.userAgreementContent;
+
+ getUserTermsAndConditions() async{
+ setState(ViewState.Busy);
+ await _reportsService.getUserTermsAndConditions();
+ if (_reportsService.hasError) {
+ error = _reportsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ updatePatientHealthSummaryReport({String message, bool isSummary})async{
+ setState(ViewState.BusyLocal);
+ await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
+ if (_reportsService.hasError) {
+ error = _reportsService.error;
+ AppToast.showErrorToast(message: error);
+ setState(ViewState.ErrorLocal);
+ } else {
+ AppToast.showSuccessToast(message: message);
+ setState(ViewState.Idle);
+ }
+ }
+
+
+
+}
diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart
new file mode 100644
index 00000000..233a945f
--- /dev/null
+++ b/lib/core/viewModels/vaccine_view_model.dart
@@ -0,0 +1,41 @@
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+import 'base_view_model.dart';
+import '../../locator.dart';
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
+import 'package:diplomaticquarterapp/core/service/vaccine_service.dart';
+
+class VaccineViewModel extends BaseViewModel {
+ bool hasError = false;
+
+ VaccineService _vaccineService = locator();
+
+ List get vaccineList => _vaccineService.vaccineList;
+
+ Future getVaccine() async {
+ hasError = false;
+ //_insuranceCardService.clearInsuranceCard();
+ setState(ViewState.Busy);
+ await _vaccineService.getMyVaccine();
+ if (_vaccineService.hasError) {
+ error = _vaccineService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future sendEmail({String message}) async {
+ hasError = false;
+ setState(ViewState.BusyLocal);
+ await _vaccineService.sendEmail();
+ if (_vaccineService.hasError) {
+ error = _vaccineService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ AppToast.showSuccessToast(message: message);
+ setState(ViewState.Idle);
+ }
+ }
+}
diff --git a/lib/locator.dart b/lib/locator.dart
index 71035955..f676717d 100644
--- a/lib/locator.dart
+++ b/lib/locator.dart
@@ -13,6 +13,7 @@ import 'core/service/medical/medical_service.dart';
import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_service.dart';
+import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/vital_sign_service.dart';
import 'core/viewModels/appointment_rate_view_model.dart';
import 'core/viewModels/er/near_hospital_view_model.dart';
@@ -24,6 +25,7 @@ import 'core/viewModels/medical/medical_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/medical/radiology_view_model.dart';
+import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
@@ -31,6 +33,8 @@ import 'core/service/pharmacies_service.dart';
import 'core/service/insurance_service.dart';
import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/qr_view_model.dart';
+import 'core/viewModels/vaccine_view_model.dart';
+import 'core/service/vaccine_service.dart';
GetIt locator = GetIt.instance;
@@ -52,6 +56,8 @@ void setupLocator() {
locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => AppointmentRateService());
locator.registerLazySingleton(() => QrService());
+ locator.registerFactory(() => VaccineService());
+ locator.registerLazySingleton(() => ReportsMonthlyService());
locator.registerLazySingleton(() => ErService());
/// View Model
@@ -63,12 +69,14 @@ void setupLocator() {
locator.registerFactory(() => LabsViewModel());
locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => FeedbackViewModel());
+ locator.registerFactory(() => VaccineViewModel());
locator.registerFactory(() => VitalSignViewModel());
locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => MedicalViewModel());
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel());
locator.registerFactory(() => QrViewModel());
+ locator.registerFactory(() => ReportsMonthlyViewModel());
locator.registerFactory(() => NearHospitalViewModel());
}
diff --git a/lib/main.dart b/lib/main.dart
index f641f22e..0c6b2760 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -66,7 +66,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
- scaffoldBackgroundColor:Hexcolor('#E0E0E0'),// Colors.grey[100],
+ scaffoldBackgroundColor:Hexcolor('#E9E9E9'),// Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
canvasColor: Colors.white,
diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
index a935542a..9ba1fb8e 100644
--- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart
+++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
@@ -272,3 +272,13 @@ class AppoitmentAllHistoryResultList {
return data;
}
}
+
+class PatientAppointmentList {
+ String filterName = "";
+ List patientDoctorAppointmentList = List();
+
+ PatientAppointmentList(
+ {this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) {
+ patientDoctorAppointmentList.add(patientDoctorAppointment);
+ }
+}
diff --git a/lib/models/Appointments/DentalChiefComplaintsModel.dart b/lib/models/Appointments/DentalChiefComplaintsModel.dart
new file mode 100644
index 00000000..c15b828a
--- /dev/null
+++ b/lib/models/Appointments/DentalChiefComplaintsModel.dart
@@ -0,0 +1,48 @@
+class DentalChiefComplaintsModel {
+ List listDentalChiefComplain;
+
+ DentalChiefComplaintsModel({this.listDentalChiefComplain});
+
+ DentalChiefComplaintsModel.fromJson(Map json) {
+ if (json['List_DentalChiefComplain'] != null) {
+ listDentalChiefComplain = new List();
+ json['List_DentalChiefComplain'].forEach((v) {
+ listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v));
+ });
+ }
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.listDentalChiefComplain != null) {
+ data['List_DentalChiefComplain'] =
+ this.listDentalChiefComplain.map((v) => v.toJson()).toList();
+ }
+ return data;
+ }
+}
+
+class ListDentalChiefComplain {
+ int projectID;
+ int iD;
+ String name;
+ String nameN;
+
+ ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN});
+
+ ListDentalChiefComplain.fromJson(Map json) {
+ projectID = json['ProjectID'];
+ iD = json['ID'];
+ name = json['Name'];
+ nameN = json['NameN'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProjectID'] = this.projectID;
+ data['ID'] = this.iD;
+ data['Name'] = this.name;
+ data['NameN'] = this.nameN;
+ return data;
+ }
+}
diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart
index 07563a25..65d28910 100644
--- a/lib/models/Appointments/DoctorListResponse.dart
+++ b/lib/models/Appointments/DoctorListResponse.dart
@@ -41,51 +41,51 @@ class DoctorList {
DoctorList(
{this.clinicID,
- this.clinicName,
- this.doctorTitle,
- this.iD,
- this.name,
- this.projectID,
- this.projectName,
- this.actualDoctorRate,
- this.clinicRoomNo,
- this.date,
- this.dayName,
- this.doctorID,
- this.doctorImageURL,
- this.doctorProfile,
- this.doctorProfileInfo,
- this.doctorRate,
- this.gender,
- this.genderDescription,
- this.isAppointmentAllowed,
- this.isDoctorAllowVedioCall,
- this.isDoctorDummy,
- this.isLiveCare,
- this.latitude,
- this.longitude,
- this.nationalityFlagURL,
- this.nationalityID,
- this.nationalityName,
- this.nearestFreeSlot,
- this.noOfPatientsRate,
- this.originalClinicID,
- this.personRate,
- this.projectDistanceInKiloMeters,
- this.qR,
- this.qRString,
- this.rateNumber,
- this.serviceID,
- this.setupID,
- this.speciality,
- this.workingHours});
+ this.clinicName,
+ this.doctorTitle,
+ this.iD,
+ this.name,
+ this.projectID,
+ this.projectName,
+ this.actualDoctorRate,
+ this.clinicRoomNo,
+ this.date,
+ this.dayName,
+ this.doctorID,
+ this.doctorImageURL,
+ this.doctorProfile,
+ this.doctorProfileInfo,
+ this.doctorRate,
+ this.gender,
+ this.genderDescription,
+ this.isAppointmentAllowed,
+ this.isDoctorAllowVedioCall,
+ this.isDoctorDummy,
+ this.isLiveCare,
+ this.latitude,
+ this.longitude,
+ this.nationalityFlagURL,
+ this.nationalityID,
+ this.nationalityName,
+ this.nearestFreeSlot,
+ this.noOfPatientsRate,
+ this.originalClinicID,
+ this.personRate,
+ this.projectDistanceInKiloMeters,
+ this.qR,
+ this.qRString,
+ this.rateNumber,
+ this.serviceID,
+ this.setupID,
+ this.speciality,
+ this.workingHours});
DoctorList.fromJson(Map json) {
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle'];
iD = json['ID'];
- name = json['Name'];
+ name = json['DoctorName']??json['Name'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
actualDoctorRate = json['ActualDoctorRate'];
@@ -118,7 +118,8 @@ class DoctorList {
rateNumber = json['RateNumber'];
serviceID = json['ServiceID'];
setupID = json['SetupID'];
- speciality = json['Speciality'].cast();
+ if (json.containsKey('Speciality') && json['Speciality']!=null)
+ speciality = json['Speciality'].cast();
workingHours = json['WorkingHours'];
}
@@ -166,3 +167,14 @@ class DoctorList {
return data;
}
}
+
+class PatientDoctorAppointmentList {
+ String filterName = "";
+ String distanceInKMs = "";
+ List patientDoctorAppointmentList = List();
+
+ PatientDoctorAppointmentList(
+ {this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) {
+ patientDoctorAppointmentList.add(patientDoctorAppointment);
+ }
+}
diff --git a/lib/models/Appointments/SearchInfoModel.dart b/lib/models/Appointments/SearchInfoModel.dart
new file mode 100644
index 00000000..f5500bca
--- /dev/null
+++ b/lib/models/Appointments/SearchInfoModel.dart
@@ -0,0 +1,10 @@
+class SearchInfo {
+ int ProjectID;
+ int ClinicID;
+ String DoctorName;
+ String SelectedDate;
+ String SelectedTime;
+ String currentLat;
+ String currentLong;
+ DateTime date;
+}
diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart
new file mode 100644
index 00000000..9d3da450
--- /dev/null
+++ b/lib/pages/BookAppointment/DentalComplaints.dart
@@ -0,0 +1,82 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
+import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
+import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
+import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
+
+class DentalComplaints extends StatefulWidget {
+ SearchInfo searchInfo;
+
+ DentalComplaints({@required this.searchInfo});
+
+ @override
+ _DentalComplaintsState createState() => _DentalComplaintsState();
+}
+
+class _DentalComplaintsState extends State {
+ List complaintsList = [];
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+ bool isDataLoaded = false;
+ var languageID;
+
+ @override
+ void initState() {
+ WidgetsBinding.instance
+ .addPostFrameCallback((_) => getChiefComplaintsList());
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: "Symptoms",
+ body: Container(
+ margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
+ child: ListView.builder(
+ itemCount: complaintsList.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Container(
+ margin: EdgeInsets.only(bottom: 10.0),
+ child: DentalComplaintCard(
+ listDentalChiefComplain: complaintsList[index],
+ languageID: languageID,
+ ),
+ );
+ },
+ ),
+ ),
+ );
+ }
+
+ getLanguageID() async {
+ languageID = await sharedPref.getString(APP_LANGUAGE);
+ }
+
+ getChiefComplaintsList() {
+ getLanguageID();
+ ClinicListService service = new ClinicListService();
+ service
+ .getChiefComplaintsList(
+ widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ print(res['List_DentalChiefComplain']);
+ setState(() {
+ res['List_DentalChiefComplain'].forEach((v) {
+ complaintsList.add(new ListDentalChiefComplain.fromJson(v));
+ });
+ print(complaintsList.length);
+ });
+ } else {}
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
+}
diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart
index 5d74cc59..2b5fac17 100644
--- a/lib/pages/BookAppointment/SearchResults.dart
+++ b/lib/pages/BookAppointment/SearchResults.dart
@@ -8,8 +8,10 @@ import 'package:flutter/material.dart';
class SearchResults extends StatefulWidget {
List doctorsList = [];
+ List patientDoctorAppointmentListHospital;
- SearchResults({@required this.doctorsList});
+ SearchResults(
+ {@required this.doctorsList, this.patientDoctorAppointmentListHospital});
@override
_SearchResultsState createState() => _SearchResultsState();
@@ -21,23 +23,7 @@ class _SearchResultsState extends State {
@override
void initState() {
- event.controller.stream.listen((p) {
- // if (p['project_id'] != null) {
- // tempList = [];
- // widget.doctorsList.forEach((e) => {
- // if (e.projectID == int.parse(p['project_id'])) {tempList.add(e)}
- // });
- // } else if (p['doctor_id'] != null) {
- // tempList = [];
- // widget.doctorsList.forEach((e) => {
- // if (e.doctorID == int.parse(p['doctor_id'])) {tempList.add(e)}
- // });
- // DoctorView().getDoctorsProfile(context, tempList[0], isAppo: true);
- // }
- // setState(() {
- // widget.doctorsList = tempList;
- // });
- });
+ event.controller.stream.listen((p) {});
super.initState();
}
@@ -47,53 +33,32 @@ class _SearchResultsState extends State {
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
body: Container(
- margin: EdgeInsets.only(bottom: 10.0),
+ margin: EdgeInsets.all(10.0),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
- child: FractionallySizedBox(
- widthFactor: 1.0,
- child: Column(
- children: [
- ...List.generate(
- widget.doctorsList.length,
- (index) => AppExpandableNotifier(
- title: widget.doctorsList[index].projectName,
+ child: Column(
+ children: [
+ ...List.generate(
+ widget.patientDoctorAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ .patientDoctorAppointmentListHospital[index].filterName + " - " +widget
+ .patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: widget.doctorsList.map((doctorObj) {
+ children: widget
+ .patientDoctorAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
return DoctorView(
- doctor: doctorObj,
+ doctor: doctor,
);
}).toList(),
- ),
- ),
- )
- ],
- ),
+ )),
+ )
+ ],
),
-
-// ListView.builder(
-// scrollDirection: Axis.vertical,
-// shrinkWrap: true,
-// physics: ScrollPhysics(),
-// padding: EdgeInsets.all(0.0),
-// itemCount: widget.doctorsList.length,
-// itemBuilder: (context, index) {
-// return AppExpandableNotifier(
-// title: widget.doctorsList[index].projectName,
-// bodyWidget: Column(
-// crossAxisAlignment: CrossAxisAlignment.start,
-// mainAxisAlignment: MainAxisAlignment.spaceBetween,
-// children: widget.doctorsList.map((labOrder) {
-// return DoctorView(
-// doctor: widget.doctorsList[index],
-// );
-// }).toList(),
-// ),
-// );
-// },
-// ),
),
),
);
diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart
index 2188d296..6b3eff38 100644
--- a/lib/pages/BookAppointment/components/SearchByClinic.dart
+++ b/lib/pages/BookAppointment/components/SearchByClinic.dart
@@ -1,7 +1,10 @@
import "dart:collection";
+import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@@ -19,8 +22,11 @@ class SearchByClinic extends StatefulWidget {
class _SearchByClinicState extends State {
bool nearestAppo = false;
String dropdownValue;
+ String projectDropdownValue;
var event = RobotProvider();
List clinicsList = [];
+ List projectsList = [];
+ bool isMobileAppDentalAllow = false;
@override
void initState() {
@@ -76,25 +82,91 @@ class _SearchByClinicState extends State {
onChanged: (newValue) {
setState(() {
dropdownValue = newValue;
-
- getDoctorsList(context);
+ if (!isDentalSelectedAndSupported() && !nearestAppo) {
+ projectDropdownValue = "";
+ getDoctorsList(context);
+ }
});
},
),
)),
+ isDentalSelectedAndSupported() == true || nearestAppo
+ ? Container(
+ height: 60.0,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(
+ color: Colors.grey[400],
+ width: 1.0,
+ ),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ padding: EdgeInsets.all(8.0),
+ width: MediaQuery.of(context).size.width,
+ margin: EdgeInsets.only(top: 15.0),
+ child: DropdownButtonHideUnderline(
+ child: DropdownButton(
+ hint: new Text("Select Project"),
+ value: projectDropdownValue,
+ items: projectsList.map((item) {
+ return new DropdownMenuItem(
+ value: item.mainProjectID.toString(),
+ child: new Text(item.name),
+ );
+ }).toList(),
+ onChanged: (newValue) {
+ setState(() {
+ projectDropdownValue = newValue;
+ getDoctorsList(context);
+ });
+ },
+ ),
+ ))
+ : Container(),
],
),
);
}
+ bool isDentalSelectedAndSupported() {
+ return dropdownValue != "" &&
+ (dropdownValue == "17") &&
+ isMobileAppDentalAllow;
+ }
+
getClinicsList() {
ClinicListService service = new ClinicListService();
- service.getClinicsList(context).then((res) {
+ service
+ .getClinicsList(context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ setState(() {
+ isMobileAppDentalAllow = res['ISMobileAppDentalAllow'];
+ res['ListClinicCentralized'].forEach((v) {
+ clinicsList.add(new ListClinicCentralized.fromJson(v));
+ });
+ });
+ } else {}
+ })
+ .catchError((err) {
+ print(err);
+ })
+ .showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
+ .then((value) {
+ getProjectsList();
+ });
+ }
+
+ getProjectsList() {
+ ClinicListService service = new ClinicListService();
+ service.getProjectsList(context).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
- res['ListClinicCentralized'].forEach((v) {
- clinicsList.add(new ListClinicCentralized.fromJson(v));
+ res['ListProject'].forEach((v) {
+ projectsList.add(new HospitalsModel.fromJson(v));
});
+ print(projectsList.length);
});
} else {}
}).catchError((err) {
@@ -104,51 +176,66 @@ class _SearchByClinicState extends State {
}
getDoctorsList(BuildContext context) {
- List doctorsList = [];
+ SearchInfo searchInfo = new SearchInfo();
+ if (dropdownValue == "17") {
+ searchInfo.ProjectID = int.parse(projectDropdownValue);
+ searchInfo.ClinicID = int.parse(dropdownValue);
+ searchInfo.date = DateTime.now();
- List arr = [];
- List arrDistance = [];
- var distinctIds;
- List result;
- int numAll;
- DoctorsListService service = new DoctorsListService();
- service.getDoctorsList(int.parse(dropdownValue), 0, context).then((res) {
- if (res['MessageStatus'] == 1) {
- setState(() {
- if (res['DoctorList'].length != 0) {
- print(res['DoctorList']);
- doctorsList.clear();
- res['DoctorList'].forEach((v) {
- doctorsList.add(new DoctorList.fromJson(v));
+ navigateToDentalComplaints(context, searchInfo);
+ } else {
+ List doctorsList = [];
+ List arr = [];
+ List arrDistance = [];
+ List result;
+ int numAll;
+ DoctorsListService service = new DoctorsListService();
+ service
+ .getDoctorsList(
+ int.parse(dropdownValue),
+ projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
+ nearestAppo,
+ context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ setState(() {
+ if (res['DoctorList'].length != 0) {
+ print(res['DoctorList']);
+ doctorsList.clear();
+ res['DoctorList'].forEach((v) {
+ doctorsList.add(new DoctorList.fromJson(v));
- arr.add(new DoctorList.fromJson(v).projectName);
- arrDistance.add(new DoctorList.fromJson(v)
- .projectDistanceInKiloMeters
- .toString());
+ arr.add(new DoctorList.fromJson(v).projectName);
+ arrDistance.add(new DoctorList.fromJson(v)
+ .projectDistanceInKiloMeters
+ .toString());
+ });
+ } else {}
+ });
-// print(DoctorList
-// .fromJson(v)
-// .projectName);
-// print(DoctorList
-// .fromJson(v)
-// .projectDistanceInKiloMeters);
-// distinctIds = result.toSet().toList();
- });
- } else {}
- });
+ result = LinkedHashSet.from(arr).toList();
+ numAll = result.length;
- result = LinkedHashSet.from(arr).toList();
- numAll = result.length;
+ navigateToSearchResults(
+ context, doctorsList, result, numAll, arrDistance);
+ } else {
+ AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
+ }
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
+ }
- navigateToSearchResults(
- context, doctorsList, result, numAll, arrDistance);
- } else {
- AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
- }
- }).catchError((err) {
- print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ Future navigateToDentalComplaints(
+ BuildContext context, SearchInfo searchInfo) async {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => DentalComplaints(searchInfo: searchInfo),
+ ),
+ );
}
Future navigateToSearchResults(
@@ -156,14 +243,14 @@ class _SearchByClinicState extends State {
Navigator.push(
context,
MaterialPageRoute(
-// builder: (context) => SearchResults(doctorsList: docList)
builder: (context) => BranchView(
doctorsList: docList,
result: result,
num: numAll,
resultDistance: resultDistance),
),
- );
- //builder: (context) => SearchResults(doctorsList: docList)));
+ ).then((value) {
+ getProjectsList();
+ });
}
}
diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart
index 3e817878..1e7deb38 100644
--- a/lib/pages/BookAppointment/components/SearchByDoctor.dart
+++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart
@@ -84,6 +84,10 @@ class _SearchByDoctorState extends State {
getDoctorsList(BuildContext context) {
List doctorsList = [];
DoctorsListService service = new DoctorsListService();
+
+ List _patientDoctorAppointmentListHospital =
+ List();
+
service
.getDoctorsListByName(doctorNameController.text, context)
.then((res) {
@@ -93,9 +97,35 @@ class _SearchByDoctorState extends State {
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
+
+ doctorsList.forEach((element) {
+ List 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,
+ distanceInKMs: element.projectDistanceInKiloMeters.toString(),
+ patientDoctorAppointment: element));
+ }
+ });
} else {}
});
- navigateToSearchResults(context, doctorsList);
+
+ navigateToSearchResults(
+ context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@@ -107,7 +137,7 @@ class _SearchByDoctorState extends State {
_onDocTextChanged(content) {
print(content);
- if (content.length >= 4) {
+ if (content.length >= 3) {
setState(() {
_isButtonDisabled = false;
});
@@ -123,10 +153,17 @@ class _SearchByDoctorState extends State {
getDoctorsList(context);
}
- Future navigateToSearchResults(context, List docList) async {
+ Future navigateToSearchResults(
+ context,
+ List docList,
+ List
+ patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => SearchResults(doctorsList: docList)));
+ builder: (context) => SearchResults(
+ doctorsList: docList,
+ patientDoctorAppointmentListHospital:
+ patientDoctorAppointmentListHospital)));
}
}
diff --git a/lib/pages/BookAppointment/widgets/BranchView.dart b/lib/pages/BookAppointment/widgets/BranchView.dart
index 8ec0bbd5..88912a3f 100644
--- a/lib/pages/BookAppointment/widgets/BranchView.dart
+++ b/lib/pages/BookAppointment/widgets/BranchView.dart
@@ -82,13 +82,9 @@ class _ExpandableListViewState extends State {
children: [
new Text(
widget.result2[widget.val].toString() +
- " " +
- widget.resultDistance[widget.val]
- .toString() !=
- "0"
- ? getProjectDistance(
- widget.resultDistance[widget.val].toString())
- : "",
+ " " +
+ getProjectDistance(
+ widget.resultDistance[widget.val].toString()),
style: new TextStyle(
fontWeight: FontWeight.bold, color: Colors.black),
),
@@ -148,7 +144,11 @@ class _ExpandableListViewState extends State {
}
String getProjectDistance(String distance) {
- return " - " + distance + " KM";
+ if (distance != "0")
+ return " - " + distance + " " + TranslationBase.of(context).km;
+ else {
+ return "";
+ }
}
}
diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart
new file mode 100644
index 00000000..27f37d0a
--- /dev/null
+++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart
@@ -0,0 +1,135 @@
+import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
+import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
+import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
+
+// ignore: must_be_immutable
+class DentalComplaintCard extends StatefulWidget {
+ final ListDentalChiefComplain listDentalChiefComplain;
+ var languageID;
+
+ DentalComplaintCard(
+ {@required this.listDentalChiefComplain, this.languageID});
+
+ @override
+ _DentalComplaintCardState createState() => _DentalComplaintCardState();
+}
+
+class _DentalComplaintCardState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ child: InkWell(
+ onTap: () {
+ getChiefComplaintsList();
+ },
+ child: Card(
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Row(
+ children: [
+ Container(
+ width: MediaQuery.of(context).size.width * 0.85,
+ padding: EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Container(
+ child: Text(widget.listDentalChiefComplain.name,
+ style:
+ TextStyle(fontSize: 16.0, color: Colors.black)),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Icon(Icons.arrow_forward_ios,
+ size: 20.0, color: Colors.black54),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+ getChiefComplaintsList() {
+ List doctorsList = [];
+ List _patientDoctorAppointmentListHospital =
+ List();
+
+ ClinicListService service = new ClinicListService();
+ service
+ .getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
+ widget.listDentalChiefComplain.projectID, context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ print(res['List_DentalDoctorChiefComplaintMapping']);
+ setState(() {
+ doctorsList.clear();
+ res['List_DentalDoctorChiefComplaintMapping'].forEach((v) {
+ doctorsList.add(new DoctorList.fromJson(v));
+ });
+
+ doctorsList.forEach((element) {
+ List 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,
+ distanceInKMs:
+ element.projectDistanceInKiloMeters.toString(),
+ patientDoctorAppointment: element));
+ }
+ });
+ navigateToSearchResults(
+ context, doctorsList, _patientDoctorAppointmentListHospital);
+ });
+ } else {
+ AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
+ }
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
+
+ Future navigateToSearchResults(
+ context,
+ List docList,
+ List
+ patientDoctorAppointmentListHospital) async {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => SearchResults(
+ doctorsList: docList,
+ patientDoctorAppointmentListHospital:
+ patientDoctorAppointmentListHospital)));
+ }
+}
diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart
index e8f08af5..d3150459 100644
--- a/lib/pages/BookAppointment/widgets/DoctorView.dart
+++ b/lib/pages/BookAppointment/widgets/DoctorView.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -9,7 +10,7 @@ import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.dart';
class DoctorView extends StatelessWidget {
- DoctorList doctor;
+ final DoctorList doctor;
DoctorView({@required this.doctor});
@@ -33,69 +34,87 @@ class DoctorView extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
- ClipRRect(
- borderRadius: BorderRadius.circular(100.0),
- child: Image.network(this.doctor.doctorImageURL,
- fit: BoxFit.fill, height: 60.0, width: 60.0),
+ Expanded(
+ flex: 1,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(100.0),
+ child: Image.network(this.doctor.doctorImageURL,
+ fit: BoxFit.fill, height: 60.0, width: 60.0),
+ ),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.5,
- margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(this.doctor.doctorTitle + " " + this.doctor.name,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.grey[700],
- letterSpacing: 1.0)),
- Container(
- margin: EdgeInsets.only(top: 3.0),
- child: Text(this.doctor.clinicName,
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
- letterSpacing: 1.0)),
- ),
- Container(
- margin: EdgeInsets.only(top: 3.0),
- child: Text(this.doctor.projectName,
+ Expanded(
+ flex: 4,
+ child: Container(
+ width: MediaQuery.of(context).size.width * 0.55,
+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if(doctor.doctorTitle!=null)
+ Text(this.doctor.doctorTitle + " " + this.doctor.name,
style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
+ fontSize: 14.0,
+ color: Colors.grey[700],
letterSpacing: 1.0)),
- ),
- Container(
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(this.doctor.clinicName,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(this.doctor.projectName,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ if(doctor.speciality!=null)
+ Container(
+ margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
+ child: Text(
+ getDoctorSpeciality(this.doctor.speciality).trim(),
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ this.doctor.nearestFreeSlot != null ? Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(
- getDoctorSpeciality(this.doctor.speciality).trim(),
+ getDate(this.doctor.nearestFreeSlot),
style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
+ fontSize: 14.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.green[600],
letterSpacing: 1.0)),
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- mainAxisSize: MainAxisSize.max,
- children: [
- RatingBar.readOnly(
- initialRating:
- this.doctor.actualDoctorRate.toDouble(),
- size: 20.0,
- filledColor: Colors.yellow[700],
- emptyColor: Colors.grey[500],
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star,
- ),
- Container(
- child: Image.network(this.doctor.nationalityFlagURL,
- width: 25.0, height: 25.0),
- ),
- ],
- ),
- ],
+ ) : Container(),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ RatingBar.readOnly(
+ initialRating:
+ this.doctor.actualDoctorRate.toDouble(),
+ size: 20.0,
+ filledColor: Colors.yellow[700],
+ emptyColor: Colors.grey[500],
+ isHalfAllowed: true,
+ halfFilledIcon: Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star,
+ ),
+ Container(
+ child: Image.network(this.doctor.nationalityFlagURL,
+ width: 25.0, height: 25.0),
+ ),
+ ],
+ ),
+ ],
+ ),
),
),
],
@@ -136,6 +155,29 @@ class DoctorView extends StatelessWidget {
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
+ String getDate(String date) {
+ DateTime dateObj = DateUtil.convertStringToDate(date);
+ return DateUtil.getWeekDay(dateObj.weekday) +
+ ", " +
+ dateObj.day.toString() +
+ " " +
+ DateUtil.getMonth(dateObj.month) +
+ " " +
+ dateObj.year.toString() +
+ " " +
+ dateObj.hour.toString() +
+ ":" +
+ getMinute(dateObj);
+ }
+
+ String getMinute(DateTime dateObj) {
+ if(dateObj.minute == 0) {
+ return dateObj.minute.toString() + "0";
+ } else {
+ return dateObj.minute.toString();
+ }
+ }
+
Future navigateToDoctorProfile(context, docObject, docProfile,
{isAppo}) async {
Navigator.push(
diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart
index 63034373..dc6fc65c 100644
--- a/lib/pages/MyAppointments/MyAppointments.dart
+++ b/lib/pages/MyAppointments/MyAppointments.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCar
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -15,6 +16,11 @@ class MyAppointments extends StatefulWidget {
List confirmedAppoList = [];
List arrivedAppoList = [];
+ List _patientBookedAppointmentListHospital = List();
+ List _patientConfirmedAppointmentListHospital =
+ List();
+ List _patientArrivedAppointmentListHospital = List();
+
@override
_MyAppointmentsState createState() => _MyAppointmentsState();
}
@@ -36,11 +42,10 @@ class _MyAppointmentsState extends State
@override
Widget build(BuildContext context) {
return AppScaffold(
- appBarTitle: "My Appointments",
+ appBarTitle: TranslationBase.of(context).myAppointments,
isShowAppBar: true,
body: Container(
child: Column(children: [
- /// this is will not colored with theme data
TabBar(
tabs: [
Tab(text: TranslationBase.of(context).booked),
@@ -94,7 +99,10 @@ class _MyAppointmentsState extends State
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ AppToast.showErrorToast(message: err);
+ Navigator.of(context).pop();
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@@ -123,15 +131,85 @@ class _MyAppointmentsState extends State
widget.arrivedAppoList.add(v);
}
});
+
+ widget.bookedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientBookedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientBookedAppointmentListHospital[widget
+ ._patientBookedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientBookedAppointmentListHospital.add(PatientAppointmentList(
+ filterName: element.clinicName, patientDoctorAppointment: element));
+ }
+ });
+
+ widget.confirmedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientConfirmedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientConfirmedAppointmentListHospital[widget
+ ._patientConfirmedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientConfirmedAppointmentListHospital.add(
+ PatientAppointmentList(
+ filterName: element.clinicName,
+ patientDoctorAppointment: element));
+ }
+ });
+
+ widget.arrivedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientArrivedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientArrivedAppointmentListHospital[widget
+ ._patientArrivedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientArrivedAppointmentListHospital.add(
+ PatientAppointmentList(
+ filterName: element.clinicName,
+ patientDoctorAppointment: element));
+ }
+ });
}
openAppointmentsTab() {
- if (widget.bookedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 1);
- } else if (widget.confirmedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 2);
- } else if (widget.arrivedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 3);
+ if (widget._patientBookedAppointmentListHospital.length != 0) {
+ _tabController.index = 0;
+ } else if (widget._patientConfirmedAppointmentListHospital.length != 0) {
+ _tabController.index = 1;
+ } else if (widget._patientArrivedAppointmentListHospital.length != 0) {
+ _tabController.index = 2;
return;
}
}
@@ -158,29 +236,100 @@ class _MyAppointmentsState extends State
"assets/images/new-design/noAppointmentIcon.png"),
Container(
margin: EdgeInsets.only(top: 10.0),
- child: Text("No Booked Appointments",
+ child: Text(TranslationBase.of(context).noBookedAppointments,
style: TextStyle(
fontSize: 16.0,
)),
),
+ Container(
+ margin: EdgeInsets.only(top: 10.0),
+ child: Container(
+ child: widget.bookedAppoList.length != 0
+ ? SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientBookedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientBookedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientBookedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
+ )
+ : Container(
+ child: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Image.asset(
+ "assets/images/new-design/noAppointmentIcon.png"),
+ Container(
+ margin: EdgeInsets.only(top: 10.0),
+ child: Text("No Booked Appointments",
+ style: TextStyle(
+ fontSize: 16.0,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ )
],
- ),
- ),
- ),
- );
+
+ ))));
}
Widget getConfirmedAppointments() {
return widget.confirmedAppoList.length != 0
? Container(
- child: new ListView.builder(
- itemCount: widget.confirmedAppoList.length,
- itemBuilder: (context, i) {
- return AppointmentCard(
- appo: widget.confirmedAppoList[i],
- onReloadAppointmentHistory: getPatientAppointmentHistory,
- );
- },
+ margin: EdgeInsets.only(top: 10.0),
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientConfirmedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientConfirmedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientConfirmedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
),
)
: Container(
@@ -192,7 +341,7 @@ class _MyAppointmentsState extends State
Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container(
margin: EdgeInsets.only(top: 10.0),
- child: Text("No Confirmed Appointments",
+ child: Text(TranslationBase.of(context).noConfirmedAppointments ,
style: TextStyle(
fontSize: 16.0,
)),
@@ -206,14 +355,34 @@ class _MyAppointmentsState extends State
Widget getArrivedAppointments() {
return widget.arrivedAppoList.length != 0
? Container(
- child: new ListView.builder(
- itemCount: widget.arrivedAppoList.length,
- itemBuilder: (context, i) {
- return AppointmentCard(
- appo: widget.arrivedAppoList[i],
- onReloadAppointmentHistory: getPatientAppointmentHistory,
- );
- },
+ margin: EdgeInsets.only(top: 10.0),
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientArrivedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientArrivedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientArrivedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
),
)
: Container(
@@ -225,7 +394,7 @@ class _MyAppointmentsState extends State
Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container(
margin: EdgeInsets.only(top: 10.0),
- child: Text("No Arrived Appointments",
+ child: Text(TranslationBase.of(context).noArrivedAppointments,
style: TextStyle(
fontSize: 16.0,
)),
diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart
index 4a288730..a89253c6 100644
--- a/lib/pages/MyAppointments/models/ArrivedButtons.dart
+++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart
@@ -25,7 +25,7 @@ class ArrivedButtons {
"title": "Lab",
"subtitle": "Result",
"icon": "assets/images/new-design/lab_result_icon.png",
- "caller": "addReminder"
+ "caller": "labResult"
},
{
"title": "Vital Signs",
diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
index a876160f..19e82086 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
@@ -12,17 +12,18 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButton
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
+import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget {
@@ -189,6 +190,10 @@ class _AppointmentActionsState extends State {
case "VitalSigns":
navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
break;
+
+ case "insertComplaint":
+ navigateToInsertComplaint();
+ break;
}
}
@@ -357,7 +362,8 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
openAppointmentRadiology() {
@@ -374,7 +380,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
openPrescriptionReport() {
@@ -394,7 +401,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
Future navigateToMedicinePrescriptionReport(
@@ -460,7 +468,10 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ AppToast.showErrorToast(
+ message: err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
getCallRequestType() {
@@ -475,7 +486,8 @@ class _AppointmentActionsState extends State {
});
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
showAskDocRequestDialog(List requestData) {
@@ -520,7 +532,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
confirmAppointment() {
@@ -537,7 +550,8 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
navigateToInsuranceApprovals(int appoNo) {
@@ -547,7 +561,14 @@ class _AppointmentActionsState extends State {
navigateToVitalSigns(int appoNo, int projectID) {
Navigator.push(
- context, FadePage(page: VitalSignDetailsScreen(appointmentNo: appoNo, projectID: projectID)));
+ context,
+ FadePage(
+ page: VitalSignDetailsScreen(
+ appointmentNo: appoNo, projectID: projectID)));
+ }
+
+ navigateToInsertComplaint() {
+ Navigator.push(context, FadePage(page: FeedbackHomePage()));
}
rateAppointment() {
diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
index e2f6f706..b64bd232 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
@@ -42,7 +42,7 @@ class _ApointmentCardState extends State {
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
Container(
- width: MediaQuery.of(context).size.width * 0.6,
+ width: MediaQuery.of(context).size.width * 0.57,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -95,7 +95,7 @@ class _ApointmentCardState extends State {
emptyIcon: Icons.star,
),
Container(
- transform: Matrix4.translationValues(0.0, -40.0, 0.0),
+ transform: Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset(
"assets/images/new-design/arrow.png",
width: 25.0,
diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart
index 9cc40692..038468e0 100644
--- a/lib/pages/insurance/insurance_approval_screen.dart
+++ b/lib/pages/insurance/insurance_approval_screen.dart
@@ -80,7 +80,7 @@ class _InsuranceApprovalState extends State {
children: [
ExpansionTile(
title: Container(
- height: 120.0,
+ //height: 120.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart
index 70d164ff..6483b6b2 100644
--- a/lib/pages/insurance/insurance_card_screen.dart
+++ b/lib/pages/insurance/insurance_card_screen.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
@@ -39,95 +40,117 @@ class _InsuranceCardState extends State {
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
backgroundColor: Colors.white,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- ExpansionTile(
- title: Container(
- height: 65.0,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: EdgeInsets.symmetric(vertical: 15.0),
- child: Texts(
- model.insurance[index].groupName,
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ExpansionTile(
+ title: Container(
+ height: 65.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 15.0),
+ child: Texts(
+ model.insurance[index].groupName,
+ ),
),
- ),
- ],
- ),
- ),
- children: [
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 0.5,
- ),
- Texts(
- TranslationBase.of(context).companyName +
- model.insurance[index].companyName,
- fontSize: 20.0,
- ),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 0.5,
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- Text(
- TranslationBase.of(context).category +
- model.insurance[index].subCategoryDesc,
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).expirationDate +
- convertDateFormat(
- model.insurance[index].cardValidTo),
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).patientCard +
- model.insurance[index].patientCardID,
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).policyNumber +
- model
- .insurance[index].insurancePolicyNumber,
- style: TextStyle(fontSize: 18.5),
- ),
- ],
- ),
- Column(
- children: [
- model.insurance[index].isActive == true
- ? Text('Active',
- style: TextStyle(
- color: Colors.green,
- fontWeight: FontWeight.w900,
- fontSize: 17.9))
- : Text('Not Active',
- style: TextStyle(
- color: Colors.red,
- fontWeight: FontWeight.w900,
- fontSize: 17.9))
- ],
- ),
- SizedBox(
- height: 14.5,
+ ],
+ ),
),
- if (model.insurance[index].isActive == true)
+ children: [
Container(
- child: Button(
- label: TranslationBase.of(context).seeDetails,
+ padding: EdgeInsets.all(14),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ shape: BoxShape.rectangle,
+ border: Border.all(color: Colors.grey,width: 0.2),
+ borderRadius: BorderRadius.all(Radius.circular(2)),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.white70,
+ ),
+
+ ]
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context).companyName +
+ model.insurance[index].companyName,
+ fontSize: 20.0,
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 0.5,
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Text(
+ TranslationBase.of(context).category +
+ model.insurance[index].subCategoryDesc,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).expirationDate +
+ convertDateFormat(
+ model.insurance[index].cardValidTo),
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).patientCard +
+ model.insurance[index].patientCardID,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).policyNumber +
+ model
+ .insurance[index].insurancePolicyNumber,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ model.insurance[index].isActive == true
+ ? Text('Active',
+ style: TextStyle(
+ color: Colors.green,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ : Text('Not Active',
+ style: TextStyle(
+ color: Colors.red,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ ],
+ ),
+ SizedBox(
+ height: 14.5,
+ ),
+ if (model.insurance[index].isActive == true)
+ Container(
+ color: Colors.transparent,
+ child: SecondaryButton(
+ label: TranslationBase.of(context).seeDetails,
+ textColor: Colors.white,
+ ),
+ width: double.infinity,
+ ),
+ ],
),
- width: 400.0,
),
- ],
- ),
- ],
+
+
+ ],
+ ),
+ ],
+ ),
),
);
}),
diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart
index 9cfa41a9..2fa291df 100644
--- a/lib/pages/insurance/insurance_update_screen.dart
+++ b/lib/pages/insurance/insurance_update_screen.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
@@ -97,9 +98,12 @@ class _InsuranceUpdateState extends State
children: [
Container(
child: ListView.builder(
- itemCount: model.insuranceUpdate == null
+ itemCount: model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList ==
+ null
? 0
- : model.insuranceUpdate.length,
+ : model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(10.0),
@@ -112,81 +116,63 @@ class _InsuranceUpdateState extends State
child: Container(
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
- child: Column(
+ child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
- Flex(
- direction: Axis.horizontal,
- children: [
- Expanded(
- flex: 3,
- child: Container(
- margin: EdgeInsets.only(
- top: 2.0,
- left: 10.0,
- right: 20.0),
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- Text("TAMER FANASHEH ",
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- Text(
- 'File No.' +
- model
- .insuranceUpdate[
- index]
- .patientID
- .toString(),
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- Text(
- model.insuranceUpdate[index]
- .createdOn,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- ],
- ),
- ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0, left: 10.0, right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index].patientName,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ 'File No.' +
+ model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index].patientID.toString(),
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ letterSpacing: 1.0)),
+ ],
),
- Expanded(
- flex: 1,
- child: Container(
-// height: MediaQuery.of(context).size.height * 0.12,
- margin: EdgeInsets.only(top: 20.0),
- child: Column(
- children: [
- Container(
- child: Button(
- label: 'Fetch',
- ),
- height: SizeConfig
- .heightMultiplier *
- 3.8,
- width:
- SizeConfig.screenWidth *
- 4.2,
- ),
- ],
- ),
- ),
- )
- ],
+ ),
),
+ Expanded(
+ flex: 2,
+ child: Container(
+ // height: MediaQuery.of(context).size.height * 0.12,
+ margin: EdgeInsets.only(top: 2.0),
+ child: Column(
+ children: [
+ Container(
+ child: SecondaryButton(
+ label: 'Update',
+ small: true,
+ textColor: Colors.white,
+ // color: Colors.grey,
+ ),
+ //height: 45,
+ // width:90
+ ),
+ ],
+ ),
+ ),
+ )
],
),
),
diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart
index de1670e6..da9d9348 100644
--- a/lib/pages/landing/home_page.dart
+++ b/lib/pages/landing/home_page.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
@@ -155,8 +156,8 @@ class _HomePageState extends State {
),
Align(
alignment: projectViewModel.isArabic
- ? Alignment.bottomLeft
- : Alignment.bottomRight,
+ ? Alignment.bottomRight
+ : Alignment.bottomLeft,
child: InkWell(
onTap: () {
widget.goToMyProfile();
@@ -369,13 +370,13 @@ class _HomePageState extends State {
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
- fontSize: SizeConfig.textMultiplier * 2.0,
+ fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
),
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
@@ -404,7 +405,7 @@ class _HomePageState extends State {
),
),
),
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
DashboardItem(
@@ -432,7 +433,7 @@ class _HomePageState extends State {
),
),
),
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png',
),
@@ -473,7 +474,7 @@ class _HomePageState extends State {
),
),
),
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
@@ -506,7 +507,7 @@ class _HomePageState extends State {
),
),
width: MediaQuery.of(context).size.width * 0.29,
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
@@ -541,7 +542,7 @@ class _HomePageState extends State {
),
),
),
- height: MediaQuery.of(context).size.width*0.4,
+ height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
@@ -597,6 +598,10 @@ class _HomePageState extends State {
context, FadePage(page: AllHabibMedicalService())),
),
DashboardItem(
+ onTap: (){
+ Navigator.push(context, FadePage(page: FeedbackHomePage()));
+
+ },
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index 7f1316ed..d892be83 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -130,119 +130,119 @@ class _LandingPageState extends State with WidgetsBindingObserver {
//_firebase Background message handler
_firebaseMessaging.configure(
- onMessage: (Map message) async {
- showDialog("onMessage: $message");
- print("onMessage: $message");
- print(message);
- print(message['name']);
- print(message['appointmentdate']);
-
- if (Platform.isIOS) {
- if (message['is_call'] == "true") {
- var route = ModalRoute.of(context);
-
- if (route != null) {
- print(route.settings.name);
- }
-
- Map myMap = new Map.from(message);
- print(myMap);
- LandingPage.isOpenCallPage = true;
- LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
- if (!isPageNavigated) {
- isPageNavigated = true;
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => IncomingCall(
- incomingCallData: LandingPage.incomingCallData)))
- .then((value) {
- isPageNavigated = false;
- });
- }
- } else {
- print("Is Call Not Found iOS");
- }
- } else {
- print("Is Call Not Found iOS");
- }
-
- if (Platform.isAndroid) {
- if (message['data'].containsKey("is_call")) {
- var route = ModalRoute.of(context);
-
- if (route != null) {
- print(route.settings.name);
- }
-
- Map myMap =
- new Map.from(message['data']);
- print(myMap);
- LandingPage.isOpenCallPage = true;
- LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
- if (!isPageNavigated) {
- isPageNavigated = true;
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => IncomingCall(
- incomingCallData: LandingPage.incomingCallData)))
- .then((value) {
- isPageNavigated = false;
- });
- }
- } else {
- print("Is Call Not Found Android");
- }
- } else {
- print("Is Call Not Found Android");
- }
- },
- onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
- onLaunch: (Map message) async {
- print("onLaunch: $message");
- showDialog("onLaunch: $message");
- },
- onResume: (Map message) async {
- print("onResume: $message");
- print(message);
- print(message['name']);
- print(message['appointmentdate']);
-
- showDialog("onResume: $message");
-
- if (Platform.isIOS) {
- if (message['is_call'] == "true") {
- var route = ModalRoute.of(context);
-
- if (route != null) {
- print(route.settings.name);
- }
-
- Map myMap =
- new Map.from(message);
- print(myMap);
- LandingPage.isOpenCallPage = true;
- LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
- if (!isPageNavigated) {
- isPageNavigated = true;
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => IncomingCall(
- incomingCallData: LandingPage.incomingCallData)))
- .then((value) {
- isPageNavigated = false;
- });
- }
- } else {
- print("Is Call Not Found iOS");
- }
- } else {
- print("Is Call Not Found iOS");
- }
- },
- );
+ // onMessage: (Map message) async {
+ // showDialog("onMessage: $message");
+ // print("onMessage: $message");
+ // print(message);
+ // print(message['name']);
+ // print(message['appointmentdate']);
+ //
+ // if (Platform.isIOS) {
+ // if (message['is_call'] == "true") {
+ // var route = ModalRoute.of(context);
+ //
+ // if (route != null) {
+ // print(route.settings.name);
+ // }
+ //
+ // Map myMap = new Map.from(message);
+ // print(myMap);
+ // LandingPage.isOpenCallPage = true;
+ // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
+ // if (!isPageNavigated) {
+ // isPageNavigated = true;
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) => IncomingCall(
+ // incomingCallData: LandingPage.incomingCallData)))
+ // .then((value) {
+ // isPageNavigated = false;
+ // });
+ // }
+ // } else {
+ // print("Is Call Not Found iOS");
+ // }
+ // } else {
+ // print("Is Call Not Found iOS");
+ // }
+ //
+ // if (Platform.isAndroid) {
+ // if (message['data'].containsKey("is_call")) {
+ // var route = ModalRoute.of(context);
+ //
+ // if (route != null) {
+ // print(route.settings.name);
+ // }
+ //
+ // Map myMap =
+ // new Map.from(message['data']);
+ // print(myMap);
+ // LandingPage.isOpenCallPage = true;
+ // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
+ // if (!isPageNavigated) {
+ // isPageNavigated = true;
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) => IncomingCall(
+ // incomingCallData: LandingPage.incomingCallData)))
+ // .then((value) {
+ // isPageNavigated = false;
+ // });
+ // }
+ // } else {
+ // print("Is Call Not Found Android");
+ // }
+ // } else {
+ // print("Is Call Not Found Android");
+ // }
+ // },
+ // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
+ // onLaunch: (Map message) async {
+ // print("onLaunch: $message");
+ // showDialog("onLaunch: $message");
+ // },
+ // onResume: (Map message) async {
+ // print("onResume: $message");
+ // print(message);
+ // print(message['name']);
+ // print(message['appointmentdate']);
+ //
+ // showDialog("onResume: $message");
+ //
+ // if (Platform.isIOS) {
+ // if (message['is_call'] == "true") {
+ // var route = ModalRoute.of(context);
+ //
+ // if (route != null) {
+ // print(route.settings.name);
+ // }
+ //
+ // Map myMap =
+ // new Map.from(message);
+ // print(myMap);
+ // LandingPage.isOpenCallPage = true;
+ // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
+ // if (!isPageNavigated) {
+ // isPageNavigated = true;
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) => IncomingCall(
+ // incomingCallData: LandingPage.incomingCallData)))
+ // .then((value) {
+ // isPageNavigated = false;
+ // });
+ // }
+ // } else {
+ // print("Is Call Not Found iOS");
+ // }
+ // } else {
+ // print("Is Call Not Found iOS");
+ // }
+ // },
+ );
}
showDialog(String message) {
@@ -298,16 +298,21 @@ class _LandingPageState extends State with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
- HomePage(goToMyProfile: (){
- _changeCurrentTab(1);
- },),
+ HomePage(
+ goToMyProfile: () {
+ _changeCurrentTab(1);
+ },
+ ),
MedicalProfilePage(),
MyAdmissionsPage(),
ToDo(),
BookingOptions()
], // Please do not remove the BookingOptions from this array
),
- bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab,index: currentTab,),
+ bottomNavigationBar: BottomNavBar(
+ changeIndex: _changeCurrentTab,
+ index: currentTab,
+ ),
);
}
@@ -316,7 +321,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
case 0:
return TranslationBase.of(context).home;
case 1:
- return 'Medical Profile';
+ return TranslationBase.of(context).medicalProfile;
case 2:
return TranslationBase.of(context).mySchedule;
case 3:
diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart
index 4cce1dc8..7a01ef90 100644
--- a/lib/pages/medical/doctor/doctor_home_page.dart
+++ b/lib/pages/medical/doctor/doctor_home_page.dart
@@ -1,7 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
+import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@@ -34,7 +37,7 @@ class DoctorHomePage extends StatelessWidget {
child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile(
- title: const Text('Clinic'),
+ title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
@@ -51,7 +54,7 @@ class DoctorHomePage extends StatelessWidget {
child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile(
- title: const Text('Hospital'),
+ title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
@@ -75,16 +78,42 @@ class DoctorHomePage extends StatelessWidget {
children: model.patientDoctorAppointmentList[index]
.patientDoctorAppointmentList
.map((doctor) {
- return InkWell(
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: DoctorProfilePage(
- patientDoctorAppointment: doctor,
- ),
- ),
- );
+ DoctorList doctorList = DoctorList(
+ projectID: doctor.projectID,
+ setupID: doctor.setupID,
+ clinicID: doctor.clinicID,
+ projectName: doctor.projectName,
+ clinicName: doctor.clinicName,
+ actualDoctorRate: doctor.actualDoctorRate,
+ doctorID: doctor.doctorID,
+ doctorRate: doctor.doctorRate,
+ gender: doctor.gender,
+ doctorTitle: doctor.doctorTitle,
+ name: doctor.name,
+ doctorImageURL: doctor.doctorImageURL,
+ nationalityFlagURL: doctor.nationalityFlagURL);
+ return DoctorView(
+ doctor: doctorList,
+ );
+ /* InkWell(
+ onTap: () async {
+ model
+ .getDoctorProfileAndRating(
+ doctorId: doctor.doctorID,
+ clinicID: doctor.clinicID,
+ projectID: doctor.projectID)
+ .then((value) {
+ var asd="";
+ Navigator.push(
+ context,
+ FadePage(
+ page: DoctorView(doctor: model.doctorList,),
+ ),
+ );
+ }).catchError((e){
+ var asd="";
+
+ });
},
child: DoctorCard(
name: doctor.doctorName,
@@ -93,7 +122,8 @@ class DoctorHomePage extends StatelessWidget {
subName: DateUtil.getMonthDayYearDateFormatted(
doctor.appointmentDate),
),
- );
+ )*/
+ ;
}).toList(),
)),
)
diff --git a/lib/pages/medical/doctor/doctor_profile_page.dart b/lib/pages/medical/doctor/doctor_profile_page.dart
index 2b19ba3d..7588205c 100644
--- a/lib/pages/medical/doctor/doctor_profile_page.dart
+++ b/lib/pages/medical/doctor/doctor_profile_page.dart
@@ -1,5 +1,7 @@
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/BookAppointment/components/DocAvailableAppointments.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.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';
@@ -35,149 +37,147 @@ class _DoctorProfilePageState extends State
@override
Widget build(BuildContext context) {
return BaseView(
- 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(
+ /* onModelReady: (model) => model.getDoctorProfileAndRating(
+ doctorId: widget.patientDoctorAppointment.doctorID,
+ clinicID: widget.patientDoctorAppointment.clinicID,
+ projectID: widget.patientDoctorAppointment.projectID),*/
+ builder: (context, model, widget) => DoctorView(doctor: model.doctorList,)/*AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: 'Doctor Profile',
+ baseViewModel: model,
+ body: SingleChildScrollView(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
- color: Colors.white,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ margin: EdgeInsets.only(top: 20.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
- margin: EdgeInsets.only(top: 20.0),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- 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,
- )),
- ],
- ),
+ 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.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,
- ),
+ 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(),
+// DocAvailableAppointments(doctor: model.doctorList,)
],
+ controller: _tabController,
),
),
],
),
),
- ));
+ ],
+ ),
+ ),
+ )*/,
+ );
}
}
diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart
index 216b8adb..01cb6725 100644
--- a/lib/pages/medical/labs/laboratory_result_page.dart
+++ b/lib/pages/medical/labs/laboratory_result_page.dart
@@ -27,8 +27,10 @@ class LaboratoryResultPage extends StatelessWidget {
body: ListView.builder(
itemBuilder: (context, index) => LaboratoryResultWidget(
onTap: () => model.sendLabReportEmail(patientLabOrder: patientLabOrders),
- billNo: model.patientLabSpecialResult[index].invoiceNo,
+ billNo: patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML,
+ orderNo: patientLabOrders.orderNo,
+ patientLabOrder: patientLabOrders,
),
itemCount: model.patientLabSpecialResult.length,
),
diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart
index 00cd82a1..325d5dcd 100644
--- a/lib/pages/medical/labs/labs_home_page.dart
+++ b/lib/pages/medical/labs/labs_home_page.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@@ -19,7 +20,7 @@ class LabsHomePage extends StatelessWidget {
builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
- appBarTitle: 'Lab Orders',
+ appBarTitle: TranslationBase.of(context).labOrders,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
@@ -34,7 +35,7 @@ class LabsHomePage extends StatelessWidget {
child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile(
- title: const Text('Clinic'),
+ title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
@@ -51,7 +52,7 @@ class LabsHomePage extends StatelessWidget {
child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile(
- title: const Text('Hospital'),
+ title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
@@ -85,7 +86,7 @@ class LabsHomePage extends StatelessWidget {
),
name: labOrder.doctorName,
profileUrl: labOrder.doctorImageURL,
- subName: 'Bill No : ${labOrder.invoiceNo}',
+ subName: TranslationBase.of(context).billNo+' ${labOrder.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted(
labOrder.orderDate),
);
diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart
index 87486ce5..e78e18a9 100644
--- a/lib/pages/medical/medical_profile_page.dart
+++ b/lib/pages/medical/medical_profile_page.dart
@@ -2,12 +2,16 @@ import 'dart:math';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart';
+import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@@ -17,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
+import 'package:provider/provider.dart';
import '../../locator.dart';
import 'doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@@ -31,6 +36,7 @@ class MedicalProfilePage extends StatefulWidget {
class _MedicalProfilePageState extends State {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold(
@@ -48,11 +54,9 @@ class _MedicalProfilePageState extends State {
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
- image: ExactAssetImage(
- 'assets/images/timeline_bg.png'),
- fit: BoxFit.cover
- ),
-
+ image: ExactAssetImage(
+ 'assets/images/timeline_bg.png'),
+ fit: BoxFit.cover),
),
child: Stack(
children: [
@@ -70,13 +74,13 @@ class _MedicalProfilePageState extends State {
itemCount:
model.appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal,
- reverse: true,
+ reverse: !projectViewModel.isArabic,
),
],
),
),
Padding(
- padding: EdgeInsets.symmetric(vertical: 12.0),
+ padding: EdgeInsets.symmetric(vertical: 5.0),
child: Column(
children: [
Container(
@@ -89,13 +93,19 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () {
- Navigator.push(context,
- FadePage(page: MyAppointments()));
+ Navigator.push(
+ context,
+ FadePage(
+ page: MyAppointments(),
+ ),
+ );
},
child: MedicalProfileItem(
- title: 'My Appointments',
+ title: TranslationBase.of(context)
+ .myAppointments,
imagePath: 'my_appointment_icon.png',
- subTitle: 'List',
+ subTitle: TranslationBase.of(context)
+ .myAppointmentsList,
),
),
),
@@ -103,11 +113,12 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
- FadePage(page: RadiologyHomePage())),
+ FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
- title: 'Radiology',
- imagePath: 'radiology_icon.png',
- subTitle: 'Service',
+ title: TranslationBase.of(context).lab,
+ imagePath: 'lab_result_icon.png',
+ subTitle:
+ TranslationBase.of(context).lab,
),
),
),
@@ -115,11 +126,13 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
- FadePage(page: LabsHomePage())),
+ FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
- title: 'Lab',
- imagePath: 'lab_result_icon.png',
- subTitle: 'Result',
+ title: TranslationBase.of(context)
+ .radiology,
+ imagePath: 'radiology_icon.png',
+ subTitle: TranslationBase.of(context)
+ .radiologySubtitle,
),
),
),
@@ -132,14 +145,18 @@ class _MedicalProfilePageState extends State {
child: InkWell(
onTap: () {
Navigator.push(
- context,
- FadePage(
- page: HomePrescriptionsPage()));
+ context,
+ FadePage(
+ page: HomePrescriptionsPage(),
+ ),
+ );
},
child: MedicalProfileItem(
- title: 'Medicines',
+ title: TranslationBase.of(context)
+ .medicines,
imagePath: 'prescription_icon.png',
- subTitle: 'Prescriptions',
+ subTitle: TranslationBase.of(context)
+ .medicinesSubtitle,
),
),
),
@@ -147,13 +164,17 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
- context,
- FadePage(
- page: VitalSignDetailsScreen())),
+ context,
+ FadePage(
+ page: VitalSignDetailsScreen(),
+ ),
+ ),
child: MedicalProfileItem(
- title: 'Vital Signs',
+ title: TranslationBase.of(context)
+ .vitalSigns,
imagePath: 'medical_history_icon.png',
- subTitle: 'Reports',
+ subTitle: TranslationBase.of(context)
+ .vitalSignsSubtitle,
),
),
),
@@ -163,9 +184,11 @@ class _MedicalProfilePageState extends State {
// onTap: () => Navigator.push(
// context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
- title: 'My Medicines ',
+ title: TranslationBase.of(context)
+ .myMedical,
imagePath: 'radiology_icon.png',
- subTitle: 'Service',
+ subTitle: TranslationBase.of(context)
+ .myMedicalSubtitle,
),
),
),
@@ -177,13 +200,19 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () {
- Navigator.push(context,
- FadePage(page: DoctorHomePage()));
+ Navigator.push(
+ context,
+ FadePage(
+ page: DoctorHomePage(),
+ ),
+ );
},
child: MedicalProfileItem(
- title: 'My Doctor',
+ title: TranslationBase.of(context)
+ .myDoctor,
imagePath: 'doctor_icon.png',
- subTitle: 'List',
+ subTitle: TranslationBase.of(context)
+ .myDoctorSubtitle,
),
),
),
@@ -196,10 +225,11 @@ class _MedicalProfilePageState extends State {
// FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
- title: 'Eye',
+ title: TranslationBase.of(context).eye,
imagePath:
'insurance_approvals_icon.png',
- subTitle: 'Measurement',
+ subTitle: TranslationBase.of(context)
+ .eyeSubtitle,
),
),
),
@@ -211,9 +241,11 @@ class _MedicalProfilePageState extends State {
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
- title: 'Insurance',
+ title: TranslationBase.of(context)
+ .insurance,
imagePath: 'insurance_card_icon.png',
- subTitle: 'Card',
+ subTitle: TranslationBase.of(context)
+ .insuranceSubtitle,
),
),
),
@@ -223,38 +255,43 @@ class _MedicalProfilePageState extends State {
Expanded(
flex: 1,
child: InkWell(
- //TODO
-// onTap: () {
-// Navigator.push(
-// context, FadePage(page: DoctorHomePage()));
-// },
+ onTap: () {
+ Navigator.push(context,
+ FadePage(page: InsuranceUpdate()));
+ },
child: MedicalProfileItem(
- title: 'Update Insurance',
+ title: TranslationBase.of(context)
+ .updateInsurance,
imagePath: 'insurance_card_icon.png',
- subTitle: 'card',
+ subTitle: TranslationBase.of(context)
+ .updateInsuranceSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
-// onTap: () {
-// Navigator.push(
-// context, FadePage(page: InsuranceApproval()));
-// },
+ onTap: () {
+ Navigator.push(context,
+ FadePage(page: InsuranceApproval()));
+ },
child: MedicalProfileItem(
- title: 'Insurance Approval',
+ title: TranslationBase.of(context)
+ .insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
- subTitle: '',
+ subTitle: TranslationBase.of(context)
+ .insuranceApprovalSubtitle,
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
- title: 'Allergies',
+ title:
+ TranslationBase.of(context).allergies,
imagePath: 'medical_history_icon.png',
- subTitle: 'Diagnosed',
+ subTitle: TranslationBase.of(context)
+ .allergiesSubtitle,
),
),
]),
@@ -262,15 +299,16 @@ class _MedicalProfilePageState extends State {
Expanded(
flex: 1,
child: InkWell(
- //TODO
-// onTap: () {
-// Navigator.push(
-// context, FadePage(page: DoctorHomePage()));
-// },
+ onTap: () {
+ Navigator.push(context,
+ FadePage(page: MyVaccines()));
+ },
child: MedicalProfileItem(
- title: 'My Vaccines',
+ title: TranslationBase.of(context)
+ .myVaccines,
imagePath: 'insurance_card_icon.png',
- subTitle: 'card',
+ subTitle: TranslationBase.of(context)
+ .myVaccinesSubtitle,
),
),
),
@@ -282,18 +320,27 @@ class _MedicalProfilePageState extends State {
FadePage(page: HomeReportPage()));
},
child: MedicalProfileItem(
- title: 'Medical',
+ title:
+ TranslationBase.of(context).medical,
imagePath: 'insurance_approvals_icon.png',
- subTitle: 'Reports',
+ subTitle: TranslationBase.of(context)
+ .medicalSubtitle,
),
),
),
Expanded(
flex: 1,
- child: MedicalProfileItem(
- title: 'Monthly',
- imagePath: 'medical_history_icon.png',
- subTitle: 'Report',
+ child: InkWell(
+ onTap: (){
+ Navigator.push(context,
+ FadePage(page: MonthlyReportsPage()));
+ },
+ child: MedicalProfileItem(
+ title: TranslationBase.of(context).monthly,
+ imagePath: 'medical_history_icon.png',
+ subTitle: TranslationBase.of(context)
+ .monthlySubtitle,
+ ),
),
),
]),
@@ -307,9 +354,10 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
- title: 'Sick',
+ title: TranslationBase.of(context).sick,
imagePath: 'insurance_card_icon.png',
- subTitle: 'Leaves',
+ subTitle: TranslationBase.of(context)
+ .sickSubtitle,
),
),
),
@@ -321,18 +369,22 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
- title: 'My Balance',
+ title:
+ TranslationBase.of(context).myBalance,
imagePath: 'insurance_approvals_icon.png',
- subTitle: 'Credit',
+ subTitle: TranslationBase.of(context)
+ .myBalanceSubtitle,
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
- title: 'Patient Call',
+ title:
+ TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
- subTitle: 'Service',
+ subTitle: TranslationBase.of(context)
+ .patientCallSubtitle,
),
),
]),
@@ -346,9 +398,11 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
- title: 'Smart Watches',
+ title: TranslationBase.of(context)
+ .smartWatches,
imagePath: 'insurance_card_icon.png',
- subTitle: 'Pairing',
+ subTitle: TranslationBase.of(context)
+ .smartWatchesSubtitle,
),
),
),
@@ -360,18 +414,21 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
- title: 'My Trackers',
+ title: TranslationBase.of(context)
+ .myTrackers,
imagePath: 'insurance_approvals_icon.png',
- subTitle: 'Service',
+ subTitle: TranslationBase.of(context)
+ .myTrackersSubtitle,
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
- title: 'Ask Your',
+ title: TranslationBase.of(context).askYour,
imagePath: 'medical_history_icon.png',
- subTitle: 'Doctor',
+ subTitle: TranslationBase.of(context)
+ .askYourSubtitle,
),
),
]),
@@ -385,9 +442,11 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
- title: 'Internet',
+ title:
+ TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png',
- subTitle: 'Pairing',
+ subTitle: TranslationBase.of(context)
+ .internetSubtitle,
),
),
),
@@ -399,19 +458,17 @@ class _MedicalProfilePageState extends State {
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
- title: 'My Trackers',
+ title:
+ TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
- subTitle: 'Service',
+ subTitle: TranslationBase.of(context)
+ .chatbotSubtitle,
),
),
),
Expanded(
flex: 1,
- child: MedicalProfileItem(
- title: 'Ask Your',
- imagePath: 'medical_history_icon.png',
- subTitle: 'Doctor',
- ),
+ child: Container(),
),
]),
],
@@ -428,17 +485,16 @@ class _MedicalProfilePageState extends State {
width: double.infinity,
height: 70,
decoration: BoxDecoration(
- color: Colors.grey[600],
- shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.transparent, width: 0.5),
- borderRadius: BorderRadius.all(Radius.circular(9)),
- image: DecorationImage(
- image: ExactAssetImage(
- 'assets/images/bg_graphic.png'),
- fit: BoxFit.cover
- )
- ),
+ color: Colors.grey[600],
+ shape: BoxShape.rectangle,
+ border: Border.all(
+ color: Colors.transparent, width: 0.5),
+ borderRadius:
+ BorderRadius.all(Radius.circular(9)),
+ image: DecorationImage(
+ image: ExactAssetImage(
+ 'assets/images/bg_graphic.png'),
+ fit: BoxFit.cover)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@@ -464,9 +520,10 @@ class _MedicalProfilePageState extends State {
),
Positioned(
top: 2,
- left: 10,
+ left: projectViewModel.isArabic ? 0 : 10,
+ right: projectViewModel.isArabic ? 10 : 0,
child: Texts(
- 'Time Line ',
+ TranslationBase.of(context).timeLine,
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.normal,
diff --git a/lib/pages/medical/prescriptions/prescriptions_history_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_page.dart
index efd9df44..9d63bf7d 100644
--- a/lib/pages/medical/prescriptions/prescriptions_history_page.dart
+++ b/lib/pages/medical/prescriptions/prescriptions_history_page.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@@ -49,7 +50,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
height: 5,
),
Texts(
- 'Order No ${prescriptionsViewModel.prescriptionsHistory[index].iD}'),
+ '${TranslationBase.of(context).orderNo} ${prescriptionsViewModel.prescriptionsHistory[index].iD}'),
SizedBox(
height: 5,
),
@@ -59,7 +60,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
height: 5,
),
Texts(
- 'Order Details',
+ '${TranslationBase.of(context).orderNo}',
fontWeight: FontWeight.w300,
),
SizedBox(
diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart
index fd903b4b..e6e3e6db 100644
--- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart
+++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@@ -36,7 +37,7 @@ class _HomePrescriptionsPageState extends State
onModelReady: (model) => model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
- appBarTitle: 'My Doctors',
+ appBarTitle: TranslationBase.of(context).myDoctor,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@@ -84,13 +85,13 @@ class _HomePrescriptionsPageState extends State
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
- child: Texts('Prescriptions'),
+ child: Texts(TranslationBase.of(context).prescriptions),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
- child: Texts('History'),
+ child: Texts(TranslationBase.of(context).history),
),
),
],
diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart
index e335f41c..e6e90d9e 100644
--- a/lib/pages/medical/prescriptions/prescriptions_page.dart
+++ b/lib/pages/medical/prescriptions/prescriptions_page.dart
@@ -2,6 +2,7 @@ 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/uitl/translations_delegate_base.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';
@@ -32,7 +33,7 @@ class PrescriptionsPage extends StatelessWidget {
onTap: () =>
prescriptionsViewModel.setFilterType(FilterType.Clinic),
child: ListTile(
- title: const Text('Clinic'),
+ title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: prescriptionsViewModel.filterType,
@@ -50,7 +51,7 @@ class PrescriptionsPage extends StatelessWidget {
onTap: () => prescriptionsViewModel
.setFilterType(FilterType.Hospital),
child: ListTile(
- title: const Text('Hospital'),
+ title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: prescriptionsViewModel.filterType,
diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart
index 3288dcaf..0f9f4c7b 100644
--- a/lib/pages/medical/radiology/radiology_home_page.dart
+++ b/lib/pages/medical/radiology/radiology_home_page.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_mode
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@@ -17,7 +18,7 @@ class RadiologyHomePage extends StatelessWidget {
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
- appBarTitle: 'Radiology',
+ appBarTitle: TranslationBase.of(context).radiology,
baseViewModel: model,
body: FractionallySizedBox(
widthFactor: 1.0,
@@ -32,7 +33,7 @@ class RadiologyHomePage extends StatelessWidget {
onTap: () =>
model.setFilterType(FilterType.Clinic),
child: ListTile(
- title: const Text('Clinic'),
+ title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
@@ -50,7 +51,7 @@ class RadiologyHomePage extends StatelessWidget {
onTap: () => model
.setFilterType(FilterType.Hospital),
child: ListTile(
- title: const Text('Hospital'),
+ title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
@@ -85,7 +86,7 @@ class RadiologyHomePage extends StatelessWidget {
child: DoctorCard(
name: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
- subName: '${radiology.projectName} \nBill No ${radiology.invoiceNo}',
+ subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted(
radiology.orderDate),
),
diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart
new file mode 100644
index 00000000..ae9cc295
--- /dev/null
+++ b/lib/pages/medical/reports/monthly_reports.dart
@@ -0,0 +1,167 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/input/custom_switch.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 MonthlyReportsPage extends StatefulWidget {
+ @override
+ _MonthlyReportsPageState createState() => _MonthlyReportsPageState();
+}
+
+class _MonthlyReportsPageState extends State {
+ bool isAgree = false;
+ bool isSummary = false;
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ builder: (_, model, w) => AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: TranslationBase.of(context).monthlyReports,
+ body: SingleChildScrollView(
+ child: Container(
+ padding: EdgeInsets.all(12),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ padding: EdgeInsets.all(9),
+ height: 55,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ shape: BoxShape.rectangle,
+ border: Border.all(color: Colors.grey)),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Texts(
+ TranslationBase.of(context).patientHealthSummaryReport,
+ bold: true,
+ ),
+ CustomSwitch(
+ value: isSummary,
+ activeColor: Colors.red,
+ inactiveColor: Colors.grey,
+ onChanged: () async {
+ setState(() {
+ isSummary = !isSummary;
+ });
+ },
+ )
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 15,
+ ),
+ Container(
+ margin: EdgeInsets.all(8),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Texts(
+ model.user.emailAddress,
+ bold: true,
+ ),
+ ],
+ ),
+ ),
+ Divider(
+ height: 10.4,
+ thickness: 1.0,
+ ),
+ SizedBox(
+ height: 15,
+ ),
+ Container(
+ margin: EdgeInsets.all(8),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Texts(TranslationBase.of(context)
+ .toViewTheTermsAndConditions),
+ ),
+ InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: UserAgreementContent(),
+ ),
+ );
+ },
+ child: Texts(
+ TranslationBase.of(context).clickHere,
+ color: Colors.blue,
+ ),
+ )
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 5,
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Checkbox(
+ value: isAgree,
+ onChanged: (value) {
+ setState(() {
+ isAgree = !isAgree;
+ });
+ },
+ activeColor: Colors.red,
+ ),
+ Texts(TranslationBase.of(context)
+ .iAgreeToTheTermsAndConditions),
+ ],
+ ),
+ Container(
+ margin: EdgeInsets.all(8),
+ width: double.infinity,
+ child: SecondaryButton(
+ textColor: Colors.white,
+ label: TranslationBase.of(context).save,
+ disabled: !isAgree,
+ loading: model.state == ViewState.BusyLocal,
+ onTap: () {
+ model.updatePatientHealthSummaryReport(
+ message: TranslationBase.of(context)
+ .updateSuccessfully,
+ isSummary: isSummary);
+ },
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(5.0),
+ child: Texts(
+ TranslationBase.of(context)
+ .iAgreeToTheTermsAndConditionsSubtitle,
+ fontWeight: FontWeight.normal,
+ ),
+ ),
+ SizedBox(
+ height: 12,
+ ),
+ Center(child: Image.asset('assets/images/report.jpg'))
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/medical/reports/user_agreement_page.dart b/lib/pages/medical/reports/user_agreement_page.dart
new file mode 100644
index 00000000..9bb886e3
--- /dev/null
+++ b/lib/pages/medical/reports/user_agreement_page.dart
@@ -0,0 +1,25 @@
+import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_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_html/flutter_html.dart';
+
+class UserAgreementContent extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getUserTermsAndConditions(),
+ builder: (_, model, w) => AppScaffold(
+ isShowAppBar: true,
+ baseViewModel: model,
+ appBarTitle: TranslationBase.of(context).userAgreement,
+ body: SingleChildScrollView(
+ child: Html(
+ data: model.userAgreementContent,
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart
index a0dc78ff..b8c4eda2 100644
--- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart
+++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart
@@ -16,7 +16,6 @@ class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo;
int projectID;
-
VitalSignDetailsScreen({this.appointmentNo, this.projectID});
@override
@@ -28,7 +27,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
: (model) => model.getPatientRadOrders(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
- appBarTitle: 'Vital Sign',
+ appBarTitle: TranslationBase.of(context).vitalSigns,
baseViewModel: mode,
body: mode.vitalSignResModelList.length > 0
? Container(
@@ -42,7 +41,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Height,
- pageTitle: 'Height',
+ pageTitle: TranslationBase.of(context).height,
vitalList: mode.vitalSignResModelList,
),
),
@@ -66,7 +65,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Weight,
- pageTitle: 'Weight',
+ pageTitle: TranslationBase.of(context).weight,
vitalList: mode.vitalSignResModelList,
),
),
@@ -92,7 +91,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BodyMeasurements,
- pageTitle: 'BMI',
+ pageTitle: TranslationBase.of(context)
+ .bodyMeasurements,
vitalList: mode.vitalSignResModelList,
),
),
@@ -112,7 +112,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Temperature,
- pageTitle: 'Temperature',
+ pageTitle:
+ TranslationBase.of(context).temperature,
vitalList: mode.vitalSignResModelList,
),
),
@@ -138,7 +139,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.heart,
- pageTitle: 'Hart ',
+ pageTitle: TranslationBase.of(context).heart,
vitalList: mode.vitalSignResModelList,
),
),
@@ -160,7 +161,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Respiration,
- pageTitle: 'Respiration Rate',
+ pageTitle:
+ TranslationBase.of(context).respirationRate,
vitalList: mode.vitalSignResModelList,
),
),
@@ -187,7 +189,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BloodPressure,
- pageTitle: 'BloodPressure',
+ pageTitle: TranslationBase.of(context).pulse,
vitalList: mode.vitalSignResModelList,
),
),
diff --git a/lib/pages/vaccine/my_vaccines_screen.dart b/lib/pages/vaccine/my_vaccines_screen.dart
new file mode 100644
index 00000000..c825884c
--- /dev/null
+++ b/lib/pages/vaccine/my_vaccines_screen.dart
@@ -0,0 +1,242 @@
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:flutter/cupertino.dart';
+import '../base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
+import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
+import 'package:popup_box/popup_box.dart';
+
+class MyVaccines extends StatefulWidget {
+ @override
+ _MyVaccinesState createState() => _MyVaccinesState();
+}
+
+class _MyVaccinesState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getVaccine(),
+ builder: (BuildContext context, VaccineViewModel model, Widget child) =>
+ AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: 'My Vaccines',
+ baseViewModel: model,
+ body: Container(
+ margin: EdgeInsets.only(
+ left: SizeConfig.screenWidth * 0.004,
+ right: SizeConfig.screenWidth * 0.004,
+ top: SizeConfig.screenWidth * 0.04,
+ ),
+ child: Column(
+ children: [
+ RoundedContainer(
+ backgroundColor: Colors.white,
+ child: ExpansionTile(
+ title: Container(
+ height: 65.0,
+ child: Text('2018'),
+ ),
+ children: [
+ Container(
+ child: ListView.builder(
+ scrollDirection: Axis.vertical,
+ shrinkWrap: true,
+ itemCount: model.vaccineList == null
+ ? 0
+ : model.vaccineList.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Column(
+ children: [
+ RoundedContainer(
+ child: Column(
+ children: [
+ Row(
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(
+ horizontal: 20.0,
+ vertical: 20.0),
+ child: Image.network(
+ model.vaccineList[index]
+ .doctorImageURL,
+ height: SizeConfig
+ .imageSizeMultiplier *
+ 23,
+ width: SizeConfig
+ .imageSizeMultiplier *
+ 20,
+ fit: BoxFit.fill,
+ ),
+ ),
+ ],
+ ),
+ flex: 2,
+ ),
+ Expanded(
+ child: Container(
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ model.vaccineList[index]
+ .doctorTitle +
+ model.vaccineList[index]
+ .doctorName,
+ style: TextStyle(
+ fontWeight: FontWeight.w900,
+ fontSize: 16.6,
+ ),
+ ),
+ SpaceBetweenTexts(space: 7.0),
+ Text(
+ model.vaccineList[index]
+ .projectName,
+ style: TextStyle(
+ fontSize: 17.0,
+ letterSpacing: 0.5,
+ ),
+ ),
+ SpaceBetweenTexts(space: 7.0),
+ Text(
+ model.vaccineList[index]
+ .vaccineName,
+ style: TextStyle(
+ fontSize: 17.0,
+ ),
+ ),
+ SpaceBetweenTexts(space: 7.0),
+ Text(
+ 'Date Taken ' +
+ convertDateFormat(model
+ .vaccineList[index]
+ .invoiceDate),
+ style:
+ TextStyle(fontSize: 17.0),
+ ),
+ ],
+ ),
+ ),
+ flex: 5,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ );
+ }),
+ )
+ ],
+ ),
+ ),
+ // SpaceBetweenTexts(space: 165.0),
+
+ ],
+ ),
+
+ ),
+ bottomSheet: Container(
+ color: Theme.of(context).scaffoldBackgroundColor,
+ padding: EdgeInsets.all(12),
+ height: MediaQuery.of(context).size.height *0.25,
+ width: double.infinity,
+ child: Column(
+ children: [
+ Divider(height: 2,thickness: 1,),
+ SizedBox(height: 6,),
+ Container(
+ width: double.infinity,
+ // height: 80.0,
+ child: Button(
+ label: 'CHECK VACCINE AVAILABILITY',
+ backgroundColor: Color(0xff9EA3A4),
+ ),
+ ),
+ Container(
+ width: double.infinity,
+ // height: 80.0,
+ child: SecondaryButton(
+ label: 'SEND EMAIL',
+ color: Color(0xffF62426),
+ textColor: Colors.white,
+ disabled: model.vaccineList.length==0,
+ onTap: () async {
+ await PopupBox.showPopupBox(
+ context: context,
+ button: MaterialButton(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(3),
+ ),
+ color: Colors.white,
+ child: Text(
+ 'CANCEL',
+ style: TextStyle(fontSize: 16.5),
+ ),
+ onPressed: () {
+ Navigator.of(context).pop();
+ },
+ ),
+ willDisplayWidget: Column(
+ children: [
+ Text(
+ 'Conform \nSend a copy of this report to the email' +
+ model.vaccineList[0].doctorName,
+ style: TextStyle(
+ fontSize: 20,
+ color: Colors.black26,
+ fontWeight: FontWeight.w900),
+ ),
+ SizedBox(
+ height: 30.0,
+ ),
+ ],
+ ));
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+ convertDateFormat(String Date) {
+ const start = "/Date(";
+ const end = "+0300)";
+
+ final startIndex = Date.indexOf(start);
+ final endIndex = Date.indexOf(end, startIndex + start.length);
+
+ var date = new DateTime.fromMillisecondsSinceEpoch(
+ int.parse(Date.substring(startIndex + start.length, endIndex)));
+ String newDate = date.year.toString() +
+ "-" +
+ date.month.toString().padLeft(2, '0') +
+ "-" +
+ date.day.toString().padLeft(2, '0');
+
+ return newDate.toString();
+ }
+
+
+}
+
+class SpaceBetweenTexts extends StatelessWidget {
+ final double space;
+ SpaceBetweenTexts({this.space});
+
+ @override
+ Widget build(BuildContext context) {
+ return SizedBox(
+ height: space,
+ );
+ }
+}
diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart
index 27a66d43..c992e8e9 100644
--- a/lib/services/appointment_services/GetDoctorsList.dart
+++ b/lib/services/appointment_services/GetDoctorsList.dart
@@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
-import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService {
@@ -23,7 +22,8 @@ class DoctorsListService extends BaseService {
double lat;
double long;
- Future