add no data image in all pages

merge-requests/478/head
Mohammad Aljammal 5 years ago
parent 26f90214b2
commit b812ac4b06

@ -23,8 +23,8 @@ class InsuranceViewModel extends BaseViewModel{
else else
await _insuranceCardService.getInsuranceApproval(patient); await _insuranceCardService.getInsuranceApproval(patient);
if (_insuranceCardService.hasError) { if (_insuranceCardService.hasError) {
error = _insuranceCardService.error; error = "No Insurance Approval Found";
setState(ViewState.ErrorLocal); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -244,12 +244,15 @@ class PrescriptionViewModel extends BaseViewModel {
} }
} }
getPrescriptions(PatiantInformtion patient) async { getPrescriptions(PatiantInformtion patient, {String patientType}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions(patient); await _prescriptionsService.getPrescriptions(patient);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.Error); if(patientType=="7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else { } else {
_filterList(); _filterList();
await _getPrescriptionsOrders(); await _getPrescriptionsOrders();

@ -55,14 +55,17 @@ class ProcedureViewModel extends BaseViewModel {
? _patientLabOrdersListClinic ? _patientLabOrdersListClinic
: _patientLabOrdersListHospital; : _patientLabOrdersListHospital;
Future getProcedure({int mrn}) async { Future getProcedure({int mrn,String patientType}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedure(mrn: mrn); await _procedureService.getProcedure(mrn: mrn);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
setState(ViewState.Error); if(patientType=="7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -136,12 +139,15 @@ class ProcedureViewModel extends BaseViewModel {
//await getProcedure(mrn: mrn); //await getProcedure(mrn: mrn);
} }
void getPatientRadOrders(PatiantInformtion patient) async { void getPatientRadOrders(PatiantInformtion patient,{String patientType}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient); await _radiologyService.getPatientRadOrders(patient);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
setState(ViewState.Error); if(patientType=="7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else { } else {
_radiologyService.finalRadiologyList.forEach((element) { _radiologyService.finalRadiologyList.forEach((element) {
List<FinalRadiologyList> finalRadiologyListClinic = List<FinalRadiologyList> finalRadiologyListClinic =
@ -220,12 +226,15 @@ class ProcedureViewModel extends BaseViewModel {
return labResultLists; return labResultLists;
} }
void getLabs(PatiantInformtion patient) async { void getLabs(PatiantInformtion patient,{bool isArrived}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient); await _labsService.getPatientLabOrdersList(patient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
if(isArrived)
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else { } else {
_labsService.patientLabOrdersList.forEach((element) { _labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic = List<PatientLabOrdersList> patientLabOrdersClinic =

@ -80,7 +80,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
To: DateUtils.convertDateToFormat( To: DateUtils.convertDateToFormat(
DateTime.now().add(Duration(days: 7, hours: 0)), 'yyyy-MM-dd') DateTime.now().add(Duration(days: 6, hours: 0)), 'yyyy-MM-dd')
.toString(), .toString(),
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",

@ -54,630 +54,89 @@ class _InsuranceApprovalScreenNewState
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004, left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04, top: SizeConfig.screenWidth * 0.04,
), ),
child: model.insuranceApproval.length != 0 child: model.insuranceApproval.length != 0
? Column( ? Column(
children: <Widget>[ children: <Widget>[
// Container( Padding(
// width: double.infinity, padding: const EdgeInsets.all(8.0),
// height: SizeConfig.screenHeight * 0.09, child: Column(
// color: Color(0xffEEEEEE), children: [
// child: Row( Row(
// mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
// children: <Widget>[ AppText(
// Texts( 'Insurance',
// TranslationBase.of(context).totalApproval, fontSize: 15.0,
// color: Color(0xff60688B), fontWeight: FontWeight.w600,
// fontSize: 19.0, fontFamily: 'Poppins',
// fontWeight: FontWeight.w600, ),
// ), ],
// if (model.insuranceApproval.length > 0) ),
// Container( Row(
// width: 60, children: [
// height: 40, AppText(
// decoration: BoxDecoration( 'Approvals',
// color: Theme.of(context).primaryColor, fontSize: 30.0,
// borderRadius: BorderRadius.circular(19.0)), fontWeight: FontWeight.w700,
// child: Center( ),
// child: Texts( ],
// model.insuranceApproval[0].unUsedCount ),
// .toString(), ],
// color: Colors.white,
// fontSize: 17.0,
// ),
// ))
// ],
// )),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
'Insurance',
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
'Approvals',
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
), ),
),
...List.generate( ...List.generate(
model.insuranceApproval.length, model.insuranceApproval.length,
(index) => Container( (index) => Container(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => builder: (context) =>
InsuranceApprovalsDetails( InsuranceApprovalsDetails(
patient: patient, patient: patient,
indexInsurance: index, indexInsurance: index,
)), )),
); );
}, },
child: DoctorCardInsurance( child: DoctorCardInsurance(
patientOut: model.insuranceApproval[index] patientOut: model
.patientDescription, .insuranceApproval[index].patientDescription,
profileUrl: profileUrl:
model.insuranceApproval[index].doctorImage, model.insuranceApproval[index].doctorImage,
clinic: clinic: model.insuranceApproval[index].clinicName,
model.insuranceApproval[index].clinicName, doctorName:
doctorName: model.insuranceApproval[index].doctorName,
model.insuranceApproval[index].doctorName, branch: model.insuranceApproval[index].approvalNo
branch: model .toString(),
.insuranceApproval[index].approvalNo isPrescriptions: true,
.toString(), approvalStatus: model.insuranceApproval[index]
isPrescriptions: true, .approvalStatusDescption ??
approvalStatus: model.insuranceApproval[index] '',
.approvalStatusDescption ?? branch2:
'', model.insuranceApproval[index].projectName,
branch2:
model.insuranceApproval[index].projectName,
),
), ),
), ),
// (index) => Container(
// width: double.maxFinite,
// height: MediaQuery.of(context).size.height * .20,
// margin: EdgeInsets.all(10),
// padding:
// EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(15),
// color: Colors.white,
// ),
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Container(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Container(
// height: MediaQuery.of(context).size.height * .20,
// width: 5,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(10),
// bottomLeft: Radius.circular(10),
// ),
// color: model.insuranceApproval[index]
// .approvalStatusDescption !=
// "Approved"
// ? Colors.red[500]
// : Colors.green,
// ),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets.only(
// left: projectViewModel.isArabic ? 0 : 15,
// right: projectViewModel.isArabic ? 15 : 0),
// child: InkWell(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// // mainAxisAlignment:
// // MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Texts(
// model.insuranceApproval[index]
// .approvalDetails.status,
// color: model
// .insuranceApproval[
// index]
// .approvalStatusDescption ==
// "Approved"
// ? Colors.green
// : Colors.red[800],
// fontWeight: FontWeight.w600,
// ),
// SizedBox(
// height: 5,
// ),
// AppText(model
// .insuranceApproval[index]
// .doctorName),
// Container(
// child: LargeAvatar(
// url: model
// .insuranceApproval[index]
// .doctorImage,
// ),
// width: 55,
// height: 55,
// ),
// ],
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: <Widget>[
// Texts(
// 'Clinic: ',
// color: Colors.grey[500],
// ),
// Texts(
// model
// .insuranceApproval[
// index]
// .clinicName,
// ),
// ],
// ),
// Row(
// children: <Widget>[
// Texts(
// 'Approval No',
// color: Colors.grey[500],
// ),
// Texts(
// model
// .insuranceApproval[
// index]
// .approvalNo
// .toString(),
// ),
// ],
// ),
// ],
// ),
// SizedBox(
// width: 5,
// ),
// ],
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: <Widget>[
// Texts(
// 'Clinic: ',
// color: Colors.grey[500],
// ),
// Texts(
// model
// .insuranceApproval[
// index]
// .clinicName,
// ),
// ],
// ),
// Row(
// children: <Widget>[
// Texts(
// 'Approval No',
// color: Colors.grey[500],
// ),
// Texts(
// model
// .insuranceApproval[
// index]
// .approvalNo
// .toString(),
// ),
// ],
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Icon(Icons.remove_red_eye_outlined)
// ],
// )
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// ),
// RoundedContainer(
// backgroundColor: Colors.white,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// ExpansionTile(
// title: Container(
// //height: 120.0,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// model.insuranceApproval[index]
// .patientDescription ==
// "In Patient"
// ? Container(
// decoration: BoxDecoration(
// color:
// Theme.of(context).primaryColor,
// borderRadius:
// BorderRadius.circular(16.0)),
// width: 115.0,
// padding: EdgeInsets.only(left: 11.5),
// child: Center(
// child: Texts(
// TranslationBase.of(context)
// .inPatient,
// color: Colors.white,
// ),
// ),
// )
// : Container(
// decoration: BoxDecoration(
// color: Color(0xff505A5D),
// borderRadius:
// BorderRadius.circular(16.0)),
// width: 115.0,
// padding: EdgeInsets.only(left: 11.5),
// child: Center(
// child: Texts(
// TranslationBase.of(context)
// .outpatient,
// color: Colors.white,
// ),
// ),
// ),
// Padding(
// padding: EdgeInsets.symmetric(vertical: 10.0),
// child: Texts(
// model.insuranceApproval[index].clinicName,
// fontSize: 20.0,
// color: Color(0xff60686B),
// fontWeight: FontWeight.w600,
// ),
// ),
// Texts(
// model.insuranceApproval[index].doctorName,
// fontSize: 17.0,
// ),
// ],
// ),
// ),
// children: <Widget>[
// Padding(
// padding: EdgeInsets.symmetric(
// vertical: 12.0, horizontal: 12.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Row(
// children: [
// Texts(
// TranslationBase.of(context).approvalNo,
// fontSize: 18.0,
// ),
// Texts(
// model
// .insuranceApproval[index].approvalNo
// .toString(),
// fontSize: 18.0,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context)
// .procedureStatus,
// fontSize: 17.5,
// ),
// SizedBox(
// width: 12,
// ),
// Expanded(
// child: Texts(
// model.insuranceApproval[index]
// .approvalStatusDescption,
// fontWeight: FontWeight.w600,
// fontSize: 17.5,
// ),
// ),
// ],
// ),
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context).unusedCount,
// fontSize: 17.5,
// ),
// Texts(
// model.insuranceApproval[index]
// .unUsedCount
// .toString(),
// fontSize: 17.5,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// // Text(
// // 'Company Name: ' +
// // model.insuranceApproval[index]
// // .companyName ==
// // null
// // ? '000'
// // : model
// // .insuranceApproval[index].companyName,
// // style: TextStyle(
// // fontSize: 17.5,
// // fontWeight: FontWeight.w600),
// // ),
// Texts(
// TranslationBase.of(context).companyName,
// fontWeight: FontWeight.w600,
// fontSize: 17.5,
// ),
//
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context).receiptOn,
// fontSize: 17.5,
// fontWeight: FontWeight.w600,
// ),
// Texts(
// DateUtils.getDateTimeFromServerFormat(
// model.insuranceApproval[index]
// .rceiptOn)
// .toString(),
// fontSize: 17.5,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context).expiryDate,
// fontSize: 17.5,
// fontWeight: FontWeight.w600,
// ),
// Texts(
// DateUtils.getDateTimeFromServerFormat(
// model.insuranceApproval[index]
// .expiryDate)
// .toString(),
// fontSize: 17.5,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Divider(
// color: Colors.black,
// height: 55.0,
// thickness: 1.2,
// ),
// IntrinsicHeight(
// child: Row(
// crossAxisAlignment:
// CrossAxisAlignment.center,
// children: <Widget>[
// Expanded(
// flex: 1,
// child: Column(
// children: <Widget>[
// Text(TranslationBase.of(context)
// .procedureName),
// Padding(
// padding: EdgeInsets.only(
// top: SizeConfig
// .heightMultiplier *
// 3.0),
// child: Text(
// model.insuranceApproval[index]
// .approvalDetails ==
// null
// ? ''
// : model
// .insuranceApproval[
// index]
// .approvalDetails
// .procedureName,
// style: TextStyle(
// fontWeight:
// FontWeight.w600,
// fontSize: 15.5),
// ),
// ),
// ],
// ),
// ),
// VerticalDivider(
// width: 10.0,
// thickness: 1.2,
// color: Colors.black,
// ),
// Expanded(
// flex: 1,
// child: Column(
// children: <Widget>[
// Text(TranslationBase.of(context)
// .procedureStatus),
// Padding(
// padding: EdgeInsets.only(
// top: SizeConfig
// .heightMultiplier *
// 3.0),
// child: Text(
// model.insuranceApproval[index]
// .approvalDetails ==
// null
// ? ''
// : model
// .insuranceApproval[
// index]
// .approvalDetails
// .status,
// style: TextStyle(
// fontSize: 17.5,
// fontWeight:
// FontWeight.w600),
// ),
// ),
// ],
// ),
// ),
// VerticalDivider(
// width: 2.3,
// thickness: 1.2,
// color: Colors.black,
// ),
// Expanded(
// flex: 1,
// child: Column(
// children: <Widget>[
// Text(TranslationBase.of(context)
// .usageStatus),
// Padding(
// padding: EdgeInsets.only(
// top: SizeConfig
// .heightMultiplier *
// 3.0),
// child: Text(
// model.insuranceApproval[index]
// .approvalDetails ==
// null
// ? ''
// : model
// .insuranceApproval[
// index]
// .approvalDetails
// .isInvoicedDesc,
// style: TextStyle(
// fontWeight:
// FontWeight.w600,
// fontSize: 17.5),
// ),
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// Divider(
// color: Colors.black,
// height: 25.0,
// thickness: 1.0,
// ),
// ],
// ),
// ),
// ],
// ),
// ],
// ),
// ),
), ),
], ),
) ],
: Column( )
children: [ : Column(
Container( children: [
height: 200, Container(
width: double.infinity, height: 200,
child: Center( width: double.infinity,
child: Text("No Insurance Approvals Found"))) child: Center(
], child: Text("No Insurance Approvals Found")))
)), ],
),
),
), ),
), ),
); );
} }
convertDateFormat(String Date) {
const start = "/Date(";
const end = "+0300)";
final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
} }

@ -32,9 +32,10 @@ class LabsHomePage extends StatelessWidget {
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
print(arrivalType); print(arrivalType);
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient), onModelReady: (model) => model.getLabs(patient,isArrived: (patientType != null && patientType == '7' && patient.patientStatusType == 43)),
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Colors.grey[100],
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType), patient, patient.patientType.toString() ?? '0', patientType),
@ -48,6 +49,7 @@ class LabsHomePage extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if(model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -67,9 +69,27 @@ class LabsHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && if(patient.patientStatusType == 43)
patientType == '7' && Padding(
patient.patientStatusType == 43) padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Lab',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Result',
bold: true,
fontSize: 22,
),
],
),
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -156,7 +176,22 @@ class LabsHomePage extends StatelessWidget {
); );
}).toList(), }).toList(),
), ),
) ),
if(model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts('No Lab Result Found'),
)
],
),
)
], ],
), ),
), ),

@ -29,9 +29,10 @@ class RadiologyHomePage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient), onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100],
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType), patient, patient.patientType.toString() ?? '0', arrivalType),
@ -44,7 +45,8 @@ class RadiologyHomePage extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Padding( if(model.radiologyList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -63,6 +65,26 @@ class RadiologyHomePage extends StatelessWidget {
], ],
), ),
), ),
if(patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Radiology',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Result',
bold: true,
fontSize: 22,
),
],
),
),
if (patientType != null && if (patientType != null &&
patientType == '7' && patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
@ -142,6 +164,21 @@ class RadiologyHomePage extends StatelessWidget {
appointmentDate: model.radiologyList[index].orderDate, appointmentDate: model.radiologyList[index].orderDate,
), ),
)), )),
if(model.radiologyList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts('No Radiology Found'),
)
],
),
)
], ],
), ),
), ),

@ -49,7 +49,7 @@ postProcedure(
DateTime doseTime, DateTime doseTime,
String doseUnit, String doseUnit,
String icdCode, String icdCode,
PatiantInformtion patient}) async { PatiantInformtion patient,String patientType}) async {
PostPrescriptionReqModel postProcedureReqModel = PostPrescriptionReqModel postProcedureReqModel =
new PostPrescriptionReqModel(); new PostPrescriptionReqModel();
List<PrescriptionRequestModel> sss = List(); List<PrescriptionRequestModel> sss = List();
@ -236,8 +236,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
children: [ children: [
Column( Column(
children: [ children: [
SizedBox(height: 15,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText(
'New Prescription Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
InkWell( InkWell(
child: Icon( child: Icon(
Icons.close, Icons.close,
@ -246,16 +253,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
}, },
), )
],
),
Row(
children: [
AppText(
'New Prescription Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
], ],
), ),
], ],

@ -28,10 +28,11 @@ class PrescriptionsPage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescriptions(patient), onModelReady: (model) => model.getPrescriptions(patient,patientType:patientType),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType ?? '0', arrivalType), patient, patientType ?? '0', arrivalType),
body: FractionallySizedBox( body: FractionallySizedBox(
@ -42,7 +43,8 @@ class PrescriptionsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Padding( if(model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -61,6 +63,26 @@ class PrescriptionsPage extends StatelessWidget {
], ],
), ),
), ),
if(patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Order',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Prescriptions',
bold: true,
fontSize: 22,
),
],
),
),
if (patientType != null && if (patientType != null &&
patientType == '7' && patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
@ -138,7 +160,22 @@ class PrescriptionsPage extends StatelessWidget {
DateUtils.getDateTimeFromServerFormat( DateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate, model.prescriptionsList[index].appointmentDate,
), ),
))) ))),
if(model.prescriptionsList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts('No Lab Result Found'),
)
],
),
)
], ],
), ),
), ),

@ -154,21 +154,21 @@ class ProcedureCard extends StatelessWidget {
), ),
], ],
), ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Texts( // Texts(
entityList.remarks.toString() ?? '', // entityList.remarks.toString() ?? '',
fontSize: 12, // fontSize: 12,
), // ),
if (entityList.categoryID == 2 || // if (entityList.categoryID == 2 ||
entityList.categoryID == 4) // entityList.categoryID == 4)
InkWell( // InkWell(
child: Icon(DoctorApp.edit), // child: Icon(DoctorApp.edit),
onTap: onTap, // onTap: onTap,
) // )
], // ],
) // )
], ],
), ),
//onTap: onTap, //onTap: onTap,

@ -155,7 +155,7 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
(BuildContext context, ScrollController scrollController) { (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView( return SingleChildScrollView(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 1.0, height: MediaQuery.of(context).size.height * .90,
child: Padding( child: Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Column( child: Column(
@ -209,85 +209,39 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
isEntityListSelected: (master) => isEntityListSelected: (master) =>
isEntityListSelected(master), isEntityListSelected(master),
)), )),
SizedBox( Container(
height: 15.0, margin: EdgeInsets.all(
), SizeConfig.widthMultiplier * 5),
Column( child: Wrap(
mainAxisAlignment: MainAxisAlignment.spaceBetween, alignment: WrapAlignment.center,
children: [ children: <Widget>[
// Container( AppButton(
// child: Row( title:
// children: [ "Add Lab Order", //TranslationBase.of(context)
// AppText( fontWeight: FontWeight.w700,
// TranslationBase.of(context).orderType), //.addSelectedProcedures,
// Radio( color: Color(0xff359846),
// activeColor: Color(0xFFB9382C), onPressed: () {
// value: 1, //print(entityList.toString());
// groupValue: selectedType, onPressed:
// onChanged: (value) { if (entityList.isEmpty == true) {
// setSelectedType(value); DrAppToastMsg.showErrorToast(
// }, "Fill the mandatory procedure details");
// ), return;
// Text('routine'), }
// Radio(
// activeColor: Color(0xFFB9382C),
// groupValue: selectedType,
// value: 0,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text(TranslationBase.of(context).urgent),
// ],
// ),
// ),
// SizedBox(
// height: 15.0,
// ),
// TextFields(
// hintText: TranslationBase.of(context).remarks,
// controller: remarksController,
// minLines: 3,
// maxLines: 5,
// ),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
"Add Lab Order", //TranslationBase.of(context)
fontWeight: FontWeight.w700,
//.addSelectedProcedures,
color: Color(0xff359846),
onPressed: () {
//print(entityList.toString());
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
return;
}
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
orderType: selectedType.toString(), orderType: selectedType.toString(),
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
model: widget.model, model: widget.model,
remarks: remarksController.text); remarks: remarksController.text);
}, },
),
],
), ),
), ],
], ),
) ),
], ],
), ),
), ),

@ -162,15 +162,14 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( AppText(
'New Radiology Order', 'New Radiology Order',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 20, fontSize: 20,
), ),
SizedBox(
width: MediaQuery.of(context).size.width * 0.48,
),
InkWell( InkWell(
child: Icon( child: Icon(
Icons.close, Icons.close,
@ -209,82 +208,36 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
isEntityListSelected: (master) => isEntityListSelected: (master) =>
isEntityListSelected(master), isEntityListSelected(master),
)), )),
SizedBox( Container(
height: 15.0, margin: EdgeInsets.all(
), SizeConfig.widthMultiplier * 5),
Column( child: Wrap(
mainAxisAlignment: MainAxisAlignment.spaceBetween, alignment: WrapAlignment.center,
children: [ children: <Widget>[
// Container( AppButton(
// child: Row( title: 'Add Radiology Order',
// children: [ color: Color(0xff359846),
// AppText( fontWeight: FontWeight.w700,
// TranslationBase.of(context).orderType), onPressed: () {
// Radio( //print(entityList.toString());
// activeColor: Color(0xFFB9382C), onPressed:
// value: 1, if (entityList.isEmpty == true) {
// groupValue: selectedType, DrAppToastMsg.showErrorToast(
// onChanged: (value) { "Fill the mandatory procedure details");
// setSelectedType(value); return;
// }, }
// ),
// Text('routine'),
// Radio(
// activeColor: Color(0xFFB9382C),
// groupValue: selectedType,
// value: 0,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text(TranslationBase.of(context).urgent),
// ],
// ),
// ),
// SizedBox(
// height: 15.0,
// ),
// TextFields(
// hintText: TranslationBase.of(context).remarks,
// controller: remarksController,
// minLines: 3,
// maxLines: 5,
// ),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'Add Radiology Order',
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () {
//print(entityList.toString());
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
return;
}
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
orderType: selectedType.toString(), orderType: selectedType.toString(),
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
model: widget.model, model: widget.model,
remarks: remarksController.text); remarks: remarksController.text);
}, },
),
],
), ),
), ],
], ),
) )
], ],
), ),

@ -69,7 +69,7 @@ class _EntityListCheckboxSearchWidgetState
NetworkBaseView( NetworkBaseView(
baseViewModel: widget.model, baseViewModel: widget.model,
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.55, height: MediaQuery.of(context).size.height * 0.65,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: 15), margin: EdgeInsets.only(top: 15),

@ -25,10 +25,11 @@ class ProcedureScreen extends StatelessWidget {
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure(mrn: patient.patientId), onModelReady: (model) => model.getProcedure(mrn: patient.patientId,patientType: patientType),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100],
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType), patient, arrivalType ?? '0', patientType),
@ -40,7 +41,8 @@ class ProcedureScreen extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Padding( if(model.procedureList.length==0 && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -59,6 +61,26 @@ class ProcedureScreen extends StatelessWidget {
], ],
), ),
), ),
if( patient.patientStatusType == 43)
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) if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
@ -141,6 +163,21 @@ class ProcedureScreen extends StatelessWidget {
}, },
), ),
), ),
if (model.procedureList.length!=0 && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts('No Procedure Found'),
)
],
),
)
], ],
), ),
), ),

@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
@ -32,6 +33,7 @@ class AddSickLeavScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient,
routeArgs['patientType'] ?? "0", routeArgs['patientType'] ?? "0",
@ -197,33 +199,33 @@ class AddSickLeavScreen extends StatelessWidget {
AppText( AppText(
item.remarks ?? "", item.remarks ?? "",
), ),
(item.status == 1 || // (item.status == 1 ||
item.status == 2) // item.status == 2)
? IconButton( // ? IconButton(
icon: Image.asset( // icon: Image.asset(
'assets/images/edit.png'), // 'assets/images/edit.png'),
//
// color: Colors.green, //Colors.black, // // color: Colors.green, //Colors.black,
onPressed: () => { // onPressed: () => {
if (item.status == // if (item.status ==
1) // 1)
{ // {
DrAppToastMsg.showErrorToast( // DrAppToastMsg.showErrorToast(
TranslationBase.of( // TranslationBase.of(
context) // context)
.sickleaveonhold) // .sickleaveonhold)
} // }
else // else
{ // {
openSickLeave( // openSickLeave(
context, // context,
true, // true,
extendedData: // extendedData:
item) // item)
} // }
}, // },
) // )
: SizedBox() // : SizedBox()
]), ]),
], ],
), ),
@ -240,90 +242,22 @@ class AddSickLeavScreen extends StatelessWidget {
}).toList(), }).toList(),
) )
: patient.patientStatusType != 43 : patient.patientStatusType != 43
? Container( ? Center(
height: 200, child: Column(
width: SizeConfig.screenWidth, crossAxisAlignment: CrossAxisAlignment.center,
color: Colors.white, children: [
child: Column( SizedBox(height: 100,),
mainAxisAlignment: MainAxisAlignment.center, Image.asset('assets/images/no-data.png'),
children: [ Padding(
AppText( padding: const EdgeInsets.all(8.0),
TranslationBase.of(context).noSickLeave, child: Texts('No Sick Leave Found'),
color: Colors.red, )
)
]), ],
) ),
)
: SizedBox() : SizedBox()
// : new Builder(builder: (context) {
// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Padding(
// padding: EdgeInsets.all(10),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// AppText(
// TranslationBase.of(context).patient,
// fontWeight: FontWeight.bold,
// ),
// AppText(
// TranslationBase.of(context).sickLeave,
// fontSize: 24,
// fontWeight: FontWeight.bold,
// ),
// ],
// )),
// Container(
// width: SizeConfig.screenWidth,
// margin: EdgeInsets.only(
// left: 20, right: 20, top: 20, bottom: 20),
// padding: EdgeInsets.all(20),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: HexColor('#EAEAEA')),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Container(
// child: Container(
// decoration: BoxDecoration(
// color: Colors.grey,
// borderRadius:
// BorderRadius.circular(10)),
// padding: EdgeInsets.all(3),
// child: IconButton(
// icon: Icon(
// Icons.add,
// size: 35,
// color: Colors.white,
// ),
// onPressed: () {
// openSickLeave(
// context,
// false,
// );
// }),
// )),
// Padding(
// child: AppText(
// TranslationBase.of(context)
// .noSickLeaveApplied,
// fontWeight: FontWeight.bold,
// fontFamily: 'Poppins',
// fontSize: 16,
// textAlign: TextAlign.center,
// color: HexColor('#7E7E7E')),
// padding: EdgeInsets.all(10),
// ),
// ],
// )),
// SizedBox(
// height: SizeConfig.screenHeight * .6,
// )
// ],
// );
// }),
])))); ]))));
} }

@ -150,6 +150,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
textInputType:TextInputType.number,
inputFormatter: ONLY_NUMBERS) inputFormatter: ONLY_NUMBERS)
]), ]),
), ),

@ -34,10 +34,14 @@ class NetworkBaseView extends StatelessWidget {
case ViewState.Error: case ViewState.Error:
return Center( return Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 100,), SizedBox(height: 100,),
Image.asset('assets/images/no-data.png',height: 250), Image.asset('assets/images/no-data.png'),
Texts(baseViewModel.error??'') Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(baseViewModel.error??''),
)
], ],
), ),

Loading…
Cancel
Save