Merge branch 'Haroon' into 'development'

updates & fixes

See merge request Cloud_Solution/diplomatic-quarter!383
merge-update-with-lab-changes
haroon amjad 5 years ago
commit 75c0de091f

@ -9,12 +9,12 @@ class LabResultList {
class LabResult { class LabResult {
String description; String description;
Null femaleInterpretativeData; dynamic femaleInterpretativeData;
int gender; int gender;
bool isCertificateAllowed; bool isCertificateAllowed;
int lineItemNo; int lineItemNo;
Null maleInterpretativeData; dynamic maleInterpretativeData;
Null notes; dynamic notes;
int orderLineItemNo; int orderLineItemNo;
int orderNo; int orderNo;
String packageID; String packageID;
@ -27,11 +27,11 @@ class LabResult {
String sampleCollectedOn; String sampleCollectedOn;
String sampleReceivedOn; String sampleReceivedOn;
String setupID; String setupID;
Null superVerifiedOn; dynamic superVerifiedOn;
String testCode; String testCode;
String uOM; String uOM;
String verifiedOn; String verifiedOn;
Null verifiedOnDateTime; dynamic verifiedOnDateTime;
LabResult( LabResult(
{this.description, {this.description,

@ -1,3 +1,6 @@
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -28,6 +31,8 @@ class _LiveCareHomeState extends State<LiveCareHome>
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
@ -40,7 +45,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
imageAr: imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png')); 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory(); if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
}); });
super.initState(); super.initState();

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[ children: <Widget>[
Card( Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey, color: widget.isSelected ? Colors.blue : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),

@ -39,6 +39,9 @@ class _clinic_listState extends State<ClinicList> {
int currentSelectedIndex = 0; int currentSelectedIndex = 0;
LiveCareClinicsListResponse liveCareClinicsListResponse; LiveCareClinicsListResponse liveCareClinicsListResponse;
List<PatientERGetClinicsList> liveCareOnlineClinicsListResponse;
List<PatientERGetClinicsList> liveCareOfflineClinicsListResponse;
LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse; LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse;
bool isDataLoaded = false; bool isDataLoaded = false;
@ -62,8 +65,11 @@ class _clinic_listState extends State<ClinicList> {
@override @override
void initState() { void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse(); liveCareClinicsListResponse = new LiveCareClinicsListResponse();
liveCareScheduleClinicsListResponse =
new LiveCareScheduleClinicsListResponse(); liveCareOnlineClinicsListResponse = new List();
liveCareOfflineClinicsListResponse = new List();
liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isLiveCareTypeSelected) { if (!isLiveCareTypeSelected) {
@ -77,18 +83,14 @@ class _clinic_listState extends State<ClinicList> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SingleChildScrollView( return SingleChildScrollView(child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList());
child: currentSelectedLiveCareType == "immediate"
? getLiveCareImmediateClinicList()
: getLiveCareScheduleClinicList());
} }
void startLiveCare() { void startLiveCare() {
bool isError = false; bool isError = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, context).then((res) { service.getERAppointmentFees(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) { if (res['HasAppointment'] == true) {
@ -98,9 +100,7 @@ class _clinic_listState extends State<ClinicList> {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res); erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
isError = false; isError = false;
} }
if (!isError) if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList);
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -158,8 +158,7 @@ class _clinic_listState extends State<ClinicList> {
service.getERAppointmentTime(selectedClinicID, context).then((res) { service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
showLiveCarePaymentDialog( showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -167,22 +166,16 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
showLiveCarePaymentDialog( showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {
final curvedValue = final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform( return Transform(
transform: transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: LiveCarePaymentDialog( child: LiveCarePaymentDialog(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName),
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName),
), ),
); );
}, },
@ -193,8 +186,7 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {}) pageBuilder: (context, animation1, animation2) {})
.then((value) { .then((value) {
if (value) { if (value) {
if (getERAppointmentFeesList.total == "0" || if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
getERAppointmentFeesList.total == "0.0") {
showLiveCareInfoDialog(getERAppointmentFeesList); showLiveCareInfoDialog(getERAppointmentFeesList);
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
@ -203,11 +195,9 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
showLiveCareInfoDialog( showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async {
GetERAppointmentFeesList getERAppointmentFeesList) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -216,11 +206,9 @@ class _clinic_listState extends State<ClinicList> {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {
final curvedValue = final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform( return Transform(
transform: transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: LiveCareInfoDialog(), child: LiveCareInfoDialog(),
@ -234,11 +222,8 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {}) pageBuilder: (context, animation1, animation2) {})
.then((value) { .then((value) {
if (value) { if (value) {
if (getERAppointmentFeesList.total == "0" || if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
getERAppointmentFeesList.total == "0.0") { addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
addNewCallForPatientER(authUser.patientID.toString() +
"" +
DateTime.now().millisecondsSinceEpoch.toString());
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
} }
@ -246,16 +231,14 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
Future navigateToPaymentMethod( Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async {
GetERAppointmentFeesList getERAppointmentFeesList, context) async {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = selectedClinicID; appo.clinicID = selectedClinicID;
appo.appointmentNo = DateTime.now().millisecondsSinceEpoch; appo.appointmentNo = DateTime.now().millisecondsSinceEpoch;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -264,32 +247,16 @@ class _clinic_listState extends State<ClinicList> {
Navigator.push(context, FadePage(page: PaymentMethod())).then((value) { Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
print(value); print(value);
if (value != null) { if (value != null) {
openPayment(value, authUser, openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
double.parse(getERAppointmentFeesList.total), appo);
} }
}); });
} }
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
double amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit, browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod,
appo: appo, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false);
onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(
amount,
"LiveCare Payment",
Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo),
"12",
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -321,19 +288,13 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') { if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID( addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
appo.projectID, appo.clinicID, appo.appointmentNo));
} else { } else {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
@ -347,12 +308,9 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) { addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) {
.addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast( AppToast.showSuccessToast(message: "New Call has been added successfully");
message: "New Call has been added successfully");
widget.getLiveCareHistory(); widget.getLiveCareHistory();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -374,13 +332,19 @@ class _clinic_listState extends State<ClinicList> {
print(res['PatientER_GetClinicsList'].length); print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
liveCareClinicsListResponse = liveCareOnlineClinicsListResponse.clear();
LiveCareClinicsListResponse.fromJson(res); liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res);
print(liveCareClinicsListResponse.patientERGetClinicsList.length);
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList.forEach((clinic) {
liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID; if (clinic.isOnline == 1) {
selectedClinicName = liveCareClinicsListResponse liveCareOnlineClinicsListResponse.add(clinic);
.patientERGetClinicsList[0].serviceName; } else {
liveCareOfflineClinicsListResponse.add(clinic);
}
});
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceName;
isDataLoaded = true; isDataLoaded = true;
}); });
} else { } else {
@ -403,14 +367,10 @@ class _clinic_listState extends State<ClinicList> {
print(res['ClinicsHaveScheduleList'].length); print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
liveCareScheduleClinicsListResponse = liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res);
LiveCareScheduleClinicsListResponse.fromJson(res); print(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length);
print(liveCareScheduleClinicsListResponse selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].serviceID;
.clinicsHaveScheduleList.length); selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].clinicDesc;
selectedClinicID = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].clinicDesc;
isDataLoaded = true; isDataLoaded = true;
}); });
} else { } else {
@ -483,25 +443,15 @@ class _clinic_listState extends State<ClinicList> {
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
.clinicsHaveScheduleList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
updateSelectedScheduleIndex( updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]);
}, },
child: ScheduleClinicCard( child: ScheduleClinicCard(
isSelected: selectedClinicID == isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
liveCareScheduleClinicsListResponse clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
.clinicsHaveScheduleList[index]
.serviceID
? true
: false,
clinicsHaveScheduleList:
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index],
languageID: languageID, languageID: languageID,
), ),
); );
@ -555,39 +505,51 @@ class _clinic_listState extends State<ClinicList> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(15.0), margin: EdgeInsets.all(15.0),
child: Text("Online Clinics: ", child: Text("Online Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
style: TextStyle( ),
fontSize: 20.0, fontWeight: FontWeight.bold)), ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOnlineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
},
child: ClinicCard(
isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOnlineClinicsListResponse[index],
languageID: languageID,
),
);
},
),
Container(
margin: EdgeInsets.all(15.0),
child: Text("Offline Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
), ),
ListView.builder( ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: liveCareClinicsListResponse // itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
.patientERGetClinicsList.length, itemCount: liveCareOfflineClinicsListResponse.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
if (liveCareClinicsListResponse // if (liveCareClinicsListResponse.patientERGetClinicsList[index].isOnline == 1) {
.patientERGetClinicsList[index].isOnline == // updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
1) { // } else {
updateSelectedIndex(liveCareClinicsListResponse // AppToast.showErrorToast(message: "Clinic is offline");
.patientERGetClinicsList[index]); // }
} else {
AppToast.showErrorToast(
message: "Clinic is offline");
}
}, },
child: ClinicCard( child: ClinicCard(
isSelected: selectedClinicID == isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false,
liveCareClinicsListResponse patientERGetClinicsList: liveCareOfflineClinicsListResponse[index],
.patientERGetClinicsList[index]
.serviceID
? true
: false,
patientERGetClinicsList: liveCareClinicsListResponse
.patientERGetClinicsList[index],
languageID: languageID, languageID: languageID,
), ),
); );
@ -633,11 +595,8 @@ class _clinic_listState extends State<ClinicList> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
List(); service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
service
.getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -647,34 +606,23 @@ class _clinic_listState extends State<ClinicList> {
}); });
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
_patientDoctorAppointmentListHospital .where(
.where( (elementClinic) => elementClinic.filterName == element.projectName,
(elementClinic) => )
elementClinic.filterName == element.projectName, .toList();
)
.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.add( _patientDoctorAppointmentListHospital
PatientDoctorAppointmentList( .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}
}); });
this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true); this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true);
navigateToSearchResults( navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -683,19 +631,8 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
Future navigateToSearchResults( Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
context, Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
doctorsList: docList,
isLiveCareAppointment: true,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
} }
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -611,11 +611,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.setUser(authenticatedUserObject.user); .setUser(authenticatedUserObject.user);
getToDoCount(); getToDoCount();
pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {

@ -278,11 +278,6 @@ class _Login extends State<Login> {
// result['CRSVerificationStatus']; // result['CRSVerificationStatus'];
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
// await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
// if (pharmacyModuleViewModel.error.isNotEmpty)
// await pharmacyModuleViewModel.createUser();
// });
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {

@ -149,7 +149,6 @@ class LabResultWidget extends StatelessWidget {
isCovidResult = true; isCovidResult = true;
covidLabResult = order; covidLabResult = order;
} }
print(covidLabResult.testCode);
}); });
return isCovidResult; return isCovidResult;

@ -23,23 +23,23 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL = // static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PRESCRIPTION_PAYMENT_WITH_ORDERID = static String PREAUTH_SERVICE_URL =
'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live
// Packages // Packages
static String PACKAGES_REQUEST_PAYMENT_URL = static String PACKAGES_REQUEST_PAYMENT_URL =

Loading…
Cancel
Save