Merge branch 'fix_er' into 'development'

Fix ER service

See merge request Cloud_Solution/diplomatic-quarter!244
merge-requests/245/merge
Mohammad Aljammal 4 years ago
commit 8d39e8b385

@ -1 +1 @@
269226e53e3ba1b1460fd3df51f89f77
59a6c452ee075b50114918f17f1ad8f5

@ -452,4 +452,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 5a17be3f8af73a757fa4439c77cf6ab2db29a6e7
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.0

@ -225,8 +225,8 @@ const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtu
const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = '/Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = '/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
//URL to get medicine and pharmacies list
const CHANNEL = 3;

@ -288,7 +288,7 @@ const Map localizedValues = {
},
"ksa": {"en": "KSA", "ar": "السعودية"},
"dubai": {"en": "Dubai", "ar": "دبي"},
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"enter-email": {"en": "Please Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
"myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
@ -1065,7 +1065,7 @@ const Map localizedValues = {
"pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"},
"pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"},
"inside-home": {"en": "Inside Home", "ar": "داخل المنزل"},
"have-appo": {"en": "Do you have an appointment?", "ar": "هل لديك موعد؟"},
"have-appo": {"en": "Do you have an appointment ?", "ar": "هل لديك موعد ؟"},
"dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"},
"select-all": {
"en": "Please select all fields",
@ -1469,4 +1469,13 @@ const Map localizedValues = {
"en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
},
"instructionAgree": {
"en": "This monthly Health Summary Report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as an official report so no medical decisions should be taken based on it.",
"ar": "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية"
},
"reqId": {
"en": "Request ID:",
"ar": " رقم الطلب"
},
};

@ -18,8 +18,8 @@ class PickUpRequestPresOrder {
int pickupSpot;
dynamic dropoffLocationId;
int transportationMethodId;
double cost;
double vAT;
dynamic cost;
dynamic vAT;
double totalPrice;
int amountCollected;
int selectedAmbulate;

@ -11,24 +11,24 @@ class Reports {
String setupId;
int patientID;
int doctorID;
Null clinicID;
dynamic clinicID;
DateTime requestDate;
bool isRead;
DateTime isReadOn;
int actualDoctorRate;
String clinicDescription;
Null clinicDescriptionN;
dynamic clinicDescriptionN;
String docName;
Null docNameN;
String doctorImageURL;
Null doctorName;
Null doctorNameN;
dynamic doctorName;
dynamic doctorNameN;
int doctorRate;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
int noOfPatientsRate;
String projectName;
Null projectNameN;
dynamic projectNameN;
Reports(
{this.status,
@ -61,37 +61,41 @@ class Reports {
this.projectNameN});
Reports.fromJson(Map<String, dynamic> json) {
status = json['Status'];
encounterDate = DateUtil.convertStringToDate(
json['EncounterDate']); //json['EncounterDate'];
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
encounterNo = json['EncounterNo'];
procedureId = json['ProcedureId'];
requestType = json['RequestType'];
setupId = json['SetupId'];
patientID = json['PatientID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
requestDate = DateUtil.convertStringToDate(
json['RequestDate']); //json['RequestDate'];
isRead = json['IsRead'];
isReadOn =
DateUtil.convertStringToDate(json['IsReadOn']); //json['IsReadOn'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
docName = json['DocName'];
docNameN = json['DocNameN'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
noOfPatientsRate = json['NoOfPatientsRate'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
try {
status = json['Status'];
encounterDate = DateUtil.convertStringToDate(
json['EncounterDate']); //json['EncounterDate'];
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
encounterNo = json['EncounterNo'];
procedureId = json['ProcedureId'];
requestType = json['RequestType'];
setupId = json['SetupId'];
patientID = json['PatientID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
requestDate = DateUtil.convertStringToDate(
json['RequestDate']); //json['RequestDate'];
isRead = json['IsRead'];
isReadOn =
DateUtil.convertStringToDate(json['IsReadOn']); //json['IsReadOn'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
docName = json['DocName'];
docNameN = json['DocNameN'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
noOfPatientsRate = json['NoOfPatientsRate'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
}catch(e){
print(e);
}
}
Map<String, dynamic> toJson() {

@ -68,6 +68,19 @@ class ReportsService extends BaseService {
}, body: body);
}
Future updateEmail({String email}) async {
Map<String, dynamic> body = Map<String, dynamic>();
body['EmailAddress'] = email;
body['isDentalAllowedBackend'] = false;
hasError = false;
await baseAppClient.post(UPDATE_PATENT_EMAIL,
onSuccess: (dynamic response, int statusCode) {},
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>();

@ -13,11 +13,9 @@ class ReportsMonthlyViewModel extends BaseViewModel {
ReportsService _reportsService = locator<ReportsService>();
String get userAgreementContent => _reportsService.userAgreementContent;
getUserTermsAndConditions() async{
getUserTermsAndConditions() async {
setState(ViewState.Busy);
await _reportsService.getUserTermsAndConditions();
if (_reportsService.hasError) {
@ -28,19 +26,33 @@ class ReportsMonthlyViewModel extends BaseViewModel {
}
}
updatePatientHealthSummaryReport({String message, bool isSummary})async{
updatePatientHealthSummaryReport(
{String message,
bool isSummary,
bool isUpdateEmail = false,
String email}) async {
setState(ViewState.BusyLocal);
await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
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);
if (isUpdateEmail) {
await _reportsService.updateEmail(email: email);
if (_reportsService.hasError) {
error = _reportsService.error;
AppToast.showErrorToast(message: error);
setState(ViewState.ErrorLocal);
} else {
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
}
} else {
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
}
}
}
}

@ -79,7 +79,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.93,
width: MediaQuery.of(context).size.width * 0.90,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -92,8 +92,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
indicatorSize: TabBarIndicatorSize.label,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -46,7 +46,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
@override
Widget build(BuildContext context) {
return AppScaffold(
body: widget.amRequestViewModel.pickUpRequestPresOrder != null
body: false
? Column(
children: [
SizedBox(
@ -62,18 +62,18 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
OrderLogItem(
title: 'Request ID',
title: TranslationBase.of(context).reqId,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.presOrderID
.toString(),
),
OrderLogItem(
title: 'Status',
title: TranslationBase.of(context).status,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.ambulateDescription,
),
OrderLogItem(
title: 'Last edit time',
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget
.amRequestViewModel
@ -81,17 +81,17 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
.lastEditDate)),
),
OrderLogItem(
title: 'Pickup Location',
title: TranslationBase.of(context).pickupLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.pickupLocationName,
),
OrderLogItem(
title: 'Drop off Location',
title: TranslationBase.of(context).dropoffLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.dropoffLocationName,
),
OrderLogItem(
title: 'Trasfaer way',
title: TranslationBase.of(context).transportMethod,
value: widget
.amRequestViewModel.pickUpRequestPresOrder.title,
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.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:flutter/cupertino.dart';
@ -51,7 +52,7 @@ class _BillAmountState extends State<BillAmount> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Bill Amount '),
Texts(TranslationBase.of(context).billAmount),
SizedBox(
height: 10,
),
@ -73,7 +74,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Amount before tax: ',
TranslationBase.of(context).patientShareB,
textAlign: TextAlign.start,
color: Colors.black,
fontSize: 15,
@ -91,7 +92,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.price}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}',
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
@ -108,7 +109,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Tax amount :',
TranslationBase.of(context).patientShareTax,
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -121,7 +122,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.vAT}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -143,7 +144,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Total amount payable',
TranslationBase.of(context).patientShareTotal,
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -162,7 +163,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.totalPrice}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -176,7 +177,7 @@ class _BillAmountState extends State<BillAmount> {
SizedBox(
height: 10,
),
Texts('Select Ambulate',bold: true,),
Texts(TranslationBase.of(context).selectAmbulate,bold: true,),
SizedBox(height: 5,),
Row(
children: [
@ -196,7 +197,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Wheelchair'),
title: Text(TranslationBase.of(context).wheelchair),
leading: Radio(
value: Ambulate.Wheelchair,
groupValue: _ambulate,
@ -227,7 +228,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Walker'),
title: Text(TranslationBase.of(context).walker),
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
@ -263,7 +264,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Stretcher'),
title: Text(TranslationBase.of(context).stretcher),
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
@ -294,7 +295,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('None'),
title: Text(TranslationBase.of(context).none),
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
@ -313,7 +314,7 @@ class _BillAmountState extends State<BillAmount> {
),
SizedBox(height: 12,),
NewTextFields(
hintText: 'Note',
hintText: TranslationBase.of(context).notes,
initialValue: note,
onChanged: (value){
setState(() {
@ -340,7 +341,7 @@ class _BillAmountState extends State<BillAmount> {
widget.changeCurrentTab(3);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/pickupLocation/PickupLocationFromMap.dart';
@ -78,7 +79,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Pickup Location'),
Texts(TranslationBase.of(context).pickupLocation),
SizedBox(
height: 15,
),
@ -110,7 +111,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getSelectFromMapName()),
Texts(getSelectFromMapName(context)),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -123,7 +124,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Pickup Spot'),
Texts(TranslationBase.of(context).pickupSpot),
SizedBox(
height: 5,
),
@ -141,7 +142,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Texts('Inside Home'),
title: Texts(TranslationBase.of(context).insideHome),
leading: Checkbox(
activeColor: Colors.red[800],
value: _isInsideHome,
@ -157,7 +158,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Do you have an appointment ?'),
Texts(TranslationBase.of(context).haveAppo),
SizedBox(
height: 5,
),
@ -182,7 +183,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Text('Yes'),
title: Texts(TranslationBase.of(context).yes),
leading: Radio(
value: HaveAppointment.YES,
groupValue: _haveAppointment,
@ -217,7 +218,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Text('No'),
title: Texts(TranslationBase.of(context).no),
leading: Radio(
value: HaveAppointment.NO,
groupValue: _haveAppointment,
@ -250,7 +251,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Drop off Location'),
Texts(TranslationBase.of(context).dropoffLocation),
SizedBox(
height: 8,
),
@ -270,7 +271,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName('Pickup Location')),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -286,7 +287,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Pickup Location'),
Texts(TranslationBase.of(context).pickupLocation),
SizedBox(
height: 15,
),
@ -306,7 +307,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName('Pickup Location')),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -319,7 +320,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Drop off Location'),
Texts(TranslationBase.of(context).dropoffLocation),
SizedBox(
height: 8,
),
@ -351,7 +352,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getSelectFromMapName()),
Texts(getSelectFromMapName(context)),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -377,7 +378,7 @@ class _PickupLocationState extends State<PickupLocation> {
onTap: () {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(
message: 'please select all fields');
message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
@ -427,7 +428,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.changeCurrentTab(2);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],
@ -455,8 +456,8 @@ class _PickupLocationState extends State<PickupLocation> {
return _selectedHospital == null ? title : _selectedHospital.name;
}
String getSelectFromMapName() {
return _result != null ? _result.formattedAddress : 'Select From Map';
String getSelectFromMapName(context) {
return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap;
}
getAppointment() {
@ -494,7 +495,7 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() {
_haveAppointment = HaveAppointment.NO;
});
AppToast.showErrorToast(message: 'You don\'t have any appointment');
AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment);
}
}).catchError((e) {
ProgressDialogUtil.hideProgressDialog(context);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.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:flutter/cupertino.dart';
@ -67,7 +68,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 12,
),
Texts('Select Transportation Method'),
Texts(TranslationBase.of(context).transportHeading),
...List.generate(
widget.amRequestViewModel.amRequestModeList.length,
(index) => InkWell(
@ -108,7 +109,7 @@ class _SelectTransportationMethodState
Expanded(
flex: 1,
child: Texts(
'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'),
TranslationBase.of(context).sar+' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
)
],
),
@ -118,7 +119,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 12,
),
Texts('Select Direction'),
Texts(TranslationBase.of(context).directionHeading),
SizedBox(
height: 5,
),
@ -144,7 +145,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('To Hospital'),
title: Text(TranslationBase.of(context).toHospital),
leading: Radio(
value: Direction.ToHospital,
groupValue: _direction,
@ -175,7 +176,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('Form Hospital'),
title: Text(TranslationBase.of(context).fromHospital),
leading: Radio(
value: Direction.FromHospital,
groupValue: _direction,
@ -200,7 +201,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 8,
),
Texts('Select Direction'),
Texts(TranslationBase.of(context).directionHeading),
SizedBox(
height: 5,
),
@ -222,7 +223,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('One Way'),
title: Text(TranslationBase.of(context).oneDirec),
leading: Radio(
value: Way.OneWay,
groupValue: _way,
@ -253,7 +254,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('Two Ways'),
title: Text(TranslationBase.of(context).twoDirec),
leading: Radio(
value: Way.TwoWays,
groupValue: _way,
@ -298,7 +299,7 @@ class _SelectTransportationMethodState
widget.changeCurrentTab(1);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.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:flutter/cupertino.dart';
@ -27,7 +28,7 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Summary'),
Texts(TranslationBase.of(context).RRTSummary),
SizedBox(height: 5,),
Container(
width: double.infinity,
@ -39,11 +40,11 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Transportation Method',color: Colors.grey,),
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
SizedBox(height: 8,),
Texts('Direction',color: Colors.grey,),
Texts(TranslationBase.of(context).directions,color: Colors.grey,),
Texts('From Hospital',bold: true,),
SizedBox(height: 8,),
@ -92,7 +93,7 @@ class _SummaryState extends State<Summary> {
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: 'Send',
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER);

@ -74,7 +74,6 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -2,10 +2,12 @@ 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/gif_loader_dialog_utils.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/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -19,6 +21,8 @@ class MonthlyReportsPage extends StatefulWidget {
class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
bool isAgree = false;
bool isSummary = false;
String email = "";
final formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
@ -29,135 +33,161 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
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;
});
},
)
],
child: Form(
key: formKey,
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;
});
if(!isSummary) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase
.of(context)
.updateSuccessfully, isSummary: isSummary);
GifLoaderDialogUtils.hideDialog(context);
}
},
)
],
),
),
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
model.user.emailAddress,
bold: true,
),
],
SizedBox(
height: 15,
),
),
Divider(
height: 10.4,
thickness: 1.0,
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Container(
margin: EdgeInsets.all(8),
child: TextFields(
fillColor: Colors.red,
hintText: 'email@email.com',
fontSize: 20,
initialValue: model.user.emailAddress,
fontWeight: FontWeight.w600,
onChanged: (text) {
email = text;
},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).enterEmail;
else
return null;
},
),
),
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: [
Expanded(
child: Texts(TranslationBase.of(context)
.toViewTheTermsAndConditions),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
);
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
},
child: Texts(
TranslationBase.of(context).clickHere,
color: Colors.blue,
),
)
activeColor: Colors.red,
),
Texts(TranslationBase.of(context).iAgreeToTheTermsAndConditions),
],
),
),
SizedBox(
height: 5,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).save,
disabled: (!isAgree || !isSummary ),
onTap: () async {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase
.of(context)
.updateSuccessfully,
isSummary: isSummary,
isUpdateEmail: true,
email: email.isNotEmpty ? email : model.user
.emailAddress);
GifLoaderDialogUtils.hideDialog(context);
}
},
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,
Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
TranslationBase.of(context)
.instructionAgree,
fontWeight: FontWeight.normal,
),
),
SizedBox(
height: 12,
),
),
SizedBox(
height: 12,
),
Center(child: Image.asset('assets/images/report.jpg'))
],
Center(child: Image.asset('assets/images/report.jpg'))
],
),
),
),
),

@ -1042,7 +1042,7 @@ class TranslationBase {
String get selectAmbulate =>
localizedValues['select-ambulate'][locale.languageCode];
String get wheelchair => localizedValues['wheelchair'][locale.languageCode];
String get walker => localizedValues['walker"'][locale.languageCode];
String get walker => localizedValues['walker'][locale.languageCode];
String get stretcher => localizedValues['stretcher'][locale.languageCode];
String get none => localizedValues['none'][locale.languageCode];
String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode];
@ -1248,6 +1248,8 @@ class TranslationBase {
String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode];
String get NearestEr => localizedValues['NearestEr'][locale.languageCode];
String get infoCMC => localizedValues['infoCMC'][locale.languageCode];
String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode];
String get reqId => localizedValues['reqId'][locale.languageCode];
}

@ -46,8 +46,7 @@ class TextFields extends StatefulWidget {
this.suffixIcon,
this.autoFocus,
this.onChanged,
// this.initialValue,
this.initialValue,
this.minLines,
this.maxLines,
this.inputFormatters,
@ -78,8 +77,7 @@ class TextFields extends StatefulWidget {
: super(key: key);
final String hintText;
// final String initialValue;
final String initialValue;
final String type;
final bool autoFocus;
final IconData suffixIcon;
@ -230,7 +228,7 @@ class _TextFieldsState extends State<TextFields> {
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
// initialValue: widget.initialValue,
initialValue: widget.initialValue,
onChanged: widget.onChanged,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,

Loading…
Cancel
Save