Merge branch 'fix-issues' into 'development'

changeing add prescription behovior

See merge request Cloud_Solution/doctor_app_flutter!483
merge-requests/484/merge
Mohammad Aljammal 5 years ago
commit 277f36cdb5

@ -112,9 +112,9 @@ class PrescriptionService extends LookupService {
}, body: _drugRequestModel.toJson());
}
Future getMedicationList() async {
Future getMedicationList({String drug}) async {
hasError = false;
_drugRequestModel.search = [""];
_drugRequestModel.search = ["$drug"];
await baseAppClient.post(SEARCH_DRUG,
onSuccess: (dynamic response, int statusCode) {
allMedicationList = [];

@ -15,7 +15,7 @@ class MedicineViewModel extends BaseViewModel {
PrescriptionService _prescriptionService = locator<PrescriptionService>();
get pharmacyItemsList => _medicineService.pharmacyItemsList;
get searchText=>_medicineService.searchText;
get searchText => _medicineService.searchText;
get pharmaciesList => _medicineService.pharmaciesList;
get medicationStrengthList => _prescriptionService.medicationStrengthList;
@ -34,7 +34,6 @@ class MedicineViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList =>
_prescriptionService.patientAssessmentList;
List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
@ -55,6 +54,18 @@ class MedicineViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getPrescription({int mrn}) async {
//hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.getPrescription(mrn: mrn);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getMedicineItem(String itemName) async {
setState(ViewState.Busy);
await _medicineService.getMedicineItem(itemName);
@ -65,9 +76,9 @@ class MedicineViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getMedicationList() async {
Future getMedicationList({String drug}) async {
setState(ViewState.Busy);
await _prescriptionService.getMedicationList();
await _prescriptionService.getMedicationList(drug: drug);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.Error);

@ -95,9 +95,9 @@ class PrescriptionViewModel extends BaseViewModel {
}
}
Future getMedicationList() async {
Future getMedicationList({String drug}) async {
setState(ViewState.Busy);
await _prescriptionService.getMedicationList();
await _prescriptionService.getMedicationList(drug: drug);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.Error);
@ -249,7 +249,7 @@ class PrescriptionViewModel extends BaseViewModel {
await _prescriptionsService.getPrescriptions(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
if(patientType=="7")
if (patientType == "7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);

@ -115,13 +115,11 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
@override
Widget build(BuildContext context) {
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
return BaseView<MedicineViewModel>(onModelReady: (model) async {
// if (model.allMedicationList.length == 0)
// await model.getMedicationList();
},
builder: (_, model, w) {
myController.text =model.searchText;
}, builder: (_, model, w) {
myController.text = model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: false,
@ -142,15 +140,14 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
widthFactor: 0.9,
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
borderColor: Colors.white,
hintText: TranslationBase.of(context)
.searchMedicineNameHere,
hintText:
TranslationBase.of(context).searchMedicineNameHere,
controller: myController,
onSaved: (value) {},
onFieldSubmitted: (value) {
@ -169,80 +166,63 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(context).search,
onPressed: () async{
onPressed: () async {
await searchMedicine(context, model);
},
),
],
),
),
),
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
margin:
EdgeInsets.only(left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase
.of(context)
.youCanFind +
(myController.text !=''?model.pharmacyItemsList.length
.toString():'0' )+
TranslationBase.of(context).youCanFind +
(myController.text != ''
? model.pharmacyItemsList.length.toString()
: '0') +
" " +
TranslationBase
.of(context)
.itemsInSearch,
TranslationBase.of(context).itemsInSearch,
fontWeight: FontWeight.bold,
),
],
),
),
SizedBox(
height:10,
height: 10,
),
if(myController.text !='')
if (myController.text != '')
Container(
height: MediaQuery
.of(context)
.size
.height * 0.5,
height: MediaQuery.of(context).size.height * 0.5,
child: ListView.builder(
padding: const EdgeInsets.only(top:20),
padding: const EdgeInsets.only(top: 20),
scrollDirection: Axis.vertical,
// shrinkWrap: true,
itemCount:
model.pharmacyItemsList ==
null
itemCount: model.pharmacyItemsList == null
? 0
: model
.pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
: model.pharmacyItemsList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.pharmacyItemsList[index]
label: model.pharmacyItemsList[index]
["ItemDescription"],
url: model
.pharmacyItemsList[index]
url: model.pharmacyItemsList[index]
["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID: model
.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
builder: (context) => PharmaciesListScreen(
itemID: model.pharmacyItemsList[index]
["ItemID"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"]),
),
);
},
@ -255,24 +235,19 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
)),
),
),
);}
);
});
}
searchMedicine(context, MedicineViewModel model) async {
FocusScope.of(context).unfocus();
if (myController.text.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase
.of(context)
.typeMedicineName);
helpers.showErrorToast(TranslationBase.of(context).typeMedicineName);
//"Type Medicine Name")
return;
}
if (myController.text.length < 3) {
helpers.showErrorToast(TranslationBase
.of(context)
.moreThan3Letter);
helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter);
return;
}

@ -1,5 +1,6 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
@ -15,11 +16,14 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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_text_form_field.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/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -49,7 +53,8 @@ postProcedure(
DateTime doseTime,
String doseUnit,
String icdCode,
PatiantInformtion patient,String patientType}) async {
PatiantInformtion patient,
String patientType}) async {
PostPrescriptionReqModel postProcedureReqModel =
new PostPrescriptionReqModel();
List<PrescriptionRequestModel> sss = List();
@ -103,6 +108,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
TextEditingController frequencyController = TextEditingController();
TextEditingController indicationController = TextEditingController();
TextEditingController instructionController = TextEditingController();
bool visbiltyPrescriptionForm = false;
bool visbiltySearch = true;
final myController = TextEditingController();
DateTime selectedDate;
dynamic selectedDrug;
int strengthChar;
@ -198,9 +208,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
appointmentNo: widget.patient.appointmentNo);
await model.getMedicationList();
await model.getMedicationStrength();
await model.getPrescription(mrn: widget.patient.patientMRN);
await model.getMedicationDuration();
await model.getMedicationRoute();
await model.getMedicationFrequency();
//await model.getMedicationRoute();
//await model.getMedicationFrequency();
await model.getMedicationDoseTime();
//await model.getMedicationIndications();
await model.getPatientAssessment(getAssessmentReqModel);
@ -231,14 +242,17 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
//crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
children: [
SizedBox(height: 15,),
SizedBox(
height: 15,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
AppText(
'New Prescription Order',
@ -267,115 +281,225 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Column(
//mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
height: MediaQuery.of(context).size.height *
0.070,
color: Colors.white,
child: InkWell(
onTap: model.allMedicationList != null
? () {
Helpers.hideKeyboard(context);
setState(() {
_selectedMedication = null;
model.getItem(
itemID: _selectedMedication
.itemId);
});
}
: null,
child: _selectedMedication == null
? AutoCompleteTextField<
GetMedicationResponseModel>(
onFocusChanged: (__) {
if (_selectedMedication !=
null) {
model.getItem(
itemID:
_selectedMedication
.itemId);
uom = _selectedMedication.uom;
} else {
null;
}
if (_selectedMedication !=
null &&
duration != null &&
frequency != null &&
strengthController.text !=
null) {
model.getBoxQuantity(
freq: frequency[
'parameterCode'],
duration: duration['id'],
itemCode:
_selectedMedication
.itemId,
strength: double.parse(
strengthController
.text));
box = model.boxQuintity;
return;
}
// Container(
// height: MediaQuery.of(context).size.height *
// 0.070,
// color: Colors.white,
// child: InkWell(
// onTap: model.allMedicationList != null
// ? () {
// Helpers.hideKeyboard(context);
// setState(() {
// _selectedMedication = null;
// model.getItem(
// itemID: _selectedMedication
// .itemId);
// });
// }
// : null,
// child: _selectedMedication == null
// ? AutoCompleteTextField<
// GetMedicationResponseModel>(
// onFocusChanged: (__) {
// if (_selectedMedication !=
// null) {
// model.getItem(
// itemID:
// _selectedMedication
// .itemId);
// uom = _selectedMedication.uom;
// } else {
// null;
// }
// if (_selectedMedication !=
// null &&
// duration != null &&
// frequency != null &&
// strengthController.text !=
// null) {
// model.getBoxQuantity(
// freq: frequency[
// 'parameterCode'],
// duration: duration['id'],
// itemCode:
// _selectedMedication
// .itemId,
// strength: double.parse(
// strengthController
// .text));
// box = model.boxQuintity;
//
// return;
// }
// },
// decoration:
// textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// _selectedMedication != null
// ? _selectedMedication
// .genericName
// : null,
// true,
// ),
// itemSubmitted: (item) => setState(
// () => _selectedMedication =
// item),
// key: key,
// suggestions:
// model.allMedicationList,
// itemBuilder: (context,
// suggestion) =>
// new Padding(
// child: Texts(suggestion
// .description +
// '/' +
// suggestion
// .genericName),
// padding:
// EdgeInsets.all(15.0)),
// itemSorter: (a, b) => 1,
// suggestionsAmount: 7,
// itemFilter: (suggestion, input) =>
// suggestion.genericName.toLowerCase().startsWith(
// input.toLowerCase()) ||
// suggestion.description
// .toLowerCase()
// .startsWith(input
// .toLowerCase()) ||
// suggestion.keywords
// .toLowerCase()
// .startsWith(
// input.toLowerCase()),
// )
// : TextField(
// onEditingComplete: () {
// model.getItem(
// itemID: _selectedMedication
// .itemId);
// },
// decoration: textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// _selectedMedication != null
// ? _selectedMedication
// .description +
// ('${_selectedMedication.genericName}')
// : null,
// false,
// suffixIcon:
// Icon(Icons.search)),
// enabled: false,
// ),
// ),
// ),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
onTap: () {
visbiltyPrescriptionForm = false;
visbiltySearch = true;
},
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
borderColor: Colors.white,
hintText: TranslationBase.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication
.genericName
: null,
true,
controller: myController,
onSaved: (value) {},
onFieldSubmitted: (value) {
searchMedicine(context, model);
},
inputFormatter: ONLY_LETTERS,
),
itemSubmitted: (item) => setState(
() => _selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: Texts(suggestion
.description +
'/' +
suggestion
.genericName),
padding:
EdgeInsets.all(15.0)),
itemSorter: (a, b) => 1,
suggestionsAmount: 7,
itemFilter: (suggestion, input) =>
suggestion.genericName.toLowerCase().startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(
input.toLowerCase()),
)
: TextField(
onEditingComplete: () {
),
),
SizedBox(
height: 15.0,
),
Visibility(
visible: visbiltySearch,
child: Container(
child: Column(
children: [
FractionallySizedBox(
widthFactor: 0.8,
child: Container(
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(
context)
.search,
onPressed: () async {
await searchMedicine(
context, model);
},
),
],
),
),
),
if (myController.text != '')
Container(
height: MediaQuery.of(context)
.size
.height *
0.5,
child: ListView.builder(
padding: const EdgeInsets.only(
top: 20),
scrollDirection: Axis.vertical,
// shrinkWrap: true,
itemCount:
model.allMedicationList ==
null
? 0
: model
.allMedicationList
.length,
itemBuilder:
(BuildContext context,
int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.allMedicationList[
index]
.description
// url: model
// .pharmacyItemsList[
// index]["ImageSRCUrl"],
),
onTap: () {
model.getItem(
itemID: _selectedMedication
itemID: model
.allMedicationList[
index]
.itemId);
visbiltyPrescriptionForm =
true;
visbiltySearch = false;
_selectedMedication =
model.allMedicationList[
index];
uom = _selectedMedication
.uom;
},
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication
.description +
('${_selectedMedication.genericName}')
: null,
false,
suffixIcon:
Icon(Icons.search)),
enabled: false,
);
},
),
),
],
),
),
),
@ -383,9 +507,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
height: spaceBetweenTextFileds,
),
Visibility(
visible: _selectedMedication == null
? false
: true,
visible: visbiltyPrescriptionForm,
child: Container(
child: Column(
children: [
@ -1142,9 +1264,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
if (formKey.currentState
.validate()) {
Navigator.pop(context);
openDrugToDrug(model);
//openDrugToDrug(model);
{
/*// var x = model
// var x = model
// .patientAssessmentList
// .map((value) =>
// value.icdCode10ID)
@ -1166,7 +1288,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
0]
.icdCode10ID
.toString()
: "TEST",
: "test",
// icdCode: model
// .patientAssessmentList
// .map((value) => value
@ -1174,34 +1296,43 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// .trim())
// .toList()
// .join(' '),
dose: strengthController.text,
doseUnit:
units['parameterCode']
dose:
strengthController
.text,
doseUnit: units[
'parameterCode']
.toString(),
patient: widget.patient,
patient:
widget.patient,
doseTimeIn:
doseTime['id'].toString(),
doseTime['id']
.toString(),
model: widget.model,
duration:
duration['id'].toString(),
frequency:
frequency['parameterCode']
duration['id']
.toString(),
route: route['parameterCode']
frequency: frequency[
'parameterCode']
.toString(),
drugId: _selectedMedication
route: route[
'parameterCode']
.toString(),
drugId:
_selectedMedication
.itemId
.toString(),
strength:
strengthController.text,
strengthController
.text,
indication:
indicationController.text,
indicationController
.text,
instruction:
instructionController
.text,
doseTime: selectedDate,
doseTime:
selectedDate,
);
*/
}
}
@ -1389,4 +1520,22 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
}
return prescriptionDetails;
}
searchMedicine(context, MedicineViewModel model) async {
FocusScope.of(context).unfocus();
// if (myController.text.isEmpty()) {
// helpers.showErrorToast(TranslationBase.of(context).typeMedicineName);
// //"Type Medicine Name")
// return;
// }
if (myController.text.length < 3) {
helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter);
return;
}
//GifLoaderDialogUtils.showMyDialog(context);
await model.getMedicationList(drug: myController.text);
//GifLoaderDialogUtils.hideDialog(context);
}
}

@ -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';
@ -141,13 +142,16 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getCategory(),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
AppScaffold(
isShowAppBar: false,
body: NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder: (BuildContext context, ScrollController scrollController) {
builder:
(BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.20,
@ -155,11 +159,17 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Row(
children: [
AppText(
'Please Select Category',
fontWeight: FontWeight.w700,
fontSize: 20,
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.29,
),
InkWell(
child: Icon(
Icons.close,
@ -171,17 +181,6 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
),
],
),
Row(
children: [
AppText(
'Please Select Category',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
],
),
SizedBox(
height: 10.0,
),
@ -191,7 +190,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
onTap: model.categoryList != null &&
model.categoryList.length > 0
? () {
ListSelectDialog dialog = ListSelectDialog(
ListSelectDialog dialog =
ListSelectDialog(
list: model.categoryList,
attributeName: 'categoryName',
attributeValueId: 'categoryId',
@ -334,15 +334,22 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
],
)
],
),
),
),
);
}),
),
bottomSheet: Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.addSelectedProcedures,
title: TranslationBase.of(context).addSelectedProcedures,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () {
@ -366,14 +373,6 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
],
),
),
],
)
],
),
),
),
);
}),
),
);
}

@ -209,15 +209,20 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
],
),
),
),
);
}),
),
bottomSheet: Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
"Add Lab Order", //TranslationBase.of(context)
title: "Add Lab Order", //TranslationBase.of(context)
fontWeight: FontWeight.w700,
//.addSelectedProcedures,
color: Color(0xff359846),
@ -242,13 +247,6 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
],
),
),
],
),
),
),
);
}),
),
),
);
}

@ -169,7 +169,6 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
fontWeight: FontWeight.w700,
fontSize: 20,
),
InkWell(
child: Icon(
Icons.close,
@ -208,9 +207,15 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
isEntityListSelected: (master) =>
isEntityListSelected(master),
)),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
],
),
),
),
);
}),
),
bottomSheet: Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
@ -238,13 +243,6 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
),
],
),
)
],
),
),
),
);
}),
),
),
);

@ -25,7 +25,8 @@ class ProcedureScreen extends StatelessWidget {
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure(mrn: patient.patientId,patientType: patientType),
onModelReady: (model) =>
model.getProcedure(mrn: patient.patientId, patientType: patientType),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
@ -41,7 +42,8 @@ class ProcedureScreen extends StatelessWidget {
SizedBox(
height: 12,
),
if(model.procedureList.length==0 && patient.patientStatusType != 43)
if (model.procedureList.length == 0 &&
patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -61,7 +63,7 @@ class ProcedureScreen extends StatelessWidget {
],
),
),
if( patient.patientStatusType == 43)
if (patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -81,10 +83,19 @@ class ProcedureScreen extends StatelessWidget {
],
),
),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell(
onTap: () {
addSelectedProcedure(context, model, patient);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedProcedure(
patient: patient,
model: model,
)),
);
},
child: Container(
width: double.maxFinite,
@ -143,38 +154,40 @@ class ProcedureScreen extends StatelessWidget {
patient: patient,
remarks: model
.procedureList[0].entityList[index].remarks,
orderType: model.procedureList[0]
.entityList[index].orderType
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
categoreId: model
.procedureList[0].entityList[index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList[index].procedureId,
limetNo: model.procedureList[0]
.entityList[index].lineItemNo);
limetNo: model.procedureList[0].entityList[index]
.lineItemNo);
// } else
// helpers.showErrorToast(
// 'You Cant Update This Procedure');
},
),
),
if (model.procedureList.length!=0 && patient.patientStatusType != 43)
if (model.procedureList.length != 0 &&
patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts('No Procedure Found'),
)
],
),
)

Loading…
Cancel
Save