Merge branch 'procedure-fix' into 'development'

Procedure fix

See merge request Cloud_Solution/doctor_app_flutter!252
merge-requests/251/merge
Mohammad Aljammal 4 years ago
commit ff701578a7

@ -453,6 +453,26 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
.edit),
onTap: () {
updatePrescriptionForm(
startDate:
model.prescriptionList[0].entityList[index].startDate
.toString(),
dose: model
.prescriptionList[
0]
.entityList[
index]
.doseTimingID
.toString(),
frequency:
model.prescriptionList[0].entityList[index].frequencyID
.toString(),
rouat: model
.prescriptionList[
0]
.entityList[
index]
.routeID
.toString(),
patient:
patient,
drugId: model
@ -466,17 +486,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
0]
.entityList[
index]
.medicationName,
.doseDetail,
remarks: model
.prescriptionList[
0]
.entityList[
index]
.prescriptionList[0]
.entityList[index]
.remarks,
model:
model,
context:
context);
model: model,
context: context);
//model.postPrescription();
},
),
@ -577,7 +593,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
int drugId,
String remarks,
PrescriptionViewModel model,
PatiantInformtion patient}) {
PatiantInformtion patient,
String rouat,
String frequency,
String dose,
String startDate}) {
TextEditingController remarksController = TextEditingController();
TextEditingController doseController = TextEditingController();
TextEditingController frequencyController = TextEditingController();
@ -587,11 +607,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: 600,
height: MediaQuery.of(context).size.height * 0.73,
child: Form(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -626,7 +646,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Dose',
hintText: 'Dose Time',
controller: doseController,
keyboardType: TextInputType.number,
),
@ -649,7 +669,6 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
SizedBox(
height: 12.0,
),
AppText('Remarks'),
Container(
decoration: BoxDecoration(
borderRadius:
@ -667,7 +686,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
height: 12.0,
),
SizedBox(
height: 140.0,
height: MediaQuery.of(context).size.height * 0.12,
),
Container(
margin:
@ -679,6 +698,10 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
title: 'update prescription'.toUpperCase(),
onPressed: () {
updatePrescription(
startDate: startDate,
doseId: dose,
frequencyId: frequency,
routeId: rouat,
patient: patient,
model: model,
drugId: drugId,
@ -704,10 +727,14 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
updatePrescription(
{PrescriptionViewModel model,
int drugId,
String frequencyId,
String remarks,
String dose,
String doseId,
String frequency,
String route,
String routeId,
String startDate,
PatiantInformtion patient}) async {
//PrescriptionViewModel model = PrescriptionViewModel();
PostPrescriptionReqModel updatePrescriptionReqModel =
@ -722,17 +749,19 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
sss.add(PrescriptionRequestModel(
covered: true,
dose: frequency.isNotEmpty ? int.parse(dose) : 1,
dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1,
itemId: drugId,
doseUnitId: 1,
route: frequency.isNotEmpty ? int.parse(route) : 1,
frequency: frequency.isNotEmpty ? int.parse(frequency) : 1,
doseUnitId: 2,
route: route.isNotEmpty ? int.parse(route) : int.parse(routeId),
frequency: frequency.isNotEmpty
? int.parse(frequency)
: int.parse(frequencyId),
remarks: remarks.isEmpty ? '' : remarks,
approvalRequired: true,
icdcode10Id: "test2",
doseTime: 1,
doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId),
duration: 2,
doseStartDate: "2020-12-20T13:07:41.769Z"));
doseStartDate: startDate));
updatePrescriptionReqModel.prescriptionRequestModel = sss;
//postProcedureReqModel.procedures = controlsProcedure;

@ -61,7 +61,7 @@ class _EntityListCheckboxSearchWidgetState
child: ListView(
children: [
TextFields(
hintText: 'Search ',
hintText: 'Search Procedure',
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);

@ -568,139 +568,154 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container(
height: 810,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Select Procedure'.toUpperCase(),
fontWeight: FontWeight.w900,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.categoryList != null &&
model.categoryList.length > 0
? () {
ListSelectDialog dialog = ListSelectDialog(
list: model.categoryList,
attributeName: 'categoryName',
attributeValueId: 'categoryId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
selectedCategory = selectedValue;
model.getProcedureCategory(
categoryName:
selectedCategory['categoryName']);
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
//model.getProcedureCategory();
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
'Procedure Categorey',
selectedCategory != null
? selectedCategory['categoryName']
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: [
AppText(
'Search Procedure Category'.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 5.0,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.categoryList != null &&
model.categoryList.length > 0
? () {
ListSelectDialog dialog = ListSelectDialog(
list: model.categoryList,
attributeName: 'categoryName',
attributeValueId: 'categoryId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
selectedCategory = selectedValue;
model.getProcedureCategory(
categoryName: selectedCategory[
'categoryName']);
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
//model.getProcedureCategory();
}
: null,
true,
suffixIcon: Icon(
Icons.search,
color: Colors.black,
)),
enabled: false,
),
),
),
if (widget.model.categoriesList.length != 0)
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(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order Type'.toUpperCase(),
controller: procedureController,
child: TextField(
decoration: textFieldSelectorDecoration(
'Procedure Categorey',
selectedCategory != null
? selectedCategory['categoryName']
: null,
true,
suffixIcon: Icon(
Icons.search,
color: Colors.black,
)),
enabled: false,
),
),
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText: 'Remarks',
controller: remarksController,
minLines: 3,
maxLines: 5,
),
SizedBox(
height: 50.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'add Selected Procedures'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
postProcedure(
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
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(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order Type'.toUpperCase(),
controller: procedureController,
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText: 'Remarks',
controller: remarksController,
minLines: 3,
maxLines: 5,
),
SizedBox(
height: 50.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
'add Selected Procedures'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
postProcedure(
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
),
),
],
)
],
),
),
),
);
}),
),
);
}
@ -760,7 +775,7 @@ void updateProcedureForm(context,
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: 400,
height: MediaQuery.of(context).size.height * 0.55,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),

@ -538,7 +538,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -795,7 +795,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
@ -930,5 +930,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <2.11.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save