Merge branch 'fixes_nov' into 'development'

Fixes nov

See merge request Cloud_Solution/doctor_app_flutter!901
merge-requests/902/head
Elham Ali 4 years ago
commit 13c05e87dc

@ -711,6 +711,8 @@ const Map<String, Map<String, String>> localizedValues = {
"special": {"en": "Special", "ar": "خاص"},
"allClinic": {"en": "All Clinics", "ar": "جميع العيادات"} ,
"operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"},
"reports": {"en": "Reports", "ar": "تقارير "},
"operation": {"en": "Operation", "ar": " العملية"},
"registerNewPatient": {"en": "Register\nNew Patient", "ar": "تسجيل\n مريض جديد"},
"registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"},
"occupation": {"en": "Occupation", "ar": "مهنة"},

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -49,8 +50,11 @@ class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
),
body: model.admissionOrderList == null ||
model.admissionOrderList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(

@ -199,7 +199,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
],
),
)
: ErrorMessage(error: TranslationBase.of(context).noItem),
: Center(child: ErrorMessage(error: TranslationBase.of(context).noItem)),
],
),
)),

@ -23,6 +23,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -50,10 +51,11 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
print(type);
GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel =
GetDiagnosisForInPatientRequestModel(
GetDiagnosisForInPatientRequestModel(
admissionNo: int.parse(patient.admissionNo),
patientTypeID: patient.patientType,
patientID: patient.patientId, setupID: "010266");
patientID: patient.patientId,
setupID: "010266");
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel);
}
@ -76,8 +78,11 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
),
body: model.diagnosisForInPatientList == null ||
model.diagnosisForInPatientList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).noItem)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(
@ -85,8 +90,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
Expanded(
child: Container(
child: ListView.builder(
itemCount:
model.diagnosisForInPatientList.length,
itemCount: model.diagnosisForInPatientList.length,
itemBuilder: (BuildContext ctxt, int index) {
return FractionallySizedBox(
widthFactor: 0.95,
@ -207,9 +211,9 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(
context)
.icd + " : ",
TranslationBase.of(context)
.icd +
" : ",
fontSize: 12,
),
Expanded(
@ -228,16 +232,17 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
MainAxisAlignment.start,
children: [
AppText("Ascii Desc : ",
AppText(
"Ascii Desc : ",
fontSize: 12,
),
Expanded(
child: AppText(
model
.diagnosisForInPatientList[
index]
index]
.asciiDesc,
fontSize: 12,
isCopyable: true,

@ -35,8 +35,10 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
isShowAppBar: false,
body: // DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
model.allDisChargeSummaryList.isEmpty
? ErrorMessage(
error: TranslationBase.of(context).noDataAvailable)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable),
)
: Column(
children: [
Padding(

@ -36,9 +36,11 @@ class _PendingDischargeSummaryState extends State<PendingDischargeSummary> {
baseViewModel: model,
isShowAppBar: false,
body: model.pendingDischargeSummaryList.isEmpty
? ErrorMessage(
error: TranslationBase.of(context)
.noDataAvailable) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.noDataAvailable),
) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
: Column(
children: [
Padding(

@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -54,7 +55,8 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
GetNursingProgressNoteRequestModel(
admissionNo: int.parse(patient.admissionNo),
patientTypeID: patient.patientType,
patientID: patient.patientId, setupID: "010266");
patientID: patient.patientId,
setupID: "010266");
model.getNursingProgressNote(getNursingProgressNoteRequestModel);
}
@ -78,8 +80,11 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
),
body: model.patientNursingProgressNoteList == null ||
model.patientNursingProgressNoteList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(

@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -66,303 +67,330 @@ class _ProgressNoteState extends State<OperationReportScreen> {
),
body: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
model.reservationList == null ||
model.reservationList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote)
: Expanded(
child: Container(
child: ListView.builder(
itemCount: model.reservationList.length,
itemBuilder: (BuildContext ctxt, int index) {
return FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.white,
widget: Column(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
child:model.reservationList == null ||
model.reservationList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, ),
): Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).operation,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).reports,
fontSize: 25.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
),
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.reservationList.length,
itemBuilder: (BuildContext ctxt, int index) {
return FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.white,
widget: Column(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
TranslationBase.of(
context)
.createdBy,
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.doctorName ??
'',
fontWeight:
FontWeight.w600,
fontSize: 12,
),
),
],
),
],
),
),
Column(
children: [
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
Row(
crossAxisAlignment:
CrossAxisAlignment.end,
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Reservation: ",
fontSize: 10,
),
Expanded(
child: AppText(
model.reservationList[index].oTReservationID.toString(),
fontSize: 10,
),
)
]),
SizedBox(
height: 8,
),
if (model.reservationList[index]
.operationDate !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
CrossAxisAlignment
.start,
children: [
AppText(
"Operation Date : ",
fontSize: 10,
),
Expanded(
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 10,
),
)
]),
if (model.reservationList[index]
.timeStart !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Time Start : ",
TranslationBase.of(
context)
.createdBy,
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.timeStart,
fontSize: 10,
),
)
]),
if (model.reservationList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.remarks ??
index]
.doctorName ??
'',
fontSize: 10,
fontWeight:
FontWeight.w600,
fontSize: 12,
),
),
])
],
),
SizedBox(
height: 20,
),
// if (
// authenticationViewModel
// .doctorProfile.doctorID ==
// model
// .operationReportList[
// index]
// .createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
],
),
],
),
),
Column(
children: [
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
crossAxisAlignment:
CrossAxisAlignment.end,
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.end,
MainAxisAlignment.start,
children: [
InkWell(
onTap: () async {
await locator<AnalyticsService>()
.logEvent(
eventCategory:
"Operation Report Screen",
eventAction:
"Update Operation Report ",
);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
UpdateOperationReport(
reservation: model
.reservationList[
index],
patient: patient,
isUpdate: true,
)),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.green[600],
borderRadius:
BorderRadius.circular(10),
AppText(
"Reservation: ",
fontSize: 10,
),
Expanded(
child: AppText(
model.reservationList[index].oTReservationID.toString(),
fontSize: 10,
),
)
]),
SizedBox(
height: 8,
),
if (model.reservationList[index]
.operationDate !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Date : ",
fontSize: 10,
),
Expanded(
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 10,
),
// color:Colors.red[600],
child: Row(
children: [
Icon(
DoctorApp.edit_1,
size: 12,
color: Colors.white,
),
SizedBox(
width: 2,
),
AppText(
"Operation Reports",
fontSize: 10,
color: Colors.white,
),
],
)
]),
if (model.reservationList[index]
.timeStart !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Time Start : ",
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.timeStart,
fontSize: 10,
),
padding: EdgeInsets.all(6),
)
]),
if (model.reservationList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
),
),
SizedBox(
width: 10,
),
SizedBox(
width: 10,
),
],
),
Expanded(
child: AppText(
model
.reservationList[
index]
.remarks ??
'',
fontSize: 10,
),
),
])
],
),
SizedBox(
height: 10,
SizedBox(
height: 20,
),
// if (
// authenticationViewModel
// .doctorProfile.doctorID ==
// model
// .operationReportList[
// index]
// .createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.end,
children: [
InkWell(
onTap: () async {
await locator<AnalyticsService>()
.logEvent(
eventCategory:
"Operation Report Screen",
eventAction:
"Update Operation Report ",
);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
UpdateOperationReport(
reservation: model
.reservationList[
index],
patient: patient,
isUpdate: true,
)),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.green[600],
borderRadius:
BorderRadius.circular(10),
),
// color:Colors.red[600],
child: Row(
children: [
Icon(
DoctorApp.edit_1,
size: 12,
color: Colors.white,
),
SizedBox(
width: 2,
),
AppText(
"Operation Reports",
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
),
],
),
),
SizedBox(
width: 10,
),
SizedBox(
width: 10,
),
],
),
);
}),
),
),
SizedBox(
height: 10,
),
],
),
),
);
}),
),
),
],
),
),

@ -5,7 +5,9 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:flutter/material.dart';
class PendingOrdersScreen extends StatelessWidget {
@ -34,8 +36,10 @@ class PendingOrdersScreen extends StatelessWidget {
appBarTitle: "Pending Orders",
body: model.pendingOrdersList == null ||
model.pendingOrdersList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable)
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, ),
)
: Column(
children: [
Padding(
@ -64,30 +68,35 @@ class PendingOrdersScreen extends StatelessWidget {
],
),
),
Container(
Expanded(
child: Container(
height: MediaQuery.of(context).size.height *.9,
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pendingOrdersList.length,
itemCount:
model.pendingOrdersList.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Color(0xFF707070), width: 0.30),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: AppText(
model.pendingOrdersList[index].notes),
return FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.transparent,
widget: Column(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: AppText(
model.pendingOrdersList[index].notes),
),
SizedBox(
height: 20,
),
],
),
),
);
})),
}),
),
),
],
),
),

@ -259,6 +259,10 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
});
},
),
SizedBox(
height: 70,
),
],
),
),

@ -213,6 +213,8 @@ class TranslationBase {
String get progressNote => localizedValues['progressNote'][locale.languageCode];
String get operationReports => localizedValues['operationReports'][locale.languageCode];
String get reports => localizedValues['reports'][locale.languageCode];
String get operation => localizedValues['operation'][locale.languageCode];
String get progress => localizedValues['progress'][locale.languageCode];

Loading…
Cancel
Save