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

merge-requests/369/head
Elham Rababh 3 years ago
commit 9777b3f2ab

@ -127,11 +127,14 @@ const INSERT_ER_INERT_PRES_ORDER =
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE =
'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add";
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@ class PatientER {
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
dynamic patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
@ -160,7 +160,7 @@ class PatientER {
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA == 0 ? false : true;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;

@ -76,13 +76,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
},
),
Text(TranslationBase.of(context).nearestAppo,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
],
),
widget.clnicIds != null &&
widget.clnicIds.length > 1 &&
isLoaded == true
widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: clinicsList.map<Widget>((result) {
@ -95,14 +92,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported()) {
projectDropdownValue = "";
getDoctorsList(context);
}
} else {}
});
},
title: Text(result.clinicDescription,
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
letterSpacing: 1.0))));
title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0))));
}).toList())
: Container(
height: 60.0,
@ -123,25 +116,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem<String>(
value: item.clinicID.toString() +
"-" +
item.isLiveCareClinicAndOnline.toString() +
"-" +
item.liveCareClinicID.toString() +
"-" +
item.liveCareServiceID.toString(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',
height: 15,
width: 15,
fit: BoxFit.cover)
: Container(),
]),
value: item.clinicID.toString() + "-" + item.isLiveCareClinicAndOnline.toString() + "-" + item.liveCareClinicID.toString() + "-" + item.liveCareServiceID.toString(),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 15, width: 15, fit: BoxFit.cover) : Container(),
]),
);
}).toList(),
onChanged: (newValue) {
@ -151,13 +130,14 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = "";
getDoctorsList(context);
} else {
print("Dental");
}
});
},
),
)),
isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@ -196,9 +176,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
bool isDentalSelectedAndSupported() {
return dropdownValue != "" &&
(dropdownValue == "17") &&
isMobileAppDentalAllow;
if (dropdownValue != null)
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17") && isMobileAppDentalAllow;
else
return false;
}
getClinicsList() {
@ -245,9 +226,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
// TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) {
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") {
if (dropdownValue.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]);
searchInfo.date = DateTime.now();
navigateToDentalComplaints(context, searchInfo);
@ -258,10 +239,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(
clinicName: "Family Medicine",
liveCareClinicID: dropdownValue.split("-")[2],
liveCareServiceID: dropdownValue.split("-")[3]),
page: LiveCareBookAppointment(clinicName: "Family Medicine", liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]),
),
).then((value) {
print(value);
@ -285,17 +263,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
int.parse(dropdownValue.split("-")[0]),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo,
context)
.then((res) {
service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -305,27 +276,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
@ -333,8 +294,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -345,8 +305,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
@ -355,20 +314,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
);
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
getProjectsList();
});
@ -377,9 +325,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() {
setState(() {
if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList();
isLoaded = true;
}
});

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save