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

merge-requests/472/head
Mohammad Aljammal 5 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); await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) { if (_medicalFileService.hasError) {
error = _medicalFileService.error; error = _medicalFileService.error;
setState(ViewState.ErrorLocal); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); 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( : Column(
children: [ children: [

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save