add lab & add radiology update

merge-requests/471/head
hussam al-habibeh 4 years ago
parent 8dca476898
commit 844bd9ba27

@ -36,7 +36,8 @@ class LabsHomePage extends StatelessWidget {
builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', patientType),
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
@ -66,11 +67,24 @@ class LabsHomePage extends StatelessWidget {
],
),
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell(
onTap: () {
addSelectedLabOrder(context, model, patient);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedLabOrder(
patient: patient,
model: model,
)),
);
},
// () {
// addSelectedLabOrder(context, model, patient);
// },
child: Container(
width: double.maxFinite,
height: 140,

@ -33,7 +33,8 @@ class RadiologyHomePage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', arrivalType),
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType),
baseViewModel: model,
body: FractionallySizedBox(
widthFactor: 1.0,
@ -62,11 +63,23 @@ class RadiologyHomePage extends StatelessWidget {
],
),
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell(
onTap: () {
addSelectedRadiologyOrder(context, model, patient);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedRadiologyOrder(
patient: patient,
model: model,
)),
);
},
// () {
// addSelectedRadiologyOrder(context, model, patient);
// },
child: Container(
width: double.maxFinite,
height: 140,
@ -108,25 +121,26 @@ class RadiologyHomePage extends StatelessWidget {
),
),
),
...List.generate(model.radiologyList.length, (index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: model.radiologyList[index],
patient: patient,
),
),
),
child: DoctorCard(
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
appointmentDate: model.radiologyList[index].orderDate,
),
)),
...List.generate(
model.radiologyList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: model.radiologyList[index],
patient: patient,
),
),
),
child: DoctorCard(
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
appointmentDate: model.radiologyList[index].orderDate,
),
)),
],
),
),

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_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/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
@ -142,154 +143,158 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
onModelReady: (model) => model.getProcedureCategory(
categoryName: "Laboratory", categoryID: "02"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder: (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.20,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'New Lab Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.48,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
AppScaffold(
isShowAppBar: false,
body: NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder:
(BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'New Lab Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
onTap: () {
Navigator.pop(context);
},
),
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
SizedBox(
width: MediaQuery.of(context).size.width * 0.48,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
),
onTap: () {
Navigator.pop(context);
},
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
SizedBox(
height: 15.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 1,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// 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;
}
),
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
},
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
SizedBox(
height: 15.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 1,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// 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);
postProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
Navigator.pop(context);
postProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
),
),
),
],
)
],
],
)
],
),
),
),
),
);
}),
);
}),
),
),
);
}

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_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/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
@ -142,152 +143,156 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
onModelReady: (model) => model.getProcedureCategory(
categoryName: "Radiology", categoryID: "03"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder: (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.20,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'New Radiology Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.48,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
AppScaffold(
isShowAppBar: false,
body: NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder:
(BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'New Radiology Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
onTap: () {
Navigator.pop(context);
},
),
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
SizedBox(
width: MediaQuery.of(context).size.width * 0.48,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
),
onTap: () {
Navigator.pop(context);
},
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
SizedBox(
height: 15.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 1,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// 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;
}
),
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
},
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
SizedBox(
height: 15.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 1,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// 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);
postProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
Navigator.pop(context);
postProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
),
),
),
],
)
],
],
)
],
),
),
),
),
);
}),
);
}),
),
),
);
}

Loading…
Cancel
Save