Merge branch 'development' into feature-ucaf

merge-requests/253/head
mosazaid 5 years ago
commit d9d4e22531

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

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

@ -568,18 +568,26 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
maxChildSize: 1.0,
builder: (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container( child: Container(
height: 810, height: MediaQuery.of(context).size.height * 1.20,
child: Padding( child: Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
'Select Procedure'.toUpperCase(), 'Search Procedure Category'.toUpperCase(),
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
), ),
SizedBox(
height: 5.0,
),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
@ -595,8 +603,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
setState(() { setState(() {
selectedCategory = selectedValue; selectedCategory = selectedValue;
model.getProcedureCategory( model.getProcedureCategory(
categoryName: categoryName: selectedCategory[
selectedCategory['categoryName']); 'categoryName']);
}); });
}, },
); );
@ -626,9 +634,12 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
), ),
), ),
if (widget.model.categoriesList.length != 0) if (widget.model.categoriesList.length != 0)
EntityListCheckboxSearchWidget( NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model, model: widget.model,
masterList: widget.model.categoriesList[0].entityList, masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) { removeHistory: (item) {
setState(() { setState(() {
entityList.remove(item); entityList.remove(item);
@ -646,6 +657,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
isEntityListSelected: (master) => isEntityListSelected: (master) =>
isEntityListSelected(master), isEntityListSelected(master),
), ),
),
SizedBox( SizedBox(
height: 15.0, height: 15.0,
), ),
@ -676,12 +688,14 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
height: 50.0, height: 50.0,
), ),
Container( Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: 'add Selected Procedures'.toUpperCase(), title:
'add Selected Procedures'.toUpperCase(),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
@ -700,7 +714,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
), ),
), ),
), ),
), );
}),
), ),
); );
} }
@ -760,7 +775,7 @@ void updateProcedureForm(context,
isScrollControlled: true, isScrollControlled: true,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return Container( return Container(
height: 400, height: MediaQuery.of(context).size.height * 0.55,
child: Form( child: Form(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),

@ -552,7 +552,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -823,7 +823,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -958,5 +958,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: 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" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save