DOCTOR ROTA AND LAB RAD CHANGES

development-3.3_voipCall
Sultan khan 2 years ago
parent 320af7d9e0
commit b5851f384d

@ -167,6 +167,7 @@ class BaseAppClient {
}
}
postPatient(String endPoint,
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
@ -346,4 +347,19 @@ class BaseAppClient {
}
return error;
}
get({String endPoint,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure}) async{
String token = await sharedPref.getString(TOKEN);
String url = DOCTOR_ROTATION + endPoint+'&token='+token;
final response = await http.get(Uri.parse(url));
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed,statusCode);
}
}
}

@ -5,12 +5,15 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
// const BASE_URL = 'https://webservices.hmg.com/';
// const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
// const BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; //Vida Plus URL
@ -272,6 +275,9 @@ const GET_STP_MASTER_LIST = "Services/DoctorApplication.svc/REST/DoctorApp_GetST
const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment";
const DOCTOR_SCHEDULE = "api/ScheduledSchedule/GetallSchedulebyUser";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -1146,4 +1146,9 @@ const Map<String, Map<String, String>> localizedValues = {
"yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"},
"youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""},
"conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"},
"doctorSchedule": {"en": "Doctor Schedule", "ar":"جدول الطبيب"},
"doctorRota": {"en": "Doctor Rota", "ar":"دوران الطبيب"},
"dateFrom": {"en": "Date From", "ar":"التاريخ من"},
"searchFindSchedule": {"en": "Search and find out the doctors schedule ", "ar":"بحث ومعرفة جدول الطبيب"}
};

@ -0,0 +1,80 @@
import 'dart:convert';
List<DoctorSchedule> doctorScheduleFromJson(String str) => List<DoctorSchedule>.from(json.decode(str).map((x) => DoctorSchedule.fromJson(x)));
String doctorScheduleToJson(List<DoctorSchedule> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
class DoctorSchedule {
int scheduledid;
int status;
String clinicname;
int clinicid;
List<Scheduleforuser> scheduleforuser;
DoctorSchedule({
this.scheduledid,
this.status,
this.clinicname,
this.clinicid,
this.scheduleforuser,
});
factory DoctorSchedule.fromJson(Map<String, dynamic> json) => DoctorSchedule(
scheduledid: json["scheduledid"],
status: json["status"],
clinicname: json["clinicname"],
clinicid: json["clinicid"],
scheduleforuser: List<Scheduleforuser>.from(json["scheduleforuser"].map((x) => Scheduleforuser.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"scheduledid": scheduledid,
"status": status,
"clinicname": clinicname,
"clinicid": clinicid,
"scheduleforuser": List<dynamic>.from(scheduleforuser.map((x) => x.toJson())),
};
}
class Scheduleforuser {
DateTime days;
int duration;
List<Shiftforuser> shiftforuser;
Scheduleforuser({
this.days,
this.duration,
this.shiftforuser,
});
factory Scheduleforuser.fromJson(Map<String, dynamic> json) => Scheduleforuser(
days: DateTime.parse(json["days"]),
duration: json["duration"],
shiftforuser: List<Shiftforuser>.from(json["shiftforuser"].map((x) => Shiftforuser.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"days": days.toIso8601String(),
"duration": duration,
"shiftforuser": List<dynamic>.from(shiftforuser.map((x) => x.toJson())),
};
}
class Shiftforuser {
int fromtime;
int totime;
Shiftforuser({
this.fromtime,
this.totime,
});
factory Shiftforuser.fromJson(Map<String, dynamic> json) => Shiftforuser(
fromtime: json["fromtime"],
totime: json["totime"],
);
Map<String, dynamic> toJson() => {
"fromtime": fromtime,
"totime": totime,
};
}

@ -36,7 +36,7 @@ class PatientLabOrders {
String setupID;
List<String> speciality;
bool isLiveCareAppointment;
String invoiceType;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -71,7 +71,9 @@ class PatientLabOrders {
this.qR,
this.setupID,
this.speciality,
this.isLiveCareAppointment});
this.isLiveCareAppointment,
this.invoiceType
});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -108,6 +110,7 @@ class PatientLabOrders {
qR = json['QR'];
setupID = json['SetupID'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
invoiceType = json["InvoiceType"];
// speciality = json['Speciality'].cast<String>();
}
@ -147,6 +150,7 @@ class PatientLabOrders {
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['InvoiceType'] = this.invoiceType;
return data;
}
}

@ -45,7 +45,7 @@ class FinalRadiology {
bool isRadMedicalReport;
bool isLiveCareAppodynamicment;
bool isRecordFromVidaPlus;
String invoiceType;
FinalRadiology(
{this.setupID,
this.projectID,
@ -89,7 +89,7 @@ class FinalRadiology {
this.speciality,
this.isCVI,
this.isRadMedicalReport,
this.isLiveCareAppodynamicment, this.isRecordFromVidaPlus});
this.isLiveCareAppodynamicment, this.isRecordFromVidaPlus, this.invoiceType});
FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
try {
@ -137,6 +137,7 @@ class FinalRadiology {
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
isRecordFromVidaPlus = json['IsRecordFromVidaPlus'];
invoiceType = json["InvoiceType"];
} catch (e) {
print(e);
}
@ -186,6 +187,7 @@ class FinalRadiology {
data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport;
data['IsRecordFromVidaPlus'] = this.isRecordFromVidaPlus;
data["InvoiceType"] =invoiceType;
return data;
}
}

@ -2,11 +2,13 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart';
import '../../model/dashboard/doctor_schedule.dart';
class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = [];
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
bool hasVirtualClinic = false;
String sServiceID;

@ -3,13 +3,17 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/request_schedule.dart';
import '../../../config/shared_pref_kay.dart';
import '../../model/dashboard/doctor_schedule.dart';
class ScheduleService extends BaseService {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = [];
RequestSchedule _requestSchedule = RequestSchedule();
List<DoctorSchedule> _doctorRota= [];
List<DoctorSchedule> get doctorRotation => _doctorRota;
Future getDoctorSchedule() async {
await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE,
onSuccess: (dynamic response, int statusCode) {
@ -23,4 +27,23 @@ class ScheduleService extends BaseService {
super.error = error;
}, body: _requestSchedule.toJson(), isFallLanguage: true);
}
Future getDoctorRota(String fromDate, String toDate,{int pageNo = 1}) async{
hasError = false;
String doctorId = '7826'; //await sharedPref.getString(DOCTOR_ID);
String url = DOCTOR_SCHEDULE + '?userid='+doctorId+'&fromDate='+fromDate+'&toDate='+toDate+'&pagenumber='+pageNo.toString()+'&pagesize=10';
await baseAppClient.get( endPoint: url, onSuccess: (dynamic response, int statusCode) {
_doctorRota =[];
response['response'].forEach((res){
_doctorRota.add(DoctorSchedule.fromJson(res));
});
print(_doctorRota);
}, onFailure: (String error, int statusCode) {
print(error);
},
);
}
}

@ -112,7 +112,7 @@ class LabsService extends BaseService {
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
body['InvoiceType'] = patientLabOrder.invoiceType ??"";
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult = [];

@ -10,14 +10,14 @@ class RadiologyService extends BaseService {
String url = '';
bool isRadiologyVIDAPlus = false;
Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient}) async {
Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient,String invoiceType}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
body["InvoiceType"] = invoiceType;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
}, onFailure: (String error, int statusCode) {

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/doctor_schedule.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
@ -30,7 +31,6 @@ class DashboardViewModel extends BaseViewModel {
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList =>
_specialClinicsService.specialClinicalCareList;
Future startHomeScreenServices(ProjectViewModel projectsProvider,
AuthenticationViewModel authProvider) async {
setState(ViewState.Busy);
@ -130,4 +130,6 @@ class DashboardViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
}

@ -53,9 +53,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url;
getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient}) async {
getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient, String invoiceType}) async {
setState(ViewState.Busy);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus, patient: patient);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus, patient: patient, invoiceType: invoiceType);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/doctor_schedule.dart';
import 'package:doctor_app_flutter/core/service/home/schedule_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart';
@ -11,6 +12,8 @@ class ScheduleViewModel extends BaseViewModel {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_scheduleService.listDoctorWorkingHoursTable;
List<DoctorSchedule> get getDoctorRotation =>
_scheduleService.doctorRotation;
Future getDoctorSchedule() async {
setState(ViewState.Busy);
await _scheduleService.getDoctorSchedule();
@ -20,4 +23,15 @@ class ScheduleViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
Future getDoctorRota(String fromDate, String toDate,{int pageNo=1}) async {
setState(ViewState.Busy);
await _scheduleService.getDoctorRota(fromDate,toDate,pageNo:pageNo);
if (_scheduleService.hasError) {
error = _scheduleService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -0,0 +1,465 @@
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../core/viewModel/project_view_model.dart';
import '../../core/viewModel/schedule_view_model.dart';
import '../../icons_app/doctor_app_icons.dart';
import '../../utils/date-utils.dart';
import '../../utils/dr_app_toast_msg.dart';
import '../../utils/translations_delegate_base_utils.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/errors/error_message.dart';
import '../base/base_view.dart';
import '../patients/register_patient/CustomEditableText.dart';
class DoctorSchedulePage extends StatefulWidget {
@override
_DoctorSchedulePageState createState() => _DoctorSchedulePageState();
}
class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
DashboardService service;
PageController _pageController = PageController();
double currentPage = 0;
int selectedindex = 0;
List weeks = [];
// List<DoctorScheduleResponse> doctorScheduleResponse = [];
int weekMS = 604800 * 1000;
// DoctorList? doctorList;
List<String> freeSlots = [];
bool isPageChange = false;
String fromDate = DateFormat('yyyy-MM-dd').format(DateTime.now());
String toDate =
DateFormat('yyyy-MM-dd').format(DateTime.now().add(Duration(days: 30)));
// AppSharedPreferences sharedPref = AppSharedPreferences();
@override
void initState() {
// this.doctorList = widget.doctorList;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ScheduleViewModel>(
onModelReady: (model) => model.getDoctorRota(fromDate, toDate),
builder: (_, model, widget2) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).doctorSchedule,
isShowAppBar: true,
baseViewModel: model,
isHomeIcon: false,
isLoading: true,
actionButton: IconButton(
icon: Icon(DoctorApp.search_1),
color: Colors.black, //Colors.black,
onPressed: () => searchSchedule(model),
),
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Column(
children: [
Padding(
padding: EdgeInsets.only(left: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).dateFrom +
" " +
DateFormat("dd-MMM").format(
DateFormat('yyyy-MM-dd')
.parse(fromDate)) +
" " +
TranslationBase.of(context).to +
" " +
DateFormat("dd-MMM").format(
DateFormat('yyyy-MM-dd')
.parse(toDate)),
style: TextStyle(fontWeight: FontWeight.w600),
),
Row(
children: [
IconButton(
onPressed: () {
model.getDoctorRota(fromDate, toDate,);
},
icon: SvgPicture.asset(
'assets/images/svgs/prev.svg',
height: 25,
width: 10)),
IconButton(
onPressed: () {},
icon: SvgPicture.asset(
'assets/images/svgs/next.svg',
height: 25,
width: 10))
],
),
],
)),
],
),
model.getDoctorRotation.length ==0 ? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
)) :
Container(
margin: EdgeInsets.only(top: 45),
child: PageView.builder(
controller: _pageController,
itemCount: model.getDoctorRotation.length,
onPageChanged: (index) {
setState(() {
isPageChange = true;
this.currentPage = index.toDouble();
});
},
itemBuilder: (context, index) {
return Container(
child: ListView.builder(
itemCount: model.getDoctorRotation[index]
.scheduleforuser.length,
itemBuilder: (context, index2) => InkWell(
onTap: () {
// final weekDay = weeks[index][index2]['DayName'];
},
child: Row(
children: [
Expanded(
flex: 1,
child: Padding(
padding:
projectViewModel.isArabic
? EdgeInsets.only(
right: 17)
: EdgeInsets.only(
left: 17),
child: Row(children: [
Column(
children: [
Text(DateFormat('EEEE')
.format(model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days)
// fontSize: 13,
// fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
),
Text(getDayMonths(model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days))
// fontWeight: FontWeight.bold,
// fontSize: 18,
],
)
])),
),
Expanded(
flex: 3,
child: ClipRRect(
borderRadius:
const BorderRadius.all(
Radius.circular(
20.0)),
child: Container(
padding: EdgeInsets.only(
left: 10,
right: 10,
top: 15,
bottom: 20),
margin: EdgeInsets.only(
left: 20,
right: 20,
top: 7,
bottom: 7),
decoration: BoxDecoration(
boxShadow: [
model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days
.toString()
.substring(
0,
10) ==
DateTime.now()
.toString()
.substring(
0, 10)
? BoxShadow(
color: Colors
.green,
offset: Offset(
projectViewModel.isArabic
? 5
: -5,
0))
: BoxShadow(
color: Colors
.grey[
100],
blurRadius:
5,
spreadRadius:
4,
offset:
Offset(
0,
10),
),
],
borderRadius:
const BorderRadius.all(
Radius.circular(
10.0)),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days
.toString()
.substring(
0,
10) ==
DateTime.now()
.toString()
.substring(
0,
10)
? Text(
TranslationBase.of(
context)
.today,
style:
TextStyle(
color: Colors
.green,
fontWeight:
FontWeight
.w600,
fontSize:
12,
))
: SizedBox(),
// : SizedBox(),
Row(
children: [
Expanded(
child: Text(
model
.getDoctorRotation[
index]
.clinicname,
style:
TextStyle(
fontWeight:
FontWeight
.w600,
),
),
),
// Icon(Icons.arrow_forward, size: 16.0),
],
),
Container(
height: 45,
child: ListView
.builder(
itemCount: model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.shiftforuser
.length,
itemBuilder: (context,
index3) =>
Row(children: [
Text(model.getDoctorRotation[index].scheduleforuser[index2].shiftforuser[index3].fromtime.toString()),
Text(" To "),
Text(model.getDoctorRotation[index].scheduleforuser[index2].shiftforuser[index3].totime.toString())
])))
// ],)
]))),
),
],
))));
},
)),
// PageViewIndicator(
// isActive: true,
// currentPage: this.currentPage,
// length: weeks.length,
// )
],
)),
);
});
}
searchSchedule(model) {
showDialog(
context: context,
builder: (BuildContext context) {
return StatefulBuilder(
builder:(context, setState) {
return
AlertDialog(
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).search,
style: TextStyle(fontSize: 22),
),
Text(
TranslationBase.of(context).searchFindSchedule,
style: TextStyle(fontSize: 16),
)
],
),
content: Container(
height: 150,
child: Column(children: [
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
fromDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).dateFrom,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(fromDate),
Icon(Icons.calendar_month_outlined)
])
],
))),
SizedBox(height: 20,),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
toDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).toDate,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(toDate),
Icon(Icons.calendar_month_outlined)
])
],
)))
]),
),
actions: [
AppButton(
title:TranslationBase.of(context).search,
onPressed: () {
setState((){
model.getDoctorRota(fromDate, toDate);
Navigator.pop(context);
});
},
)
],
);
;
}
);
},
);
}
String getDayMonths(DateTime dateTime) {
String dateFormat =
'${dateTime.day} ${AppDateUtils.getMonth(dateTime.month).toString().substring(0, 3)}';
return dateFormat;
}
}

@ -58,6 +58,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
patientLabOrder: widget.patientLabOrders,
patient: widget.patient,
isInpatient: widget.patientType == "1",
invoiceType:widget.patientLabOrders.invoiceType
),
),
),

@ -23,8 +23,8 @@ class LaboratoryResultWidget extends StatefulWidget {
final PatientLabOrders patientLabOrder;
final PatiantInformtion patient;
final bool isInpatient;
const LaboratoryResultWidget(
final String invoiceType;
const LaboratoryResultWidget(
{Key key,
this.onTap,
this.billNo,
@ -32,7 +32,9 @@ class LaboratoryResultWidget extends StatefulWidget {
this.orderNo,
this.patientLabOrder,
this.patient,
this.isInpatient})
this.isInpatient,
this.invoiceType
})
: super(key: key);
@override

@ -35,8 +35,11 @@ class RadiologyDetailsPage extends StatelessWidget {
patient: patient,
projectId: finalRadiology.projectID,
lineItem: finalRadiology.invoiceLineItemNo,
invoiceType:finalRadiology.invoiceType,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP : finalRadiology.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID),
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID,
),
),
builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileAppBar(

@ -1725,7 +1725,10 @@ class TranslationBase {
String get conditionDescription => localizedValues['conditionDescription'][locale.languageCode];
String get doctorSchedule => localizedValues['doctorSchedule'][locale.languageCode];
String get doctorRota => localizedValues['doctorRota'][locale.languageCode];
String get dateFrom => localizedValues['dateFrom'][locale.languageCode];
String get searchFindSchedule => localizedValues['searchFindSchedule'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/doctor_schedule/doctor_schedule.dart';
import 'package:doctor_app_flutter/screens/reschedule_leaves/add_reschedule_leave.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -136,6 +137,28 @@ class _AppDrawerState extends State<AppDrawer> {
},
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).doctorRota,
icon: Icons.punch_clock,
// subTitle: ,
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DoctorSchedulePage(),
settings: RouteSettings(
name: 'doctorSchedule')
// MyReferredPatient(),
));
},
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).myQRCode,
@ -143,6 +166,7 @@ class _AppDrawerState extends State<AppDrawer> {
// subTitle: ,
),
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
InkWell(
child: Container(

@ -24,7 +24,7 @@ class AppScaffold extends StatelessWidget {
final String subtitle;
final bool isHomeIcon;
final bool extendBody;
final Widget actionButton;
AppScaffold(
{this.appBarTitle = '',
this.body,
@ -36,7 +36,7 @@ class AppScaffold extends StatelessWidget {
this.isHomeIcon = true,
this.appBar,
this.subtitle,
this.drawer,
this.drawer, this.actionButton,
this.extendBody = false,
this.bottomNavigationBar});
@ -92,7 +92,7 @@ class AppScaffold extends StatelessWidget {
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
)
: SizedBox()
: actionButton !=null ? actionButton :SizedBox()
],
)
: null,

Loading…
Cancel
Save