add lab & add radiology update

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

@ -36,7 +36,8 @@ class LabsHomePage extends StatelessWidget {
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', patientType), appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( 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( InkWell(
onTap: () { onTap: () {
addSelectedLabOrder(context, model, patient); Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedLabOrder(
patient: patient,
model: model,
)),
);
}, },
// () {
// addSelectedLabOrder(context, model, patient);
// },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
height: 140, height: 140,

@ -33,7 +33,8 @@ class RadiologyHomePage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', arrivalType), appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType),
baseViewModel: model, baseViewModel: model,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, 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( InkWell(
onTap: () { onTap: () {
addSelectedRadiologyOrder(context, model, patient); Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedRadiologyOrder(
patient: patient,
model: model,
)),
);
}, },
// () {
// addSelectedRadiologyOrder(context, model, patient);
// },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
height: 140, height: 140,
@ -108,25 +121,26 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
...List.generate(model.radiologyList.length, (index) => InkWell( ...List.generate(
onTap: () => Navigator.push( model.radiologyList.length,
context, (index) => InkWell(
FadePage( onTap: () => Navigator.push(
page: RadiologyDetailsPage( context,
finalRadiology: model.radiologyList[index], FadePage(
patient: patient, page: RadiologyDetailsPage(
), finalRadiology: model.radiologyList[index],
), patient: patient,
), ),
child: DoctorCard( ),
doctorName: model.radiologyList[index].doctorName, ),
profileUrl: model.radiologyList[index].doctorImageURL, child: DoctorCard(
invoiceNO: '${model.radiologyList[index].invoiceNo}', doctorName: model.radiologyList[index].doctorName,
branch: '${model.radiologyList[index].projectName}', profileUrl: model.radiologyList[index].doctorImageURL,
appointmentDate: model.radiologyList[index].orderDate, 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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.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_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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.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( onModelReady: (model) => model.getProcedureCategory(
categoryName: "Laboratory", categoryID: "02"), categoryName: "Laboratory", categoryID: "02"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( AppScaffold(
baseViewModel: model, isShowAppBar: false,
child: DraggableScrollableSheet( body: NetworkBaseView(
minChildSize: 0.90, baseViewModel: model,
initialChildSize: 0.95, child: DraggableScrollableSheet(
maxChildSize: 1.0, minChildSize: 0.90,
builder: (BuildContext context, ScrollController scrollController) { initialChildSize: 0.95,
return SingleChildScrollView( maxChildSize: 1.0,
child: Container( builder:
height: MediaQuery.of(context).size.height * 1.20, (BuildContext context, ScrollController scrollController) {
child: Padding( return SingleChildScrollView(
padding: EdgeInsets.all(12.0), child: Container(
child: Column( height: MediaQuery.of(context).size.height * 1.0,
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
Row( child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: [
'New Lab Order', Row(
fontWeight: FontWeight.w700, children: [
fontSize: 20, AppText(
), 'New Lab Order',
SizedBox( fontWeight: FontWeight.w700,
width: MediaQuery.of(context).size.width * 0.48, fontSize: 20,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
), ),
onTap: () { SizedBox(
Navigator.pop(context); width: MediaQuery.of(context).size.width * 0.48,
}, ),
), InkWell(
], child: Icon(
), Icons.close,
SizedBox( size: 28.0,
height: 10.0, ),
), onTap: () {
if (widget.model.categoriesList.length != 0) Navigator.pop(context);
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( SizedBox(
height: 15.0, height: 10.0,
), ),
Column( if (widget.model.categoriesList.length != 0)
mainAxisAlignment: MainAxisAlignment.spaceBetween, NetworkBaseView(
children: [ baseViewModel: model,
// Container( child: EntityListCheckboxSearchWidget(
// child: Row( model: widget.model,
// children: [ masterList:
// AppText( widget.model.categoriesList[0].entityList,
// TranslationBase.of(context).orderType), removeHistory: (item) {
// Radio( setState(() {
// activeColor: Color(0xFFB9382C), entityList.remove(item);
// value: 1, });
// groupValue: selectedType, },
// onChanged: (value) { addHistory: (history) {
// setSelectedType(value); setState(() {
// }, entityList.add(history);
// ), });
// Text('routine'), },
// Radio( addSelectedHistories: () {
// activeColor: Color(0xFFB9382C), //TODO build your fun herr
// groupValue: selectedType, // widget.addSelectedHistories();
// value: 0, },
// onChanged: (value) { isEntityListSelected: (master) =>
// setSelectedType(value); isEntityListSelected(master),
// }, )),
// ), SizedBox(
// Text(TranslationBase.of(context).urgent), height: 15.0,
// ], ),
// ), Column(
// ), mainAxisAlignment: MainAxisAlignment.spaceBetween,
// SizedBox( children: [
// height: 15.0, // Container(
// ), // child: Row(
// TextFields( // children: [
// hintText: TranslationBase.of(context).remarks, // AppText(
// controller: remarksController, // TranslationBase.of(context).orderType),
// minLines: 3, // Radio(
// maxLines: 5, // activeColor: Color(0xFFB9382C),
// ), // value: 1,
SizedBox( // groupValue: selectedType,
height: 100.0, // onChanged: (value) {
), // setSelectedType(value);
Container( // },
margin: EdgeInsets.all( // ),
SizeConfig.widthMultiplier * 5), // Text('routine'),
child: Wrap( // Radio(
alignment: WrapAlignment.center, // activeColor: Color(0xFFB9382C),
children: <Widget>[ // groupValue: selectedType,
AppButton( // value: 0,
title: // onChanged: (value) {
"Add Lab Order", //TranslationBase.of(context) // setSelectedType(value);
fontWeight: FontWeight.w700, // },
//.addSelectedProcedures, // ),
color: Color(0xff359846), // Text(TranslationBase.of(context).urgent),
onPressed: () { // ],
//print(entityList.toString()); // ),
onPressed: // ),
if (entityList.isEmpty == true) { // SizedBox(
DrAppToastMsg.showErrorToast( // height: 15.0,
"Fill the mandatory procedure details"); // ),
return; // 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);
}, },
), ),
], ],
),
), ),
), ],
], )
) ],
], ),
), ),
), ),
), );
); }),
}), ),
), ),
); );
} }

@ -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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.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_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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.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( onModelReady: (model) => model.getProcedureCategory(
categoryName: "Radiology", categoryID: "03"), categoryName: "Radiology", categoryID: "03"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( AppScaffold(
baseViewModel: model, isShowAppBar: false,
child: DraggableScrollableSheet( body: NetworkBaseView(
minChildSize: 0.90, baseViewModel: model,
initialChildSize: 0.95, child: DraggableScrollableSheet(
maxChildSize: 1.0, minChildSize: 0.90,
builder: (BuildContext context, ScrollController scrollController) { initialChildSize: 0.95,
return SingleChildScrollView( maxChildSize: 1.0,
child: Container( builder:
height: MediaQuery.of(context).size.height * 1.20, (BuildContext context, ScrollController scrollController) {
child: Padding( return SingleChildScrollView(
padding: EdgeInsets.all(12.0), child: Container(
child: Column( height: MediaQuery.of(context).size.height * 1.0,
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
Row( child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: [
'New Radiology Order', Row(
fontWeight: FontWeight.w700, children: [
fontSize: 20, AppText(
), 'New Radiology Order',
SizedBox( fontWeight: FontWeight.w700,
width: MediaQuery.of(context).size.width * 0.48, fontSize: 20,
),
InkWell(
child: Icon(
Icons.close,
size: 28.0,
), ),
onTap: () { SizedBox(
Navigator.pop(context); width: MediaQuery.of(context).size.width * 0.48,
}, ),
), InkWell(
], child: Icon(
), Icons.close,
SizedBox( size: 28.0,
height: 10.0, ),
), onTap: () {
if (widget.model.categoriesList.length != 0) Navigator.pop(context);
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( SizedBox(
height: 15.0, height: 10.0,
), ),
Column( if (widget.model.categoriesList.length != 0)
mainAxisAlignment: MainAxisAlignment.spaceBetween, NetworkBaseView(
children: [ baseViewModel: model,
// Container( child: EntityListCheckboxSearchWidget(
// child: Row( model: widget.model,
// children: [ masterList:
// AppText( widget.model.categoriesList[0].entityList,
// TranslationBase.of(context).orderType), removeHistory: (item) {
// Radio( setState(() {
// activeColor: Color(0xFFB9382C), entityList.remove(item);
// value: 1, });
// groupValue: selectedType, },
// onChanged: (value) { addHistory: (history) {
// setSelectedType(value); setState(() {
// }, entityList.add(history);
// ), });
// Text('routine'), },
// Radio( addSelectedHistories: () {
// activeColor: Color(0xFFB9382C), //TODO build your fun herr
// groupValue: selectedType, // widget.addSelectedHistories();
// value: 0, },
// onChanged: (value) { isEntityListSelected: (master) =>
// setSelectedType(value); isEntityListSelected(master),
// }, )),
// ), SizedBox(
// Text(TranslationBase.of(context).urgent), height: 15.0,
// ], ),
// ), Column(
// ), mainAxisAlignment: MainAxisAlignment.spaceBetween,
// SizedBox( children: [
// height: 15.0, // Container(
// ), // child: Row(
// TextFields( // children: [
// hintText: TranslationBase.of(context).remarks, // AppText(
// controller: remarksController, // TranslationBase.of(context).orderType),
// minLines: 3, // Radio(
// maxLines: 5, // activeColor: Color(0xFFB9382C),
// ), // value: 1,
SizedBox( // groupValue: selectedType,
height: 100.0, // onChanged: (value) {
), // setSelectedType(value);
Container( // },
margin: EdgeInsets.all( // ),
SizeConfig.widthMultiplier * 5), // Text('routine'),
child: Wrap( // Radio(
alignment: WrapAlignment.center, // activeColor: Color(0xFFB9382C),
children: <Widget>[ // groupValue: selectedType,
AppButton( // value: 0,
title: 'Add Radiology Order', // onChanged: (value) {
color: Color(0xff359846), // setSelectedType(value);
fontWeight: FontWeight.w700, // },
onPressed: () { // ),
//print(entityList.toString()); // Text(TranslationBase.of(context).urgent),
onPressed: // ],
if (entityList.isEmpty == true) { // ),
DrAppToastMsg.showErrorToast( // ),
"Fill the mandatory procedure details"); // SizedBox(
return; // 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);
}, },
), ),
], ],
),
), ),
), ],
], )
) ],
], ),
), ),
), ),
), );
); }),
}), ),
), ),
); );
} }

Loading…
Cancel
Save