Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into Haroon
# Conflicts: # android/app/src/main/AndroidManifest.xml # lib/config/config.dart # lib/pages/AlHabibMedicalService/ health_calculators.dart # lib/pages/BookAppointment/widgets/DoctorView.dart # lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dartfix_authentication
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,60 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
enum Ambulate { Wheelchair, Walker, Stretcher, None }
|
||||||
|
|
||||||
|
extension SelectedAmbulate on Ambulate {
|
||||||
|
String getAmbulateTitle(BuildContext context) {
|
||||||
|
switch (this) {
|
||||||
|
case Ambulate.Wheelchair:
|
||||||
|
return 'Wheelchair';
|
||||||
|
break;
|
||||||
|
case Ambulate.Walker:
|
||||||
|
return 'Walker';
|
||||||
|
break;
|
||||||
|
case Ambulate.Stretcher:
|
||||||
|
return 'Stretcher';
|
||||||
|
break;
|
||||||
|
case Ambulate.None:
|
||||||
|
return 'None';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 'None';
|
||||||
|
}
|
||||||
|
|
||||||
|
int selectAmbulateNumber() {
|
||||||
|
switch (this) {
|
||||||
|
case Ambulate.Wheelchair:
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case Ambulate.Walker:
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
|
case Ambulate.Stretcher:
|
||||||
|
return 2;
|
||||||
|
break;
|
||||||
|
case Ambulate.None:
|
||||||
|
return 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ambulate getAmbulateById(int id) {
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
return Ambulate.Wheelchair;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
return Ambulate.Walker;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
return Ambulate.Stretcher;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
return Ambulate.None;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ambulate.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
enum OrderService { AMBULANCE }
|
||||||
|
|
||||||
|
extension SelectedOrderService on OrderService {
|
||||||
|
int getIdOrderService() {
|
||||||
|
switch (this) {
|
||||||
|
case OrderService.AMBULANCE:
|
||||||
|
return 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
OrderService getOrderServiceById(int id) {
|
||||||
|
switch (id) {
|
||||||
|
case 4:
|
||||||
|
return OrderService.AMBULANCE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return OrderService.AMBULANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,165 @@
|
|||||||
|
class CreateNewUser_New {
|
||||||
|
Null date;
|
||||||
|
int languageID;
|
||||||
|
int serviceName;
|
||||||
|
Null time;
|
||||||
|
Null androidLink;
|
||||||
|
Null authenticationTokenID;
|
||||||
|
Null data;
|
||||||
|
bool dataw;
|
||||||
|
int dietType;
|
||||||
|
Null errorCode;
|
||||||
|
Null errorEndUserMessage;
|
||||||
|
Null errorEndUserMessageN;
|
||||||
|
Null errorMessage;
|
||||||
|
int errorType;
|
||||||
|
int foodCategory;
|
||||||
|
Null iOSLink;
|
||||||
|
bool isAuthenticated;
|
||||||
|
int mealOrderStatus;
|
||||||
|
int mealType;
|
||||||
|
int messageStatus;
|
||||||
|
int numberOfResultRecords;
|
||||||
|
Null patientBlodType;
|
||||||
|
Null successMsg;
|
||||||
|
Null successMsgN;
|
||||||
|
Null htmlResult;
|
||||||
|
bool isHMGPatient;
|
||||||
|
bool isRegister;
|
||||||
|
bool isSendSMS;
|
||||||
|
Null listBabyInformationModel;
|
||||||
|
Null listBabyNeedReminderModel;
|
||||||
|
Null listCreateVaccinationTableModel;
|
||||||
|
Null listHisPatientModel;
|
||||||
|
Null listUserInformationModel;
|
||||||
|
Null listUserInformationModelNew;
|
||||||
|
Null listVaccinationTableModel;
|
||||||
|
Null tokinID;
|
||||||
|
int userID;
|
||||||
|
Null verificationCode;
|
||||||
|
|
||||||
|
CreateNewUser_New(
|
||||||
|
{this.date,
|
||||||
|
this.languageID,
|
||||||
|
this.serviceName,
|
||||||
|
this.time,
|
||||||
|
this.androidLink,
|
||||||
|
this.authenticationTokenID,
|
||||||
|
this.data,
|
||||||
|
this.dataw,
|
||||||
|
this.dietType,
|
||||||
|
this.errorCode,
|
||||||
|
this.errorEndUserMessage,
|
||||||
|
this.errorEndUserMessageN,
|
||||||
|
this.errorMessage,
|
||||||
|
this.errorType,
|
||||||
|
this.foodCategory,
|
||||||
|
this.iOSLink,
|
||||||
|
this.isAuthenticated,
|
||||||
|
this.mealOrderStatus,
|
||||||
|
this.mealType,
|
||||||
|
this.messageStatus,
|
||||||
|
this.numberOfResultRecords,
|
||||||
|
this.patientBlodType,
|
||||||
|
this.successMsg,
|
||||||
|
this.successMsgN,
|
||||||
|
this.htmlResult,
|
||||||
|
this.isHMGPatient,
|
||||||
|
this.isRegister,
|
||||||
|
this.isSendSMS,
|
||||||
|
this.listBabyInformationModel,
|
||||||
|
this.listBabyNeedReminderModel,
|
||||||
|
this.listCreateVaccinationTableModel,
|
||||||
|
this.listHisPatientModel,
|
||||||
|
this.listUserInformationModel,
|
||||||
|
this.listUserInformationModelNew,
|
||||||
|
this.listVaccinationTableModel,
|
||||||
|
this.tokinID,
|
||||||
|
this.userID,
|
||||||
|
this.verificationCode});
|
||||||
|
|
||||||
|
CreateNewUser_New.fromJson(Map<String, dynamic> json) {
|
||||||
|
date = json['Date'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
time = json['Time'];
|
||||||
|
androidLink = json['AndroidLink'];
|
||||||
|
authenticationTokenID = json['AuthenticationTokenID'];
|
||||||
|
data = json['Data'];
|
||||||
|
dataw = json['Dataw'];
|
||||||
|
dietType = json['DietType'];
|
||||||
|
errorCode = json['ErrorCode'];
|
||||||
|
errorEndUserMessage = json['ErrorEndUserMessage'];
|
||||||
|
errorEndUserMessageN = json['ErrorEndUserMessageN'];
|
||||||
|
errorMessage = json['ErrorMessage'];
|
||||||
|
errorType = json['ErrorType'];
|
||||||
|
foodCategory = json['FoodCategory'];
|
||||||
|
iOSLink = json['IOSLink'];
|
||||||
|
isAuthenticated = json['IsAuthenticated'];
|
||||||
|
mealOrderStatus = json['MealOrderStatus'];
|
||||||
|
mealType = json['MealType'];
|
||||||
|
messageStatus = json['MessageStatus'];
|
||||||
|
numberOfResultRecords = json['NumberOfResultRecords'];
|
||||||
|
patientBlodType = json['PatientBlodType'];
|
||||||
|
successMsg = json['SuccessMsg'];
|
||||||
|
successMsgN = json['SuccessMsgN'];
|
||||||
|
htmlResult = json['HtmlResult'];
|
||||||
|
isHMGPatient = json['IsHMGPatient'];
|
||||||
|
isRegister = json['IsRegister'];
|
||||||
|
isSendSMS = json['IsSendSMS'];
|
||||||
|
listBabyInformationModel = json['List_BabyInformationModel'];
|
||||||
|
listBabyNeedReminderModel = json['List_BabyNeedReminderModel'];
|
||||||
|
listCreateVaccinationTableModel = json['List_CreateVaccinationTableModel'];
|
||||||
|
listHisPatientModel = json['List_His_PatientModel'];
|
||||||
|
listUserInformationModel = json['List_UserInformationModel'];
|
||||||
|
listUserInformationModelNew = json['List_UserInformationModel_New'];
|
||||||
|
listVaccinationTableModel = json['List_VaccinationTableModel'];
|
||||||
|
tokinID = json['TokinID'];
|
||||||
|
userID = json['UserID'];
|
||||||
|
verificationCode = json['VerificationCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Date'] = this.date;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Time'] = this.time;
|
||||||
|
data['AndroidLink'] = this.androidLink;
|
||||||
|
data['AuthenticationTokenID'] = this.authenticationTokenID;
|
||||||
|
data['Data'] = this.data;
|
||||||
|
data['Dataw'] = this.dataw;
|
||||||
|
data['DietType'] = this.dietType;
|
||||||
|
data['ErrorCode'] = this.errorCode;
|
||||||
|
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
|
||||||
|
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
|
||||||
|
data['ErrorMessage'] = this.errorMessage;
|
||||||
|
data['ErrorType'] = this.errorType;
|
||||||
|
data['FoodCategory'] = this.foodCategory;
|
||||||
|
data['IOSLink'] = this.iOSLink;
|
||||||
|
data['IsAuthenticated'] = this.isAuthenticated;
|
||||||
|
data['MealOrderStatus'] = this.mealOrderStatus;
|
||||||
|
data['MealType'] = this.mealType;
|
||||||
|
data['MessageStatus'] = this.messageStatus;
|
||||||
|
data['NumberOfResultRecords'] = this.numberOfResultRecords;
|
||||||
|
data['PatientBlodType'] = this.patientBlodType;
|
||||||
|
data['SuccessMsg'] = this.successMsg;
|
||||||
|
data['SuccessMsgN'] = this.successMsgN;
|
||||||
|
data['HtmlResult'] = this.htmlResult;
|
||||||
|
data['IsHMGPatient'] = this.isHMGPatient;
|
||||||
|
data['IsRegister'] = this.isRegister;
|
||||||
|
data['IsSendSMS'] = this.isSendSMS;
|
||||||
|
data['List_BabyInformationModel'] = this.listBabyInformationModel;
|
||||||
|
data['List_BabyNeedReminderModel'] = this.listBabyNeedReminderModel;
|
||||||
|
data['List_CreateVaccinationTableModel'] =
|
||||||
|
this.listCreateVaccinationTableModel;
|
||||||
|
data['List_His_PatientModel'] = this.listHisPatientModel;
|
||||||
|
data['List_UserInformationModel'] = this.listUserInformationModel;
|
||||||
|
data['List_UserInformationModel_New'] = this.listUserInformationModelNew;
|
||||||
|
data['List_VaccinationTableModel'] = this.listVaccinationTableModel;
|
||||||
|
data['TokinID'] = this.tokinID;
|
||||||
|
data['UserID'] = this.userID;
|
||||||
|
data['VerificationCode'] = this.verificationCode;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
class DeleteBaby {
|
||||||
|
bool isLogin;
|
||||||
|
int babyID;
|
||||||
|
int editedBy;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
String sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
int patientID;
|
||||||
|
String tokenID;
|
||||||
|
int patientTypeID;
|
||||||
|
int patientType;
|
||||||
|
|
||||||
|
DeleteBaby(
|
||||||
|
{this.isLogin,
|
||||||
|
this.babyID,
|
||||||
|
this.editedBy,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID,
|
||||||
|
this.patientID,
|
||||||
|
this.tokenID,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.patientType});
|
||||||
|
|
||||||
|
DeleteBaby.fromJson(Map<String, dynamic> json) {
|
||||||
|
isLogin = json['IsLogin'];
|
||||||
|
babyID = json['BabyID'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['IsLogin'] = this.isLogin;
|
||||||
|
data['BabyID'] = this.babyID;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
class PatientAllPresOrders {
|
||||||
|
int iD;
|
||||||
|
String patientID;
|
||||||
|
bool patientOutSA;
|
||||||
|
bool isOutPatient;
|
||||||
|
int projectID;
|
||||||
|
int nearestProjectID;
|
||||||
|
double longitude;
|
||||||
|
double latitude;
|
||||||
|
String appointmentNo;
|
||||||
|
String dischargeID;
|
||||||
|
int lineItemNo;
|
||||||
|
int status;
|
||||||
|
String description;
|
||||||
|
String descriptionN;
|
||||||
|
String createdOn;
|
||||||
|
int serviceID;
|
||||||
|
int createdBy;
|
||||||
|
String editedOn;
|
||||||
|
int editedBy;
|
||||||
|
int channel;
|
||||||
|
dynamic clientRequestID;
|
||||||
|
bool returnedToQueue;
|
||||||
|
dynamic pickupDateTime;
|
||||||
|
dynamic pickupLocationName;
|
||||||
|
dynamic dropoffLocationName;
|
||||||
|
int realRRTHaveTransactions;
|
||||||
|
String nearestProjectDescription;
|
||||||
|
String nearestProjectDescriptionN;
|
||||||
|
String projectDescription;
|
||||||
|
String projectDescriptionN;
|
||||||
|
|
||||||
|
PatientAllPresOrders(
|
||||||
|
{this.iD,
|
||||||
|
this.patientID,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.isOutPatient,
|
||||||
|
this.projectID,
|
||||||
|
this.nearestProjectID,
|
||||||
|
this.longitude,
|
||||||
|
this.latitude,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.dischargeID,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.status,
|
||||||
|
this.description,
|
||||||
|
this.descriptionN,
|
||||||
|
this.createdOn,
|
||||||
|
this.serviceID,
|
||||||
|
this.createdBy,
|
||||||
|
this.editedOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.channel,
|
||||||
|
this.clientRequestID,
|
||||||
|
this.returnedToQueue,
|
||||||
|
this.pickupDateTime,
|
||||||
|
this.pickupLocationName,
|
||||||
|
this.dropoffLocationName,
|
||||||
|
this.realRRTHaveTransactions,
|
||||||
|
this.nearestProjectDescription,
|
||||||
|
this.nearestProjectDescriptionN,
|
||||||
|
this.projectDescription,
|
||||||
|
this.projectDescriptionN});
|
||||||
|
|
||||||
|
PatientAllPresOrders.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
isOutPatient = json['IsOutPatient'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
nearestProjectID = json['NearestProjectID'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
dischargeID = json['DischargeID'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
status = json['Status'];
|
||||||
|
description = json['Description'];
|
||||||
|
descriptionN = json['DescriptionN'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
serviceID = json['ServiceID'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
editedOn = json['EditedOn'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
clientRequestID = json['ClientRequestID'];
|
||||||
|
returnedToQueue = json['ReturnedToQueue'];
|
||||||
|
pickupDateTime = json['PickupDateTime'];
|
||||||
|
pickupLocationName = json['PickupLocationName'];
|
||||||
|
dropoffLocationName = json['DropoffLocationName'];
|
||||||
|
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
|
||||||
|
nearestProjectDescription = json['NearestProjectDescription'];
|
||||||
|
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
|
||||||
|
projectDescription = json['ProjectDescription'];
|
||||||
|
projectDescriptionN = json['ProjectDescriptionN'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['IsOutPatient'] = this.isOutPatient;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['NearestProjectID'] = this.nearestProjectID;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['DischargeID'] = this.dischargeID;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['Description'] = this.description;
|
||||||
|
data['DescriptionN'] = this.descriptionN;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['ServiceID'] = this.serviceID;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['EditedOn'] = this.editedOn;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['ClientRequestID'] = this.clientRequestID;
|
||||||
|
data['ReturnedToQueue'] = this.returnedToQueue;
|
||||||
|
data['PickupDateTime'] = this.pickupDateTime;
|
||||||
|
data['PickupLocationName'] = this.pickupLocationName;
|
||||||
|
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||||
|
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
|
||||||
|
data['NearestProjectDescription'] = this.nearestProjectDescription;
|
||||||
|
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
|
||||||
|
data['ProjectDescription'] = this.projectDescription;
|
||||||
|
data['ProjectDescriptionN'] = this.projectDescriptionN;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,207 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
|
||||||
|
|
||||||
|
import 'get_all_transportation_method_list_model.dart';
|
||||||
|
|
||||||
|
class PatientER {
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
String sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
int patientID;
|
||||||
|
String tokenID;
|
||||||
|
int patientTypeID;
|
||||||
|
int patientType;
|
||||||
|
int orderServiceID;
|
||||||
|
String patientIdentificationID;
|
||||||
|
int direction;
|
||||||
|
bool haveAppointment;
|
||||||
|
int tripType;
|
||||||
|
int pickupUrgency;
|
||||||
|
int pickupSpot;
|
||||||
|
String pickupDateTime;
|
||||||
|
int transportationMethodId;
|
||||||
|
int selectedAmbulate;
|
||||||
|
String requesterNote;
|
||||||
|
int requesterFileNo;
|
||||||
|
String requesterMobileNo;
|
||||||
|
bool requesterIsOutSA;
|
||||||
|
int isOutPatient;
|
||||||
|
String pickupLocationName;
|
||||||
|
String dropoffLocationName;
|
||||||
|
int projectID;
|
||||||
|
int createdBy;
|
||||||
|
int lineItemNo;
|
||||||
|
int cost;
|
||||||
|
double vAT;
|
||||||
|
double totalPrice;
|
||||||
|
String pickupLocationLattitude;
|
||||||
|
String pickupLocationLongitude;
|
||||||
|
String dropoffLocationLattitude;
|
||||||
|
String dropoffLocationLongitude;
|
||||||
|
String latitude;
|
||||||
|
String longitude;
|
||||||
|
String appointmentNo;
|
||||||
|
dynamic appointmentClinicName;
|
||||||
|
dynamic appointmentDoctorName;
|
||||||
|
dynamic appointmentBranch;
|
||||||
|
dynamic appointmentTime;
|
||||||
|
PatientERTransportationMethod patientERTransportationMethod;
|
||||||
|
Ambulate ambulate;
|
||||||
|
PatientER(
|
||||||
|
{this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID,
|
||||||
|
this.patientID,
|
||||||
|
this.tokenID,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.patientType,
|
||||||
|
this.orderServiceID = 4,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
this.direction,
|
||||||
|
this.haveAppointment,
|
||||||
|
this.tripType,
|
||||||
|
this.pickupUrgency,
|
||||||
|
this.pickupSpot,
|
||||||
|
this.pickupDateTime,
|
||||||
|
this.transportationMethodId,
|
||||||
|
this.selectedAmbulate,
|
||||||
|
this.requesterNote,
|
||||||
|
this.requesterFileNo,
|
||||||
|
this.requesterMobileNo,
|
||||||
|
this.requesterIsOutSA,
|
||||||
|
this.isOutPatient,
|
||||||
|
this.pickupLocationName,
|
||||||
|
this.dropoffLocationName,
|
||||||
|
this.projectID,
|
||||||
|
this.createdBy,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.cost,
|
||||||
|
this.vAT,
|
||||||
|
this.totalPrice,
|
||||||
|
this.pickupLocationLattitude,
|
||||||
|
this.pickupLocationLongitude,
|
||||||
|
this.dropoffLocationLattitude,
|
||||||
|
this.dropoffLocationLongitude,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.appointmentClinicName,
|
||||||
|
this.appointmentDoctorName,
|
||||||
|
this.appointmentBranch,
|
||||||
|
this.appointmentTime,
|
||||||
|
this.patientERTransportationMethod,
|
||||||
|
this.ambulate});
|
||||||
|
|
||||||
|
PatientER.fromJson(Map<String, dynamic> json) {
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
orderServiceID = json['OrderServiceID'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
direction = json['Direction'];
|
||||||
|
haveAppointment = json['HaveAppointment'];
|
||||||
|
tripType = json['TripType'];
|
||||||
|
pickupUrgency = json['PickupUrgency'];
|
||||||
|
pickupSpot = json['PickupSpot'];
|
||||||
|
pickupDateTime = json['PickupDateTime'];
|
||||||
|
transportationMethodId = json['TransportationMethodId'];
|
||||||
|
selectedAmbulate = json['SelectedAmbulate'];
|
||||||
|
requesterNote = json['RequesterNote'];
|
||||||
|
requesterFileNo = json['RequesterFileNo'];
|
||||||
|
requesterMobileNo = json['RequesterMobileNo'];
|
||||||
|
requesterIsOutSA = json['RequesterIsOutSA'];
|
||||||
|
isOutPatient = json['IsOutPatient'];
|
||||||
|
pickupLocationName = json['PickupLocationName'];
|
||||||
|
dropoffLocationName = json['DropoffLocationName'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
cost = json['Cost'];
|
||||||
|
vAT = json['VAT'];
|
||||||
|
totalPrice = json['TotalPrice'];
|
||||||
|
pickupLocationLattitude = json['PickupLocationLattitude'];
|
||||||
|
pickupLocationLongitude = json['PickupLocationLongitude'];
|
||||||
|
dropoffLocationLattitude = json['DropoffLocationLattitude'];
|
||||||
|
dropoffLocationLongitude = json['DropoffLocationLongitude'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
appointmentClinicName = json['AppointmentClinicName'];
|
||||||
|
appointmentDoctorName = json['AppointmentDoctorName'];
|
||||||
|
appointmentBranch = json['AppointmentBranch'];
|
||||||
|
appointmentTime = json['AppointmentTime'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['OrderServiceID'] = this.orderServiceID;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['Direction'] = this.direction;
|
||||||
|
data['HaveAppointment'] = this.haveAppointment;
|
||||||
|
data['TripType'] = this.tripType;
|
||||||
|
data['PickupUrgency'] = this.pickupUrgency;
|
||||||
|
data['PickupSpot'] = this.pickupSpot;
|
||||||
|
data['PickupDateTime'] = this.pickupDateTime;
|
||||||
|
data['TransportationMethodId'] = this.transportationMethodId;
|
||||||
|
data['SelectedAmbulate'] = this.selectedAmbulate;
|
||||||
|
data['RequesterNote'] = this.requesterNote;
|
||||||
|
data['RequesterFileNo'] = this.requesterFileNo;
|
||||||
|
data['RequesterMobileNo'] = this.requesterMobileNo;
|
||||||
|
data['RequesterIsOutSA'] = this.requesterIsOutSA;
|
||||||
|
data['IsOutPatient'] = this.isOutPatient;
|
||||||
|
data['PickupLocationName'] = this.pickupLocationName;
|
||||||
|
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['Cost'] = this.cost;
|
||||||
|
data['VAT'] = this.vAT;
|
||||||
|
data['TotalPrice'] = this.totalPrice;
|
||||||
|
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
|
||||||
|
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
|
||||||
|
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
|
||||||
|
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['AppointmentClinicName'] = this.appointmentClinicName;
|
||||||
|
data['AppointmentDoctorName'] = this.appointmentDoctorName;
|
||||||
|
data['AppointmentBranch'] = this.appointmentBranch;
|
||||||
|
data['AppointmentTime'] = this.appointmentTime;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,204 @@
|
|||||||
|
class PickUpRequestPresOrder {
|
||||||
|
int id;
|
||||||
|
int presOrderID;
|
||||||
|
String createDate;
|
||||||
|
String lastEditDate;
|
||||||
|
int createdBy;
|
||||||
|
int lastEditBy;
|
||||||
|
bool isActive;
|
||||||
|
String requestNo;
|
||||||
|
int requesterId;
|
||||||
|
int direction;
|
||||||
|
bool haveAppointment;
|
||||||
|
dynamic appointmentId;
|
||||||
|
int tripType;
|
||||||
|
int pickupUrgency;
|
||||||
|
String pickupDateTime;
|
||||||
|
dynamic pickupLocationId;
|
||||||
|
int pickupSpot;
|
||||||
|
dynamic dropoffLocationId;
|
||||||
|
int transportationMethodId;
|
||||||
|
int cost;
|
||||||
|
double vAT;
|
||||||
|
double totalPrice;
|
||||||
|
int amountCollected;
|
||||||
|
int selectedAmbulate;
|
||||||
|
String requesterNote;
|
||||||
|
int status;
|
||||||
|
int paymentStatus;
|
||||||
|
dynamic rejectReason;
|
||||||
|
int visibility;
|
||||||
|
dynamic durationId;
|
||||||
|
dynamic imageId;
|
||||||
|
String requesterFileNo;
|
||||||
|
String requesterMobileNo;
|
||||||
|
bool requesterIsOutSA;
|
||||||
|
String pickupLocationLongitude;
|
||||||
|
String pickupLocationLattitude;
|
||||||
|
String dropoffLocationLongitude;
|
||||||
|
String dropoffLocationLattitude;
|
||||||
|
dynamic appointmentClinicName;
|
||||||
|
dynamic appointmentDoctorName;
|
||||||
|
dynamic appointmentBranch;
|
||||||
|
dynamic appointmentTime;
|
||||||
|
String pickupLocationName;
|
||||||
|
String dropoffLocationName;
|
||||||
|
String title;
|
||||||
|
String titleAR;
|
||||||
|
String ambulateDescription;
|
||||||
|
String ambulateDescriptionN;
|
||||||
|
|
||||||
|
PickUpRequestPresOrder(
|
||||||
|
{this.id,
|
||||||
|
this.presOrderID,
|
||||||
|
this.createDate,
|
||||||
|
this.lastEditDate,
|
||||||
|
this.createdBy,
|
||||||
|
this.lastEditBy,
|
||||||
|
this.isActive,
|
||||||
|
this.requestNo,
|
||||||
|
this.requesterId,
|
||||||
|
this.direction,
|
||||||
|
this.haveAppointment,
|
||||||
|
this.appointmentId,
|
||||||
|
this.tripType,
|
||||||
|
this.pickupUrgency,
|
||||||
|
this.pickupDateTime,
|
||||||
|
this.pickupLocationId,
|
||||||
|
this.pickupSpot,
|
||||||
|
this.dropoffLocationId,
|
||||||
|
this.transportationMethodId,
|
||||||
|
this.cost,
|
||||||
|
this.vAT,
|
||||||
|
this.totalPrice,
|
||||||
|
this.amountCollected,
|
||||||
|
this.selectedAmbulate,
|
||||||
|
this.requesterNote,
|
||||||
|
this.status,
|
||||||
|
this.paymentStatus,
|
||||||
|
this.rejectReason,
|
||||||
|
this.visibility,
|
||||||
|
this.durationId,
|
||||||
|
this.imageId,
|
||||||
|
this.requesterFileNo,
|
||||||
|
this.requesterMobileNo,
|
||||||
|
this.requesterIsOutSA,
|
||||||
|
this.pickupLocationLongitude,
|
||||||
|
this.pickupLocationLattitude,
|
||||||
|
this.dropoffLocationLongitude,
|
||||||
|
this.dropoffLocationLattitude,
|
||||||
|
this.appointmentClinicName,
|
||||||
|
this.appointmentDoctorName,
|
||||||
|
this.appointmentBranch,
|
||||||
|
this.appointmentTime,
|
||||||
|
this.pickupLocationName,
|
||||||
|
this.dropoffLocationName,
|
||||||
|
this.title,
|
||||||
|
this.titleAR,
|
||||||
|
this.ambulateDescription,
|
||||||
|
this.ambulateDescriptionN});
|
||||||
|
|
||||||
|
PickUpRequestPresOrder.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['Id'];
|
||||||
|
presOrderID = json['PresOrderID'];
|
||||||
|
createDate = json['CreateDate'];
|
||||||
|
lastEditDate = json['LastEditDate'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
lastEditBy = json['LastEditBy'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
requestNo = json['RequestNo'];
|
||||||
|
requesterId = json['RequesterId'];
|
||||||
|
direction = json['Direction'];
|
||||||
|
haveAppointment = json['HaveAppointment'];
|
||||||
|
appointmentId = json['AppointmentId'];
|
||||||
|
tripType = json['TripType'];
|
||||||
|
pickupUrgency = json['PickupUrgency'];
|
||||||
|
pickupDateTime = json['PickupDateTime'];
|
||||||
|
pickupLocationId = json['PickupLocationId'];
|
||||||
|
pickupSpot = json['PickupSpot'];
|
||||||
|
dropoffLocationId = json['DropoffLocationId'];
|
||||||
|
transportationMethodId = json['TransportationMethodId'];
|
||||||
|
cost = json['Cost'];
|
||||||
|
vAT = json['VAT'];
|
||||||
|
totalPrice = json['TotalPrice'];
|
||||||
|
amountCollected = json['AmountCollected'];
|
||||||
|
selectedAmbulate = json['SelectedAmbulate'];
|
||||||
|
requesterNote = json['RequesterNote'];
|
||||||
|
status = json['Status'];
|
||||||
|
paymentStatus = json['PaymentStatus'];
|
||||||
|
rejectReason = json['RejectReason'];
|
||||||
|
visibility = json['Visibility'];
|
||||||
|
durationId = json['DurationId'];
|
||||||
|
imageId = json['ImageId'];
|
||||||
|
requesterFileNo = json['RequesterFileNo'];
|
||||||
|
requesterMobileNo = json['RequesterMobileNo'];
|
||||||
|
requesterIsOutSA = json['RequesterIsOutSA'];
|
||||||
|
pickupLocationLongitude = json['PickupLocationLongitude'];
|
||||||
|
pickupLocationLattitude = json['PickupLocationLattitude'];
|
||||||
|
dropoffLocationLongitude = json['DropoffLocationLongitude'];
|
||||||
|
dropoffLocationLattitude = json['DropoffLocationLattitude'];
|
||||||
|
appointmentClinicName = json['AppointmentClinicName'];
|
||||||
|
appointmentDoctorName = json['AppointmentDoctorName'];
|
||||||
|
appointmentBranch = json['AppointmentBranch'];
|
||||||
|
appointmentTime = json['AppointmentTime'];
|
||||||
|
pickupLocationName = json['PickupLocationName'];
|
||||||
|
dropoffLocationName = json['DropoffLocationName'];
|
||||||
|
title = json['Title'];
|
||||||
|
titleAR = json['TitleAR'];
|
||||||
|
ambulateDescription = json['AmbulateDescription'];
|
||||||
|
ambulateDescriptionN = json['AmbulateDescriptionN'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Id'] = this.id;
|
||||||
|
data['PresOrderID'] = this.presOrderID;
|
||||||
|
data['CreateDate'] = this.createDate;
|
||||||
|
data['LastEditDate'] = this.lastEditDate;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['LastEditBy'] = this.lastEditBy;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
data['RequestNo'] = this.requestNo;
|
||||||
|
data['RequesterId'] = this.requesterId;
|
||||||
|
data['Direction'] = this.direction;
|
||||||
|
data['HaveAppointment'] = this.haveAppointment;
|
||||||
|
data['AppointmentId'] = this.appointmentId;
|
||||||
|
data['TripType'] = this.tripType;
|
||||||
|
data['PickupUrgency'] = this.pickupUrgency;
|
||||||
|
data['PickupDateTime'] = this.pickupDateTime;
|
||||||
|
data['PickupLocationId'] = this.pickupLocationId;
|
||||||
|
data['PickupSpot'] = this.pickupSpot;
|
||||||
|
data['DropoffLocationId'] = this.dropoffLocationId;
|
||||||
|
data['TransportationMethodId'] = this.transportationMethodId;
|
||||||
|
data['Cost'] = this.cost;
|
||||||
|
data['VAT'] = this.vAT;
|
||||||
|
data['TotalPrice'] = this.totalPrice;
|
||||||
|
data['AmountCollected'] = this.amountCollected;
|
||||||
|
data['SelectedAmbulate'] = this.selectedAmbulate;
|
||||||
|
data['RequesterNote'] = this.requesterNote;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['PaymentStatus'] = this.paymentStatus;
|
||||||
|
data['RejectReason'] = this.rejectReason;
|
||||||
|
data['Visibility'] = this.visibility;
|
||||||
|
data['DurationId'] = this.durationId;
|
||||||
|
data['ImageId'] = this.imageId;
|
||||||
|
data['RequesterFileNo'] = this.requesterFileNo;
|
||||||
|
data['RequesterMobileNo'] = this.requesterMobileNo;
|
||||||
|
data['RequesterIsOutSA'] = this.requesterIsOutSA;
|
||||||
|
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
|
||||||
|
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
|
||||||
|
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
|
||||||
|
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
|
||||||
|
data['AppointmentClinicName'] = this.appointmentClinicName;
|
||||||
|
data['AppointmentDoctorName'] = this.appointmentDoctorName;
|
||||||
|
data['AppointmentBranch'] = this.appointmentBranch;
|
||||||
|
data['AppointmentTime'] = this.appointmentTime;
|
||||||
|
data['PickupLocationName'] = this.pickupLocationName;
|
||||||
|
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||||
|
data['Title'] = this.title;
|
||||||
|
data['TitleAR'] = this.titleAR;
|
||||||
|
data['AmbulateDescription'] = this.ambulateDescription;
|
||||||
|
data['AmbulateDescriptionN'] = this.ambulateDescriptionN;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,26 +1,41 @@
|
|||||||
import 'package:diplomaticquarterapp/config/config.dart';
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||||
import '../base_service.dart';
|
import '../base_service.dart';
|
||||||
|
|
||||||
class CreteNewBabyService extends BaseService {
|
class CreteNewBabyService extends BaseService {
|
||||||
List<CreateNewBaby> createNewBabyModelList = List();
|
List<CreateNewBaby> createNewBabyModelList = List();
|
||||||
|
List<List_UserInformationModel> userModelList = List();
|
||||||
|
List<CreateNewUser_New> newUserModelList = List();
|
||||||
|
|
||||||
|
|
||||||
Future getCreateNewBabyOrders({ CreateNewBaby newChild}) async {
|
|
||||||
|
Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
|
||||||
hasError = false;
|
hasError = false;
|
||||||
|
await getUser();
|
||||||
|
Map<String, dynamic> body = Map.from(newChild.toJson());
|
||||||
|
body['CreatedBy'] = 102;
|
||||||
|
body['EditedBy'] = 102;
|
||||||
|
body['UserID'] = userID;
|
||||||
|
body['AlertBy'] = 2;
|
||||||
|
body['EmailAddress'] = user.emailAddress;
|
||||||
|
body['IsLogin'] = true;
|
||||||
|
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||||
|
body['MobileNumber'] = user.mobileNumber;
|
||||||
|
body['NationalID'] = user.nationalityID;
|
||||||
|
body['ZipCode'] = user.zipCode;
|
||||||
|
|
||||||
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
|
||||||
await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
createNewBabyModelList.clear();
|
var asd ="";
|
||||||
|
},
|
||||||
response['List_UserInformationModel_New'].forEach((vital) {
|
onFailure: (String error, int statusCode) {
|
||||||
createNewBabyModelList.add(
|
hasError = true;
|
||||||
CreateNewBaby.fromJson(vital));
|
super.error = error;
|
||||||
});
|
}, body: body);
|
||||||
}, onFailure: (String error, int statusCode) {
|
|
||||||
hasError = true;
|
|
||||||
super.error = error;
|
|
||||||
}, body: newChild.toJson());
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -0,0 +1,75 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||||
|
import '../base_service.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class DeleteBabyService extends BaseService{
|
||||||
|
|
||||||
|
List<CreateNewBaby> createNewBabyModelList = List();
|
||||||
|
List<List_UserInformationModel> userModelList = List();
|
||||||
|
List<CreateNewUser_New> newUserModelList = List();
|
||||||
|
|
||||||
|
List<DeleteBaby> deleteBabyModelList= List();
|
||||||
|
|
||||||
|
|
||||||
|
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async {
|
||||||
|
hasError = false;
|
||||||
|
await getUser();
|
||||||
|
Map<String, dynamic> body = Map.from(deleteChild.toJson());
|
||||||
|
// body['CreatedBy'] = 102;
|
||||||
|
body['EditedBy'] = 102;
|
||||||
|
//body['BabyID'] = babyID;
|
||||||
|
//body['BabyID'] = createNewBabyModelList ;
|
||||||
|
// body['AlertBy'] = 2;
|
||||||
|
// body['EmailAddress'] = user.emailAddress;
|
||||||
|
body['IsLogin'] = true;
|
||||||
|
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||||
|
body['MobileNumber'] = user.mobileNumber;
|
||||||
|
body['NationalID'] = user.nationalityID;
|
||||||
|
body['ZipCode'] = user.zipCode;
|
||||||
|
|
||||||
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
|
||||||
|
await baseAppClient.post(DELETE_CHILD_REQUEST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
var asd ="";
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
|
||||||
|
// hasError = false;
|
||||||
|
// await getUser();
|
||||||
|
// Map<String, dynamic> body = Map.from(newChild.toJson());
|
||||||
|
// body['CreatedBy'] = 102;
|
||||||
|
// body['EditedBy'] = 102;
|
||||||
|
// body['UserID'] = userID;
|
||||||
|
// body['AlertBy'] = 2;
|
||||||
|
// body['EmailAddress'] = user.emailAddress;
|
||||||
|
// body['IsLogin'] = true;
|
||||||
|
// body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||||
|
// body['MobileNumber'] = user.mobileNumber;
|
||||||
|
// body['NationalID'] = user.nationalityID;
|
||||||
|
// body['ZipCode'] = user.zipCode;
|
||||||
|
//
|
||||||
|
// body['isDentalAllowedBackend'] = false;
|
||||||
|
//
|
||||||
|
// await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||||
|
// onSuccess: (dynamic response, int statusCode) {
|
||||||
|
// var asd ="";
|
||||||
|
// },
|
||||||
|
// onFailure: (String error, int statusCode) {
|
||||||
|
// hasError = true;
|
||||||
|
// super.error = error;
|
||||||
|
// }, body: body);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,41 +1,35 @@
|
|||||||
|
|
||||||
import 'package:diplomaticquarterapp/config/config.dart';
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||||
import '../base_service.dart';
|
import '../base_service.dart';
|
||||||
|
|
||||||
class UserInformationService extends BaseService{
|
class UserInformationService extends BaseService {
|
||||||
|
|
||||||
List<List_UserInformationModel> userInformationModelList = List();
|
List<List_UserInformationModel> userInformationModelList = List();
|
||||||
Map<String, dynamic> body = Map();
|
Map<String, dynamic> body = Map();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future getUserInformationOrders() async {
|
Future getUserInformationOrders() async {
|
||||||
hasError = false;
|
hasError = false;
|
||||||
await getUser();
|
await getUser();
|
||||||
body['CreatedBy'] = 102;
|
body['CreatedBy'] = 102;
|
||||||
body['EditedBy'] = 102;
|
body['EditedBy'] = 102;
|
||||||
body['EmailAddress'] = user.emailAddress;
|
body['EmailAddress'] = user.emailAddress;
|
||||||
body['IsLogin'] =true;
|
body['IsLogin'] = true;
|
||||||
body['LogInTokenID'] = 'ZBGoQFUG50eQJd6Y7u1ykA==';
|
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||||
body['MobileNumber'] = user.mobileNumber;
|
body['MobileNumber'] = user.mobileNumber;
|
||||||
body['NationalID'] = user.nationalityID;
|
body['NationalID'] = user.nationalityID;
|
||||||
body['ZipCode'] = user.zipCode;
|
body['ZipCode'] = user.zipCode;
|
||||||
body['isDentalAllowedBackend'] = false;
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
|
||||||
|
|
||||||
await baseAppClient.post(GET_USERINFORMATION_REQUEST,
|
await baseAppClient.post(GET_USERINFORMATION_REQUEST,
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
userInformationModelList.clear();
|
userInformationModelList.clear();
|
||||||
|
|
||||||
response['List_UserInformationModel_New'].forEach((vital) {
|
response['List_UserInformationModel_New'].forEach((vital) {
|
||||||
userInformationModelList.add(List_UserInformationModel.fromJson(vital));
|
userInformationModelList.add(List_UserInformationModel.fromJson(vital));
|
||||||
});
|
});
|
||||||
}, onFailure: (String error, int statusCode) {
|
}, onFailure: (String error, int statusCode) {
|
||||||
hasError = true;
|
hasError = true;
|
||||||
super.error = error;
|
super.error = error;
|
||||||
}, body: body);
|
}, body: body);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,25 +1,76 @@
|
|||||||
import 'package:diplomaticquarterapp/config/config.dart';
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
||||||
import '../base_service.dart';
|
import '../base_service.dart';
|
||||||
|
|
||||||
class AmService extends BaseService {
|
class AmService extends BaseService {
|
||||||
List<PatientER_RRT_GetAllTransportationMethodListModel> AmModelList = List();
|
List<PatientERTransportationMethod> amModelList = List();
|
||||||
Map<String, dynamic> body = Map();
|
List<PatientAllPresOrders> patientAllPresOrdersList = List();
|
||||||
|
bool hasPendingOrder = false;
|
||||||
|
int pendingOrderID = 0;
|
||||||
|
String pendingOrderStatus = "";
|
||||||
|
String pendingOrderStatusAR = "";
|
||||||
|
PickUpRequestPresOrder pickUpRequestPresOrder;
|
||||||
|
|
||||||
Future getAllTransportationOrders() async {
|
Future getAllTransportationOrders() async {
|
||||||
hasError = false;
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
body['IdentificationNo'] = user.patientIdentificationNo;
|
||||||
await baseAppClient.post(GET_AMBULANCE_REQUEST,
|
await baseAppClient.post(GET_AMBULANCE_REQUEST,
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
AmModelList.clear();
|
amModelList.clear();
|
||||||
response['AmModelList'].forEach((vital) {
|
response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
|
||||||
AmModelList.add(
|
amModelList.add(PatientERTransportationMethod.fromJson(item));
|
||||||
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital));
|
|
||||||
});
|
});
|
||||||
}, onFailure: (String error, int statusCode) {
|
}, onFailure: (String error, int statusCode) {
|
||||||
hasError = true;
|
hasError = true;
|
||||||
super.error = error;
|
super.error = error;
|
||||||
}, body: body);
|
}, body: body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future getPatientAllPresOrdersList() async {
|
||||||
|
hasError = false;
|
||||||
|
hasPendingOrder = false;
|
||||||
|
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
patientAllPresOrdersList.clear();
|
||||||
|
response['PatientER_GetPatientAllPresOrdersList'].forEach((item) {
|
||||||
|
if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) {
|
||||||
|
var order = PatientAllPresOrders.fromJson(item);
|
||||||
|
patientAllPresOrdersList.add(order);
|
||||||
|
if (order.status == 1) {
|
||||||
|
hasPendingOrder = true;
|
||||||
|
pendingOrderID = order.iD;
|
||||||
|
pendingOrderStatus = order.description;
|
||||||
|
pendingOrderStatusAR = order.descriptionN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: Map());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getOrderDetails() async {
|
||||||
|
hasError = false;
|
||||||
|
hasPendingOrder = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['PresOrderID'] = pendingOrderID;
|
||||||
|
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
patientAllPresOrdersList.clear();
|
||||||
|
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
|
||||||
|
.forEach((item) {
|
||||||
|
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: Map());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,42 @@
|
|||||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||||
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
|
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
|
||||||
|
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
import '../base_view_model.dart';
|
import '../base_view_model.dart';
|
||||||
|
|
||||||
|
|
||||||
class AddNewChildViewModel extends BaseViewModel{
|
class AddNewChildViewModel extends BaseViewModel {
|
||||||
|
|
||||||
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
|
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
|
||||||
|
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
|
||||||
|
// DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
|
||||||
|
bool isAdded = false;
|
||||||
List<CreateNewBaby> get creteNewBabyModelList=> _creteNewBabyService.createNewBabyModelList;
|
///create new baby
|
||||||
getNewBabyOrders({ CreateNewBaby newChild}) async {
|
createNewBabyOrders({ CreateNewBaby newChild}) async {
|
||||||
setState(ViewState.Busy);
|
setState(ViewState.Busy);
|
||||||
|
await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
|
||||||
await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild);
|
if (_creteNewBabyService.hasError) {
|
||||||
|
error = _creteNewBabyService.error;
|
||||||
if ( _creteNewBabyService.hasError) {
|
|
||||||
error = _creteNewBabyService.error;
|
|
||||||
setState(ViewState.Error);
|
setState(ViewState.Error);
|
||||||
} else
|
} else {
|
||||||
|
isAdded = true;
|
||||||
setState(ViewState.Idle);
|
setState(ViewState.Idle);
|
||||||
|
await _childVaccinesService.getAllBabyInformationOrders();
|
||||||
|
if (_childVaccinesService.hasError) {
|
||||||
|
error = _childVaccinesService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,32 +1,82 @@
|
|||||||
|
|
||||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
|
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
|
||||||
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
import '../base_view_model.dart';
|
import '../base_view_model.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
|
|
||||||
class AmRequestViewModel extends BaseViewModel{
|
class AmRequestViewModel extends BaseViewModel {
|
||||||
|
AmService _amService = locator<AmService>();
|
||||||
|
HospitalService _hospitalService = locator<HospitalService>();
|
||||||
|
MedicalService _medicalService = locator<MedicalService>();
|
||||||
|
|
||||||
|
List<PatientERTransportationMethod> get amRequestModeList =>
|
||||||
|
_amService.amModelList;
|
||||||
|
|
||||||
AmService _amService = locator<AmService>();
|
List<PatientAllPresOrders> get patientAllPresOrdersList =>
|
||||||
|
_amService.patientAllPresOrdersList;
|
||||||
|
|
||||||
List<PatientER_RRT_GetAllTransportationMethodListModel> get AmRequestModeList=>
|
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
|
||||||
_amService.AmModelList;
|
_medicalService.appoitmentAllHistoryResultList;
|
||||||
|
|
||||||
getAmRequestOrders({int id, int projectID}) async {
|
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
|
||||||
setState(ViewState.Busy);
|
|
||||||
|
|
||||||
|
bool get hasPendingOrder =>_amService.hasPendingOrder;
|
||||||
|
|
||||||
await _amService.getAllTransportationOrders();
|
Future getAppointmentHistory() async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
|
||||||
|
if (_medicalService.hasError) {
|
||||||
|
error = _medicalService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
if ( _amService.hasError) {
|
Future getAmRequestOrders() async {
|
||||||
error = _amService.error;
|
setState(ViewState.Busy);
|
||||||
|
await _amService.getAllTransportationOrders();
|
||||||
|
if (_amService.hasError) {
|
||||||
|
error = _amService.error;
|
||||||
setState(ViewState.Error);
|
setState(ViewState.Error);
|
||||||
} else
|
} else
|
||||||
setState(ViewState.Idle);
|
getHospitals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future getHospitals() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _hospitalService.getHospitals();
|
||||||
|
if (_hospitalService.hasError) {
|
||||||
|
error = _hospitalService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
getPatientAllPresOrdersList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientAllPresOrdersList() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _amService.getPatientAllPresOrdersList();
|
||||||
|
if (_hospitalService.hasError) {
|
||||||
|
error = _hospitalService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else if (_amService.hasPendingOrder) {
|
||||||
|
getOrderDetails();
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
Future getOrderDetails() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _amService.getOrderDetails();
|
||||||
|
if (_hospitalService.hasError) {
|
||||||
|
error = _hospitalService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -0,0 +1,146 @@
|
|||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.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/material.dart';
|
||||||
|
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
import 'delivery_due_result_page.dart';
|
||||||
|
|
||||||
|
class DeliveryDue extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_DeliveryDueState createState() => _DeliveryDueState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DeliveryDueState extends State<DeliveryDue> {
|
||||||
|
DateTime bloodSugarDate = DateTime.now();
|
||||||
|
DateTime timeSugarDate = DateTime.now();
|
||||||
|
var dateFrom = DateTime.now();
|
||||||
|
var dateTo = DateTime.now();
|
||||||
|
var conceivedDate = DateTime.now();
|
||||||
|
var deliveryDue = DateTime.now();
|
||||||
|
var firstTrimester = DateTime.now();
|
||||||
|
var secondTrimester = DateTime.now();
|
||||||
|
var thirdTrimester = DateTime.now();
|
||||||
|
var dt = DateTime.now();
|
||||||
|
var newFormat = DateFormat("yy-MM-dd");
|
||||||
|
|
||||||
|
String getDate() {
|
||||||
|
return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}";
|
||||||
|
}
|
||||||
|
|
||||||
|
String getTime() {
|
||||||
|
return " ${timeSugarDate.hour}:${timeSugarDate.minute}";
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Delivery Due Date',
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 35.0, vertical: 20.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
//mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
'Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual perios began (the first day), then click calculate.',
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
//height: 2,
|
||||||
|
thickness: 2,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
'What was the date of the first day of the last period?',
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
DatePicker.showDatePicker(
|
||||||
|
context,
|
||||||
|
showTitleActions: true,
|
||||||
|
minTime: DateTime(DateTime.now().year - 1, 1, 1),
|
||||||
|
maxTime: DateTime.now(),
|
||||||
|
onConfirm: (date) {
|
||||||
|
print('confirm $date');
|
||||||
|
setState(() {
|
||||||
|
bloodSugarDate == date
|
||||||
|
? null
|
||||||
|
: bloodSugarDate = DateTime.now();
|
||||||
|
dateFrom = date.add(Duration(days: 10));
|
||||||
|
|
||||||
|
dateTo = date.add(Duration(days: 20));
|
||||||
|
conceivedDate = date.add(Duration(days: 14));
|
||||||
|
deliveryDue = date.add(Duration(days: 280));
|
||||||
|
firstTrimester = date.add(Duration(days: 85));
|
||||||
|
secondTrimester = date.add(Duration(days: 190));
|
||||||
|
thirdTrimester = date.add(Duration(days: 280));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
currentTime: DateTime.now(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.date_range),
|
||||||
|
Texts('Date'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Texts(getDate()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 280.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 100.0,
|
||||||
|
width: 350.0,
|
||||||
|
child: Button(
|
||||||
|
label: 'CALCULATE',
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
{
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => DeliveryDueResult(
|
||||||
|
conceivedDate: conceivedDate,
|
||||||
|
dateFrom: dateFrom,
|
||||||
|
dateTo: dateTo,
|
||||||
|
deliveryDue: deliveryDue,
|
||||||
|
firstTrimester: firstTrimester,
|
||||||
|
secondTrimester: secondTrimester,
|
||||||
|
thirdTrimester: thirdTrimester,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
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/material.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class DeliveryDueResult extends StatelessWidget {
|
||||||
|
var dateFrom;
|
||||||
|
var dateTo;
|
||||||
|
var conceivedDate;
|
||||||
|
var deliveryDue;
|
||||||
|
var firstTrimester;
|
||||||
|
var secondTrimester;
|
||||||
|
var thirdTrimester;
|
||||||
|
DeliveryDueResult(
|
||||||
|
{this.dateFrom,
|
||||||
|
this.dateTo,
|
||||||
|
this.conceivedDate,
|
||||||
|
this.deliveryDue,
|
||||||
|
this.firstTrimester,
|
||||||
|
this.secondTrimester,
|
||||||
|
this.thirdTrimester});
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Delivery Due Date',
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: 750.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
'The next ovulation period is estimated to be:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'From:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(DateFormat.yMMMEd().format(dateFrom),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
color: Color(0xffC5272D)),
|
||||||
|
Texts(
|
||||||
|
'To:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(DateFormat.yMMMEd().format(dateTo),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
color: Color(0xffC5272D)),
|
||||||
|
Texts(
|
||||||
|
'You have conceived on:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(conceivedDate),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'First Trimester Ends (12 weeks):',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(firstTrimester),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'Second Trimester Ends (27 weeks):',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(secondTrimester),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'Third Trimester, Estimated Due Date (40 weeks):',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(thirdTrimester),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 350,
|
||||||
|
child: Button(
|
||||||
|
label: 'See List Of Doctors',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,351 @@
|
|||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.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/material.dart';
|
||||||
|
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
import 'ovulation_result_page.dart';
|
||||||
|
|
||||||
|
class OvulationPeriod extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_OvulationPeriodState createState() => _OvulationPeriodState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OvulationPeriodState extends State<OvulationPeriod> {
|
||||||
|
DateTime bloodSugarDate = DateTime.now();
|
||||||
|
DateTime timeSugarDate = DateTime.now();
|
||||||
|
int cycleLength = 0;
|
||||||
|
int lutealPhaseLength = 0;
|
||||||
|
String selectedDate;
|
||||||
|
var dateFrom = DateTime.now();
|
||||||
|
var dateTo = DateTime.now();
|
||||||
|
var conceivedDate = DateTime.now();
|
||||||
|
var deliveryDue = DateTime.now();
|
||||||
|
var dt = DateTime.now();
|
||||||
|
var newFormat = DateFormat("yy-MM-dd");
|
||||||
|
String updatedDt;
|
||||||
|
|
||||||
|
String getTime() {
|
||||||
|
return " ${timeSugarDate.hour}:${timeSugarDate.minute}";
|
||||||
|
}
|
||||||
|
|
||||||
|
String getDate() {
|
||||||
|
return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// void calculate() {}
|
||||||
|
//
|
||||||
|
// void calculateFertility(DateTime selectedDate) {const diff = Date.}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Ovulation Period',
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: 700.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts('Calculates Ovulation Period'),
|
||||||
|
SizedBox(
|
||||||
|
height: 12.0,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
//height: 2,
|
||||||
|
thickness: 2,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12.0,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
DatePicker.showDatePicker(
|
||||||
|
context,
|
||||||
|
showTitleActions: true,
|
||||||
|
minTime: DateTime(DateTime.now().year - 1, 1, 1),
|
||||||
|
maxTime: DateTime.now(),
|
||||||
|
onConfirm: (date) {
|
||||||
|
print('confirm $date');
|
||||||
|
setState(() {
|
||||||
|
bloodSugarDate = date;
|
||||||
|
dateFrom = date.add(Duration(days: 10));
|
||||||
|
updatedDt = DateFormat.yMMMEd().format(dateFrom);
|
||||||
|
|
||||||
|
dateTo = date.add(Duration(days: 20));
|
||||||
|
conceivedDate = date.add(Duration(days: 14));
|
||||||
|
deliveryDue = date.add(Duration(days: 280));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
currentTime: DateTime.now(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts('Date'),
|
||||||
|
Texts(getDate()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'Average Cycle Length (usually 28 days):',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 340.0,
|
||||||
|
height: 60.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 10.0, horizontal: 8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
width: 60.0,
|
||||||
|
foregroundDecoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(5.0),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.blueGrey,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: Text(cycleLength.toString()),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 38.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_drop_up,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
if (cycleLength < 45)
|
||||||
|
cycleLength++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_drop_down,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
if (cycleLength > 0)
|
||||||
|
cycleLength--;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Slider(
|
||||||
|
value: cycleLength.toDouble(),
|
||||||
|
min: 0,
|
||||||
|
max: 45,
|
||||||
|
onChanged: (double newValue) {
|
||||||
|
setState(() {
|
||||||
|
cycleLength = newValue.round();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activeColor: Color(0xffC5272D),
|
||||||
|
inactiveColor: Color(0xffF3C5C6),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'Average Luteal Phase Length (usually 14 days):',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 340.0,
|
||||||
|
height: 60.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 10.0, horizontal: 8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
width: 60.0,
|
||||||
|
foregroundDecoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(5.0),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.blueGrey,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child:
|
||||||
|
Text(lutealPhaseLength.toString()),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 38.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_drop_up,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
if (lutealPhaseLength < 15)
|
||||||
|
lutealPhaseLength++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_drop_down,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
if (lutealPhaseLength > 0)
|
||||||
|
lutealPhaseLength--;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Slider(
|
||||||
|
value: lutealPhaseLength.toDouble(),
|
||||||
|
min: 0,
|
||||||
|
max: 15,
|
||||||
|
onChanged: (double newValue) {
|
||||||
|
setState(() {
|
||||||
|
lutealPhaseLength = newValue.round();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activeColor: Color(0xffC5272D),
|
||||||
|
inactiveColor: Color(0xffF3C5C6),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 220.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 100.0,
|
||||||
|
width: 350.0,
|
||||||
|
child: Button(
|
||||||
|
label: 'CALCULATE',
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
{
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => OvulationResult(
|
||||||
|
conceivedDate: conceivedDate,
|
||||||
|
dateFrom: dateFrom,
|
||||||
|
dateTo: dateTo,
|
||||||
|
deliveryDue: deliveryDue,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
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/material.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class OvulationResult extends StatelessWidget {
|
||||||
|
var dateFrom;
|
||||||
|
var dateTo;
|
||||||
|
var conceivedDate;
|
||||||
|
var deliveryDue;
|
||||||
|
OvulationResult(
|
||||||
|
{this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
|
||||||
|
//var newFormat = DateFormat("yy-MM-dd");
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Ovulation Period',
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 15.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: 750.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
'The next ovulation period is estimated to be:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'From:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(dateFrom),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'To:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(dateTo),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'Useful Information:',
|
||||||
|
color: Color(0xffC5272D),
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'You have conceived on:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(conceivedDate),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'The baby\'s age right now:',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'5 Weeks, 2',
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
'The delivery due date is estimated to be on the: ',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
DateFormat.yMMMEd().format(deliveryDue),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 21.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 350,
|
||||||
|
child: Button(
|
||||||
|
label: 'See List Of Doctors',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.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';
|
||||||
|
|
||||||
|
|
||||||
|
class DeleteChild extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_DeleteChildState createState() => _DeleteChildState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DeleteChildState extends State<DeleteChild> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SimpleDialog(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Divider(),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
//beneficiaryType = Gender.Male;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
title: Text("Delete the child "),
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).cancel.toUpperCase(),
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
height: 30,
|
||||||
|
color: Colors.grey[500],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
// widget.onValueSelected(beneficiaryType);
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).ok,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
import 'BillAmount.dart';
|
||||||
|
import 'PickupLocation.dart';
|
||||||
|
import 'SelectTransportationMethod.dart';
|
||||||
|
import 'Summary.dart';
|
||||||
|
|
||||||
|
class AmbulanceRequestIndexPage extends StatefulWidget {
|
||||||
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
|
AmbulanceRequestIndexPage({Key key, this.amRequestViewModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AmbulanceRequestIndexPageState createState() => _AmbulanceRequestIndexPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
|
||||||
|
int currentIndex = 0;
|
||||||
|
PageController pageController;
|
||||||
|
PatientER _patientER = PatientER();
|
||||||
|
|
||||||
|
_changeCurrentTab(int tab) {
|
||||||
|
setState(() {
|
||||||
|
currentIndex = tab;
|
||||||
|
});
|
||||||
|
pageController.animateToPage(tab,
|
||||||
|
duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
pageController = new PageController();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 80,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: StepsWidget(
|
||||||
|
index: currentIndex,
|
||||||
|
changeCurrentTab: _changeCurrentTab,
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
child: PageView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
controller: pageController,
|
||||||
|
children: <Widget>[
|
||||||
|
//Container(),
|
||||||
|
SelectTransportationMethod(
|
||||||
|
changeCurrentTab: _changeCurrentTab,
|
||||||
|
patientER: _patientER,
|
||||||
|
amRequestViewModel: widget.amRequestViewModel,
|
||||||
|
),
|
||||||
|
PickupLocation(
|
||||||
|
changeCurrentTab: _changeCurrentTab,
|
||||||
|
patientER: _patientER,
|
||||||
|
amRequestViewModel: widget.amRequestViewModel,
|
||||||
|
),
|
||||||
|
BillAmount(
|
||||||
|
changeCurrentTab: _changeCurrentTab,
|
||||||
|
patientER: _patientER,
|
||||||
|
amRequestViewModel: widget.amRequestViewModel,
|
||||||
|
),
|
||||||
|
Summary(
|
||||||
|
changeCurrentTab: _changeCurrentTab,
|
||||||
|
patientER: _patientER,
|
||||||
|
amRequestViewModel: widget.amRequestViewModel,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,351 @@
|
|||||||
|
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/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class BillAmount extends StatefulWidget {
|
||||||
|
final Function changeCurrentTab;
|
||||||
|
final PatientER patientER;
|
||||||
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
|
BillAmount(
|
||||||
|
{Key key,
|
||||||
|
this.changeCurrentTab,
|
||||||
|
this.patientER,
|
||||||
|
this.amRequestViewModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_BillAmountState createState() => _BillAmountState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BillAmountState extends State<BillAmount> {
|
||||||
|
Ambulate _ambulate = Ambulate.None;
|
||||||
|
String note ="";
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
|
||||||
|
if(widget.patientER.ambulate!=null)
|
||||||
|
{
|
||||||
|
setState(() {
|
||||||
|
_ambulate = widget.patientER.ambulate;
|
||||||
|
note = widget.patientER.requesterNote;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts('Bill Amount '),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Table(
|
||||||
|
border: TableBorder.symmetric(
|
||||||
|
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
|
||||||
|
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
|
||||||
|
children: [
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Amount before tax: ',
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.price}',
|
||||||
|
color: Colors.black,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Tax amount :',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.vAT}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Total amount payable',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
bold: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.totalPrice}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Texts('Select Ambulate',bold: true,),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Wheelchair;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Wheelchair'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Wheelchair,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Walker;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Walker'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Walker,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Stretcher;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Stretcher'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Stretcher,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.None;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('None'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.None,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 12,),
|
||||||
|
NewTextFields(
|
||||||
|
hintText: 'Note',
|
||||||
|
initialValue: note,
|
||||||
|
onChanged: (value){
|
||||||
|
setState(() {
|
||||||
|
note = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 15,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(15),
|
||||||
|
width: double.maxFinite,
|
||||||
|
height: 76,
|
||||||
|
child: SecondaryButton(
|
||||||
|
color: Colors.grey[800],
|
||||||
|
textColor: Colors.white,
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.patientER.ambulate = _ambulate;
|
||||||
|
widget.patientER.requesterNote = note;
|
||||||
|
widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
|
||||||
|
widget.changeCurrentTab(3);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
label: 'Next',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,309 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||||
|
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/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
enum Direction { ToHospital, FromHospital }
|
||||||
|
enum Way { OneWay, TwoWays }
|
||||||
|
|
||||||
|
class SelectTransportationMethod extends StatefulWidget {
|
||||||
|
final Function changeCurrentTab;
|
||||||
|
final PatientER patientER;
|
||||||
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
|
SelectTransportationMethod(
|
||||||
|
{Key key,
|
||||||
|
this.changeCurrentTab,
|
||||||
|
this.patientER,
|
||||||
|
this.amRequestViewModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SelectTransportationMethodState createState() =>
|
||||||
|
_SelectTransportationMethodState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelectTransportationMethodState
|
||||||
|
extends State<SelectTransportationMethod> {
|
||||||
|
PatientERTransportationMethod _erTransportationMethod =
|
||||||
|
PatientERTransportationMethod();
|
||||||
|
Direction _direction = Direction.FromHospital;
|
||||||
|
Way _way = Way.OneWay;
|
||||||
|
|
||||||
|
OrderService _orderService = OrderService.AMBULANCE;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
if (widget.patientER.direction != null) {
|
||||||
|
_direction = widget.patientER.direction == 0
|
||||||
|
? Direction.ToHospital
|
||||||
|
: Direction.FromHospital;
|
||||||
|
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
|
||||||
|
_erTransportationMethod = widget.amRequestViewModel
|
||||||
|
.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
|
||||||
|
} else {
|
||||||
|
if (widget.amRequestViewModel.amRequestModeList.length != 0)
|
||||||
|
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[
|
||||||
|
widget.amRequestViewModel.amRequestModeList.length - 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
Texts('Select Transportation Method'),
|
||||||
|
...List.generate(
|
||||||
|
widget.amRequestViewModel.amRequestModeList.length,
|
||||||
|
(index) => InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_erTransportationMethod =
|
||||||
|
widget.amRequestViewModel.amRequestModeList[index];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 3,
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(widget.amRequestViewModel
|
||||||
|
.amRequestModeList[index].title),
|
||||||
|
leading: Radio(
|
||||||
|
value: widget
|
||||||
|
.amRequestViewModel.amRequestModeList[index],
|
||||||
|
groupValue: _erTransportationMethod,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_erTransportationMethod = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
Texts('Select Direction'),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.maxFinite,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_direction = Direction.ToHospital;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: double.maxFinite,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('To Hospital'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Direction.ToHospital,
|
||||||
|
groupValue: _direction,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_direction = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_direction = Direction.FromHospital;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: double.maxFinite,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Form Hospital'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Direction.FromHospital,
|
||||||
|
groupValue: _direction,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_direction = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (_direction == Direction.ToHospital)
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Texts('Select Direction'),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_way = Way.OneWay;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('One Way'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Way.OneWay,
|
||||||
|
groupValue: _way,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_way = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_way = Way.TwoWays;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Two Ways'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Way.TwoWays,
|
||||||
|
groupValue: _way,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_way = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(15),
|
||||||
|
width: double.maxFinite,
|
||||||
|
height: 76,
|
||||||
|
child: SecondaryButton(
|
||||||
|
color: Colors.grey[800],
|
||||||
|
textColor: Colors.white,
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.patientER.direction = _direction == Direction.ToHospital ? 0 : 1;
|
||||||
|
widget.patientER.tripType = _way == Way.TwoWays ? 2 : 1;
|
||||||
|
widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
|
||||||
|
widget.patientER.patientERTransportationMethod = _erTransportationMethod;
|
||||||
|
widget.patientER.orderServiceID = _orderService.getIdOrderService();
|
||||||
|
widget.patientER.pickupUrgency = 1;
|
||||||
|
widget.patientER.lineItemNo = 1;
|
||||||
|
widget.patientER.cost = _erTransportationMethod.price;
|
||||||
|
widget.patientER.vAT = _erTransportationMethod.vAT ?? 0;
|
||||||
|
widget.patientER.totalPrice = _erTransportationMethod.totalPrice;
|
||||||
|
|
||||||
|
widget.changeCurrentTab(1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
label: 'Next',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
|
||||||
|
|
||||||
|
class Summary extends StatefulWidget {
|
||||||
|
final Function changeCurrentTab;
|
||||||
|
final PatientER patientER;
|
||||||
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
|
Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SummaryState createState() => _SummaryState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SummaryState extends State<Summary> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts('Summary'),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts('Transportation Method',color: Colors.grey,),
|
||||||
|
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
|
||||||
|
Texts('Direction',color: Colors.grey,),
|
||||||
|
Texts('From Hospital',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
|
||||||
|
Texts('Pickup Location',color: Colors.grey,),
|
||||||
|
Texts('SZR Medical Center',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
|
||||||
|
Texts('Drop off location',color: Colors.grey,),
|
||||||
|
Texts('6199, Al Ameen wlfn nif',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
|
||||||
|
Texts('Select Ambulate',color: Colors.grey,),
|
||||||
|
Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
|
||||||
|
Texts('Note',color: Colors.grey,),
|
||||||
|
Texts('${widget.patientER.requesterNote?? '---'}',bold: true,),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20,),
|
||||||
|
Texts('Bill Amount',textAlign: TextAlign.start,),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Container(
|
||||||
|
height: 55,
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8)
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts('Total amount payable:'),
|
||||||
|
Texts('SR ${widget.patientER.patientERTransportationMethod.totalPrice}')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 45,),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(15),
|
||||||
|
width: double.maxFinite,
|
||||||
|
height: 76,
|
||||||
|
child:SecondaryButton(
|
||||||
|
color: Colors.grey[800],
|
||||||
|
textColor: Colors.white,
|
||||||
|
label: 'Next',
|
||||||
|
|
||||||
|
// onTap: ()=> widget.changeCurrentTab(2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AvailableAppointmentsPage extends StatelessWidget {
|
||||||
|
final List<AppoitmentAllHistoryResultList> appointmentsAllHistoryList;
|
||||||
|
|
||||||
|
const AvailableAppointmentsPage({Key key, this.appointmentsAllHistoryList})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Available Appointments',
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Texts('Available Appointments'),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
appointmentsAllHistoryList.length,
|
||||||
|
(index) => InkWell(
|
||||||
|
onTap: (){
|
||||||
|
Navigator.pop(context, appointmentsAllHistoryList[index]);
|
||||||
|
},
|
||||||
|
child: AppointmentCard(appointment: appointmentsAllHistoryList[index],),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class OrderLogPage extends StatelessWidget {
|
||||||
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
|
OrderLogPage({Key key, @required this.amRequestViewModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(10),
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: amRequestViewModel.patientAllPresOrdersList.length,
|
||||||
|
itemBuilder: (context, index) => Container(
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
OrderLogItem(
|
||||||
|
title: 'Request ID',
|
||||||
|
value: amRequestViewModel.patientAllPresOrdersList[index].iD
|
||||||
|
.toString(),
|
||||||
|
),
|
||||||
|
OrderLogItem(
|
||||||
|
title: 'Status',
|
||||||
|
value: amRequestViewModel
|
||||||
|
.patientAllPresOrdersList[index].description,
|
||||||
|
),
|
||||||
|
OrderLogItem(
|
||||||
|
title: 'Pickup Date',
|
||||||
|
value: DateUtil.getDayMonthYearDateFormatted(
|
||||||
|
DateUtil.convertStringToDate(amRequestViewModel
|
||||||
|
.patientAllPresOrdersList[index].createdOn)),
|
||||||
|
),
|
||||||
|
OrderLogItem(
|
||||||
|
title: 'Pickup Location',
|
||||||
|
value: amRequestViewModel
|
||||||
|
.patientAllPresOrdersList[index].pickupLocationName,
|
||||||
|
),
|
||||||
|
OrderLogItem(
|
||||||
|
title: 'Drop off Location',
|
||||||
|
value: amRequestViewModel
|
||||||
|
.patientAllPresOrdersList[index].dropoffLocationName,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppointmentCard extends StatelessWidget {
|
||||||
|
final AppoitmentAllHistoryResultList appointment;
|
||||||
|
|
||||||
|
const AppointmentCard({Key key, this.appointment}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
LargeAvatar(
|
||||||
|
url: appointment.doctorImageURL,
|
||||||
|
name: appointment.doctorNameObj,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts(appointment.doctorNameObj,bold: true,),
|
||||||
|
SizedBox(height: 4,),
|
||||||
|
Texts(appointment.projectName),
|
||||||
|
Texts(appointment.clinicName),
|
||||||
|
Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,226 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class StepsWidget extends StatelessWidget {
|
||||||
|
final int index;
|
||||||
|
final Function changeCurrentTab;
|
||||||
|
|
||||||
|
StepsWidget({Key key, this.index, this.changeCurrentTab});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return projectViewModel.isArabic? Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 50,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Center(
|
||||||
|
child: Divider(
|
||||||
|
color: Colors.grey,
|
||||||
|
height: 0.75,
|
||||||
|
thickness: 0.75,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
left: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => changeCurrentTab(0),
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'1',
|
||||||
|
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
left: MediaQuery.of(context).size.width * 0.3,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'2',
|
||||||
|
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
left: MediaQuery.of(context).size.width * 0.6,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'3',
|
||||||
|
color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index == 2 ?changeCurrentTab(3):null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.black,width: 0.75),
|
||||||
|
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 3 ? Colors.grey[800] : Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'4',
|
||||||
|
color: index == 3 ? Colors.white : Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
):Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 50,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Center(
|
||||||
|
child: Divider(
|
||||||
|
color: Colors.grey,
|
||||||
|
height: 0.75,
|
||||||
|
thickness: 0.75,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => changeCurrentTab(0),
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'1',
|
||||||
|
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: MediaQuery.of(context).size.width * 0.3,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'2',
|
||||||
|
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: MediaQuery.of(context).size.width * 0.6,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75),
|
||||||
|
color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'3',
|
||||||
|
color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
left: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index == 2 ?changeCurrentTab(3):null,
|
||||||
|
child: Container(
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.black,width: 0.75),
|
||||||
|
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 3 ? Colors.grey[800] : Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'4',
|
||||||
|
color: index == 3 ? Colors.white : Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||