add the branch in all doctors card and add no data image

merge-requests/472/head
Mohammad Aljammal 4 years ago
parent 7dfe9f843f
commit 8055fa17eb

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -19,7 +19,7 @@ class MedicalFileViewModel extends BaseViewModel {
await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) {
error = _medicalFileService.error;
setState(ViewState.ErrorLocal);
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}

@ -131,181 +131,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
);
// return Padding(
// padding: EdgeInsets.symmetric(
// horizontal: 12.0, vertical: 8.0),
// child: InkWell(
// child: Container(
// width: double.infinity,
// margin: EdgeInsets.only(
// top: 10, left: 10, right: 10),
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// border: Border.all(
// color: Colors.grey[200], width: 0.5),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .doctorName,
// fontWeight: FontWeight.w700,
// fontSize: 17.0,
// fontFamily: 'Poppins',
// )
// ],
// ),
// Row(
// children: [
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .day
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .month
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .year
// .toString(),
// ),
// ],
// )
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// children: [
// ClipRRect(
// borderRadius:
// BorderRadius.all(
// Radius.circular(30)),
// child: Image.network(
// 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
// fit: BoxFit.cover,
// width: 60,
// height: 70,
// ),
// ),
// ],
// ),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// AppText(
// TranslationBase.of(context)
// .clinic +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .clinicName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
// children: [
// AppText(
// TranslationBase.of(context)
// .branch +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .projectName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Column(
// children: [
// Icon(
// Icons.remove_red_eye,
// size: 30.0,
// )
// ],
// )
// ],
// ),
// ],
// ),
// ),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// MedicalFileDetails(
// age: patient.age,
// firstName: patient.firstName,
// lastName: patient.lastName,
// gender: patient.genderDescription,
// encounterNumber: index,
// pp: patient.patientId,
// patient: patient,
// )),
// );
// },
// ),
// );
})
: Column(
children: [

@ -43,6 +43,8 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
orderNo: widget.patientLabOrders.orderNo,
appointmentDate:widget.patientLabOrders.orderDate,
doctorName: widget.patientLabOrders.doctorName,
branch: widget.patientLabOrders.projectName,
clinic: widget.patientLabOrders.clinicDescription,
profileUrl: widget.patientLabOrders.doctorImageURL,
invoiceNO: widget.patientLabOrders.invoiceNo,
),

@ -136,6 +136,7 @@ class LabsHomePage extends StatelessWidget {
invoiceNO: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
branch: labOrder.projectName,
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo,
);

@ -43,6 +43,8 @@ class RadiologyDetailsPage extends StatelessWidget {
arrivalType: arrivalType ?? "0",
appointmentDate: finalRadiology.orderDate,
doctorName: finalRadiology.doctorName,
clinic: finalRadiology.clinicDescription,
branch: finalRadiology.projectName,
profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(),
),
@ -54,6 +56,7 @@ class RadiologyDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: double.maxFinite,
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.white,

@ -123,6 +123,7 @@ class RadiologyHomePage extends StatelessWidget {
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate: model.radiologyList[index].orderDate,
),
)),

@ -36,6 +36,7 @@ class PrescriptionItemsPage extends StatelessWidget {
patientType: patientType??"0",
arrivalType: arrivalType??"0",
clinic: prescriptions.clinicDescription,
branch: prescriptions.name,
isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName,

@ -29,121 +29,119 @@ class ProcedureScreen extends StatelessWidget {
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType),
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Order Test or',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Procedure',
bold: true,
fontSize: 22,
),
],
),
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Order Test or',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Procedure',
bold: true,
fontSize: 22,
),
],
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell(
onTap: () {
addSelectedProcedure(context, model, patient);
},
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell(
onTap: () {
addSelectedProcedure(context, model, patient);
},
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
SizedBox(
height: 10,
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
Texts(
'Add More Procedure',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
SizedBox(
height: 10,
),
Texts(
'Add More Procedure',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
if (model.procedureList.isNotEmpty)
...List.generate(
model.procedureList[0].rowcount,
(index) => ProcedureCard(
categoryID:
model.procedureList[0].entityList[index].categoryID,
entityList: model.procedureList[0].entityList[index],
onTap: () {
if (model.procedureList[0].entityList[index].categoryID ==
2 ||
model.procedureList[0].entityList[index].categoryID == 4)
updateProcedureForm(context,
model: model,
patient: patient,
remarks: model
.procedureList[0].entityList[index].remarks,
orderType: model.procedureList[0]
.entityList[index].orderType
.toString(),
orderNo: model
.procedureList[0].entityList[index].orderNo,
procedureName: model.procedureList[0]
.entityList[index].procedureName,
categoreId: model.procedureList[0]
.entityList[index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList[index].procedureId,
limetNo: model.procedureList[0]
.entityList[index].lineItemNo);
// } else
// helpers.showErrorToast(
// 'You Cant Update This Procedure');
},
),
),
if (model.procedureList.isNotEmpty)
...List.generate(
model.procedureList[0].rowcount,
(index) => ProcedureCard(
categoryID:
model.procedureList[0].entityList[index].categoryID,
entityList: model.procedureList[0].entityList[index],
onTap: () {
if (model.procedureList[0].entityList[index].categoryID ==
2 ||
model.procedureList[0].entityList[index].categoryID == 4)
updateProcedureForm(context,
model: model,
patient: patient,
remarks: model
.procedureList[0].entityList[index].remarks,
orderType: model.procedureList[0]
.entityList[index].orderType
.toString(),
orderNo: model
.procedureList[0].entityList[index].orderNo,
procedureName: model.procedureList[0]
.entityList[index].procedureName,
categoreId: model.procedureList[0]
.entityList[index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList[index].procedureId,
limetNo: model.procedureList[0]
.entityList[index].lineItemNo);
// } else
// helpers.showErrorToast(
// 'You Cant Update This Procedure');
},
),
],
),
),
],
),
),
),

@ -171,7 +171,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
Container(
child: AppText(
convertDateFormat2(
patient.appointmentDate.toString() ?? ''),
patient.appointmentDate ?? ''),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
@ -281,7 +281,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
date.day.toString().padLeft(2, '0');
}
return newDate.toString();
return newDate??'';
}
isToday(date) {

@ -380,7 +380,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
fontWeight: FontWeight.w600,
fontSize: 12,
),
if (orderNo != null && !isPrescriptions)
if (orderNo != null )
Row(
children: <Widget>[
Texts(
@ -393,7 +393,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
)
],
),
if (invoiceNO != null && !isPrescriptions)
if (invoiceNO != null )
Row(
children: <Widget>[
Texts(
@ -407,7 +407,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
)
],
),
if(isPrescriptions && branch!=null)
if( branch!=null)
Row(
children: [
Texts(
@ -421,7 +421,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
)
],
),
if(isPrescriptions)
if(clinic!=null)
Row(
children: [
Texts(

@ -82,7 +82,7 @@ class DoctorCard extends StatelessWidget {
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
child: LargeAvatar(
@ -93,74 +93,81 @@ class DoctorCard extends StatelessWidget {
height: 55,
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'order No:',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
orderNo ?? '',
fontSize: 14,
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
'Invoice:',
fontSize: 14,
color: Colors.grey[500],
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'order No:',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
orderNo ?? '',
fontSize: 14,
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Invoice:',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
invoiceNO,
fontSize: 14,
)
],
),
if(clinic!=null)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
clinic,
fontSize: 14,
)
],
),
Texts(
invoiceNO,
fontSize: 14,
if(branch!=null)
Row(
children: <Widget>[
Texts(
'Branch: ',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
branch,
fontSize: 14,
)
],
)
],
),
if(isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
clinic,
fontSize: 14,
)
],
),
if(branch!=null)
Row(
children: <Widget>[
Texts(
'Branch: ',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
branch,
fontSize: 14,
)
],
)
]),
]),
),
),
Icon(
EvaIcons.eye,
)
],
),
),
Icon(
EvaIcons.eye,
)
],
),
],

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -32,8 +33,13 @@ class NetworkBaseView extends StatelessWidget {
break;
case ViewState.Error:
return Center(
child: DrAppEmbeddedError(
error: baseViewModel.error,
child: Column(
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png',height: 250),
Texts(baseViewModel.error??'')
],
),
);
break;

Loading…
Cancel
Save