Dental updates & fixes, Update to stores VersionID 18.3

merge-update-with-lab-changes
haroon amjad 11 months ago
parent 4564b42018
commit c1212c2c6a

@ -22,12 +22,13 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.201.204.103/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
@ -353,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 18.2; var VERSION_ID = 18.3;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -28,11 +28,7 @@ class DentalComplaints extends StatefulWidget {
bool isDoctorNameSearch; bool isDoctorNameSearch;
bool isFromHospitalSearchPage; bool isFromHospitalSearchPage;
DentalComplaints( DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false, this.isFromHospitalSearchPage = false});
{required this.searchInfo,
this.onSelectedMethod,
this.isDoctorNameSearch = false,
this.isFromHospitalSearchPage = false});
@override @override
_DentalComplaintsState createState() => _DentalComplaintsState(); _DentalComplaintsState createState() => _DentalComplaintsState();
@ -53,6 +49,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
bool isDoctorsList = false;
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan()); WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan());
@ -71,36 +69,66 @@ class _DentalComplaintsState extends State<DentalComplaints> {
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGreyColor,
body: Container( body: Container(
child: !hasDentalPlan child: !hasDentalPlan
? ListView.separated( ? isDoctorsList
itemCount: complaintsList.length, ? Container(
itemBuilder: (BuildContext context, int index) { child: SingleChildScrollView(
return Container( child: Column(
child: DentalComplaintCard( children: [
listDentalChiefComplain: complaintsList[index], ...List.generate(
languageID: languageID, patientDoctorAppointmentListHospital.length,
isDoctorNameSearch: widget.isDoctorNameSearch, (index) => Padding(
onSelectedMethod: widget.onSelectedMethod, padding: const EdgeInsets.all(14.0),
isFromHospitalSearchPage: widget.isFromHospitalSearchPage, child: AppExpandableNotifier(
onDoctorFetched: widget.isFromHospitalSearchPage isExpand: true,
? (doctorsList) { title:
Navigator.pop(context, doctorsList); patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km,
} bodyWidget: Column(
: null, crossAxisAlignment: CrossAxisAlignment.start,
)..logAnalytics = () { mainAxisAlignment: MainAxisAlignment.spaceBetween,
final info = widget.searchInfo; children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.map((doctor) {
locator<GAnalytics>() return DoctorView(
.appointment doctor: doctor,
.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]); isLiveCareAppointment: false,
}, isContinueDentalPlan: hasDentalPlan,
); );
}, }).toList(),
separatorBuilder: (BuildContext context, int index) { )),
return Padding( ),
padding: const EdgeInsets.only(left: 14, right: 14), )
child: mDivider(CustomColors.devider), ],
); ),
}, ),
) )
: ListView.separated(
itemCount: complaintsList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
child: DentalComplaintCard(
listDentalChiefComplain: complaintsList[index],
languageID: languageID,
isDoctorNameSearch: widget.isDoctorNameSearch,
onSelectedMethod: widget.onSelectedMethod,
isFromHospitalSearchPage: widget.isFromHospitalSearchPage,
onDoctorFetched: widget.isFromHospitalSearchPage
? (doctorsList) {
Navigator.pop(context, doctorsList);
}
: null,
)..logAnalytics = () {
final info = widget.searchInfo;
locator<GAnalytics>()
.appointment
.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
},
);
},
separatorBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: mDivider(CustomColors.devider),
);
},
)
: Container( : Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
@ -284,9 +312,36 @@ class _DentalComplaintsState extends State<DentalComplaints> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
res['List_DentalChiefComplain'].forEach((v) { if (res['DoctorList'].length != 0) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v)); isDoctorsList = true;
}); doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
}
});
} else {
isDoctorsList = false;
res['List_DentalChiefComplain'].forEach((v) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v));
});
}
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {

@ -539,7 +539,8 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
} else { } else {
if (DocAvailableAppointments.areSlotsAvailable) { if (DocAvailableAppointments.areSlotsAvailable) {
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) { // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
navigateToDentalComplaints(context); navigateToDentalComplaints(context);
} else if (widget.isDoctorNameSearch && widget.doctor.clinicID == 253) { } else if (widget.isDoctorNameSearch && widget.doctor.clinicID == 253) {
navigateToLaserClinic(context); navigateToLaserClinic(context);

@ -640,14 +640,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = []; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue!) : 0, nearestAppo, languageID, context).then((res) async {
.getDoctorsList(
clinicID,
projectDropdownValue != "" ? int.parse(projectDropdownValue!) : 0,
nearestAppo,
languageID,
context)
.then((res) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
RegionList regionHospitalList = RegionList(); RegionList regionHospitalList = RegionList();
@ -661,21 +654,12 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (nearestAppo) { if (nearestAppo) {
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
.where((elementClinic) =>
elementClinic.filterName ==
element.getProjectCompleteName())
.toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList!
.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(), filterName: element.getProjectCompleteName(),
distanceInKMs: element.projectDistanceInKiloMeters.toString(), distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName, projectTopName: element.projectTopName,
@ -685,20 +669,16 @@ class _SearchByClinicState extends State<SearchByClinic> {
)); ));
} }
}); });
navigateToSearchResultsForNearestAppointment( navigateToSearchResultsForNearestAppointment(context, doctorsList, _patientDoctorAppointmentListHospital);
context, doctorsList, _patientDoctorAppointmentListHospital);
return; return;
} }
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT); var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG); var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
(lat != null && lat != 0.0) && (lng != null && lng != 0.0); regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
regionHospitalList = await DoctorMapper.sortList(
isLocationEnabled, regionHospitalList);
setState(() {}); setState(() {});
} else { } else {
@ -733,10 +713,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
} }
navigateToSearchResultsForNearestAppointment( navigateToSearchResultsForNearestAppointment(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -744,8 +721,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
isLiveCareAppointment: false, isLiveCareAppointment: false,
isDoctorNameSearch: true, isDoctorNameSearch: true,
doctorsList: docList, doctorsList: docList,
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
patientDoctorAppointmentListHospital,
isDoctorSearchResult: true, isDoctorSearchResult: true,
))); )));
} }

@ -47,6 +47,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
bool isPageLoaded = false; bool isPageLoaded = false;
bool isTermsAndConditionsPage = true; bool isTermsAndConditionsPage = true;
bool acceptTerms = false;
@override @override
void initState() { void initState() {
@ -155,9 +156,13 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
onPressed: isPageLoaded onPressed: isPageLoaded
? () { ? () {
if (isTermsAndConditionsPage) { if (isTermsAndConditionsPage) {
setState(() { if (acceptTerms) {
isTermsAndConditionsPage = false; setState(() {
}); isTermsAndConditionsPage = false;
});
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
}
} else { } else {
addUsageAgreement(); addUsageAgreement();
} }
@ -654,6 +659,23 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
), ),
mHeight(24.0), mHeight(24.0),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: acceptTerms,
onChanged: (v) {
setState(() => acceptTerms = v!);
}),
Expanded(
child: Text(
TranslationBase.of(context).termsConditionsRead,
style: TextStyle(
fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
),
],
),
mHeight(150.0), mHeight(150.0),
], ],
), ),

Loading…
Cancel
Save