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

merge-update-with-lab-changes
Sultan Khan 5 years ago
commit 71592adf32

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -1 +1 @@
f4a819c27119d0f472892c1088ad1ca3
d69545ca05f0ca200eba92121a1458fb

@ -38,8 +38,8 @@ const GET_PRESCRIPTION_REPORT_ENH =
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';

@ -74,6 +74,10 @@ const Map localizedValues = {
'en': 'Please confirm the appointment to avoid cancellation',
'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'
},
"book-success-confirm-more-24-1-2": {
"en": "The online payment process will be available 24 hours before the appointment.",
"ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."
},
'upcoming-payment-pending': {
'en':
'Online Payment will be Activated before 24 Hours of Appointment Time',
@ -1110,4 +1114,44 @@ const Map localizedValues = {
"not-active": {"en": "Not Active", "ar": "غير نشط"},
"card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"},
"Dr": {"en": "Dr. ", "ar": "الدكتور."},
"empty": {
"en": "You do not have any records.",
"ar": "ليس لديك أي سجلات"
},
"last-visit": {
"en": "How was your last visit with doctor?",
"ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"
},
"tap-title": {
"en": "Please rate the doctor",
"ar": "يرجى تقييم الطبيب"
},
"later": {
"en": "Later",
"ar": "لاحقاً"
},
"sendSuc":{
"en":"A copy has been sent to the email",
"ar":"تم إرسال نسخة إلى البريد الإلكتروني"
},
"instructions": {
"en": "You can now talk directly to the appointments department by chat or request a call back",
"ar": "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال"
},
"instructions-pharmacies": {
"en": "You can now talk directly to the pharmacist by chat or request a call back",
"ar": "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال"
},
"select-hospital": {
"en": "Choose Hospital",
"ar": "اختر المستشفى"
},
"start": {
"en": "Start",
"ar": "ابدأ"
},
"info-chat": {
"en": "This service allows you to chat with customer service directly without the need to call.",
"ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً."
},
};

@ -0,0 +1,88 @@
class LabOrderResult {
String description;
dynamic femaleInterpretativeData;
int gender;
int lineItemNo;
dynamic maleInterpretativeData;
dynamic notes;
String packageID;
int patientID;
String projectID;
String referanceRange;
String resultValue;
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
dynamic superVerifiedOn;
String testCode;
String uOM;
String verifiedOn;
String verifiedOnDateTime;
LabOrderResult(
{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});
LabOrderResult.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;
}
}

@ -82,7 +82,7 @@ class RequestPrescriptionReport {
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
// data['DischargeNo'] = this.dischargeNo;
data['DischargeNo'] = this.dischargeNo;
return data;
}
}

@ -47,15 +47,8 @@ class BaseAppClient {
}
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'en'
? 2
: 1;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;

@ -8,6 +8,7 @@ class LiveChatService extends BaseService {
List<GetPatientICProjectsModel> LivechatModelList = List();
Map<String, dynamic> body = Map();
// body['body']
Future getAllLiveChatOrders() async {
hasError = false;

@ -13,14 +13,13 @@ class HospitalService extends BaseService {
double _longitude;
_getCurrentLocation() async {
await getLastKnownPosition().then((value) {
await Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
// currentLocation = LatLng(position.latitude, position.longitude);
}
Future getHospitals() async {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
@ -32,7 +33,7 @@ class LabsService extends BaseService {
List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
List<LabResult> labOrdersResultsList = List();
List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult(
{String projectID,
@ -88,11 +89,11 @@ class LabsService extends BaseService {
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;
await baseAppClient.post(GET_Patient_LAB_RESULT,
await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT,
onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabResult.fromJson(lab));
labOrdersResultsList.add(LabOrderResult.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -72,6 +72,7 @@ class PrescriptionsService extends BaseService {
prescriptionReportEnhList.clear();
if(prescriptions.isInOutPatient){
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{

@ -67,7 +67,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.patientName = user.firstName + " " + user.lastName;
_requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendRadReportEmail.projectName = finalRadiology.projectName;
_requestSendRadReportEmail.radResult = 'asd'; //finalRadiology.reportData;
_requestSendRadReportEmail.radResult = finalRadiology.reportData;
_requestSendRadReportEmail.to = user.emailAddress;
_requestSendRadReportEmail.dateofBirth = user.dateofBirth;

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:geolocator/geolocator.dart';
class PharmacyService extends BaseService {
List<PharmaciesModel> _medicineItem = List();
@ -59,10 +60,29 @@ class PharmacyService extends BaseService {
projectID: 15,
);
double _latitude;
double _longitude;
_getCurrentLocation() async {
await Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
}
Future getMedicineList({String drugName}) async {
hasError = false;
_requestGetPharmaciesModel.pHRItemName = drugName;
try {
// await _getCurrentLocation();
Map<String,dynamic> body = Map();
body['PHR_itemName'] = drugName;
body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true;
// body['Latitude'] = _latitude;
// body['Longitude'] = _longitude;
await baseAppClient.post(GET_PHARMCY_ITEMS,
onSuccess: (dynamic response, int statusCode) {
_medicineItem.clear();
@ -72,15 +92,18 @@ class PharmacyService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestGetPharmaciesModel.toJson());
} catch (error) {
throw error;
}
}, body: body);
}
Future getPharmaciesList({int itemID}) async {
_pharmaciesListModel.itemID = itemID;
try {
await _getCurrentLocation();
Map<String,dynamic> body = Map();
body['ItemID'] = itemID;
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
await baseAppClient.post(GET_PHARMACY_LIST,
onSuccess: (dynamic response, int statusCode) {
_pharmaciesList.clear();
@ -91,9 +114,7 @@ class PharmacyService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _pharmaciesListModel.toJson());
} catch (error) {
throw error;
}
}, body:body);
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
@ -12,7 +13,7 @@ class LabsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
LabsService _labsService = locator<LabsService>();
List<LabResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();

@ -119,6 +119,7 @@ class PrescriptionsViewModel extends BaseViewModel {
int patientID,
String clinicName,
String doctorName,
String mes,
int projectID}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(
@ -128,7 +129,7 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error);
} else {
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle);
}
}

@ -80,7 +80,7 @@ class RadiologyViewModel extends BaseViewModel {
}
sendRadReportEmail(
{FinalRadiology finalRadiology}) async {
{FinalRadiology finalRadiology,String mes}) async {
setState(ViewState.BusyLocal);
await _radiologyService.sendRadReportEmail(
finalRadiology: finalRadiology
@ -89,7 +89,7 @@ class RadiologyViewModel extends BaseViewModel {
error = _radiologyService.error;
AppToast.showErrorToast(message: error);
} else {
AppToast.showSuccessToast(message: 'A copy has been sent to the email');
AppToast.showSuccessToast(message: mes);
}
setState(ViewState.Idle);
}

@ -23,9 +23,11 @@ class PharmacyViewModel extends BaseViewModel {
setState(ViewState.Error);
} else
setState(ViewState.Idle);
//_pharmacyService.clearPharmaciesList();
}
clearMedicineSearch(){
_pharmacyService.clearMedicineList();
}
Future getMedicine({String name}) async {
hasError = false;
_pharmacyService.clearMedicineList();

@ -30,7 +30,6 @@ class ProjectViewModel extends BaseViewModel {
bool get isArabic => _isArabic;
// BaseViewModel baseViewModel = locator<BaseViewModel>()
StreamSubscription subscription;
ProjectViewModel() {
@ -54,7 +53,7 @@ class ProjectViewModel extends BaseViewModel {
});
}
void loadSharedPrefLanguage() async {
Future loadSharedPrefLanguage() async {
currentLanguage =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);

@ -241,7 +241,7 @@ class _BookConfirmState extends State<BookConfirm> {
),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text(
TranslationBase.of(context).date +
": " +

@ -165,6 +165,173 @@ class _BookSuccessState extends State<BookSuccess> {
],
),
),
bottomNavigationBar: getBottomContainer(),
);
}
Widget getBottomContainer() {
switch (widget.patientShareResponse.nextAction) {
case 0:
return Container();
break;
case 10:
return _getConfirmAppoButtons();
break;
case 15:
return _getPaymentPendingAppo();
break;
case 20:
return _getPayNowButtons();
break;
case 30:
return _getQRButtons();
break;
case 50:
return _getConfirmAppoButtons();
break;
}
}
Widget _getQRButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getPayNowButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getConfirmAppoButtons() {
return Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 5.0),
height: MediaQuery.of(context).size.height * 0.15,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
@ -238,8 +405,7 @@ class _BookSuccessState extends State<BookSuccess> {
_getBulletPoint("1"),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
"Please confirm the appointment to avoid the cancellation",
child: Text(TranslationBase.of(context).upcomingConfirm,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)),
),
@ -263,7 +429,7 @@ class _BookSuccessState extends State<BookSuccess> {
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
"The online payment process will be available 24 hours before the appointment.",
TranslationBase.of(context).upcomingConfirmMore,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)),
),
@ -277,67 +443,6 @@ class _BookSuccessState extends State<BookSuccess> {
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
child: Image.asset("assets/images/new-design/payment-method.png"),
),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.32,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo =
widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
],
);
}
@ -463,52 +568,6 @@ class _BookSuccessState extends State<BookSuccess> {
),
],
),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
],
);
}
@ -770,34 +829,34 @@ class _BookSuccessState extends State<BookSuccess> {
),
],
),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
// Container(
// alignment: Alignment.bottomCenter,
// height: MediaQuery.of(context).size.height * 0.18,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// minWidth: MediaQuery.of(context).size.width * 0.7,
// height: 45.0,
// child: RaisedButton(
// color: new Color(0xFF60686b),
// textColor: Colors.white,
// disabledTextColor: Colors.white,
// disabledColor: new Color(0xFFbcc2c4),
// onPressed: () {
// // navigateToQR(context);
// getAppoQR(context);
// },
// child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
// style: TextStyle(fontSize: 18.0)),
// ),
// ),
// ],
// ),
// ),
],
);
}

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
@ -27,13 +31,14 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -43,11 +48,11 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 20,
height: 70,
),
Container(
width: double.infinity,
height: 200,
height: 230,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
@ -56,10 +61,29 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :',
color: Colors.white,
textAlign: TextAlign.start,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: projectViewModel.isArabic? 10:20,
),
Texts(
TranslationBase.of(context).instructions,
color: Colors.white,
textAlign: TextAlign.start,
),
SizedBox(
height:projectViewModel.isArabic? 8:25,
),
Texts(
TranslationBase.of(context)
.selectHospitalDec +
" :",
color: Colors.white,
fontWeight: FontWeight.w700,
textAlign: TextAlign.start,
),
],
),
),
),
@ -91,7 +115,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
borderRadius: BorderRadius.all(
Radius.circular(5)),
color: tappedIndex == index
? Colors.red
? Theme.of(context).primaryColor
: Colors.white,
),
child: Padding(
@ -104,8 +128,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
onTap: () {
setState(() {
tappedIndex = index;
chat =
"http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}";
chat = "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
});
},
child: Row(
@ -135,7 +158,8 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
.black,
textAlign: TextAlign
.center,
))), //model.cOCItemList[index].cOCTitl
))),
//model.cOCItemList[index].cOCTitl
IconButton(
icon: Icon(
Icons.arrow_forward_ios,
@ -171,18 +195,19 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13,
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
height: MediaQuery.of(context).size.height * 0.07,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'ٍStart',
child: SecondaryButton(
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
disabled: chat.isEmpty,
onTap: () {
print("chat=" + chat);
launch(chat);
},
),

@ -1,6 +1,8 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -16,9 +18,15 @@ class LiveChatPage extends StatefulWidget {
class _LiveChatPageState extends State<LiveChatPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
_tabController = TabController(length: 2, vsync: this);
}
@ -33,7 +41,10 @@ class _LiveChatPageState extends State<LiveChatPage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Locations',
imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,
appBarTitle: TranslationBase.of(context).service,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -71,25 +82,22 @@ class _LiveChatPageState extends State<LiveChatPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(' Hospitals '),
child: Texts(TranslationBase.of(context).hospitals),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(' Pharmacies '),
child: Texts(TranslationBase.of(context).pharmacies),
),
),
],

@ -1,12 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
@ -28,10 +31,11 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
@ -43,12 +47,9 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
Container(
width: double.infinity,
height: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(''), fit: BoxFit.cover),
),
child: Texts(
'You can now talk directly to the pharmacist by chat or request a call back',
TranslationBase.of(context).instructionsPharmacies,
color: Colors.black,
textAlign: TextAlign.center,
),
@ -63,20 +64,20 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13,
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
height: MediaQuery.of(context).size.height * 0.87,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'ٍStart',
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
onTap: () {
print("chat=" + chat);
chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1";
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic? 1:2}";
launch(chat);
},
),

@ -411,11 +411,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']);
finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']);
finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -429,19 +433,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
if (prescriptionReportEnhList.length != 0) {
navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']);
if (res['ListPRM'].length != 0) {
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err);
});
}

@ -63,6 +63,7 @@ class _ToDoState extends State<ToDo> {
appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo,
isShowAppBar: false,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView(
child: Column(

@ -42,13 +42,7 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider;
@override
// void initState() {
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// getToDoCount();
// });
// super.initState();
// }
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@ -93,10 +87,9 @@ class _HomePageState extends State<HomePage> {
)
],
),
),
Container(
width: double.infinity,
height: projectViewModel.isArabic ? 120 : 110),
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110),
],
),
Positioned(
@ -111,7 +104,7 @@ class _HomePageState extends State<HomePage> {
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin)
child: (!model.isLogin )
? Container(
width: double.infinity,
height: 160,
@ -180,6 +173,7 @@ class _HomePageState extends State<HomePage> {
color: Theme.of(context)
.primaryColor,
fontSize: 14,
),
),
),
@ -307,9 +301,7 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(
context)
.height,
TranslationBase.of(context).height,
color: Colors.white,
fontSize: 10,
),
@ -341,9 +333,7 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(
context)
.weight,
TranslationBase.of(context).weight,
color: Colors.white,
fontSize: 10,
)
@ -357,10 +347,8 @@ class _HomePageState extends State<HomePage> {
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/blood-drop.png',
@ -374,9 +362,7 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
Texts(
TranslationBase.of(
context)
.bloodType,
TranslationBase.of(context).bloodType,
color: Colors.white,
fontSize: 10,
)
@ -415,35 +401,28 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
width: 60,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/vital_sign_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
fit: BoxFit.contain,)),
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context).vitalSigns,
TranslationBase.of(context)
.vitalSigns,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -471,35 +450,26 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/search_medicine_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
width: 50,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
fit: BoxFit.contain,)),
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -511,9 +481,8 @@ class _HomePageState extends State<HomePage> {
),
),
Expanded(
child: DashboardItem(
opacity: 1.0,
onTap: () {
child: DashboardItem(opacity: 1.0,
onTap: (){
Navigator.push(
context,
FadePage(
@ -526,35 +495,25 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/online_payment_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/online_payment_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 15,
fit: BoxFit.contain,)),
),
SizedBox(height: 15,),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -590,33 +549,34 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).myAppointments,
title: TranslationBase.of(context)
.myAppointments,
imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context)
.myAppointmentsList,
subTitle: TranslationBase.of(context).myAppointmentsList,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: LabsHomePage())),
onTap: () => Navigator.push(context,
FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png',
subTitle: TranslationBase.of(context).lab,
subTitle:
TranslationBase.of(context).lab,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: RadiologyHomePage())),
onTap: () => Navigator.push(context,
FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
title: TranslationBase.of(context)
.radiology,
imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context)
.radiologySubtitle,
@ -639,7 +599,8 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
@ -658,7 +619,8 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor,
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
@ -669,11 +631,12 @@ class _HomePageState extends State<HomePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context, FadePage(page: InsuranceCard()));
Navigator.push(context,
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
@ -682,6 +645,7 @@ class _HomePageState extends State<HomePage> {
),
],
),
],
),
),
@ -694,7 +658,7 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
opacity: 1.0,
opacity:1.0,
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -707,38 +671,31 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(context)
.viewAllHabibMedicalService,
TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
// Expanded(
// child: Container(),
// ),
Text(
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewAll,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
color: Colors.white,
bold: true,
)
],
),
),
height: 106,
imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700],
//color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context,
FadePage(
page: AllHabibMedicalService(
goToMyProfile: widget.goToMyProfile,
))),
context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))),
),
DashboardItem(
opacity: 1.0,
opacity:1.0,
onTap: () {
Navigator.push(
context, FadePage(page: ContactUsPage()));
@ -758,7 +715,7 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.0,
fontSize: SizeConfig.textMultiplier * 1.0 ,
),
Expanded(
child: Container(),

@ -468,7 +468,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 3:
return TranslationBase.of(context).services;
case 4:
return TranslationBase.of(context).bookAppo;
return TranslationBase.of(context).todoList;
}
}

@ -45,21 +45,22 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity,
height: 65,
decoration: BoxDecoration(
color: HexColor('#B61422'),
color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).totalBalance,
'${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar,
color: Colors.white,
bold: true,
),
Texts(
'${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar,
TranslationBase.of(context).totalBalance,
color: Colors.white,
bold: true,
),
],
),

@ -63,6 +63,7 @@ class PrescriptionItemsPage extends StatelessWidget {
height: 70,
),
),
SizedBox(width: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
@ -121,6 +122,7 @@ class PrescriptionItemsPage extends StatelessWidget {
height: 70,
),
),
SizedBox(width: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
@ -133,6 +135,11 @@ class PrescriptionItemsPage extends StatelessWidget {
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
@ -143,7 +150,7 @@ class PrescriptionItemsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.23,
height: MediaQuery.of(context).size.height * 0.1,
color: Colors.grey[100],
child: Column(
children: <Widget>[
@ -157,10 +164,12 @@ class PrescriptionItemsPage extends StatelessWidget {
patientID: prescriptions.patientID,
clinicName: prescriptions.companyName,
doctorName: prescriptions.doctorName,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID),
loading: model.state == ViewState.BusyLocal,
),
),
if(false)
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(

@ -51,11 +51,13 @@ class RadiologyDetailsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
height: model.radImageURL.isNotEmpty ? MediaQuery.of(context).size.height * 0.2:MediaQuery.of(context).size.height * 0.15,
color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Divider(),
if(model.radImageURL.isNotEmpty)
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
@ -70,6 +72,7 @@ class RadiologyDetailsPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () => model.sendRadReportEmail(
mes: TranslationBase.of(context).sendSuc,
finalRadiology: finalRadiology),
label: TranslationBase.of(context).sendCopyRad,
loading: model.state == ViewState.BusyLocal,

@ -1,9 +1,12 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class VitalSignDetailsWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList;
@ -21,6 +24,7 @@ class VitalSignDetailsWidget extends StatefulWidget {
class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
@ -38,7 +42,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(),
children: fullData(projectViewModel),
),
],
),
@ -46,20 +50,21 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
);
}
List<TableRow> fullData() {
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
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(
widget.title1,
TranslationBase.of(context).date,
color: Colors.white,
),
),
@ -69,9 +74,10 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
@ -81,32 +87,34 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
)
]));
widget.vitalList.forEach((vital) {
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
var data = vital.toJson()[widget.viewKey];
if (data != 0)
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate.weekday) : DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate.month) : DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
),
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey]}',
textAlign: TextAlign.center,
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey]}',
textAlign: TextAlign.center,
),
),
),
),
),
]));
]));
});
return tableRow;
}

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class VitalSignItemDetailsScreen extends StatelessWidget {
final VitalSignDetails pageKey;
@ -15,43 +17,56 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
switch (pageKey) {
case VitalSignDetails.BodyMeasurements:
VSchart = [
{
'name': 'Height',
'nameAr': 'الطول',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm',
},
{
'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date',
'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg',
},
{
'name': 'BodyMassIndex',
'name': 'Body Mass Index',
'nameAr': 'مؤشر كتلة الجسم',
'title1': 'Date',
'title2': 'BodyMass',
'title2Ar': 'كتلة الجسم',
'viewKey': 'BodyMassIndex',
},
{
'name': 'HeadCircumCm',
'name': 'Head Circum Cm',
'nameAr': 'محيط رأس سم',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeadCircumCm',
},
{
'name': 'Ideal Body Weight (Lbs)',
'nameAr': 'وزن الجسم المثالي (رطل)',
'title1': 'Date',
'title2': 'Ideal Weight',
'title2Ar': 'الوزن المثالي',
'viewKey': 'IdealBodyWeightLbs',
},
{
'name': 'LeanBodyWeightLbs (Lbs)',
'name': 'Lean Body WeightLbs (Lbs)',
'nameAr': 'رطل وزن الجسم النحيل (رطل)',
'title1': 'Date',
'title2': 'Lean Weight',
'title2Ar': 'وزن خفيف',
'viewKey': 'LeanBodyWeightLbs',
}
];
@ -61,9 +76,11 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.Temperature:
VSchart = [
{
'name': 'Temperature In Celcius',
'name': 'Temperature In Celsius',
'nameAr': 'درجة الحرارة بالدرجة المئوية',
'title1': 'Date',
'title2': 'C',
'title2Ar': 'ْس',
'viewKey': 'TemperatureCelcius',
},
];
@ -73,8 +90,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Pulse Beat Per Minute',
'nameAr': 'نبضة نبضة في الدقيقة',
'title1': 'Date',
'title2': 'Minute',
'title2Ar': 'دقيقة',
'viewKey': 'PulseBeatPerMinute',
},
];
@ -84,8 +103,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Respiration Beat Per Minute',
'nameAr': 'ضربات التنفس في الدقيقة',
'title1': 'Date',
'title2': 'Beat Per Minute',
'title2Ar': 'نفس في الدقيقة',
'viewKey': 'RespirationBeatPerMinute',
},
];
@ -95,14 +116,18 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Blood Pressure Higher',
'nameAr': 'ضغط الدم الإنقباض',
'title1': 'Date',
'title2': 'Minute',
'title2Ar': 'الإنقباض',
'viewKey': 'BloodPressureHigher',
},
{
'name': 'Blood Pressure Lower',
'nameAr': 'ضغط الدم الإنبساط',
'title1': 'Date',
'title2': 'Minute',
'title2Ar': 'الإنبساط',
'viewKey': 'BloodPressureLower',
}
];
@ -112,8 +137,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Respiration Rate',
'nameAr': 'معدل التنفس',
'title1': 'Date',
'title2': 'bpm',
'title2Ar': 'نفس',
'viewKey': 'RespirationBeatPerMinute',
},
];
@ -123,8 +150,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'FIO2',
'nameAr': 'معدل النبض بالدقيقة',
'title1': 'Date',
'title2': 'bpm',
'title2Ar': 'نبضة',
'viewKey': 'PulseBeatPerMinute',
},
];
@ -134,8 +163,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'PainScore',
'nameAr': 'نقاط الألم',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'PainScore',
},
];
@ -145,8 +176,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date',
'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg',
},
];
@ -157,8 +190,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [
{
'name': 'Height Cm',
'nameAr': 'الطول سم',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm',
},
];
@ -177,9 +212,9 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
return vitalListTemp.length != 0
? VitalSingChartAndDetials(
vitalList: vitalList,
name: chartInfo['name'],
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'],
title1: chartInfo['title1'],
title2: chartInfo['title2'],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'],
viewKey: chartInfo['viewKey'])
: Container();
}).toList(),

@ -45,7 +45,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
endDate: vitalList[0].vitalSignDate,
),
bodyWidget: VitalSignDetailsWidget(
vitalList: vitalList.reversed.toList(),
vitalList: vitalList,
title1: title1,
title2: title2,
viewKey: viewKey,
@ -59,6 +59,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
if (vitalList.length > 0) {
vitalList.forEach(
(element) {
if( element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add(
TimeSeriesSales(
new DateTime(element.vitalSignDate.year,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -50,11 +51,15 @@ class PaymentService extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.normal,
),
Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
fit: BoxFit.fill,
height: 55,
width: double.infinity,
SizedBox(height: 12,),
Container(
margin: EdgeInsets.only(left: 10,right: 10),
child: Image.asset(
'assets/images/online_payment_icon.png',
fit: BoxFit.fill,
height: 55,
width: double.infinity,
),
),
],
),
@ -82,12 +87,13 @@ class PaymentService extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(height: 12,),
Align(
alignment: projectViewModel.isArabic
alignment: !projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/device_icon.png',
height: 55,
),
),
@ -124,12 +130,13 @@ class PaymentService extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(height: 12,),
Align(
alignment: projectViewModel.isArabic
alignment: !projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/new-design/check-in.png',
height: 55,
),
),

@ -21,6 +21,8 @@ class MedicineSearch extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>(
allowAny: true,
onModelReady: (model) => model.clearMedicineSearch(),
builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold(
baseViewModel: model,

@ -24,12 +24,14 @@ class PharmaciesList extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>(
allowAny: true,
onModelReady: (model) => model.getPharmacies(id: medicineID),
builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaciesList,
baseViewModel: model,
isShowAppBar: true,
isShowDecPage: false,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(
@ -146,7 +148,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell(
child: Icon(
Icons.phone,
color: Colors.red,
color: Theme.of(context).primaryColor,
),
onTap: () => launch("tel://" +
model.pharmacyList[index].phoneNumber),
@ -157,7 +159,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell(
child: Icon(
Icons.local_pharmacy,
color: Colors.red,
color: Theme.of(context).primaryColor,
),
onTap: () {
MapsLauncher.launchCoordinates(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -60,10 +61,10 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Column(
children: <Widget>[
SizedBox(
height: 25,
height: 25, //5598
),
Texts(
'How would you rate your last visit to the doctor',
TranslationBase.of(context).lastVisit,
bold: true,
color: Colors.black,
),
@ -114,7 +115,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
),
Center(
child: Texts(
'Please rate the doctor',
TranslationBase.of(context).tapTitle,
textAlign: TextAlign.center,
)),
SizedBox(
@ -204,7 +205,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
);
}
},
label: "Next",
label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
@ -222,7 +223,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
);
},
child: Texts(
'Later',
TranslationBase.of(context).later,
decoration: TextDecoration.underline,
color: HexColor('#151DFE'),
fontSize: 18,

@ -27,7 +27,7 @@ class _SplashScreenState extends State<SplashScreen> {
Timer(
Duration(seconds: 1, milliseconds: 500),
() {
getUserData().then((value) {
Provider.of<ProjectViewModel>(context, listen: false).loadSharedPrefLanguage().then((value) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
@ -39,13 +39,7 @@ class _SplashScreenState extends State<SplashScreen> {
}
Future getUserData() async {
var data = await sharedPref.getObject(USER_PROFILE);
if (data != null) {
AuthenticatedUser userData = AuthenticatedUser.fromJson(data);
// Provider.of<ProjectViewModel>(context, listen: false).isLogin = true;
//authenticatedUserObject.isLogin = true;
//authenticatedUserObject.user = userData;
}
Provider.of<ProjectViewModel>(context, listen: false).loadSharedPrefLanguage();
}
@override

@ -24,7 +24,8 @@ class DateUtil {
try {
var dateT = date.split('/');
var year = dateT[2].substring(0,4);
return DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0]));
var dateP = DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0]));
return dateP;
} catch (e) {
print(e);
}

@ -220,6 +220,9 @@ class TranslationBase {
String get upcomingConfirm =>
localizedValues['upcoming-confirm'][locale.languageCode];
String get upcomingConfirmMore =>
localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode];
String get upcomingPaymentPending =>
localizedValues['upcoming-payment-pending'][locale.languageCode];
@ -1000,6 +1003,18 @@ class TranslationBase {
String get notActive => localizedValues['not-active'][locale.languageCode];
String get cardDetail => localizedValues['card-detail'][locale.languageCode];
String get dr => localizedValues['Dr'][locale.languageCode];
String get sendSuc => localizedValues['sendSuc'][locale.languageCode];
String get instructions => localizedValues['instructions'][locale.languageCode];
String get instructionsPharmacies => localizedValues['instructions-pharmacies'][locale.languageCode];
String get selectHospitalDec => localizedValues['select-hospital'][locale.languageCode];
String get start => localizedValues['start'][locale.languageCode];
String get infoChat => localizedValues['info-chat'][locale.languageCode];
String get noRecords => localizedValues['empty'][locale.languageCode];
String get lastVisit => localizedValues['last-visit'][locale.languageCode];
String get tapTitle => localizedValues['tap-title'][locale.languageCode];
String get later => localizedValues['later'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -25,6 +25,7 @@ class _FloatingButtonState extends State<FloatingButton>
AnimationController _animationController;
Animation _animation;
PermissionService permission = new PermissionService();
@override
void initState() {
_animationController = AnimationController(
@ -63,16 +64,17 @@ class _FloatingButtonState extends State<FloatingButton>
onTapCancel: () {
_animationController.forward();
},
onTap: (){permission.vibrate(widget.onTap, context);},
onTap: () {
permission.vibrate(widget.onTap, context);
},
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(54.0)),
borderRadius: BorderRadius.all(Radius.circular(70.0)),
color: Theme.of(context).primaryColor,
boxShadow: [
BoxShadow(
@ -81,31 +83,15 @@ class _FloatingButtonState extends State<FloatingButton>
spreadRadius:
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
offset: Offset(0, 7.0),
blurRadius: 55.0)
blurRadius: 70.0)
]),
child: Container(
child: Column(
children: [
Icon(EvaIcons.calendar,color: Colors.white,size: 23,),
Texts(
TranslationBase.of(context).book,
bold: !projectViewModel.isArabic,
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 17,
),
Texts(
TranslationBase.of(context).appointmentLabel,
bold: projectViewModel.isArabic,
color: Colors.white,
fontSize:projectViewModel.isArabic ? 8.8 : 8,
),
],
),
width: 54,
height: 54,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
projectViewModel.isArabic
? 'assets/images/booking_ar.png'
: 'assets/images/booking_en.png',
// fit: BoxFit.cover,
width: 90,
height: 90,
),
)),
));

@ -177,7 +177,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
width: MediaQuery.of(context).size.width,
height: 100,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
color: widget.disabled? Colors.grey: widget.color ?? Theme.of(context).primaryColor,
),
),
),

@ -1,12 +1,16 @@
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class LabResultDetailsWidget extends StatefulWidget {
final List<LabResult> labResult;
final List<LabOrderResult> labResult;
LabResultDetailsWidget({
this.labResult,
@ -19,6 +23,7 @@ class LabResultDetailsWidget extends StatefulWidget {
class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
@ -36,7 +41,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(),
children: fullData(projectViewModel),
),
],
),
@ -44,7 +49,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
);
}
List<TableRow> fullData() {
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
@ -52,7 +57,8 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
child: Center(
@ -69,7 +75,8 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
child: Center(
@ -79,6 +86,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
)
]));
widget.labResult.forEach((vital) {
var date =DateUtil.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [
Container(
child: Container(
@ -86,7 +94,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
color: Colors.white,
child: Center(
child: Texts(
'${vital.verifiedOn}',
'${projectViewModel.isArabic? DateUtil.getWeekDayArabic(date.weekday): DateUtil.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtil.getMonthArabic(date.month) : DateUtil.getMonth(date.month)} ${date.year}',
textAlign: TextAlign.center,
),
),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
@ -15,7 +16,7 @@ class LabResultChartAndDetails extends StatelessWidget {
@required this.name,
}) : super(key: key);
final List<LabResult> labResult;
final List<LabOrderResult> labResult;
final String name;
List<TimeSeriesSales> _timeSeriesData = [];
@ -28,8 +29,8 @@ class LabResultChartAndDetails extends StatelessWidget {
headerWidget: AppTimeSeriesChart(
seriesList: generateData(),
chartName: name,
startDate: DateUtil.convertStringToDateTime(labResult[0].sampleCollectedOn),
endDate: DateTime.now(),
startDate: DateUtil.convertStringToDate(labResult[0].verifiedOnDateTime),
endDate: DateUtil.convertStringToDate(labResult[labResult.length-1].verifiedOnDateTime),
),
bodyWidget: LabResultDetailsWidget(
labResult: labResult,
@ -49,7 +50,7 @@ class LabResultChartAndDetails extends StatelessWidget {
var resultValueInt = resultValueDouble.toInt();
_timeSeriesData.add(
TimeSeriesSales(
DateUtil.convertStringToDateTime(element.sampleCollectedOn),
DateUtil.convertStringToDate(element.verifiedOnDateTime),
resultValueInt,
),
);

@ -38,18 +38,18 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
children: <Widget>[
if (widget.url != null)
Container(
height: 39.0,
width: 39.0,
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(7)),
child: Image.memory(
dataFromBase64String(widget.url),
height: SizeConfig.imageSizeMultiplier * 11,
width: SizeConfig.imageSizeMultiplier * 11,
height: SizeConfig.imageSizeMultiplier * 19,
width: SizeConfig.imageSizeMultiplier * 18,
fit: BoxFit.cover,
),
),
),
SizedBox(width: 10,),
Expanded(
child: Center(
child: Padding(

Loading…
Cancel
Save