Merge branch 'design-updates' into 'development'

Design updates

See merge request Cloud_Solution/doctor_app_flutter!213
merge-requests/220/merge
Mohammad Aljammal 5 years ago
commit 50c834d740

@ -166,6 +166,7 @@ const GET_CATEGORISE_PROCEDURE =
const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure'; const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure';
const UPDATE_PRESCRIPTION = const UPDATE_PRESCRIPTION =
'Services/DoctorApplication.svc/REST/PatchPrescription'; 'Services/DoctorApplication.svc/REST/PatchPrescription';
const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList';
const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile'; const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile';

@ -34,7 +34,7 @@ class EntityList {
String genderValidation; String genderValidation;
String group; String group;
String orderedValidation; String orderedValidation;
int price; dynamic price;
String procedureId; String procedureId;
String procedureName; String procedureName;
String specialPermission; String specialPermission;

@ -0,0 +1,65 @@
class SearchDrugModel {
List<EntityList> entityList;
int rowcount;
dynamic statusMessage;
SearchDrugModel({this.entityList, this.rowcount, this.statusMessage});
SearchDrugModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<EntityList>();
json['entityList'].forEach((v) {
entityList.add(new EntityList.fromJson(v));
});
}
rowcount = json['rowcount'];
statusMessage = json['statusMessage'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.entityList != null) {
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
}
data['rowcount'] = this.rowcount;
data['statusMessage'] = this.statusMessage;
return data;
}
}
class EntityList {
dynamic description;
dynamic genericName;
dynamic itemId;
dynamic keywords;
dynamic price;
dynamic quantity;
EntityList(
{this.description,
this.genericName,
this.itemId,
this.keywords,
this.price,
this.quantity});
EntityList.fromJson(Map<String, dynamic> json) {
description = json['Description'];
genericName = json['GenericName'];
itemId = json['ItemId'];
keywords = json['Keywords'];
price = json['Price'];
quantity = json['Quantity'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['GenericName'] = this.genericName;
data['ItemId'] = this.itemId;
data['Keywords'] = this.keywords;
data['Price'] = this.price;
data['Quantity'] = this.quantity;
return data;
}
}

@ -0,0 +1,18 @@
class SearchDrugRequestModel {
List<String> search;
String vidaAuthTokenID;
SearchDrugRequestModel({this.search, this.vidaAuthTokenID});
SearchDrugRequestModel.fromJson(Map<String, dynamic> json) {
search = json['Search'].cast<String>();
vidaAuthTokenID = json['VidaAuthTokenID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Search'] = this.search;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}
}

@ -2,17 +2,26 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PrescriptionService extends BaseService { class PrescriptionService extends BaseService {
List<PrescriptionModel> _prescriptionList = List(); List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList; List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList;
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel( PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(
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6 +39,18 @@ class PrescriptionService extends BaseService {
}, body: _prescriptionReqModel.toJson()); }, body: _prescriptionReqModel.toJson());
} }
Future getDrugs() async {
hasError = false;
_drugsList.clear();
await baseAppClient.post(SEARCH_DRUG,
onSuccess: (dynamic response, int statusCode) {
_drugsList.add(SearchDrugModel.fromJson(response['MedicationList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _drugRequestModel.toJson());
}
Future postPrescription( Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel) async { PostPrescriptionReqModel postProcedureReqModel) async {
hasError = false; hasError = false;

@ -14,10 +14,10 @@ class ProcedureService extends BaseService {
List<Procedures> procedureslist = List(); List<Procedures> procedureslist = List();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
clinicId: 0, clinicId: 17,
pageSize: 10, pageSize: 10,
pageIndex: 1, pageIndex: 1,
patientMRN: 0, patientMRN: 3120725,
//categoryId: null, //categoryId: null,
vidaAuthTokenID: vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
@ -11,6 +12,7 @@ class PrescriptionViewModel extends BaseViewModel {
List<PrescriptionModel> get prescriptionList => List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList; _prescriptionService.prescriptionList;
List<SearchDrugModel> get drugsList => _prescriptionService.drugsList;
Future getPrescription() async { Future getPrescription() async {
hasError = false; hasError = false;
@ -53,4 +55,16 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future getDrugs() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.getDrugs();
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
} }

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart'; import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -29,303 +30,341 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
final double spaceBetweenTextFileds = 12; final double spaceBetweenTextFileds = 12;
showModalBottomSheet( showModalBottomSheet(
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return DraggableScrollableSheet( return BaseView<PrescriptionViewModel>(
initialChildSize: 0.90, onModelReady: (model) => model.getDrugs(),
maxChildSize: 0.90, builder: (BuildContext context, PrescriptionViewModel model,
minChildSize: 0.9, Widget child) =>
builder: (BuildContext context, ScrollController scrollController) { DraggableScrollableSheet(
return SingleChildScrollView( initialChildSize: 0.90,
child: Container( maxChildSize: 0.90,
height: 980, minChildSize: 0.9,
child: Padding( builder: (BuildContext context,
padding: ScrollController scrollController) {
EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0), return SingleChildScrollView(
child: Column( child: Container(
crossAxisAlignment: CrossAxisAlignment.start, height: 980,
//mainAxisAlignment: MainAxisAlignment.spaceEvenly, child: Padding(
children: [ padding: EdgeInsets.symmetric(
AppText( horizontal: 12.0, vertical: 10.0),
TranslationBase.of(context).medicines.toUpperCase(), child: Column(
fontWeight: FontWeight.w900, crossAxisAlignment: CrossAxisAlignment.start,
), //mainAxisAlignment: MainAxisAlignment.spaceEvenly,
SizedBox( children: [
height: spaceBetweenTextFileds, AppText(
), TranslationBase.of(context)
Container( .medicines
child: Form( .toUpperCase(),
key: formKey, fontWeight: FontWeight.w900,
child: Column( ),
//mainAxisAlignment: MainAxisAlignment.end, SizedBox(
children: [ height: spaceBetweenTextFileds,
Container( ),
decoration: BoxDecoration( Container(
borderRadius: BorderRadius.all( child: Form(
Radius.circular(6.0)), key: formKey,
border: Border.all( child: Column(
width: 1.0, //mainAxisAlignment: MainAxisAlignment.end,
color: HexColor("#CCCCCC"))), children: [
child: TextFields( Container(
hintText: TranslationBase.of(context) decoration: BoxDecoration(
.searchMedicine, borderRadius: BorderRadius.all(
controller: drugIdController, Radius.circular(6.0)),
keyboardType: TextInputType.number, border: Border.all(
validator: (value) { width: 1.0,
if (value.isEmpty) color: HexColor("#CCCCCC"))),
return TranslationBase.of(context) child: TextFields(
.emptyMessage; hintText:
else TranslationBase.of(context)
return null; .searchMedicine,
}), controller: drugIdController,
), keyboardType: TextInputType.number,
SizedBox( validator: (value) {
height: spaceBetweenTextFileds, if (value.isEmpty)
), return TranslationBase.of(
Container( context)
decoration: BoxDecoration( .emptyMessage;
borderRadius: BorderRadius.all( else
Radius.circular(6.0)), return null;
border: Border.all( }),
width: 1.0, ),
color: HexColor("#CCCCCC"))), SizedBox(
child: TextFields( height: spaceBetweenTextFileds,
hintText: ),
TranslationBase.of(context).orderType, Container(
), decoration: BoxDecoration(
), borderRadius: BorderRadius.all(
SizedBox(height: spaceBetweenTextFileds), Radius.circular(6.0)),
Container( border: Border.all(
decoration: BoxDecoration( width: 1.0,
borderRadius: BorderRadius.all( color: HexColor("#CCCCCC"))),
Radius.circular(6.0)), child: TextFields(
border: Border.all( hintText: TranslationBase.of(context)
width: 1.0, .orderType,
color: HexColor("#CCCCCC"))), ),
child: TextFields( ),
hintText: SizedBox(height: spaceBetweenTextFileds),
TranslationBase.of(context).strength, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
controller: strengthController, borderRadius: BorderRadius.all(
validator: (value) { Radius.circular(6.0)),
if (value.isEmpty) border: Border.all(
return TranslationBase.of(context) width: 1.0,
.emptyMessage; color: HexColor("#CCCCCC"))),
else child: TextFields(
return null; hintText: TranslationBase.of(context)
}, .strength,
), keyboardType: TextInputType.number,
), controller: strengthController,
SizedBox(height: spaceBetweenTextFileds), validator: (value) {
Container( if (value.isEmpty)
decoration: BoxDecoration( return TranslationBase.of(context)
borderRadius: BorderRadius.all( .emptyMessage;
Radius.circular(6.0)), else
border: Border.all( return null;
width: 1.0, },
color: HexColor("#CCCCCC"))), ),
child: TextFields( ),
hintText: TranslationBase.of(context).route, SizedBox(height: spaceBetweenTextFileds),
controller: routeController, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
validator: (value) { borderRadius: BorderRadius.all(
if (value.isEmpty) Radius.circular(6.0)),
return TranslationBase.of(context) border: Border.all(
.emptyMessage; width: 1.0,
else color: HexColor("#CCCCCC"))),
return null; child: TextFields(
}, hintText:
), TranslationBase.of(context).route,
), controller: routeController,
SizedBox(height: spaceBetweenTextFileds), keyboardType: TextInputType.number,
Container( validator: (value) {
decoration: BoxDecoration( if (value.isEmpty)
borderRadius: BorderRadius.all( return TranslationBase.of(context)
Radius.circular(6.0)), .emptyMessage;
border: Border.all( else
width: 1.0, return null;
color: HexColor("#CCCCCC"))), },
child: TextFields( ),
hintText: ),
TranslationBase.of(context).frequency, SizedBox(height: spaceBetweenTextFileds),
controller: frequencyController, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
validator: (value) { borderRadius: BorderRadius.all(
if (value.isEmpty) Radius.circular(6.0)),
return TranslationBase.of(context) border: Border.all(
.emptyMessage; width: 1.0,
else color: HexColor("#CCCCCC"))),
return null; child: TextFields(
}, hintText: TranslationBase.of(context)
), .frequency,
), controller: frequencyController,
SizedBox(height: spaceBetweenTextFileds), keyboardType: TextInputType.number,
Container( validator: (value) {
decoration: BoxDecoration( if (value.isEmpty)
borderRadius: BorderRadius.all( return TranslationBase.of(context)
Radius.circular(6.0)), .emptyMessage;
border: Border.all( else
width: 1.0, return null;
color: HexColor("#CCCCCC"))), },
child: TextFields( ),
hintText: ),
TranslationBase.of(context).doseTime, SizedBox(height: spaceBetweenTextFileds),
controller: doseController, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
validator: (value) { borderRadius: BorderRadius.all(
if (value.isEmpty) Radius.circular(6.0)),
return TranslationBase.of(context) border: Border.all(
.emptyMessage; width: 1.0,
else color: HexColor("#CCCCCC"))),
return null; child: TextFields(
}, hintText: TranslationBase.of(context)
), .doseTime,
), controller: doseController,
SizedBox(height: spaceBetweenTextFileds), keyboardType: TextInputType.number,
Container( validator: (value) {
decoration: BoxDecoration( if (value.isEmpty)
borderRadius: BorderRadius.all( return TranslationBase.of(context)
Radius.circular(6.0)), .emptyMessage;
border: Border.all( else
width: 1.0, return null;
color: HexColor("#CCCCCC"))), },
child: TextFields( ),
hintText: ),
TranslationBase.of(context).indication, SizedBox(height: spaceBetweenTextFileds),
controller: indicationController, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
validator: (value) { borderRadius: BorderRadius.all(
if (value.isEmpty) Radius.circular(6.0)),
return TranslationBase.of(context) border: Border.all(
.emptyMessage; width: 1.0,
else color: HexColor("#CCCCCC"))),
return null; child: TextFields(
}, hintText: TranslationBase.of(context)
), .indication,
), controller: indicationController,
SizedBox(height: spaceBetweenTextFileds), keyboardType: TextInputType.number,
Container( validator: (value) {
decoration: BoxDecoration( if (value.isEmpty)
borderRadius: BorderRadius.all( return TranslationBase.of(context)
Radius.circular(6.0)), .emptyMessage;
border: Border.all( else
width: 1.0, return null;
color: HexColor("#CCCCCC"))), },
child: TextFields( ),
hintText: ),
TranslationBase.of(context).fromDate, SizedBox(height: spaceBetweenTextFileds),
keyboardType: TextInputType.datetime, Container(
validator: (value) { decoration: BoxDecoration(
if (value.isEmpty) borderRadius: BorderRadius.all(
return TranslationBase.of(context) Radius.circular(6.0)),
.emptyMessage; border: Border.all(
else width: 1.0,
return null; color: HexColor("#CCCCCC"))),
}, child: TextFields(
), hintText: TranslationBase.of(context)
), .fromDate,
SizedBox(height: spaceBetweenTextFileds), keyboardType: TextInputType.datetime,
Container( validator: (value) {
decoration: BoxDecoration( if (value.isEmpty)
borderRadius: BorderRadius.all( return TranslationBase.of(context)
Radius.circular(6.0)), .emptyMessage;
border: Border.all( else
width: 1.0, return null;
color: HexColor("#CCCCCC"))), },
child: TextFields( ),
hintText: ),
TranslationBase.of(context).duration, SizedBox(height: spaceBetweenTextFileds),
// borderColor: Colors.white, Container(
keyboardType: TextInputType.number, decoration: BoxDecoration(
controller: durationController, borderRadius: BorderRadius.all(
validator: (value) { Radius.circular(6.0)),
if (value.isEmpty) border: Border.all(
return TranslationBase.of(context) width: 1.0,
.emptyMessage; color: HexColor("#CCCCCC"))),
else child: TextFields(
return null; hintText:
}), TranslationBase.of(context)
), .duration,
SizedBox(height: spaceBetweenTextFileds), // borderColor: Colors.white,
Container( keyboardType: TextInputType.number,
decoration: BoxDecoration( controller: durationController,
borderRadius: BorderRadius.all( validator: (value) {
Radius.circular(6.0)), if (value.isEmpty)
border: Border.all( return TranslationBase.of(
width: 1.0, context)
color: HexColor("#CCCCCC"))), .emptyMessage;
child: TextFields( else
hintText: return null;
TranslationBase.of(context).instruction, }),
controller: indicationController, ),
keyboardType: TextInputType.number, SizedBox(height: spaceBetweenTextFileds),
validator: (value) { Container(
if (value.isEmpty) decoration: BoxDecoration(
return TranslationBase.of(context) borderRadius: BorderRadius.all(
.emptyMessage; Radius.circular(6.0)),
else border: Border.all(
return null; width: 1.0,
}, color: HexColor("#CCCCCC"))),
), child: TextFields(
), hintText: TranslationBase.of(context)
SizedBox(height: spaceBetweenTextFileds), .instruction,
Container( controller: indicationController,
margin: EdgeInsets.all( keyboardType: TextInputType.number,
SizeConfig.widthMultiplier * 5), validator: (value) {
child: Wrap( if (value.isEmpty)
alignment: WrapAlignment.center, return TranslationBase.of(context)
children: <Widget>[ .emptyMessage;
AppButton( else
title: TranslationBase.of(context) return null;
.addMedication, },
onPressed: () { ),
formKey.currentState.save(); ),
SizedBox(height: spaceBetweenTextFileds),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.addMedication,
onPressed: () {
formKey.currentState.save();
if (formKey.currentState.validate()) { if (formKey.currentState
postProcedure( .validate()) {
model: model, postProcedure(
duration: durationController.text, model: model,
dose: doseController.text, duration:
frequency: durationController.text,
frequencyController.text, dose: doseController.text,
route: routeController.text, frequency:
drugId: drugIdController.text, frequencyController
strength: strengthController.text, .text,
indication: route: routeController.text,
indicationController.text, drugId:
instruction: drugIdController.text,
indicationController.text, strength:
); strengthController.text,
Navigator.pop(context); indication:
} indicationController
{ .text,
// Navigator.push( instruction:
// context, indicationController
// MaterialPageRoute( .text,
// builder: (context) => );
// NewPrescriptionScreen()), Navigator.pop(context);
// ); }
} {
}, // Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// NewPrescriptionScreen()),
// );
}
},
),
],
),
), ),
], ],
), ),
), ),
], ),
), ],
), ),
), ),
], ),
), );
), }),
), );
);
});
}); });
} }
// openAllergiesList(BuildContext context) {
// showModalBottomSheet(
// backgroundColor: Colors.white,
// isScrollControlled: true,
// context: context,
// builder: (context) {
// return AddAllergies(
// addAllergiesFun: (MySelectedAllergy mySelectedAllergy) {
// setState(() {
// widget.myAllergiesList.add(mySelectedAllergy);
// Navigator.of(context).pop();
// });
// },
// );
// });
// }
postProcedure( postProcedure(
{String duration, {String duration,
String dose, String dose,

@ -420,7 +420,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
} }
} }
postProcedure({ProcedureViewModel model}) async { postProcedure({ProcedureViewModel model, String remarks}) async {
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel(); PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List(); List<Controls> controls = List();
List<Procedures> controlsProcedure = List(); List<Procedures> controlsProcedure = List();
@ -433,10 +433,10 @@ postProcedure({ProcedureViewModel model}) async {
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGx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isEmpty ? '' : remarks, controlValue: 'sssssssss'),
); );
controlsProcedure.add( controlsProcedure.add(
Procedures(category: "02", procedure: "02011002", controls: controls)); Procedures(category: "02", procedure: "02011009", controls: controls));
postProcedureReqModel.procedures = controlsProcedure; postProcedureReqModel.procedures = controlsProcedure;
await model.postProcedure(postProcedureReqModel); await model.postProcedure(postProcedureReqModel);
@ -448,7 +448,8 @@ postProcedure({ProcedureViewModel model}) async {
} }
} }
updateProcedure({ProcedureViewModel model, String remarks}) async { updateProcedure(
{ProcedureViewModel model, String remarks, String procedureId}) async {
PostProcedureReqModel updateProcedureReqModel = new PostProcedureReqModel(); PostProcedureReqModel updateProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List(); List<Controls> controls = List();
List<Procedures> controlsProcedure = List(); List<Procedures> controlsProcedure = List();
@ -500,6 +501,7 @@ class AddSelectedProcedure extends StatefulWidget {
class _AddSelectedProcedureState extends State<AddSelectedProcedure> { class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
TextEditingController procedureController = TextEditingController(); TextEditingController procedureController = TextEditingController();
TextEditingController remarksController = TextEditingController();
List<EntityList> entityList = List(); List<EntityList> entityList = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -559,6 +561,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
), ),
TextFields( TextFields(
hintText: 'Remarks', hintText: 'Remarks',
controller: remarksController,
minLines: 3, minLines: 3,
maxLines: 5, maxLines: 5,
), ),
@ -574,7 +577,9 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
title: 'add Selected Procedures'.toUpperCase(), title: 'add Selected Procedures'.toUpperCase(),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
postProcedure(model: widget.model); postProcedure(
model: widget.model,
remarks: remarksController.text);
}, },
), ),
], ],

@ -28,7 +28,6 @@ class UpdateAllergiesWidget extends StatefulWidget {
} }
class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> { class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
@override @override
@ -53,9 +52,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase return TranslationBase.of(context).emptyMessage;
.of(context)
.emptyMessage;
else else
return null; return null;
}), }),
@ -64,19 +61,15 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
height: 20, height: 20,
), ),
Container( Container(
margin: margin: EdgeInsets.only(left: 15, right: 15, top: 15),
EdgeInsets.only(left: 15, right: 15, top: 15),
child: Column( child: Column(
children: widget.myAllergiesList.map((selectedAllergy) { children: widget.myAllergiesList.map((selectedAllergy) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container( Container(
child: Expanded( child: Expanded(
@ -169,9 +162,9 @@ class _AddAllergiesState extends State<AddAllergies> {
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>(); GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
InputDecoration textFieldSelectorDecoration(
InputDecoration textFieldSelectorDecoration(String hintText, String hintText, String selectedText, bool isDropDown,
String selectedText, bool isDropDown,{IconData icon}) { {IconData icon}) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -211,166 +204,166 @@ class _AddAllergiesState extends State<AddAllergies> {
await model.getMasterLookup(MasterKeysService.AllergySeverity); await model.getMasterLookup(MasterKeysService.AllergySeverity);
} }
}, },
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold( baseViewModel: model,
baseViewModel: model, isShowAppBar: false,
isShowAppBar: false, body: SingleChildScrollView(
body: SingleChildScrollView( child: Center(
child: Center( child: FractionallySizedBox(
child: FractionallySizedBox( widthFactor: 0.9,
widthFactor: 0.9, child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ SizedBox(
height: 16,
SizedBox( ),
height: 16, AppText(
), TranslationBase
AppText(
TranslationBase
.of(context) .of(context)
.addAllergies, .addAllergies,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16, fontSize: 16,
), ),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.allergiesList != null onTap: model.allergiesList != null
? () { ? () {
setState(() { setState(() {
_selectedAllergy = null; _selectedAllergy = null;
}); });
} }
: null, : null,
child: _selectedAllergy==null? AutoCompleteTextField<MasterKeyModel>( child: _selectedAllergy == null
decoration: textFieldSelectorDecoration( ? AutoCompleteTextField<MasterKeyModel>(
TranslationBase decoration: textFieldSelectorDecoration(
TranslationBase
.of(context) .of(context)
.selectAllergy, .selectAllergy,
_selectedAllergy != null _selectedAllergy != null
? _selectedAllergy.nameEn ? _selectedAllergy.nameEn
: null, true, icon: EvaIcons.search), : null,
itemSubmitted: (item) => true,
setState(() => _selectedAllergy = item), icon: EvaIcons.search),
key: key, itemSubmitted: (item) =>
suggestions: model.allergiesList, setState(() => _selectedAllergy = item),
itemBuilder: (context, suggestion) => key: key,
new Padding( suggestions: model.allergiesList,
child: Texts( itemBuilder: (context, suggestion) =>
projectViewModel.isArabic ? suggestion new Padding(
.nameAr : suggestion.nameEn), child: Texts(
padding: EdgeInsets.all(8.0)), projectViewModel.isArabic
itemSorter: (a, b) => 1, ? suggestion.nameAr
itemFilter: (suggestion, input) => : suggestion.nameEn),
suggestion.nameAr.toLowerCase().startsWith( padding: EdgeInsets.all(8.0)),
input.toLowerCase()) || itemSorter: (a, b) => 1,
suggestion.nameEn.toLowerCase() itemFilter: (suggestion, input) =>
.startsWith(input.toLowerCase()), suggestion.nameAr
):TextField( .toLowerCase()
decoration: textFieldSelectorDecoration( .startsWith(input.toLowerCase()) ||
TranslationBase suggestion.nameEn
.toLowerCase()
.startsWith(input.toLowerCase()),
)
: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase
.of(context) .of(context)
.selectAllergy, .selectAllergy,
_selectedAllergy != null _selectedAllergy != null
? projectViewModel.isArabic?_selectedAllergy.nameAr: _selectedAllergy.nameEn ? projectViewModel.isArabic?_selectedAllergy.nameAr: _selectedAllergy.nameEn
: null, true, icon: EvaIcons.search), : null,
enabled: false, true,
), icon: EvaIcons.search),
), enabled: false,
), ),
SizedBox( ),
height: 10, ),
), SizedBox(
Container( height: 10,
height: screenSize.height * 0.070, ),
child: InkWell( Container(
onTap: model.allergySeverityList != null height: screenSize.height * 0.070,
? () { child: InkWell(
MasterKeyDailog dialog = MasterKeyDailog( onTap: model.allergySeverityList != null
list: model.allergySeverityList, ? () {
okText: TranslationBase MasterKeyDailog dialog = MasterKeyDailog(
.of(context) list: model.allergySeverityList,
.ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
_selectedAllergySeverity = _selectedAllergySeverity =
selectedValue; selectedValue;
});
}, });
); },
showDialog( );
barrierDismissible: false, showDialog(
context: context, barrierDismissible: false,
builder: (BuildContext context) { context: context,
return dialog; builder: (BuildContext context) {
}, return dialog;
); },
} );
: null, }
child: TextField( : null,
decoration: textFieldSelectorDecoration( child: TextField(
TranslationBase decoration: textFieldSelectorDecoration(
TranslationBase
.of(context) .of(context)
.selectSeverity, .selectSeverity,
_selectedAllergySeverity != null _selectedAllergySeverity != null
? projectViewModel.isArabic?_selectedAllergySeverity.nameAr:_selectedAllergySeverity.nameEn ? projectViewModel.isArabic?_selectedAllergySeverity.nameAr:_selectedAllergySeverity.nameEn
: null, : null,
true), true),
enabled: false, enabled: false,
),
),
), ),
SizedBox( ),
height: 10, ),
), SizedBox(
Container( height: 10,
margin: EdgeInsets.only( ),
left: 0, right: 0, top: 15), Container(
child: TextFields( margin: EdgeInsets.only(left: 0, right: 0, top: 15),
hintText: TranslationBase.of(context).remarks, child: TextFields(
fontSize: 13.5, hintText: TranslationBase.of(context).remarks,
// hintColor: Colors.black, fontSize: 13.5,
fontWeight: FontWeight.w600, // hintColor: Colors.black,
maxLines: 25, fontWeight: FontWeight.w600,
minLines: 10, maxLines: 25,
controller: remarkController, minLines: 10,
validator: (value) { controller: remarkController,
if (value == null) validator: (value) {
return TranslationBase if (value == null)
.of(context) return TranslationBase.of(context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
}), }),
), SizedBox( ),
height: 10, SizedBox(
), height: 10,
AppButton( ),
title: "Add".toUpperCase(), AppButton(
onPressed: () { title: "Add".toUpperCase(),
MySelectedAllergy mySelectedAllergy = new MySelectedAllergy( onPressed: () {
MySelectedAllergy mySelectedAllergy =
new MySelectedAllergy(
remark: remarkController.text, remark: remarkController.text,
selectedAllergy: _selectedAllergy, selectedAllergy: _selectedAllergy,
selectedAllergySeverity: _selectedAllergySeverity); selectedAllergySeverity:
widget.addAllergiesFun(mySelectedAllergy); _selectedAllergySeverity);
}, widget.addAllergiesFun(mySelectedAllergy);
), },
] ),
]),
), ),
), ),
), )),
)),
), ),
); );
} }
} }

Loading…
Cancel
Save