|
|
|
|
@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
|
|
|
|
|
|
|
|
|
@ -37,8 +38,6 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
// authUser = authProvider.getAuthenticatedUser();
|
|
|
|
|
print("initState!!!!!");
|
|
|
|
|
widget.patientShareResponse = new PatientShareResponse();
|
|
|
|
|
WidgetsBinding.instance
|
|
|
|
|
.addPostFrameCallback((_) => getPatientAppointmentHistory());
|
|
|
|
|
@ -50,205 +49,230 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).todoList,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
|
itemCount: widget.appoList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(10.0),
|
|
|
|
|
child: Card(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
|
itemCount: widget.appoList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(10.0),
|
|
|
|
|
child: Card(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
"assets/images/new-design/time_icon.png",
|
|
|
|
|
width: 20.0,
|
|
|
|
|
height: 20.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10.0, right: 30.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDate(
|
|
|
|
|
widget.appoList[index].appointmentDate),
|
|
|
|
|
style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
"assets/images/new-design/time_icon.png",
|
|
|
|
|
width: 20.0,
|
|
|
|
|
height: 20.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 5.0, right: 25.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDate(widget
|
|
|
|
|
.appoList[index].appointmentDate),
|
|
|
|
|
style: TextStyle(fontSize: 11.0)),
|
|
|
|
|
),
|
|
|
|
|
widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
? SvgPicture.asset(
|
|
|
|
|
"assets/images/new-design/liveCare_logo_icon.svg",
|
|
|
|
|
width: 20.0,
|
|
|
|
|
height: 20.0)
|
|
|
|
|
: Image.asset(
|
|
|
|
|
"assets/images/new-design/hospital_address_icon.png",
|
|
|
|
|
width: 20.0,
|
|
|
|
|
height: 20.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
|
child: widget
|
|
|
|
|
.appoList[index].isLiveCareAppointment
|
|
|
|
|
? Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.liveCareAppo,
|
|
|
|
|
style: TextStyle(fontSize: 12.0))
|
|
|
|
|
: Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-",
|
|
|
|
|
style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Image.asset(
|
|
|
|
|
"assets/images/new-design/hospital_address_icon.png",
|
|
|
|
|
width: 20.0,
|
|
|
|
|
height: 20.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(widget.appoList[index].projectName,
|
|
|
|
|
style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: Divider(
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
widget.appoList[index].doctorImageURL,
|
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
|
),
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: Divider(
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 20.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
widget.appoList[index].doctorTitle +
|
|
|
|
|
" " +
|
|
|
|
|
widget
|
|
|
|
|
.appoList[index].doctorNameObj,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 3.0, bottom: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDoctorSpeciality(widget
|
|
|
|
|
.appoList[index]
|
|
|
|
|
.doctorSpeciality)
|
|
|
|
|
.trim(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height *
|
|
|
|
|
0.1,
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(100.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
widget.appoList[index].doctorImageURL,
|
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 20.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: widget
|
|
|
|
|
.appoList[index].actualDoctorRate
|
|
|
|
|
.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
Text(
|
|
|
|
|
widget.appoList[index].doctorTitle +
|
|
|
|
|
" " +
|
|
|
|
|
widget.appoList[index]
|
|
|
|
|
.doctorNameObj,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 3.0, bottom: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDoctorSpeciality(widget
|
|
|
|
|
.appoList[index]
|
|
|
|
|
.doctorSpeciality)
|
|
|
|
|
.trim(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: widget
|
|
|
|
|
.appoList[index]
|
|
|
|
|
.actualDoctorRate
|
|
|
|
|
.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => performNextAction(
|
|
|
|
|
widget.appoList[index]),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
getNextActionImage(widget
|
|
|
|
|
.appoList[index].nextAction),
|
|
|
|
|
width: 50.0,
|
|
|
|
|
height: 50.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getNextActionText(widget
|
|
|
|
|
.appoList[index]
|
|
|
|
|
.nextAction),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(fontSize: 12.0)),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () =>
|
|
|
|
|
performNextAction(widget.appoList[index]),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
getNextActionImage(widget
|
|
|
|
|
.appoList[index].nextAction),
|
|
|
|
|
width: 50.0,
|
|
|
|
|
height: 50.0),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getNextActionText(widget
|
|
|
|
|
.appoList[index].nextAction),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Text(
|
|
|
|
|
getNextActionDescription(
|
|
|
|
|
widget.appoList[index].nextAction),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[700])),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Text(
|
|
|
|
|
getNextActionDescription(
|
|
|
|
|
widget.appoList[index].nextAction),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[700])),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateToAppointmentDetails(
|
|
|
|
|
context, widget.appoList[index]);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.upcomingDetails,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.red[600],
|
|
|
|
|
decoration:
|
|
|
|
|
TextDecoration.underline)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateToAppointmentDetails(
|
|
|
|
|
context, widget.appoList[index]);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.upcomingDetails,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.red[600],
|
|
|
|
|
decoration:
|
|
|
|
|
TextDecoration.underline)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 120.0,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -287,6 +311,10 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
return "assets/images/new-design/confirm_button.png";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 60:
|
|
|
|
|
return "assets/images/new-design/waiting_for_doctor.png";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@ -306,6 +334,8 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
case 50:
|
|
|
|
|
confirmAppointment(appo);
|
|
|
|
|
break;
|
|
|
|
|
case 60:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -338,6 +368,10 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
return TranslationBase.of(context).confirmLiveCare;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 60:
|
|
|
|
|
return TranslationBase.of(context).waitingForDoctor;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@ -372,6 +406,10 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
return TranslationBase.of(context).upcomingLivecare;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 60:
|
|
|
|
|
return TranslationBase.of(context).waitingForDoctor;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@ -428,7 +466,6 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
getPatientAppointmentHistory() {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
service.getPatientAppointmentHistory(true, context).then((res) {
|
|
|
|
|
print(res['AppoimentAllHistoryResultList']);
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (res['AppoimentAllHistoryResultList'].length != 0) {
|
|
|
|
|
@ -439,6 +476,10 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
});
|
|
|
|
|
} else {}
|
|
|
|
|
});
|
|
|
|
|
widget.appoList.forEach((element) {
|
|
|
|
|
print(element.isLiveCareAppointment);
|
|
|
|
|
print(element.nextAction);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
@ -666,18 +707,49 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
confirmAppointment(AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
service
|
|
|
|
|
.confirmAppointment(
|
|
|
|
|
appo.appointmentNo, appo.clinicID, appo.projectID, context)
|
|
|
|
|
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
|
|
|
|
|
appo.isLiveCareAppointment, context)
|
|
|
|
|
.then((res) {
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
}).showProgressBar(
|
|
|
|
|
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
})
|
|
|
|
|
.showProgressBar(
|
|
|
|
|
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
|
|
|
|
|
.then((value) {
|
|
|
|
|
if (appo.isLiveCareAppointment) {
|
|
|
|
|
insertLiveCareVIDARequest(appo);
|
|
|
|
|
} else {
|
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
service
|
|
|
|
|
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
|
|
|
|
|
appo.serviceID, appo.doctorID, context)
|
|
|
|
|
.then((res) {
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
})
|
|
|
|
|
.showProgressBar(
|
|
|
|
|
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
|
|
|
|
|
.then((value) {
|
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|