Merge branch 'amjad_amireh' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into amjad_amireh

find_us
Amjad amireh 6 years ago
commit dc10f883db

@ -6,6 +6,7 @@
additional functionality it is fine to subclass or reimplement additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />

@ -6,7 +6,7 @@ buildscript {
} }
dependencies { 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 "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2' classpath 'com.google.gms:google-services:4.3.2'
} }

@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017 #Thu Sep 03 16:26:30 EEST 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -356,7 +356,6 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = { 249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -433,7 +432,6 @@
}; };
97C147031CF9000F007C117D /* Debug */ = { 97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -489,7 +487,6 @@
}; };
97C147041CF9000F007C117D /* Release */ = { 97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;

@ -28,8 +28,8 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const GET_Patient_LAB_RESULT = '/Services/Patients.svc/REST/GetPatientLabResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; 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 SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory = const GET_PATIENT_AppointmentHistory =
'Services/Doctors.svc/REST/PateintHasAppoimentHistory'; 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN ///VITAL SIGN
const GET_PATIENT_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 //URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; 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 //URL to get doctors list
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; 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 //URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
@ -149,13 +156,17 @@ const CANCEL_LIVECARE_REQUEST =
const SEND_LIVECARE_INVOICE_EMAIL = const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; '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 //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958'; const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20'; const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.6; const VERSION_ID = 5.6;
const SETUP_ID = '91877'; const SETUP_ID = '91877';
const LANGUAGE = 1; const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
@ -169,6 +180,8 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails"; "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED = const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; "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 = const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus"; "Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';

@ -343,7 +343,10 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Online Payment Service", "en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني' 'ar': 'خدمة الدفع عبر الإلكتدوني'
}, },
"OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, "OffersAndPackages": {
"en": "Online transfer request",
'ar': 'طلب التحويل الالكتروني'
},
"ComprehensiveMedicalCheckup": { "ComprehensiveMedicalCheckup": {
"en": "Comprehensive Medical Check up", "en": "Comprehensive Medical Check up",
'ar': 'فحص طبي شامل' 'ar': 'فحص طبي شامل'
@ -379,4 +382,80 @@ const Map<String, Map<String, String>> localizedValues = {
"locationa":{"en":"location:","ar":"الموقع"}, "locationa":{"en":"location:","ar":"الموقع"},
"ambulancerequest":{"en":"Ambulance :","ar":"طلب نقل "}, "ambulancerequest":{"en":"Ambulance :","ar":"طلب نقل "},
"requestA":{"en":"Request:","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":"تم التحديث بنجاح"},
}; };

@ -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<String, dynamic> 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<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
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;
}
}

@ -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<String> 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<String, dynamic> 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<String>();
vaccinationDate = json['VaccinationDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['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;
}
}

@ -2,14 +2,11 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.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/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import '../../../locator.dart';
import '../../../routes.dart'; import '../../../routes.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -33,12 +30,12 @@ class BaseAppClient {
var languageID = var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
body['SetupID'] = body.containsKey('SetupID') if (body.containsKey('SetupID')) {
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID body['SetupID'] = body.containsKey('SetupID')
: SETUP_ID; ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
body['VersionID'] = body.containsKey('VersionID') : SETUP_ID;
? body['VersionID'] != null ? body['VersionID'] : VERSION_ID }
: VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
@ -46,16 +43,28 @@ class BaseAppClient {
body['PatientOutSA'] = body.containsKey('PatientOutSA') body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA ? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA
: 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['DeviceTypeID'] = DeviceTypeID;
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE
: PATIENT_TYPE; : PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null ? body['PatientTypeID'] != null
? body['PatientTypeID'] ? body['PatientTypeID']
: PATIENT_TYPE_ID : PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] =

@ -1,8 +1,13 @@
import 'package:diplomaticquarterapp/config/config.dart'; 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_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/base_service.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 { class InsuranceCardService extends BaseService {
List<InsuranceCardModel> _cardList = List(); List<InsuranceCardModel> _cardList = List();
@ -15,6 +20,9 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();
clearInsuranceCard() { clearInsuranceCard() {
_cardList.clear(); _cardList.clear();
} }
@ -101,7 +109,7 @@ class InsuranceCardService extends BaseService {
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({int appointmentNo}) async {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
if(appointmentNo != null) { if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo; _insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null; _insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null; _insuranceApprovalModel.projectID = null;
@ -124,4 +132,35 @@ class InsuranceCardService extends BaseService {
super.error = error; super.error = error;
}, body: _insuranceApprovalModel.toJson()); }, 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;
}
}
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart'; 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_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
@ -28,6 +29,7 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult(); RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
Future getLaboratoryResult( Future getLaboratoryResult(
{String projectID, {String projectID,
@ -52,6 +54,27 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson()); }, body: _requestPatientLabSpecialResult.toJson());
} }
Future getPatientLabResult({PatientLabOrders patientLabOrder}) async {
hasError = false;
Map<String, dynamic> 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 _requestSendLabReportEmail =
RequestSendLabReportEmail(); RequestSendLabReportEmail();

@ -1,15 +1,16 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.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/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/reques_patient_doctor_appointmentt.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.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/model/doctor/request_doctor_rating.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
class MyDoctorService extends BaseService { class MyDoctorService extends BaseService {
List<PatientDoctorAppointment> patientDoctorAppointmentList = List(); List<DoctorList> patientDoctorAppointmentList = List();
DoctorProfile doctorProfile; DoctorProfile doctorProfile;
DoctorList doctorList;
DoctorRating doctorRating = DoctorRating(); DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest = RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
@ -49,7 +50,7 @@ class MyDoctorService extends BaseService {
patientDoctorAppointmentList.clear(); patientDoctorAppointmentList.clear();
response['PatientDoctorAppointmentResultList'].forEach((hospital) { response['PatientDoctorAppointmentResultList'].forEach((hospital) {
patientDoctorAppointmentList patientDoctorAppointmentList
.add(PatientDoctorAppointment.fromJson(hospital)); .add(DoctorList.fromJson(hospital));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -58,7 +59,6 @@ class MyDoctorService extends BaseService {
} }
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile( RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
doctorID: 2477,
license: true, license: true,
isRegistered: true, isRegistered: true,
projectID: 12, projectID: 12,
@ -79,11 +79,18 @@ class MyDoctorService extends BaseService {
///GET DOCTOR PROFILE ///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId; _requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID; _requestDoctorProfile.clinicID = clinicID;
_requestDoctorProfile.patientID = projectID; _requestDoctorProfile.projectID = projectID;
hasError = false; hasError = false;
await baseAppClient.post(GET_DOCTOR_PROFILE, await baseAppClient.post(GET_DOCTOR_PROFILE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]); 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) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -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<Reports> reportsList = List();
List<AppointmentHistory> 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<String, dynamic> body = new Map<String, dynamic>();
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<String, dynamic> body = new Map<String, dynamic>();
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);
}
}

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
class ReportsService extends BaseService { class ReportsService extends BaseService {
List<Reports> reportsList = List(); List<Reports> reportsList = List();
List<AppointmentHistory> appointHistoryList = List(); List<AppointmentHistory> appointHistoryList = List();
String userAgreementContent = "";
RequestReports _requestReports = RequestReports( RequestReports _requestReports = RequestReports(
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
@ -44,7 +44,7 @@ class ReportsService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
body['IsForMedicalReport'] = true; body['IsForMedicalReport'] = true;
await baseAppClient.post(GET_PATIENT_AppointmentHistory, await baseAppClient.post(GET_PATIENT_AppointmentHistory,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
appointHistoryList = []; appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) { response['AppoimentAllHistoryResultList'].forEach((appoint) {
@ -56,6 +56,33 @@ class ReportsService extends BaseService {
}, body: body); }, 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<String, dynamic>());
}
Future updatePatientHealthSummaryReport({bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>();
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( Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async { AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
@ -63,7 +90,7 @@ class ReportsService extends BaseService {
body['DoctorID'] = appointmentHistory.doctorID; body['DoctorID'] = appointmentHistory.doctorID;
body['SetupID'] = appointmentHistory.setupID; body['SetupID'] = appointmentHistory.setupID;
body['EncounterNo'] = appointmentHistory.appointmentNo; body['EncounterNo'] = appointmentHistory.appointmentNo;
body['EncounterType'] = 1;// appointmentHistory.appointmentType; body['EncounterType'] = 1; // appointmentHistory.appointmentType;
body['IsActive'] = appointmentHistory.isActiveDoctor; body['IsActive'] = appointmentHistory.isActiveDoctor;
body['ProjectID'] = appointmentHistory.projectID; body['ProjectID'] = appointmentHistory.projectID;
body['Remarks'] = ""; body['Remarks'] = "";
@ -73,7 +100,7 @@ class ReportsService extends BaseService {
body['Status'] = 1; body['Status'] = 1;
body['CreatedBy'] = 102; body['CreatedBy'] = 102;
hasError = false; hasError = false;
await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT, await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {}, onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -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<VaccineModel> _vaccineList = List();
List<VaccineModel> get vaccineList => _vaccineList;
Future getMyVaccine() async {
Map<String, dynamic> 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<String, dynamic> 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);
}
}

@ -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.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'base_view_model.dart'; import 'base_view_model.dart';
@ -20,6 +21,9 @@ class InsuranceViewModel extends BaseViewModel {
List<InsuranceApprovalModel> get insuranceApproval => List<InsuranceApprovalModel> get insuranceApproval =>
_insuranceCardService.insuranceApproval; _insuranceCardService.insuranceApproval;
GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse =>
_insuranceCardService.getAllSharedRecordsByStatusResponse;
Future getInsurance() async { Future getInsurance() async {
hasError = false; hasError = false;
_insuranceCardService.clearInsuranceCard(); _insuranceCardService.clearInsuranceCard();
@ -41,7 +45,7 @@ class InsuranceViewModel extends BaseViewModel {
error = _insuranceCardService.error; error = _insuranceCardService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); getFamilyFiles();
} }
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({int appointmentNo}) async {
@ -59,4 +63,13 @@ class InsuranceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getFamilyFiles() async {
await _insuranceCardService.getFamilyFiles();
if (_insuranceCardService.hasError) {
error = _insuranceCardService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
} }

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.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_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
@ -78,13 +78,32 @@ class LabsViewModel extends BaseViewModel {
List<PatientLabSpecialResult> get patientLabSpecialResult => List<PatientLabSpecialResult> get patientLabSpecialResult =>
_labsService.patientLabSpecialResult; _labsService.patientLabSpecialResult;
List<LabResult> get labResultList => _labsService.labResultList;
getLaboratoryResult( getLaboratoryResult(
{String projectID, {String projectID,
int clinicID, int clinicID,
String invoiceNo, String invoiceNo,
String orderNo}) async { String orderNo}) async {
setState(ViewState.Busy); 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) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -2,8 +2,8 @@ import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.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/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/core/service/medical/my_doctor_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -22,6 +22,9 @@ class MyDoctorViewModel extends BaseViewModel {
? _patientDoctorAppointmentListClinic ? _patientDoctorAppointmentListClinic
: _patientDoctorAppointmentListHospital; : _patientDoctorAppointmentListHospital;
DoctorList get doctorList=> _myDoctorService.doctorList;
DoctorProfile get doctorProfile => _myDoctorService.doctorProfile; DoctorProfile get doctorProfile => _myDoctorService.doctorProfile;
DoctorRating get doctorRating => _myDoctorService.doctorRating; DoctorRating get doctorRating => _myDoctorService.doctorRating;
@ -61,9 +64,7 @@ class MyDoctorViewModel extends BaseViewModel {
.toList(); .toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])]
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList .patientDoctorAppointmentList
.add(element); .add(element);
} else { } else {
@ -83,7 +84,7 @@ class MyDoctorViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
void getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async { Future getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID); await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID);
if (_myDoctorService.hasError) { if (_myDoctorService.hasError) {

@ -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<ReportsService>();
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);
}
}
}

@ -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<VaccineService>();
List<VaccineModel> 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);
}
}
}

@ -13,6 +13,7 @@ import 'core/service/medical/medical_service.dart';
import 'core/service/medical/my_doctor_service.dart'; import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart'; import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_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/service/medical/vital_sign_service.dart';
import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart';
import 'core/viewModels/er/near_hospital_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/my_doctor_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart'; import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/medical/radiology_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/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart'; import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/pharmacies_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/service/insurance_service.dart';
import 'core/viewModels/insurance_card_View_model.dart'; import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/qr_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; GetIt locator = GetIt.instance;
@ -52,6 +56,8 @@ void setupLocator() {
locator.registerLazySingleton(() => DashboardService()); locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => AppointmentRateService()); locator.registerLazySingleton(() => AppointmentRateService());
locator.registerLazySingleton(() => QrService()); locator.registerLazySingleton(() => QrService());
locator.registerFactory(() => VaccineService());
locator.registerLazySingleton(() => ReportsMonthlyService());
locator.registerLazySingleton(() => ErService()); locator.registerLazySingleton(() => ErService());
/// View Model /// View Model
@ -63,12 +69,14 @@ void setupLocator() {
locator.registerFactory(() => LabsViewModel()); locator.registerFactory(() => LabsViewModel());
locator.registerFactory(() => RadiologyViewModel()); locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => FeedbackViewModel()); locator.registerFactory(() => FeedbackViewModel());
locator.registerFactory(() => VaccineViewModel());
locator.registerFactory(() => VitalSignViewModel()); locator.registerFactory(() => VitalSignViewModel());
locator.registerFactory(() => InsuranceViewModel()); locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => MedicalViewModel()); locator.registerFactory(() => MedicalViewModel());
locator.registerFactory(() => DashboardViewModel()); locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel()); locator.registerFactory(() => AppointmentRateViewModel());
locator.registerFactory(() => QrViewModel()); locator.registerFactory(() => QrViewModel());
locator.registerFactory(() => ReportsMonthlyViewModel());
locator.registerFactory(() => NearHospitalViewModel()); locator.registerFactory(() => NearHospitalViewModel());
} }

@ -66,7 +66,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), 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), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0), textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
canvasColor: Colors.white, canvasColor: Colors.white,

@ -272,3 +272,13 @@ class AppoitmentAllHistoryResultList {
return data; return data;
} }
} }
class PatientAppointmentList {
String filterName = "";
List<AppoitmentAllHistoryResultList> patientDoctorAppointmentList = List();
PatientAppointmentList(
{this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -0,0 +1,48 @@
class DentalChiefComplaintsModel {
List<ListDentalChiefComplain> listDentalChiefComplain;
DentalChiefComplaintsModel({this.listDentalChiefComplain});
DentalChiefComplaintsModel.fromJson(Map<String, dynamic> json) {
if (json['List_DentalChiefComplain'] != null) {
listDentalChiefComplain = new List<ListDentalChiefComplain>();
json['List_DentalChiefComplain'].forEach((v) {
listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
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<String, dynamic> json) {
projectID = json['ProjectID'];
iD = json['ID'];
name = json['Name'];
nameN = json['NameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['ID'] = this.iD;
data['Name'] = this.name;
data['NameN'] = this.nameN;
return data;
}
}

@ -41,51 +41,51 @@ class DoctorList {
DoctorList( DoctorList(
{this.clinicID, {this.clinicID,
this.clinicName, this.clinicName,
this.doctorTitle, this.doctorTitle,
this.iD, this.iD,
this.name, this.name,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.actualDoctorRate, this.actualDoctorRate,
this.clinicRoomNo, this.clinicRoomNo,
this.date, this.date,
this.dayName, this.dayName,
this.doctorID, this.doctorID,
this.doctorImageURL, this.doctorImageURL,
this.doctorProfile, this.doctorProfile,
this.doctorProfileInfo, this.doctorProfileInfo,
this.doctorRate, this.doctorRate,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.isAppointmentAllowed, this.isAppointmentAllowed,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isDoctorDummy, this.isDoctorDummy,
this.isLiveCare, this.isLiveCare,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.nationalityFlagURL, this.nationalityFlagURL,
this.nationalityID, this.nationalityID,
this.nationalityName, this.nationalityName,
this.nearestFreeSlot, this.nearestFreeSlot,
this.noOfPatientsRate, this.noOfPatientsRate,
this.originalClinicID, this.originalClinicID,
this.personRate, this.personRate,
this.projectDistanceInKiloMeters, this.projectDistanceInKiloMeters,
this.qR, this.qR,
this.qRString, this.qRString,
this.rateNumber, this.rateNumber,
this.serviceID, this.serviceID,
this.setupID, this.setupID,
this.speciality, this.speciality,
this.workingHours}); this.workingHours});
DoctorList.fromJson(Map<String, dynamic> json) { DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
iD = json['ID']; iD = json['ID'];
name = json['Name']; name = json['DoctorName']??json['Name'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
projectName = json['ProjectName']; projectName = json['ProjectName'];
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
@ -118,7 +118,8 @@ class DoctorList {
rateNumber = json['RateNumber']; rateNumber = json['RateNumber'];
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
setupID = json['SetupID']; setupID = json['SetupID'];
speciality = json['Speciality'].cast<String>(); if (json.containsKey('Speciality') && json['Speciality']!=null)
speciality = json['Speciality'].cast<String>();
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
} }
@ -166,3 +167,14 @@ class DoctorList {
return data; return data;
} }
} }
class PatientDoctorAppointmentList {
String filterName = "";
String distanceInKMs = "";
List<DoctorList> patientDoctorAppointmentList = List();
PatientDoctorAppointmentList(
{this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -0,0 +1,10 @@
class SearchInfo {
int ProjectID;
int ClinicID;
String DoctorName;
String SelectedDate;
String SelectedTime;
String currentLat;
String currentLong;
DateTime date;
}

@ -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<DentalComplaints> {
List<ListDentalChiefComplain> 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));
}
}

@ -8,8 +8,10 @@ import 'package:flutter/material.dart';
class SearchResults extends StatefulWidget { class SearchResults extends StatefulWidget {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital;
SearchResults({@required this.doctorsList}); SearchResults(
{@required this.doctorsList, this.patientDoctorAppointmentListHospital});
@override @override
_SearchResultsState createState() => _SearchResultsState(); _SearchResultsState createState() => _SearchResultsState();
@ -21,23 +23,7 @@ class _SearchResultsState extends State<SearchResults> {
@override @override
void initState() { void initState() {
event.controller.stream.listen((p) { 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;
// });
});
super.initState(); super.initState();
} }
@ -47,53 +33,32 @@ class _SearchResultsState extends State<SearchResults> {
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.all(10.0),
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: Column(
widthFactor: 1.0, children: <Widget>[
child: Column( ...List.generate(
children: <Widget>[ widget.patientDoctorAppointmentListHospital.length,
...List.generate( (index) => AppExpandableNotifier(
widget.doctorsList.length, title: widget
(index) => AppExpandableNotifier( .patientDoctorAppointmentListHospital[index].filterName + " - " +widget
title: widget.doctorsList[index].projectName, .patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget.doctorsList.map((doctorObj) { children: widget
.patientDoctorAppointmentListHospital[index]
.patientDoctorAppointmentList
.map((doctor) {
return DoctorView( return DoctorView(
doctor: doctorObj, doctor: doctor,
); );
}).toList(), }).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(),
// ),
// );
// },
// ),
), ),
), ),
); );

@ -1,7 +1,10 @@
import "dart:collection"; import "dart:collection";
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.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/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@ -19,8 +22,11 @@ class SearchByClinic extends StatefulWidget {
class _SearchByClinicState extends State<SearchByClinic> { class _SearchByClinicState extends State<SearchByClinic> {
bool nearestAppo = false; bool nearestAppo = false;
String dropdownValue; String dropdownValue;
String projectDropdownValue;
var event = RobotProvider(); var event = RobotProvider();
List<ListClinicCentralized> clinicsList = []; List<ListClinicCentralized> clinicsList = [];
List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false;
@override @override
void initState() { void initState() {
@ -76,25 +82,91 @@ class _SearchByClinicState extends State<SearchByClinic> {
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
dropdownValue = newValue; dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) {
getDoctorsList(context); 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<String>(
hint: new Text("Select Project"),
value: projectDropdownValue,
items: projectsList.map((item) {
return new DropdownMenuItem<String>(
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() { getClinicsList() {
ClinicListService service = new ClinicListService(); 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) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
res['ListClinicCentralized'].forEach((v) { res['ListProject'].forEach((v) {
clinicsList.add(new ListClinicCentralized.fromJson(v)); projectsList.add(new HospitalsModel.fromJson(v));
}); });
print(projectsList.length);
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
@ -104,51 +176,66 @@ class _SearchByClinicState extends State<SearchByClinic> {
} }
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
List<DoctorList> doctorsList = []; SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.date = DateTime.now();
List<String> arr = []; navigateToDentalComplaints(context, searchInfo);
List<String> arrDistance = []; } else {
var distinctIds; List<DoctorList> doctorsList = [];
List<String> result; List<String> arr = [];
int numAll; List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); List<String> result;
service.getDoctorsList(int.parse(dropdownValue), 0, context).then((res) { int numAll;
if (res['MessageStatus'] == 1) { DoctorsListService service = new DoctorsListService();
setState(() { service
if (res['DoctorList'].length != 0) { .getDoctorsList(
print(res['DoctorList']); int.parse(dropdownValue),
doctorsList.clear(); projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
res['DoctorList'].forEach((v) { nearestAppo,
doctorsList.add(new DoctorList.fromJson(v)); 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); arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v) arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters .projectDistanceInKiloMeters
.toString()); .toString());
});
} else {}
});
// print(DoctorList result = LinkedHashSet<String>.from(arr).toList();
// .fromJson(v) numAll = result.length;
// .projectName);
// print(DoctorList
// .fromJson(v)
// .projectDistanceInKiloMeters);
// distinctIds = result.toSet().toList();
});
} else {}
});
result = LinkedHashSet<String>.from(arr).toList(); navigateToSearchResults(
numAll = result.length; 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( Future navigateToDentalComplaints(
context, doctorsList, result, numAll, arrDistance); BuildContext context, SearchInfo searchInfo) async {
} else { Navigator.push(
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); context,
} MaterialPageRoute(
}).catchError((err) { builder: (context) => DentalComplaints(searchInfo: searchInfo),
print(err); ),
}).showProgressBar( );
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToSearchResults( Future navigateToSearchResults(
@ -156,14 +243,14 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
// builder: (context) => SearchResults(doctorsList: docList)
builder: (context) => BranchView( builder: (context) => BranchView(
doctorsList: docList, doctorsList: docList,
result: result, result: result,
num: numAll, num: numAll,
resultDistance: resultDistance), resultDistance: resultDistance),
), ),
); ).then((value) {
//builder: (context) => SearchResults(doctorsList: docList))); getProjectsList();
});
} }
} }

@ -84,6 +84,10 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
service service
.getDoctorsListByName(doctorNameController.text, context) .getDoctorsListByName(doctorNameController.text, context)
.then((res) { .then((res) {
@ -93,9 +97,35 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
}); });
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {} } else {}
}); });
navigateToSearchResults(context, doctorsList);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -107,7 +137,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
_onDocTextChanged(content) { _onDocTextChanged(content) {
print(content); print(content);
if (content.length >= 4) { if (content.length >= 3) {
setState(() { setState(() {
_isButtonDisabled = false; _isButtonDisabled = false;
}); });
@ -123,10 +153,17 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
getDoctorsList(context); getDoctorsList(context);
} }
Future navigateToSearchResults(context, List<DoctorList> docList) async { Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => SearchResults(doctorsList: docList))); builder: (context) => SearchResults(
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
} }
} }

@ -82,13 +82,9 @@ class _ExpandableListViewState extends State<ExpandableListView> {
children: <Widget>[ children: <Widget>[
new Text( new Text(
widget.result2[widget.val].toString() + widget.result2[widget.val].toString() +
" " + " " +
widget.resultDistance[widget.val] getProjectDistance(
.toString() != widget.resultDistance[widget.val].toString()),
"0"
? getProjectDistance(
widget.resultDistance[widget.val].toString())
: "",
style: new TextStyle( style: new TextStyle(
fontWeight: FontWeight.bold, color: Colors.black), fontWeight: FontWeight.bold, color: Colors.black),
), ),
@ -148,7 +144,11 @@ class _ExpandableListViewState extends State<ExpandableListView> {
} }
String getProjectDistance(String distance) { String getProjectDistance(String distance) {
return " - " + distance + " KM"; if (distance != "0")
return " - " + distance + " " + TranslationBase.of(context).km;
else {
return "";
}
} }
} }

@ -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<DentalComplaintCard> {
@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: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.85,
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
child: Text(widget.listDentalChiefComplain.name,
style:
TextStyle(fontSize: 16.0, color: Colors.black)),
),
],
),
),
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Icon(Icons.arrow_forward_ios,
size: 20.0, color: Colors.black54),
],
),
),
],
),
),
),
);
}
getChiefComplaintsList() {
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _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<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
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<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SearchResults(
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_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'; import '../DoctorProfile.dart';
class DoctorView extends StatelessWidget { class DoctorView extends StatelessWidget {
DoctorList doctor; final DoctorList doctor;
DoctorView({@required this.doctor}); DoctorView({@required this.doctor});
@ -33,69 +34,87 @@ class DoctorView extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
ClipRRect( Expanded(
borderRadius: BorderRadius.circular(100.0), flex: 1,
child: Image.network(this.doctor.doctorImageURL, child: ClipRRect(
fit: BoxFit.fill, height: 60.0, width: 60.0), borderRadius: BorderRadius.circular(100.0),
child: Image.network(this.doctor.doctorImageURL,
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
), ),
Container( Expanded(
width: MediaQuery.of(context).size.width * 0.5, flex: 4,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), child: Container(
child: Column( width: MediaQuery.of(context).size.width * 0.55,
crossAxisAlignment: CrossAxisAlignment.start, margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
children: <Widget>[ child: Column(
Text(this.doctor.doctorTitle + " " + this.doctor.name, crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( children: <Widget>[
fontSize: 14.0, if(doctor.doctorTitle!=null)
color: Colors.grey[700], Text(this.doctor.doctorTitle + " " + this.doctor.name,
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,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 14.0,
color: Colors.grey[600], color: Colors.grey[700],
letterSpacing: 1.0)), 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), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text( child: Text(
getDoctorSpeciality(this.doctor.speciality).trim(), getDate(this.doctor.nearestFreeSlot),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 14.0,
color: Colors.grey[600], fontWeight: FontWeight.bold,
color: Colors.green[600],
letterSpacing: 1.0)), letterSpacing: 1.0)),
), ) : Container(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
RatingBar.readOnly( RatingBar.readOnly(
initialRating: initialRating:
this.doctor.actualDoctorRate.toDouble(), this.doctor.actualDoctorRate.toDouble(),
size: 20.0, size: 20.0,
filledColor: Colors.yellow[700], filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500], emptyColor: Colors.grey[500],
isHalfAllowed: true, isHalfAllowed: true,
halfFilledIcon: Icons.star_half, halfFilledIcon: Icons.star_half,
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Container( Container(
child: Image.network(this.doctor.nationalityFlagURL, child: Image.network(this.doctor.nationalityFlagURL,
width: 25.0, height: 25.0), width: 25.0, height: 25.0),
), ),
], ],
), ),
], ],
),
), ),
), ),
], ],
@ -136,6 +155,29 @@ class DoctorView extends StatelessWidget {
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).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, Future navigateToDoctorProfile(context, docObject, docProfile,
{isAppo}) async { {isAppo}) async {
Navigator.push( Navigator.push(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCar
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -15,6 +16,11 @@ class MyAppointments extends StatefulWidget {
List<AppoitmentAllHistoryResultList> confirmedAppoList = []; List<AppoitmentAllHistoryResultList> confirmedAppoList = [];
List<AppoitmentAllHistoryResultList> arrivedAppoList = []; List<AppoitmentAllHistoryResultList> arrivedAppoList = [];
List<PatientAppointmentList> _patientBookedAppointmentListHospital = List();
List<PatientAppointmentList> _patientConfirmedAppointmentListHospital =
List();
List<PatientAppointmentList> _patientArrivedAppointmentListHospital = List();
@override @override
_MyAppointmentsState createState() => _MyAppointmentsState(); _MyAppointmentsState createState() => _MyAppointmentsState();
} }
@ -36,11 +42,10 @@ class _MyAppointmentsState extends State<MyAppointments>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "My Appointments", appBarTitle: TranslationBase.of(context).myAppointments,
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
child: Column(children: [ child: Column(children: [
/// this is will not colored with theme data
TabBar( TabBar(
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).booked), Tab(text: TranslationBase.of(context).booked),
@ -94,7 +99,10 @@ class _MyAppointmentsState extends State<MyAppointments>
} }
}).catchError((err) { }).catchError((err) {
print(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) { bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@ -123,15 +131,85 @@ class _MyAppointmentsState extends State<MyAppointments>
widget.arrivedAppoList.add(v); widget.arrivedAppoList.add(v);
} }
}); });
widget.bookedAppoList.forEach((element) {
List<PatientAppointmentList> 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<PatientAppointmentList> 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<PatientAppointmentList> 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() { openAppointmentsTab() {
if (widget.bookedAppoList.length != 0) { if (widget._patientBookedAppointmentListHospital.length != 0) {
_tabController.animateTo((_tabController.index + 1) % 1); _tabController.index = 0;
} else if (widget.confirmedAppoList.length != 0) { } else if (widget._patientConfirmedAppointmentListHospital.length != 0) {
_tabController.animateTo((_tabController.index + 1) % 2); _tabController.index = 1;
} else if (widget.arrivedAppoList.length != 0) { } else if (widget._patientArrivedAppointmentListHospital.length != 0) {
_tabController.animateTo((_tabController.index + 1) % 3); _tabController.index = 2;
return; return;
} }
} }
@ -158,29 +236,100 @@ class _MyAppointmentsState extends State<MyAppointments>
"assets/images/new-design/noAppointmentIcon.png"), "assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Booked Appointments", child: Text(TranslationBase.of(context).noBookedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
), ),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Container(
child: widget.bookedAppoList.length != 0
? SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: <Widget>[
...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: <Widget>[
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() { Widget getConfirmedAppointments() {
return widget.confirmedAppoList.length != 0 return widget.confirmedAppoList.length != 0
? Container( ? Container(
child: new ListView.builder( margin: EdgeInsets.only(top: 10.0),
itemCount: widget.confirmedAppoList.length, child: SingleChildScrollView(
itemBuilder: (context, i) { physics: BouncingScrollPhysics(),
return AppointmentCard( child: Column(
appo: widget.confirmedAppoList[i], children: <Widget>[
onReloadAppointmentHistory: getPatientAppointmentHistory, ...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( : Container(
@ -192,7 +341,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Confirmed Appointments", child: Text(TranslationBase.of(context).noConfirmedAppointments ,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -206,14 +355,34 @@ class _MyAppointmentsState extends State<MyAppointments>
Widget getArrivedAppointments() { Widget getArrivedAppointments() {
return widget.arrivedAppoList.length != 0 return widget.arrivedAppoList.length != 0
? Container( ? Container(
child: new ListView.builder( margin: EdgeInsets.only(top: 10.0),
itemCount: widget.arrivedAppoList.length, child: SingleChildScrollView(
itemBuilder: (context, i) { physics: BouncingScrollPhysics(),
return AppointmentCard( child: Column(
appo: widget.arrivedAppoList[i], children: <Widget>[
onReloadAppointmentHistory: getPatientAppointmentHistory, ...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( : Container(
@ -225,7 +394,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Arrived Appointments", child: Text(TranslationBase.of(context).noArrivedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),

@ -25,7 +25,7 @@ class ArrivedButtons {
"title": "Lab", "title": "Lab",
"subtitle": "Result", "subtitle": "Result",
"icon": "assets/images/new-design/lab_result_icon.png", "icon": "assets/images/new-design/lab_result_icon.png",
"caller": "addReminder" "caller": "labResult"
}, },
{ {
"title": "Vital Signs", "title": "Vital Signs",

@ -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/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.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/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.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/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget { class AppointmentActions extends StatefulWidget {
@ -189,6 +190,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
case "VitalSigns": case "VitalSigns":
navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID); navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
break; break;
case "insertComplaint":
navigateToInsertComplaint();
break;
} }
} }
@ -357,7 +362,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
openAppointmentRadiology() { openAppointmentRadiology() {
@ -374,7 +380,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
openPrescriptionReport() { openPrescriptionReport() {
@ -394,7 +401,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
AppToast.showErrorToast(message: 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( Future navigateToMedicinePrescriptionReport(
@ -460,7 +468,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
}).catchError((err) { }).catchError((err) {
print(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() { getCallRequestType() {
@ -475,7 +486,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}); });
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
showAskDocRequestDialog(List<AskDocRequestType> requestData) { showAskDocRequestDialog(List<AskDocRequestType> requestData) {
@ -520,7 +532,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
confirmAppointment() { confirmAppointment() {
@ -537,7 +550,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
navigateToInsuranceApprovals(int appoNo) { navigateToInsuranceApprovals(int appoNo) {
@ -547,7 +561,14 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToVitalSigns(int appoNo, int projectID) { navigateToVitalSigns(int appoNo, int projectID) {
Navigator.push( 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() { rateAppointment() {

@ -42,7 +42,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
fit: BoxFit.fill, height: 60.0, width: 60.0), fit: BoxFit.fill, height: 60.0, width: 60.0),
), ),
Container( 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), margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -95,7 +95,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Container( Container(
transform: Matrix4.translationValues(0.0, -40.0, 0.0), transform: Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset( child: Image.asset(
"assets/images/new-design/arrow.png", "assets/images/new-design/arrow.png",
width: 25.0, width: 25.0,

@ -80,7 +80,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
children: <Widget>[ children: <Widget>[
ExpansionTile( ExpansionTile(
title: Container( title: Container(
height: 120.0, //height: 120.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
@ -39,95 +40,117 @@ class _InsuranceCardState extends State<InsuranceCard> {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return RoundedContainer( return RoundedContainer(
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: const EdgeInsets.all(8.0),
children: <Widget>[ child: Column(
ExpansionTile( crossAxisAlignment: CrossAxisAlignment.start,
title: Container( children: <Widget>[
height: 65.0, ExpansionTile(
child: Column( title: Container(
crossAxisAlignment: CrossAxisAlignment.start, height: 65.0,
children: <Widget>[ child: Column(
Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.symmetric(vertical: 15.0), children: <Widget>[
child: Texts( Padding(
model.insurance[index].groupName, padding: EdgeInsets.symmetric(vertical: 15.0),
child: Texts(
model.insurance[index].groupName,
),
), ),
), ],
], ),
),
),
children: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
Container( Container(
child: Button( padding: EdgeInsets.all(14),
label: TranslationBase.of(context).seeDetails, 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: <Widget>[
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: <Widget>[
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,
), ),
],
),
], ],
),
],
),
), ),
); );
}), }),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -97,9 +98,12 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
children: <Widget>[ children: <Widget>[
Container( Container(
child: ListView.builder( child: ListView.builder(
itemCount: model.insuranceUpdate == null itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList ==
null
? 0 ? 0
: model.insuranceUpdate.length, : model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Container( return Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
@ -112,81 +116,63 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
child: Container( child: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Flex( Expanded(
direction: Axis.horizontal, flex: 3,
children: <Widget>[ child: Container(
Expanded( margin: EdgeInsets.only(
flex: 3, top: 2.0, left: 10.0, right: 20.0),
child: Container( child: Column(
margin: EdgeInsets.only( crossAxisAlignment:
top: 2.0, CrossAxisAlignment.start,
left: 10.0, children: <Widget>[
right: 20.0), Text(
child: Column( model.getAllSharedRecordsByStatusResponse
crossAxisAlignment: .getAllSharedRecordsByStatusList[
CrossAxisAlignment.start, index].patientName,
children: <Widget>[ style: TextStyle(
Text("TAMER FANASHEH ", fontSize: 14.0,
style: TextStyle( color: Colors.black,
fontSize: 14.0, fontWeight: FontWeight.w500,
color: Colors.black, letterSpacing: 1.0)),
fontWeight: Text(
FontWeight.w500, 'File No.' +
letterSpacing: 1.0)), model.getAllSharedRecordsByStatusResponse
Text( .getAllSharedRecordsByStatusList[
'File No.' + index].patientID.toString(),
model style: TextStyle(
.insuranceUpdate[ fontSize: 14.0,
index] color: Colors.black,
.patientID fontWeight: FontWeight.w500,
.toString(), letterSpacing: 1.0)),
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: 1,
child: Container(
// height: MediaQuery.of(context).size.height * 0.12,
margin: EdgeInsets.only(top: 20.0),
child: Column(
children: <Widget>[
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: <Widget>[
Container(
child: SecondaryButton(
label: 'Update',
small: true,
textColor: Colors.white,
// color: Colors.grey,
),
//height: 45,
// width:90
),
],
),
),
)
], ],
), ),
), ),

@ -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/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
@ -155,8 +156,8 @@ class _HomePageState extends State<HomePage> {
), ),
Align( Align(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
? Alignment.bottomLeft ? Alignment.bottomRight
: Alignment.bottomRight, : Alignment.bottomLeft,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();
@ -369,13 +370,13 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, 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', imageName: 'home_healthcare_service_bg.png',
opacity: 0.5, opacity: 0.5,
), ),
@ -404,7 +405,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4, height: MediaQuery.of(context).size.width * 0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png', imageName: 'al-habib_onlne_pharmacy_bg.png',
), ),
DashboardItem( DashboardItem(
@ -432,7 +433,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4, height: MediaQuery.of(context).size.width * 0.4,
color: Hexcolor("#747C80"), color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png', imageName: 'emergency_service_image.png',
), ),
@ -473,7 +474,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4, height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
@ -506,7 +507,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
width: MediaQuery.of(context).size.width * 0.29, 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( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
@ -541,7 +542,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4, height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
@ -597,6 +598,10 @@ class _HomePageState extends State<HomePage> {
context, FadePage(page: AllHabibMedicalService())), context, FadePage(page: AllHabibMedicalService())),
), ),
DashboardItem( DashboardItem(
onTap: (){
Navigator.push(context, FadePage(page: FeedbackHomePage()));
},
child: Container( child: Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),

@ -130,119 +130,119 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
//_firebase Background message handler //_firebase Background message handler
_firebaseMessaging.configure( _firebaseMessaging.configure(
onMessage: (Map<String, dynamic> message) async { // onMessage: (Map<String, dynamic> message) async {
showDialog("onMessage: $message"); // showDialog("onMessage: $message");
print("onMessage: $message"); // print("onMessage: $message");
print(message); // print(message);
print(message['name']); // print(message['name']);
print(message['appointmentdate']); // print(message['appointmentdate']);
//
if (Platform.isIOS) { // if (Platform.isIOS) {
if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
//
if (route != null) { // if (route != null) {
print(route.settings.name); // print(route.settings.name);
} // }
//
Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
print(myMap); // print(myMap);
LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
if (!isPageNavigated) { // if (!isPageNavigated) {
isPageNavigated = true; // isPageNavigated = true;
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
.then((value) { // .then((value) {
isPageNavigated = false; // isPageNavigated = false;
}); // });
} // }
} else { // } else {
print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
} // }
} else { // } else {
print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
} // }
//
if (Platform.isAndroid) { // if (Platform.isAndroid) {
if (message['data'].containsKey("is_call")) { // if (message['data'].containsKey("is_call")) {
var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
//
if (route != null) { // if (route != null) {
print(route.settings.name); // print(route.settings.name);
} // }
//
Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
new Map<String, dynamic>.from(message['data']); // new Map<String, dynamic>.from(message['data']);
print(myMap); // print(myMap);
LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
if (!isPageNavigated) { // if (!isPageNavigated) {
isPageNavigated = true; // isPageNavigated = true;
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
.then((value) { // .then((value) {
isPageNavigated = false; // isPageNavigated = false;
}); // });
} // }
} else { // } else {
print("Is Call Not Found Android"); // print("Is Call Not Found Android");
} // }
} else { // } else {
print("Is Call Not Found Android"); // print("Is Call Not Found Android");
} // }
}, // },
onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
onLaunch: (Map<String, dynamic> message) async { // onLaunch: (Map<String, dynamic> message) async {
print("onLaunch: $message"); // print("onLaunch: $message");
showDialog("onLaunch: $message"); // showDialog("onLaunch: $message");
}, // },
onResume: (Map<String, dynamic> message) async { // onResume: (Map<String, dynamic> message) async {
print("onResume: $message"); // print("onResume: $message");
print(message); // print(message);
print(message['name']); // print(message['name']);
print(message['appointmentdate']); // print(message['appointmentdate']);
//
showDialog("onResume: $message"); // showDialog("onResume: $message");
//
if (Platform.isIOS) { // if (Platform.isIOS) {
if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
//
if (route != null) { // if (route != null) {
print(route.settings.name); // print(route.settings.name);
} // }
//
Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
new Map<String, dynamic>.from(message); // new Map<String, dynamic>.from(message);
print(myMap); // print(myMap);
LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
if (!isPageNavigated) { // if (!isPageNavigated) {
isPageNavigated = true; // isPageNavigated = true;
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
.then((value) { // .then((value) {
isPageNavigated = false; // isPageNavigated = false;
}); // });
} // }
} else { // } else {
print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
} // }
} else { // } else {
print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
} // }
}, // },
); );
} }
showDialog(String message) { showDialog(String message) {
@ -298,16 +298,21 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: [ children: [
HomePage(goToMyProfile: (){ HomePage(
_changeCurrentTab(1); goToMyProfile: () {
},), _changeCurrentTab(1);
},
),
MedicalProfilePage(), MedicalProfilePage(),
MyAdmissionsPage(), MyAdmissionsPage(),
ToDo(), ToDo(),
BookingOptions() BookingOptions()
], // Please do not remove the BookingOptions from this array ], // 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<LandingPage> with WidgetsBindingObserver {
case 0: case 0:
return TranslationBase.of(context).home; return TranslationBase.of(context).home;
case 1: case 1:
return 'Medical Profile'; return TranslationBase.of(context).medicalProfile;
case 2: case 2:
return TranslationBase.of(context).mySchedule; return TranslationBase.of(context).mySchedule;
case 3: case 3:

@ -1,7 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.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/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -34,7 +37,7 @@ class DoctorHomePage extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic), onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile( child: ListTile(
title: const Text('Clinic'), title: Text(TranslationBase.of(context).clinic),
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
@ -51,7 +54,7 @@ class DoctorHomePage extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital), onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile( child: ListTile(
title: const Text('Hospital'), title: Text(TranslationBase.of(context).hospital),
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
@ -75,16 +78,42 @@ class DoctorHomePage extends StatelessWidget {
children: model.patientDoctorAppointmentList[index] children: model.patientDoctorAppointmentList[index]
.patientDoctorAppointmentList .patientDoctorAppointmentList
.map((doctor) { .map((doctor) {
return InkWell( DoctorList doctorList = DoctorList(
onTap: () { projectID: doctor.projectID,
Navigator.push( setupID: doctor.setupID,
context, clinicID: doctor.clinicID,
FadePage( projectName: doctor.projectName,
page: DoctorProfilePage( clinicName: doctor.clinicName,
patientDoctorAppointment: doctor, 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( child: DoctorCard(
name: doctor.doctorName, name: doctor.doctorName,
@ -93,7 +122,8 @@ class DoctorHomePage extends StatelessWidget {
subName: DateUtil.getMonthDayYearDateFormatted( subName: DateUtil.getMonthDayYearDateFormatted(
doctor.appointmentDate), doctor.appointmentDate),
), ),
); )*/
;
}).toList(), }).toList(),
)), )),
) )

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

@ -27,8 +27,10 @@ class LaboratoryResultPage extends StatelessWidget {
body: ListView.builder( body: ListView.builder(
itemBuilder: (context, index) => LaboratoryResultWidget( itemBuilder: (context, index) => LaboratoryResultWidget(
onTap: () => model.sendLabReportEmail(patientLabOrder: patientLabOrders), onTap: () => model.sendLabReportEmail(patientLabOrder: patientLabOrders),
billNo: model.patientLabSpecialResult[index].invoiceNo, billNo: patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML, details: model.patientLabSpecialResult[index].resultDataHTML,
orderNo: patientLabOrders.orderNo,
patientLabOrder: patientLabOrders,
), ),
itemCount: model.patientLabSpecialResult.length, itemCount: model.patientLabSpecialResult.length,
), ),

@ -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/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -19,7 +20,7 @@ class LabsHomePage extends StatelessWidget {
builder: (context, LabsViewModel model, widget) => AppScaffold( builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Lab Orders', appBarTitle: TranslationBase.of(context).labOrders,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
@ -34,7 +35,7 @@ class LabsHomePage extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic), onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile( child: ListTile(
title: const Text('Clinic'), title: Text(TranslationBase.of(context).clinic),
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
@ -51,7 +52,7 @@ class LabsHomePage extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital), onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile( child: ListTile(
title: const Text('Hospital'), title: Text(TranslationBase.of(context).hospital),
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
@ -85,7 +86,7 @@ class LabsHomePage extends StatelessWidget {
), ),
name: labOrder.doctorName, name: labOrder.doctorName,
profileUrl: labOrder.doctorImageURL, profileUrl: labOrder.doctorImageURL,
subName: 'Bill No : ${labOrder.invoiceNo}', subName: TranslationBase.of(context).billNo+' ${labOrder.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted( date: DateUtil.getMonthDayYearDateFormatted(
labOrder.orderDate), labOrder.orderDate),
); );

@ -2,12 +2,16 @@ import 'dart:math';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; 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/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/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_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/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.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/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:provider/provider.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'doctor/doctor_home_page.dart'; import 'doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -31,6 +36,7 @@ class MedicalProfilePage extends StatefulWidget {
class _MedicalProfilePageState extends State<MedicalProfilePage> { class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<MedicalViewModel>( return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -48,11 +54,9 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
height: 210, height: 210,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage(
'assets/images/timeline_bg.png'), 'assets/images/timeline_bg.png'),
fit: BoxFit.cover fit: BoxFit.cover),
),
), ),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
@ -70,13 +74,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
itemCount: itemCount:
model.appoitmentAllHistoryResultList.length, model.appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
reverse: true, reverse: !projectViewModel.isArabic,
), ),
], ],
), ),
), ),
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 12.0), padding: EdgeInsets.symmetric(vertical: 5.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -89,13 +93,19 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: MyAppointments())); context,
FadePage(
page: MyAppointments(),
),
);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Appointments', title: TranslationBase.of(context)
.myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',
subTitle: 'List', subTitle: TranslationBase.of(context)
.myAppointmentsList,
), ),
), ),
), ),
@ -103,11 +113,12 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => Navigator.push(context, onTap: () => Navigator.push(context,
FadePage(page: RadiologyHomePage())), FadePage(page: LabsHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Radiology', title: TranslationBase.of(context).lab,
imagePath: 'radiology_icon.png', imagePath: 'lab_result_icon.png',
subTitle: 'Service', subTitle:
TranslationBase.of(context).lab,
), ),
), ),
), ),
@ -115,11 +126,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => Navigator.push(context, onTap: () => Navigator.push(context,
FadePage(page: LabsHomePage())), FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Lab', title: TranslationBase.of(context)
imagePath: 'lab_result_icon.png', .radiology,
subTitle: 'Result', imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context)
.radiologySubtitle,
), ),
), ),
), ),
@ -132,14 +145,18 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: HomePrescriptionsPage())); page: HomePrescriptionsPage(),
),
);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Medicines', title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png', imagePath: 'prescription_icon.png',
subTitle: 'Prescriptions', subTitle: TranslationBase.of(context)
.medicinesSubtitle,
), ),
), ),
), ),
@ -147,13 +164,17 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignDetailsScreen())), page: VitalSignDetailsScreen(),
),
),
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Vital Signs', title: TranslationBase.of(context)
.vitalSigns,
imagePath: 'medical_history_icon.png', imagePath: 'medical_history_icon.png',
subTitle: 'Reports', subTitle: TranslationBase.of(context)
.vitalSignsSubtitle,
), ),
), ),
), ),
@ -163,9 +184,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// onTap: () => Navigator.push( // onTap: () => Navigator.push(
// context, FadePage(page: RadiologyHomePage())), // context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Medicines ', title: TranslationBase.of(context)
.myMedical,
imagePath: 'radiology_icon.png', imagePath: 'radiology_icon.png',
subTitle: 'Service', subTitle: TranslationBase.of(context)
.myMedicalSubtitle,
), ),
), ),
), ),
@ -177,13 +200,19 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: DoctorHomePage())); context,
FadePage(
page: DoctorHomePage(),
),
);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Doctor', title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png', imagePath: 'doctor_icon.png',
subTitle: 'List', subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
), ),
), ),
), ),
@ -196,10 +225,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// FadePage(page: InsuranceApproval())); // FadePage(page: InsuranceApproval()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Eye', title: TranslationBase.of(context).eye,
imagePath: imagePath:
'insurance_approvals_icon.png', 'insurance_approvals_icon.png',
subTitle: 'Measurement', subTitle: TranslationBase.of(context)
.eyeSubtitle,
), ),
), ),
), ),
@ -211,9 +241,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
FadePage(page: InsuranceCard())); FadePage(page: InsuranceCard()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Insurance', title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'Card', subTitle: TranslationBase.of(context)
.insuranceSubtitle,
), ),
), ),
), ),
@ -223,38 +255,43 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
//TODO onTap: () {
// onTap: () { Navigator.push(context,
// Navigator.push( FadePage(page: InsuranceUpdate()));
// context, FadePage(page: DoctorHomePage())); },
// },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Update Insurance', title: TranslationBase.of(context)
.updateInsurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'card', subTitle: TranslationBase.of(context)
.updateInsuranceSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
// onTap: () { onTap: () {
// Navigator.push( Navigator.push(context,
// context, FadePage(page: InsuranceApproval())); FadePage(page: InsuranceApproval()));
// }, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Insurance Approval', title: TranslationBase.of(context)
.insuranceApproval,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
subTitle: '', subTitle: TranslationBase.of(context)
.insuranceApprovalSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Allergies', title:
TranslationBase.of(context).allergies,
imagePath: 'medical_history_icon.png', imagePath: 'medical_history_icon.png',
subTitle: 'Diagnosed', subTitle: TranslationBase.of(context)
.allergiesSubtitle,
), ),
), ),
]), ]),
@ -262,15 +299,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
//TODO onTap: () {
// onTap: () { Navigator.push(context,
// Navigator.push( FadePage(page: MyVaccines()));
// context, FadePage(page: DoctorHomePage())); },
// },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Vaccines', title: TranslationBase.of(context)
.myVaccines,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'card', subTitle: TranslationBase.of(context)
.myVaccinesSubtitle,
), ),
), ),
), ),
@ -282,18 +320,27 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
FadePage(page: HomeReportPage())); FadePage(page: HomeReportPage()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Medical', title:
TranslationBase.of(context).medical,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
subTitle: 'Reports', subTitle: TranslationBase.of(context)
.medicalSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: MedicalProfileItem( child: InkWell(
title: 'Monthly', onTap: (){
imagePath: 'medical_history_icon.png', Navigator.push(context,
subTitle: 'Report', 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<MedicalProfilePage> {
// context, FadePage(page: DoctorHomePage())); // context, FadePage(page: DoctorHomePage()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Sick', title: TranslationBase.of(context).sick,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'Leaves', subTitle: TranslationBase.of(context)
.sickSubtitle,
), ),
), ),
), ),
@ -321,18 +369,22 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// context, FadePage(page: InsuranceApproval())); // context, FadePage(page: InsuranceApproval()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Balance', title:
TranslationBase.of(context).myBalance,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
subTitle: 'Credit', subTitle: TranslationBase.of(context)
.myBalanceSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Patient Call', title:
TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png', imagePath: 'medical_history_icon.png',
subTitle: 'Service', subTitle: TranslationBase.of(context)
.patientCallSubtitle,
), ),
), ),
]), ]),
@ -346,9 +398,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// context, FadePage(page: DoctorHomePage())); // context, FadePage(page: DoctorHomePage()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Smart Watches', title: TranslationBase.of(context)
.smartWatches,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'Pairing', subTitle: TranslationBase.of(context)
.smartWatchesSubtitle,
), ),
), ),
), ),
@ -360,18 +414,21 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// context, FadePage(page: InsuranceApproval())); // context, FadePage(page: InsuranceApproval()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Trackers', title: TranslationBase.of(context)
.myTrackers,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
subTitle: 'Service', subTitle: TranslationBase.of(context)
.myTrackersSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Ask Your', title: TranslationBase.of(context).askYour,
imagePath: 'medical_history_icon.png', imagePath: 'medical_history_icon.png',
subTitle: 'Doctor', subTitle: TranslationBase.of(context)
.askYourSubtitle,
), ),
), ),
]), ]),
@ -385,9 +442,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// context, FadePage(page: DoctorHomePage())); // context, FadePage(page: DoctorHomePage()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Internet', title:
TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: 'Pairing', subTitle: TranslationBase.of(context)
.internetSubtitle,
), ),
), ),
), ),
@ -399,19 +458,17 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
// context, FadePage(page: InsuranceApproval())); // context, FadePage(page: InsuranceApproval()));
// }, // },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'My Trackers', title:
TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
subTitle: 'Service', subTitle: TranslationBase.of(context)
.chatbotSubtitle,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: MedicalProfileItem( child: Container(),
title: 'Ask Your',
imagePath: 'medical_history_icon.png',
subTitle: 'Doctor',
),
), ),
]), ]),
], ],
@ -428,17 +485,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
width: double.infinity, width: double.infinity,
height: 70, height: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[600], color: Colors.grey[600],
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius:
image: DecorationImage( BorderRadius.all(Radius.circular(9)),
image: ExactAssetImage( image: DecorationImage(
'assets/images/bg_graphic.png'), image: ExactAssetImage(
fit: BoxFit.cover 'assets/images/bg_graphic.png'),
) fit: BoxFit.cover)),
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
@ -464,9 +520,10 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
Positioned( Positioned(
top: 2, top: 2,
left: 10, left: projectViewModel.isArabic ? 0 : 10,
right: projectViewModel.isArabic ? 10 : 0,
child: Texts( child: Texts(
'Time Line ', TranslationBase.of(context).timeLine,
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -49,7 +50,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
'Order No ${prescriptionsViewModel.prescriptionsHistory[index].iD}'), '${TranslationBase.of(context).orderNo} ${prescriptionsViewModel.prescriptionsHistory[index].iD}'),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
@ -59,7 +60,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
'Order Details', '${TranslationBase.of(context).orderNo}',
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
), ),
SizedBox( SizedBox(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; 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_history_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -36,7 +37,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
onModelReady: (model) => model.getPrescriptions(), onModelReady: (model) => model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'My Doctors', appBarTitle: TranslationBase.of(context).myDoctor,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -84,13 +85,13 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: Texts('Prescriptions'), child: Texts(TranslationBase.of(context).prescriptions),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: Texts('History'), child: Texts(TranslationBase.of(context).history),
), ),
), ),
], ],

@ -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/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -32,7 +33,7 @@ class PrescriptionsPage extends StatelessWidget {
onTap: () => onTap: () =>
prescriptionsViewModel.setFilterType(FilterType.Clinic), prescriptionsViewModel.setFilterType(FilterType.Clinic),
child: ListTile( child: ListTile(
title: const Text('Clinic'), title: Text(TranslationBase.of(context).clinic),
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,
@ -50,7 +51,7 @@ class PrescriptionsPage extends StatelessWidget {
onTap: () => prescriptionsViewModel onTap: () => prescriptionsViewModel
.setFilterType(FilterType.Hospital), .setFilterType(FilterType.Hospital),
child: ListTile( child: ListTile(
title: const Text('Hospital'), title: Text(TranslationBase.of(context).hospital),
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,

@ -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/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -17,7 +18,7 @@ class RadiologyHomePage extends StatelessWidget {
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Radiology', appBarTitle: TranslationBase.of(context).radiology,
baseViewModel: model, baseViewModel: model,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
@ -32,7 +33,7 @@ class RadiologyHomePage extends StatelessWidget {
onTap: () => onTap: () =>
model.setFilterType(FilterType.Clinic), model.setFilterType(FilterType.Clinic),
child: ListTile( child: ListTile(
title: const Text('Clinic'), title: Text(TranslationBase.of(context).clinic),
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
@ -50,7 +51,7 @@ class RadiologyHomePage extends StatelessWidget {
onTap: () => model onTap: () => model
.setFilterType(FilterType.Hospital), .setFilterType(FilterType.Hospital),
child: ListTile( child: ListTile(
title: const Text('Hospital'), title: Text(TranslationBase.of(context).hospital),
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
@ -85,7 +86,7 @@ class RadiologyHomePage extends StatelessWidget {
child: DoctorCard( child: DoctorCard(
name: radiology.doctorName, name: radiology.doctorName,
profileUrl: radiology.doctorImageURL, profileUrl: radiology.doctorImageURL,
subName: '${radiology.projectName} \nBill No ${radiology.invoiceNo}', subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted( date: DateUtil.getMonthDayYearDateFormatted(
radiology.orderDate), radiology.orderDate),
), ),

@ -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<MonthlyReportsPage> {
bool isAgree = false;
bool isSummary = false;
@override
Widget build(BuildContext context) {
return BaseView<ReportsMonthlyViewModel>(
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'))
],
),
),
),
),
);
}
}

@ -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<ReportsMonthlyViewModel>(
onModelReady: (model) => model.getUserTermsAndConditions(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView(
child: Html(
data: model.userAgreementContent,
),
),
),
);
}
}

@ -16,7 +16,6 @@ class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo; int appointmentNo;
int projectID; int projectID;
VitalSignDetailsScreen({this.appointmentNo, this.projectID}); VitalSignDetailsScreen({this.appointmentNo, this.projectID});
@override @override
@ -28,7 +27,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
: (model) => model.getPatientRadOrders(), : (model) => model.getPatientRadOrders(),
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Vital Sign', appBarTitle: TranslationBase.of(context).vitalSigns,
baseViewModel: mode, baseViewModel: mode,
body: mode.vitalSignResModelList.length > 0 body: mode.vitalSignResModelList.length > 0
? Container( ? Container(
@ -42,7 +41,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Height, pageKey: VitalSignDetails.Height,
pageTitle: 'Height', pageTitle: TranslationBase.of(context).height,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -66,7 +65,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Weight, pageKey: VitalSignDetails.Weight,
pageTitle: 'Weight', pageTitle: TranslationBase.of(context).weight,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -92,7 +91,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BodyMeasurements, pageKey: VitalSignDetails.BodyMeasurements,
pageTitle: 'BMI', pageTitle: TranslationBase.of(context)
.bodyMeasurements,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -112,7 +112,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Temperature, pageKey: VitalSignDetails.Temperature,
pageTitle: 'Temperature', pageTitle:
TranslationBase.of(context).temperature,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -138,7 +139,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.heart, pageKey: VitalSignDetails.heart,
pageTitle: 'Hart ', pageTitle: TranslationBase.of(context).heart,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -160,7 +161,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.Respiration, pageKey: VitalSignDetails.Respiration,
pageTitle: 'Respiration Rate', pageTitle:
TranslationBase.of(context).respirationRate,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
@ -187,7 +189,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BloodPressure, pageKey: VitalSignDetails.BloodPressure,
pageTitle: 'BloodPressure', pageTitle: TranslationBase.of(context).pulse,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),

@ -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<MyVaccines> {
@override
Widget build(BuildContext context) {
return BaseView<VaccineViewModel>(
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: <Widget>[
RoundedContainer(
backgroundColor: Colors.white,
child: ExpansionTile(
title: Container(
height: 65.0,
child: Text('2018'),
),
children: <Widget>[
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: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Column(
children: <Widget>[
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: <Widget>[
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: <Widget>[
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,
);
}
}

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService { class DoctorsListService extends BaseService {
@ -23,7 +22,8 @@ class DoctorsListService extends BaseService {
double lat; double lat;
double long; double long;
Future<Map> getDoctorsList(int clinicID, int projectID, BuildContext context, Future<Map> getDoctorsList(
int clinicID, int projectID, bool isNearest, BuildContext context,
{doctorId}) async { {doctorId}) async {
//Utils.showProgressDialog(context); //Utils.showProgressDialog(context);
Map<String, dynamic> request; Map<String, dynamic> request;
@ -34,7 +34,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { if (await this.sharedPref.getDouble(USER_LAT) != null &&
await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT); lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG); long = await this.sharedPref.getDouble(USER_LONG);
} }
@ -62,6 +63,9 @@ class DoctorsListService extends BaseService {
"IsGetNearAppointment": false, "IsGetNearAppointment": false,
"Latitude": lat.toString(), "Latitude": lat.toString(),
"Longitude": long.toString(), "Longitude": long.toString(),
"IsGetNearAppointment": isNearest,
if (isNearest)
"SelectedDate": DateUtil.convertDateToString(DateTime.now()),
"License": true "License": true
}; };
@ -79,12 +83,21 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsListByName(String docName, BuildContext context) async { Future<Map> getDoctorsListByName(String docName, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
double lat;
double long;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
if (await this.sharedPref.getDouble(USER_LAT) != null &&
await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getString(APP_LANGUAGE); var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -106,8 +119,8 @@ class DoctorsListService extends BaseService {
"gender": authUser.gender != null ? authUser.gender : 0, "gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0, "age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false, "IsGetNearAppointment": false,
"Latitude": 0, "Latitude": lat,
"Longitude": 0, "Longitude": long,
"License": true "License": true
}; };

@ -1,13 +1,22 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart'; 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/app_shared_preferences.dart';
import 'package:flutter/material.dart';
class ClinicListService extends BaseService { class ClinicListService extends BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AppGlobal appGlobal = new AppGlobal(); AppGlobal appGlobal = new AppGlobal();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
double lat;
double long;
Future<Map> getClinicsList(context) async { Future<Map> getClinicsList(context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE); var languageID = await sharedPref.getString(APP_LANGUAGE);
@ -28,10 +37,128 @@ class ClinicListService extends BaseService {
await baseAppClient.post(GET_CLINICS_LIST_URL, await baseAppClient.post(GET_CLINICS_LIST_URL,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes);
}
Future<Map> getProjectsList(context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
};
dynamic localRes;
await baseAppClient.post(GET_PROJECTS_LIST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getChiefComplaintsList(
int clinicID, int projectID, BuildContext context,
{doctorId}) async {
//Utils.showProgressDialog(context);
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"ClinicID": clinicID,
"ProjectID": projectID,
"SelectedDate": "",
"SelectedTime": "",
"License": true,
"VersionID": 5.6,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0,
"SessionID": null,
"isDentalAllowedBackend": true,
"DeviceTypeID": 1,
"PatientID": 1,
"ContinueDentalPlan": true,
"IsSearchAppointmnetByClinicID": false
};
dynamic localRes;
await baseAppClient.post(GET_DOCTORS_LIST_URL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getChiefComplaintDoctorList(
int chiefComplaintID, int projectID, BuildContext context,
{doctorId}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
if (await this.sharedPref.getDouble(USER_LAT) != null &&
await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"ChiefComplaintID": chiefComplaintID,
"ProjectID": projectID,
"VersionID": 5.6,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": 0,
"SessionID": null,
"isDentalAllowedBackend": true,
"Latitude": lat.toString(),
"Longitude": long.toString(),
"DeviceTypeID": 1
};
dynamic localRes;
await baseAppClient.post(GET_DENTAL_DOCTORS_LIST_URL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -458,8 +458,77 @@ class TranslationBase {
String get logs => localizedValues['logs'][locale.languageCode]; String get logs => localizedValues['logs'][locale.languageCode];
String get textToSpeech => String get textToSpeech =>
localizedValues['textToSpeech'][locale.languageCode]; localizedValues['textToSpeech'][locale.languageCode];
String get myAppointments => localizedValues['MyAppointments'][locale.languageCode];
String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode];
String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode];
String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode];
String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode];
String get radiology => localizedValues['Radiology'][locale.languageCode];
String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode];
String get lab => localizedValues['Lab'][locale.languageCode];
String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode];
String get medicines => localizedValues['Medicines'][locale.languageCode];
String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode];
String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode];
String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode];
String get myMedical => localizedValues['MyMedical'][locale.languageCode];
String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode];
String get myDoctor => localizedValues['MyDoctor'][locale.languageCode];
String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode];
String get eye => localizedValues['Eye'][locale.languageCode];
String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode];
String get insurance => localizedValues['Insurance'][locale.languageCode];
String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode];
String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode];
String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode];
String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode];
String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode];
String get allergies => localizedValues['Allergies'][locale.languageCode];
String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode];
String get myVaccines => localizedValues['MyVaccines'][locale.languageCode];
String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode];
String get medical => localizedValues['Medical'][locale.languageCode];
String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode];
String get monthly => localizedValues['Monthly'][locale.languageCode];
String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode];
String get sick => localizedValues['Sick'][locale.languageCode];
String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode];
String get myBalance => localizedValues['MyBalance'][locale.languageCode];
String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode];
String get patientCall => localizedValues['PatientCall'][locale.languageCode];
String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode];
String get smartWatches => localizedValues['SmartWatches'][locale.languageCode];
String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode];
String get myTrackers => localizedValues['MyTrackers'][locale.languageCode];
String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode];
String get askYour => localizedValues['AskYour'][locale.languageCode];
String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode];
String get internet => localizedValues['Internet'][locale.languageCode];
String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode];
String get chatbot => localizedValues['Chatbot'][locale.languageCode];
String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode];
String get timeLine => localizedValues['TimeLine'][locale.languageCode];
String get labOrders => localizedValues['LabOrders'][locale.languageCode];
String get billNo => localizedValues['BillNo'][locale.languageCode];
String get prescriptions => localizedValues['Prescriptions'][locale.languageCode];
String get history => localizedValues['History'][locale.languageCode];
String get orderNo => localizedValues['OrderNo'][locale.languageCode];
String get orderDetails => localizedValues['OrderDetails'][locale.languageCode];
String get vitalSign => localizedValues['VitalSign'][locale.languageCode];
String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode];
String get locationDialogMessage => String get locationDialogMessage =>
localizedValues['locationDialogMessage'][locale.languageCode]; localizedValues['locationDialogMessage'][locale.languageCode];
String get km => localizedValues['km'][locale.languageCode];
String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode];
String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode];
String get clickHere => localizedValues['ClickHere'][locale.languageCode];
String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode];
String get iAgreeToTheTermsAndConditionsSubtitle => localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode];
String get save => localizedValues['Save'][locale.languageCode];
String get userAgreement => localizedValues['UserAgreement'][locale.languageCode];
String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -171,7 +171,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 100, height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).disabledColor, color: Theme.of(context).primaryColor,
), ),
), ),
), ),

@ -1,5 +1,13 @@
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../text.dart'; import '../text.dart';
@ -7,8 +15,16 @@ class LaboratoryResultWidget extends StatefulWidget {
final GestureTapCallback onTap; final GestureTapCallback onTap;
final String billNo; final String billNo;
final String details; final String details;
final String orderNo;
final PatientLabOrders patientLabOrder;
const LaboratoryResultWidget({Key key, this.onTap, this.billNo, this.details}) const LaboratoryResultWidget(
{Key key,
this.onTap,
this.billNo,
this.details,
this.orderNo,
this.patientLabOrder})
: super(key: key); : super(key: key);
@override @override
@ -17,9 +33,12 @@ class LaboratoryResultWidget extends StatefulWidget {
class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> { class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
bool _isShowMore = false; bool _isShowMore = false;
bool _isShowMoreGeneral = false;
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(15),
child: Column( child: Column(
@ -45,7 +64,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts('Bill No'), Texts('Invoice No'),
Texts(widget.billNo), Texts(widget.billNo),
], ],
), ),
@ -102,7 +121,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
)), )),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded(child: Texts('Result')), Expanded(child: Texts('Special Result')),
Container( Container(
width: 25, width: 25,
height: 25, height: 25,
@ -132,12 +151,211 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
bottomRight: Radius.circular(5.0), bottomRight: Radius.circular(5.0),
)), )),
duration: Duration(milliseconds: 7000), duration: Duration(milliseconds: 7000),
child: Text(widget.details?? 'No Data'), child: Container(
) width: double.infinity,
child: Text(widget.details ?? 'No Data')),
),
SizedBox(height: 12,),
BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrder),
builder: (_, model, w) => NetworkBaseView(
baseViewModel: model,
child: Container(
child: Column(
children: [
InkWell(
onTap: () {
setState(() {
_isShowMoreGeneral = !_isShowMoreGeneral;
},
);
},
child: Container(
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
child: Row(
children: <Widget>[
Expanded(child: Texts('General Result')),
Container(
width: 25,
height: 25,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red[900]),
child: Icon(
_isShowMoreGeneral
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.white,
size: 22,
),
)
],
),
),
),
if (_isShowMoreGeneral)
AnimatedContainer(
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(5.0),
bottomRight: Radius.circular(5.0),
),
),
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts('U/A'),
InkWell(
onTap: () {
model.getPatientLabResult(
patientLabOrder:
widget.patientLabOrder);
},
child: Texts(
'Flow Chart',
decoration: TextDecoration.underline,
color: Colors.blue,
),
),
],
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(
width: 2.0, color: Colors.grey[300]),
),
children: fullData(model.labResultList),
),
],
),
),
),
],
),
),
),
)
], ],
), ),
], ],
), ),
); );
} }
List<TableRow> fullData(List<LabResult> labResultList) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0.0): Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
),
),
child: Center(
child: Texts(
'Description',
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
),
child: Center(
child: Texts('Value', color: Colors.white),
),
height: 60),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(10.0):Radius.circular(0.0),
topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
),
),
child: Center(
child: Texts('Range', color: Colors.white),
),
height: 60),
),
],
),
);
labResultList.forEach((lab) {
tableRow.add(
TableRow(
children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.description,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.resultValue,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.referanceRange,
textAlign: TextAlign.center,
),
),
),
),
],
),
);
});
return tableRow;
}
} }

@ -34,7 +34,7 @@ class _CustomSwitchState extends State<CustomSwitch>
void initState() { void initState() {
super.initState(); super.initState();
_animationController = _animationController =
AnimationController(vsync: this, duration: Duration(milliseconds: 800)); AnimationController(vsync: this, duration: Duration(milliseconds: 500));
_circleAnimation = Tween(begin: 0.0, end: 30.0).animate(CurvedAnimation( _circleAnimation = Tween(begin: 0.0, end: 30.0).animate(CurvedAnimation(
parent: _animationController, parent: _animationController,
curve: Curves.easeOutQuint, curve: Curves.easeOutQuint,

@ -74,7 +74,7 @@ class AppScaffold extends StatelessWidget {
) )
: buildBodyWidget(), : buildBodyWidget(),
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
bottomNavigationBar: BottomBarSearch() // bottomNavigationBar: BottomBarSearch()
//floatingActionButton: FloatingSearchButton(), //floatingActionButton: FloatingSearchButton(),
); );
} }

@ -312,7 +312,7 @@ class _SearchBot extends State<BottomBarSearch> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList(clinicId, projectId, context, doctorId: doctorName) .getDoctorsList(clinicId, projectId, false, context, doctorId: doctorName)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -33,6 +33,10 @@ dependencies:
device_info: ^0.4.2+4 device_info: ^0.4.2+4
#popub #popub
giffy_dialog: ^1.8.0 giffy_dialog: ^1.8.0
# Flutter Html View
flutter_html: ^1.0.2
# Native # Native
flutter_device_type: ^0.2.0 flutter_device_type: ^0.2.0
local_auth: ^0.6.2+3 local_auth: ^0.6.2+3
@ -40,7 +44,7 @@ dependencies:
url_launcher: ^5.5.0 url_launcher: ^5.5.0
shared_preferences: ^0.5.8 shared_preferences: ^0.5.8
flutter_flexible_toast: ^0.1.4 flutter_flexible_toast: ^0.1.4
firebase_messaging: 6.0.12 firebase_messaging: ^7.0.0
# Progress bar # Progress bar
progress_hud_v2: ^2.0.0 progress_hud_v2: ^2.0.0
@ -69,7 +73,7 @@ dependencies:
charts_flutter: ^0.9.0 charts_flutter: ^0.9.0
# Qr code Scanner # Qr code Scanner
barcode_scan: any barcode_scan: ^3.0.1
# Rating Stars # Rating Stars
rating_bar: ^0.2.0 rating_bar: ^0.2.0
@ -78,7 +82,7 @@ dependencies:
table_calendar: ^2.2.3 table_calendar: ^2.2.3
# SVG Images # SVG Images
flutter_svg: ^0.17.4 flutter_svg: ^0.18.0
# Location Helper # Location Helper
map_launcher: ^0.8.1 map_launcher: ^0.8.1
@ -100,6 +104,15 @@ dependencies:
#hijri #hijri
hijri: ^2.0.3 hijri: ^2.0.3
#Email Sender
flutter_email_sender: ^3.0.1
#Popup_window
popup_box: ^0.1.0
#Handle Geolocation #Handle Geolocation
geolocator: ^6.0.0+1 geolocator: ^6.0.0+1

Loading…
Cancel
Save