Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services

merge-requests/463/head
Mohammad Aljammal 5 years ago
commit 7e33130ec7

@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.1 COCOAPODS: 1.10.0.rc.1

@ -843,4 +843,11 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Step", "en": "Step",
"ar": "خطوة" "ar": "خطوة"
}, },
"applyOrRescheduleLeave": {
"en": "Apply Or Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة"
},"myQRCode": {
"en": "My QR Code",
"ar": "My QR Code"
},
}; };

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
@ -145,8 +146,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: hintText: TranslationBase.of(context)
TranslationBase.of(context).durationOfIllness, .durationOfIllness,
dropDownText: "3", dropDownText: "3",
inputType: TextInputType.number, inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
@ -163,6 +164,14 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
children: [ children: [
Row( Row(
children: [ children: [
Icon(
DoctorApp.warning,
size: 20,
color: Color(0xFFCC9B14),
),
SizedBox(
width: 4,
),
AppText( AppText(
"BP (H/L)", "BP (H/L)",
fontSize: fontSize:
@ -246,7 +255,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: 16, height: 16,
), ),
AppText( AppText(
TranslationBase.of(context).chiefComplaintsAndSymptoms, TranslationBase.of(context)
.chiefComplaintsAndSymptoms,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -265,7 +275,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: 8, height: 8,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context).instruction, hintText:
TranslationBase.of(context).instruction,
dropDownText: helpers.parseHtmlString(model dropDownText: helpers.parseHtmlString(model
.patientChiefComplaintList[0] .patientChiefComplaintList[0]
.chiefComplaint), .chiefComplaint),
@ -288,7 +299,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
(index) => CheckboxListTile( (index) => CheckboxListTile(
title: AppText( title: AppText(
conditionsData[index]['name'], conditionsData[index]['name'],
fontWeight: FontWeight.bold, fontWeight: FontWeight.normal,
fontSize: fontSize:
SizeConfig.textMultiplier * 2.1, SizeConfig.textMultiplier * 2.1,
), ),
@ -307,115 +318,77 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText: TranslationBase.of(context).other,
decoration: dropDownText: "None",
Helpers.textFieldSelectorDecoration( enabled: false,
TranslationBase.of(context).other, ),
null,
false),
enabled: true,
controller: _otherController,
keyboardType: TextInputType.text,
)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText: TranslationBase.of(context).how,
decoration: dropDownText: "None",
Helpers.textFieldSelectorDecoration( enabled: false,
TranslationBase.of(context).how, ),
null,
false),
enabled: true,
controller: _howController,
keyboardType: TextInputType.text,
)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Container( child: AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: Helpers TranslationBase.of(context).when,
.textFieldSelectorDecoration( dropDownText: "None",
TranslationBase.of(context) enabled: false,
.when, ),
null,
false),
enabled: true,
controller: _whenController,
keyboardType: TextInputType.text,
)),
), ),
SizedBox( SizedBox(
width: 4, width: 4,
), ),
Expanded( Expanded(
child: Container( child: AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: Helpers TranslationBase.of(context).where,
.textFieldSelectorDecoration( dropDownText: "None",
TranslationBase.of(context) enabled: false,
.where, ),
null,
false),
enabled: true,
controller: _whereController,
keyboardType: TextInputType.text,
)),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
child: TextField( height: screenSize.height * 0.1,
decoration: hintText: TranslationBase.of(context).specifyPossibleLineManagement,
Helpers.textFieldSelectorDecoration( dropDownText: "None",
TranslationBase.of(context) enabled: false,
.specifyPossibleLineManagement,
null,
false),
enabled: true,
controller: _managementsLineController,
keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), ),
SizedBox( SizedBox(
height: 16, height: 26,
), ),
AppText( AppText(
TranslationBase.of(context).significantSigns, TranslationBase.of(context).significantSigns,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 2.1,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
child: TextField( height: screenSize.height * 0.1,
decoration: hintText: TranslationBase.of(context).backAbdomen,
Helpers.textFieldSelectorDecoration( dropDownText: "BackLNeck",
TranslationBase.of(context) enabled: false,
.backAbdomen, ),
null,
false),
enabled: true,
controller: _signsController,
keyboardType: TextInputType.multiline,
minLines: null,
maxLines: null,
)),
], ],
), ),
), ),

@ -141,7 +141,10 @@ class PatientProfileScreen extends StatelessWidget {
if (patient.episodeNo != 0) if (patient.episodeNo != 0)
BorderedButton( BorderedButton(
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
backgroundColor: Colors.red.shade700, backgroundColor:
patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
textColor: Colors.white, textColor: Colors.white,
vPadding: 8, vPadding: 8,
radius: 30, radius: 30,
@ -155,10 +158,12 @@ class PatientProfileScreen extends StatelessWidget {
height: 30, height: 30,
), ),
handler: () { handler: () {
if (patient.patientStatusType == 43) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
UPDATE_EPISODE, UPDATE_EPISODE,
arguments: {'patient': patient}); arguments: {'patient': patient});
}, }
}
), ),
], ],
), ),

@ -51,7 +51,7 @@ class VitalSignItem extends StatelessWidget {
"$lastVal", "$lastVal",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w800, fontWeight: FontWeight.bold,
margin: 0, margin: 0,
), ),
Expanded( Expanded(
@ -88,7 +88,7 @@ class VitalSignItem extends StatelessWidget {
"$des", "$des",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3, fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.w600, fontWeight: FontWeight.bold,
), ),
), ),
), ),

@ -345,8 +345,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
suggestion suggestion
.genericName), .genericName),
padding: padding:
EdgeInsets.all(8.0)), EdgeInsets.all(15.0)),
itemSorter: (a, b) => 1, itemSorter: (a, b) => 1,
suggestionsAmount: 7,
itemFilter: (suggestion, input) => itemFilter: (suggestion, input) =>
suggestion.genericName.toLowerCase().startsWith( suggestion.genericName.toLowerCase().startsWith(
input.toLowerCase()) || input.toLowerCase()) ||
@ -383,6 +384,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
SizedBox( SizedBox(
height: spaceBetweenTextFileds, height: spaceBetweenTextFileds,
), ),
Visibility(
visible: _selectedMedication == null
? false
: true,
child: Container(
child: Column(
children: [
Container( Container(
child: Row( child: Row(
children: [ children: [
@ -391,7 +399,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Radio( Radio(
activeColor: Color(0xFFB9382C), activeColor:
Color(0xFFB9382C),
value: 1, value: 1,
groupValue: selectedType, groupValue: selectedType,
onChanged: (value) { onChanged: (value) {
@ -402,7 +411,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
], ],
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
width: double.infinity, width: double.infinity,
@ -421,32 +431,39 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// .digitsOnly // .digitsOnly
], ],
hintText: hintText:
TranslationBase.of(context) TranslationBase.of(
context)
.strength, .strength,
controller: strengthController, controller:
keyboardType: strengthController,
TextInputType.numberWithOptions( keyboardType: TextInputType
.numberWithOptions(
decimal: true, decimal: true,
), ),
onChanged: (String value) { onChanged: (String value) {
setState(() { setState(() {
strengthChar = value.length; strengthChar =
value.length;
}); });
if (strengthChar >= 5) { if (strengthChar >= 5) {
DrAppToastMsg.showErrorToast( DrAppToastMsg
.showErrorToast(
"Only 5 Digits allowed for strength"); "Only 5 Digits allowed for strength");
} }
}, },
onSubmit: (_) { onSubmit: (_) {
if (_selectedMedication != null && if (_selectedMedication !=
null &&
duration != null && duration != null &&
frequency != null && frequency != null &&
strengthController.text != strengthController
.text !=
null) { null) {
model.getBoxQuantity( model.getBoxQuantity(
freq: frequency[ freq: frequency[
'parameterCode'], 'parameterCode'],
duration: duration['id'], duration:
duration['id'],
itemCode: itemCode:
_selectedMedication _selectedMedication
.itemId, .itemId,
@ -479,12 +496,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
.width * .width *
0.350, 0.350,
child: InkWell( child: InkWell(
onTap: model.itemMedicineListUnit != onTap:
model.itemMedicineListUnit !=
null null
? () { ? () {
Helpers.hideKeyboard( Helpers
.hideKeyboard(
context); context);
ListSelectDialog dialog = ListSelectDialog
dialog =
ListSelectDialog( ListSelectDialog(
list: model list: model
.itemMedicineListUnit, .itemMedicineListUnit,
@ -492,23 +512,27 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
'description', 'description',
attributeValueId: attributeValueId:
'parameterCode', 'parameterCode',
okText: okText: TranslationBase.of(
TranslationBase.of(
context) context)
.ok, .ok,
okFunction: okFunction:
(selectedValue) { (selectedValue) {
setState(() { setState(
units = selectedValue; () {
units =
selectedValue;
units['isDefault'] = units['isDefault'] =
true; true;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
context: context, false,
builder: (BuildContext context:
context,
builder:
(BuildContext
context) { context) {
return dialog; return dialog;
}, },
@ -530,82 +554,110 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
], ],
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.itemMedicineListRoute != null onTap:
model.itemMedicineListRoute !=
null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
ListSelectDialog dialog = context);
ListSelectDialog
dialog =
ListSelectDialog( ListSelectDialog(
list: list: model
model.itemMedicineListRoute, .itemMedicineListRoute,
attributeName: 'description', attributeName:
'description',
attributeValueId: attributeValueId:
'parameterCode', 'parameterCode',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
route = selectedValue; route =
route['isDefault'] = true; selectedValue;
route['isDefault'] =
true;
}); });
if (route == null) { if (route ==
null) {
helpers.showErrorToast( helpers.showErrorToast(
'plase fill'); 'plase fill');
} }
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder:
(BuildContext context) { (BuildContext
context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
TranslationBase.of(context).route, textFieldSelectorDecoration(
TranslationBase.of(
context)
.route,
route != null route != null
? route['description'] ? route[
'description']
: null, : null,
true), true),
enabled: false, enabled: false,
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.itemMedicineList != null onTap:
model.itemMedicineList != null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
ListSelectDialog dialog = context);
ListSelectDialog
dialog =
ListSelectDialog( ListSelectDialog(
list: model.itemMedicineList, list: model
attributeName: 'description', .itemMedicineList,
attributeName:
'description',
attributeValueId: attributeValueId:
'parameterCode', 'parameterCode',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
frequency = selectedValue; frequency =
frequency['isDefault'] = selectedValue;
frequency[
'isDefault'] =
true; true;
if (_selectedMedication != if (_selectedMedication != null &&
duration !=
null &&
frequency !=
null && null &&
duration != null &&
frequency != null &&
strengthController strengthController
.text != .text !=
null) { null) {
@ -613,13 +665,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
freq: frequency[ freq: frequency[
'parameterCode'], 'parameterCode'],
duration: duration:
duration['id'], duration[
'id'],
itemCode: itemCode:
_selectedMedication _selectedMedication
.itemId, .itemId,
strength: double.parse( strength:
strengthController double.parse(
.text)); strengthController.text));
return; return;
} }
@ -627,64 +680,82 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder:
(BuildContext context) { (BuildContext
context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
TranslationBase.of(context) textFieldSelectorDecoration(
TranslationBase.of(
context)
.frequency, .frequency,
frequency != null frequency != null
? frequency['description'] ? frequency[
'description']
: null, : null,
true), true),
enabled: false, enabled: false,
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.medicationDoseTimeList != onTap:
model.medicationDoseTimeList !=
null null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
ListSelectDialog dialog = context);
ListSelectDialog
dialog =
ListSelectDialog( ListSelectDialog(
list: model list: model
.medicationDoseTimeList, .medicationDoseTimeList,
attributeName: 'nameEn', attributeName:
attributeValueId: 'id', 'nameEn',
attributeValueId:
'id',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
doseTime = selectedValue; doseTime =
selectedValue;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder:
(BuildContext context) { (BuildContext
context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
TranslationBase.of(context) textFieldSelectorDecoration(
TranslationBase.of(
context)
.doseTime, .doseTime,
doseTime != null doseTime != null
? doseTime['nameEn'] ? doseTime['nameEn']
@ -694,8 +765,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
if (model.patientAssessmentList.isNotEmpty) height: spaceBetweenTextFileds),
if (model
.patientAssessmentList.isNotEmpty)
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
width: double.infinity, width: double.infinity,
@ -703,12 +776,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row( child: Row(
children: [ children: [
Container( Container(
width: MediaQuery.of(context) width:
MediaQuery.of(context)
.size .size
.width * .width *
0.29, 0.29,
child: InkWell( child: InkWell(
onTap: indicationList != null onTap:
indicationList != null
? () { ? () {
Helpers.hideKeyboard( Helpers.hideKeyboard(
context); context);
@ -722,8 +797,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
0] 0]
.icdCode10ID .icdCode10ID
.toString(), .toString(),
indication != null indication !=
? indication['name'] null
? indication[
'name']
: null, : null,
false), false),
enabled: true, enabled: true,
@ -732,13 +809,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
Container( Container(
width: MediaQuery.of(context) width:
MediaQuery.of(context)
.size .size
.width * .width *
0.65, 0.65,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: indicationList != null onTap:
indicationList != null
? () { ? () {
Helpers.hideKeyboard( Helpers.hideKeyboard(
context); context);
@ -753,8 +832,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
0] 0]
.asciiDesc .asciiDesc
.toString(), .toString(),
indication != null indication !=
? indication['name'] null
? indication[
'name']
: null, : null,
false), false),
enabled: true, enabled: true,
@ -765,16 +846,20 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
], ],
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: () => onTap: () => selectDate(
selectDate(context, widget.model), context, widget.model),
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
TranslationBase.of(context).date, textFieldSelectorDecoration(
TranslationBase.of(
context)
.date,
selectedDate != null selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null, : null,
@ -787,39 +872,51 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.medicationDurationList != onTap:
model.medicationDurationList !=
null null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
ListSelectDialog dialog = context);
ListSelectDialog
dialog =
ListSelectDialog( ListSelectDialog(
list: model list: model
.medicationDurationList, .medicationDurationList,
attributeName: 'nameEn', attributeName:
attributeValueId: 'id', 'nameEn',
attributeValueId:
'id',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
duration = selectedValue; duration =
if (_selectedMedication != selectedValue;
if (_selectedMedication != null &&
duration !=
null &&
frequency !=
null && null &&
duration != null &&
frequency != null &&
strengthController strengthController
.text != .text !=
null) { null) {
model.getBoxQuantity( model
.getBoxQuantity(
freq: frequency[ freq: frequency[
'parameterCode'], 'parameterCode'],
duration: duration:
duration['id'], duration[
'id'],
itemCode: itemCode:
_selectedMedication _selectedMedication
.itemId, .itemId,
@ -827,7 +924,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
strengthController strengthController
.text), .text),
); );
box = model.boxQuintity; box = model
.boxQuintity;
return; return;
} }
@ -835,18 +933,22 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder:
(BuildContext context) { (BuildContext
context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
TranslationBase.of(context) textFieldSelectorDecoration(
TranslationBase.of(
context)
.duration, .duration,
duration != null duration != null
? duration['nameEn'] ? duration['nameEn']
@ -856,86 +958,108 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.allMedicationList != null onTap: model.allMedicationList !=
null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
context);
ListSelectDialog dialog = ListSelectDialog dialog =
ListSelectDialog( ListSelectDialog(
list: model.allMedicationList, list: model
.allMedicationList,
attributeName: 'nameEn', attributeName: 'nameEn',
attributeValueId: 'id', attributeValueId: 'id',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
duration = selectedValue; duration =
selectedValue;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder: (BuildContext
(BuildContext context) { context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
textFieldSelectorDecoration(
"UOM", "UOM",
uom != null ? uom : null, uom != null
? uom
: null,
false), false),
//enabled: false, //enabled: false,
readOnly: true, readOnly: true,
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: model.allMedicationList != null onTap: model.allMedicationList !=
null
? () { ? () {
Helpers.hideKeyboard(context); Helpers.hideKeyboard(
context);
ListSelectDialog dialog = ListSelectDialog dialog =
ListSelectDialog( ListSelectDialog(
list: model.allMedicationList, list: model
.allMedicationList,
attributeName: 'nameEn', attributeName: 'nameEn',
attributeValueId: 'id', attributeValueId: 'id',
okText: okText:
TranslationBase.of(context) TranslationBase.of(
context)
.ok, .ok,
okFunction: (selectedValue) { okFunction:
(selectedValue) {
setState(() { setState(() {
duration = selectedValue; duration =
selectedValue;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible:
false,
context: context, context: context,
builder: builder: (BuildContext
(BuildContext context) { context) {
return dialog; return dialog;
}, },
); );
} }
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration:
textFieldSelectorDecoration(
"Box Quantity", "Box Quantity",
box != null box != null
? "Box Quantity: " + ? "Box Quantity: " +
model.boxQuintity.toString() model
.boxQuintity
.toString()
: null, : null,
false), false),
//enabled: false, //enabled: false,
@ -943,24 +1067,28 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color:
HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
maxLines: 6, maxLines: 6,
minLines: 4, minLines: 4,
hintText: TranslationBase.of(context) hintText:
TranslationBase.of(context)
.instruction, .instruction,
controller: instructionController, controller: instructionController,
//keyboardType: TextInputType.number, //keyboardType: TextInputType.number,
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(
height: spaceBetweenTextFileds),
Container( Container(
margin: EdgeInsets.all( margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5), SizeConfig.widthMultiplier * 5),
@ -969,7 +1097,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
color: Color(0xff359846), color: Color(0xff359846),
title: TranslationBase.of(context) title: TranslationBase.of(
context)
.addMedication, .addMedication,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onPressed: () { onPressed: () {
@ -996,14 +1125,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
} }
if (double.parse( if (double.parse(
strengthController.text) > strengthController
.text) >
1000.0) { 1000.0) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
"1000 is the MAX for the strength"); "1000 is the MAX for the strength");
return; return;
} }
if (double.parse( if (double.parse(
strengthController.text) < strengthController
.text) <
0.0) { 0.0) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
"strength can't be zero"); "strength can't be zero");
@ -1097,6 +1228,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
), ),
), ),
],
),
),
),
); );
}), }),
), ),

@ -134,9 +134,14 @@ class _EntityListCheckboxSearchWidgetState
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.orderType), .orderType,
fontWeight: FontWeight.w700,
),
Row(
children: [
Radio( Radio(
activeColor: Color(0xFFB9382C), activeColor:
Color(0xFFB9382C),
value: 0, value: 0,
groupValue: selectedType, groupValue: selectedType,
onChanged: (value) { onChanged: (value) {
@ -150,7 +155,8 @@ class _EntityListCheckboxSearchWidgetState
), ),
Text('routine'), Text('routine'),
Radio( Radio(
activeColor: Color(0xFFB9382C), activeColor:
Color(0xFFB9382C),
groupValue: selectedType, groupValue: selectedType,
value: 1, value: 1,
onChanged: (value) { onChanged: (value) {
@ -162,18 +168,21 @@ class _EntityListCheckboxSearchWidgetState
value.toString(); value.toString();
}, },
), ),
Text(TranslationBase.of(context) Text(TranslationBase.of(
context)
.urgent), .urgent),
], ],
), ),
],
),
), ),
), ),
SizedBox( SizedBox(
height: 15.0, height: 2.0,
), ),
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 12), horizontal: 12, vertical: 12.0),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.remarks, .remarks,

@ -622,6 +622,11 @@ class TranslationBase {
String get rescheduleLeaves => String get rescheduleLeaves =>
localizedValues['reschedule-leave'][locale.languageCode]; localizedValues['reschedule-leave'][locale.languageCode];
String get applyOrRescheduleLeave =>
localizedValues['applyOrRescheduleLeave'][locale.languageCode];
String get myQRCode =>
localizedValues['myQRCode'][locale.languageCode];
String get addMedication => String get addMedication =>
localizedValues['addMedication'][locale.languageCode]; localizedValues['addMedication'][locale.languageCode];

@ -35,9 +35,6 @@ class MyScheduleWidget extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
SizedBox(
height: 10,
),
AppText( AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 18, fontSize: 18,

@ -26,7 +26,7 @@ class StepsWidget extends StatelessWidget {
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.87, width: MediaQuery.of(context).size.width * 0.86,
child: Divider( child: Divider(
color: Colors.grey, color: Colors.grey,
height: 0.75, height: 0.75,

@ -95,7 +95,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
child: StepsWidget( child: StepsWidget(
index: _currentIndex, index: _currentIndex,
changeCurrentTab: changePageViewIndex, changeCurrentTab: changePageViewIndex,
height: MediaQuery.of(context).size.height * 0.20, height: 135,//MediaQuery.of(context).size.height * 0.17,
), ),
), ),
Container( Container(

@ -68,7 +68,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
widget.hintText, widget.hintText,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
), ),
widget.dropDownText == null widget.dropDownText == null
? TextField( ? TextField(

@ -45,10 +45,12 @@ class _AppDrawerState extends State<AppDrawer> {
flex: 4, flex: 4,
child: ListView(padding: EdgeInsets.zero, children: <Widget>[ child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 15),
// height: SizeConfig.heightMultiplier * 50, // height: SizeConfig.heightMultiplier * 50,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [ children: [
Container( Container(
child: Image.asset( child: Image.asset(
@ -56,7 +58,23 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
margin: EdgeInsets.only(top: 10, bottom: 10), margin: EdgeInsets.only(top: 10, bottom: 10),
), ),
SizedBox(height: 10), Container(
child: InkWell(
onTap: (){
Navigator.pop(context);
},
child: Icon(
DoctorApp.close_1,
size: 20,
),
),
margin: EdgeInsets.only(top: 20, bottom: 10),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
SizedBox(height: 5),
if (authProvider.doctorProfile != null) if (authProvider.doctorProfile != null)
InkWell( InkWell(
onTap: () { onTap: () {
@ -80,7 +98,7 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 0),
child: AppText( child: AppText(
authProvider.doctorProfile?.clinicDescription, authProvider.doctorProfile?.clinicDescription,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -91,13 +109,10 @@ class _AppDrawerState extends State<AppDrawer> {
], ],
), ),
), ),
SizedBox(height: 10), SizedBox(height: 40),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).rescheduleLeaves, TranslationBase.of(context).applyOrRescheduleLeave,
// " or " +
// TranslationBase.of(context).leaves,
DoctorApp.reschedule__1, DoctorApp.reschedule__1,
// subTitle: , // subTitle: ,
), ),
@ -111,19 +126,15 @@ class _AppDrawerState extends State<AppDrawer> {
)); ));
}, },
), ),
SizedBox(height: 15),
SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
'My QR Code', TranslationBase.of(context).myQRCode,
// " or " +
// TranslationBase.of(context).leaves,
DoctorApp.qr_code_3, DoctorApp.qr_code_3,
// subTitle: , // subTitle: ,
), ),
), ),
SizedBox(height: 15),
InkWell( InkWell(
child: Container( child: Container(
height: 80, height: 80,
@ -138,14 +149,12 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
SizedBox( SizedBox(
height: 40, height: 130,
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 20),
child: Column( child: Column(
children: [ children: [
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
projectsProvider.isArabic projectsProvider.isArabic
@ -159,6 +168,7 @@ class _AppDrawerState extends State<AppDrawer> {
projectsProvider.changeLanguage('ar'); projectsProvider.changeLanguage('ar');
}, },
), ),
SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).logout, DoctorApp.logout_1), TranslationBase.of(context).logout, DoctorApp.logout_1),
@ -193,13 +203,13 @@ class _AppDrawerState extends State<AppDrawer> {
style: TextStyle( style: TextStyle(
color: Color(0xFF989898), color: Color(0xFF989898),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2, fontSize: 14,
fontFamily: 'Poppins',), fontFamily: 'Poppins',),
children: <TextSpan>[ children: <TextSpan>[
TextSpan(text: ' Cloud Solutions', TextSpan(text: ' Cloud Solutions',
style: TextStyle( style: TextStyle(
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2, fontSize: 15,
fontFamily: 'Poppins',), fontFamily: 'Poppins',),
) )
] ]

@ -37,23 +37,23 @@ class _BottomNavBarState extends State<BottomNavBar> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.home_icon_active, icon: DoctorApp.home_1,
activeIcon: DoctorApp.home_active, activeIcon: DoctorApp.home_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 0, currentIndex: 0,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.schedule_icon, icon: DoctorApp.schedule_1,
activeIcon: DoctorApp.scdedule_icon_active_1, activeIcon: DoctorApp.schedule_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).mySchedule, name: TranslationBase.of(context).mySchedule,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.qr_code, icon: DoctorApp.qr_reader,
activeIcon: DoctorApp.qr_reader_active_1, activeIcon: DoctorApp.qr_reader_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
@ -61,7 +61,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
name: TranslationBase.of(context).qr, name: TranslationBase.of(context).qr,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.message_icon, icon: DoctorApp.dr_reply_1,
activeIcon: DoctorApp.dr_reply_active_1, activeIcon: DoctorApp.dr_reply_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,

@ -34,19 +34,10 @@ class BottomNavigationItem extends StatelessWidget {
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,), SizedBox(height: 15,),
Container( Container(
// decoration: BoxDecoration(boxShadow: [
// BoxShadow(
// color: currentIndex == index
// ? Color.fromRGBO(78, 62, 253, 0.4)
// : Color.fromRGBO(78, 62, 253, 0),
// blurRadius: 9.0,
// spreadRadius: -4.0,
// offset: Offset(0.0, 2.0))
// ]),
child: Icon(currentIndex == index ? activeIcon : icon, child: Icon(currentIndex == index ? activeIcon : icon,
/*color: currentIndex == index color: currentIndex == index
? Theme.of(context).primaryColor ? Color(0xFF333C45)
: Theme.of(context).dividerColor,*/ : Theme.of(context).dividerColor,
size: 22.0), size: 22.0),
), ),
SizedBox(height: 5,), SizedBox(height: 5,),

@ -26,7 +26,7 @@ class _DrawerItemState extends State<DrawerItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -49,16 +49,9 @@ class _DrawerItemState extends State<DrawerItem> {
color:widget.color ??Color(0xFF2E303A), color:widget.color ??Color(0xFF2E303A),
fontSize: 14, fontSize: 14,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
), ),
), ),
AppText(
widget.subTitle,
visibility: !widget.subTitle.isNullOrEmpty(),
color: widget.color ?? Colors.black,
marginLeft: 5,
fontSize: SizeConfig.textMultiplier * 2.5,
),
], ],
), ),
), ),

@ -137,14 +137,29 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
items[index]), items[index]),
activeColor: Colors.red[800], activeColor: Colors.red[800],
onChanged: (bool newValue) { onChanged: (bool newValue) {
// setState(() { setState(() {
// if (widget if (widget
// .isServiceSelected(items[index])) { .isServiceSelected(
// widget.removeHistory(items[index]); items[index])) {
// } else { widget.removeAllergy(
// widget.addHistory(items[index]); items[index]);
// } } else {
// }); // TODO add Allergy
MySelectedAllergy
mySelectedAllergy =
new MySelectedAllergy(
selectedAllergy:
items[index],
selectedAllergySeverity:
_selectedAllergySeverity,
remark: null,
isChecked: true,
isExpanded: true);
widget.addAllergy(
mySelectedAllergy);
}
});
}), }),
InkWell( InkWell(
onTap: () { onTap: () {

Loading…
Cancel
Save