move bottom sheet to index page

episode_fixes
Elham Rababh 5 years ago
parent b341bd5f47
commit e58ce34aa4

@ -27,6 +27,10 @@ import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessmentCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objectiveCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/planCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjectiveCallBack.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
@ -86,6 +90,9 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.patientAssessmentList;
int get episodeID => _SOAPService.episodeID;
bool isAddProgress = true;
String progressNoteText ="";
get medicationStrengthList => _SOAPService.medicationStrengthListWithModel;
get medicationDoseTimeList => _SOAPService.medicationDoseTimeListWithModel;
get medicationRouteList => _SOAPService.medicationRouteListWithModel;
@ -93,6 +100,43 @@ class SOAPViewModel extends BaseViewModel {
List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList;
SubjectiveCallBack subjectiveCallBack;
setSubjectiveCallBack(SubjectiveCallBack callBack)
{
this.subjectiveCallBack = callBack;
}
nextOnSubjectPage(model){
subjectiveCallBack.nextFunction(model);
}
ObjectiveCallBack objectiveCallBack;
setObjectiveCallBack(ObjectiveCallBack callBack)
{
this.objectiveCallBack = callBack;
}
nextOnObjectivePage(model){
objectiveCallBack.nextFunction(model);
}
AssessmentCallBack assessmentCallBack;
setAssessmentCallBack(AssessmentCallBack callBack)
{
this.assessmentCallBack = callBack;
}
nextOnAssessmentPage(model){
assessmentCallBack.nextFunction(model);
}
PlanCallBack planCallBack;
setPlanCallBack(PlanCallBack callBack)
{
this.planCallBack = callBack;
}
nextOnPlanPage(model){
planCallBack.nextFunction(model);
}
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
setState(ViewState.Busy);
await _SOAPService.getAllergies(getAllergiesRequestModel);

@ -109,7 +109,7 @@ void setupLocator() {
locator.registerFactory(() => PatientViewModel());
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => SickLeaveViewModel());
locator.registerFactory(() => SOAPViewModel());
locator.registerLazySingleton(() => SOAPViewModel());
locator.registerFactory(() => PatientReferralViewModel());
locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel());

@ -251,6 +251,32 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
)),
)),
),
if(widget.mySelectedAssessment
.selectedICD != null)
Column(
children: [
SizedBox(
height: 3,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.7,
child: AppText(
widget.mySelectedAssessment
.selectedICD.description +
(' (${widget.mySelectedAssessment
.selectedICD.code} )'),
color: Color(0xFF575757),
fontSize: 10,
fontWeight: FontWeight.w700,
letterSpacing: -0.4,
),
),
],
),
SizedBox(
height: 7,
),

@ -0,0 +1,3 @@
abstract class AssessmentCallBack{
nextFunction(model);
}

@ -25,6 +25,7 @@ import '../shared_soap_widgets/SOAP_open_items.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'add_assessment_details.dart';
import 'assessmentCallBack.dart';
// ignore: must_be_immutable
class UpdateAssessmentPage extends StatefulWidget {
@ -44,7 +45,7 @@ class UpdateAssessmentPage extends StatefulWidget {
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
}
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements AssessmentCallBack{
bool isAssessmentExpand = false;
List<MySelectedAssessment> mySelectedAssessmentList = List();
@ -54,6 +55,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
model.setAssessmentCallBack(this);
mySelectedAssessmentList.clear();
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN,
@ -525,16 +527,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
// TODO Elham*
widget.changePageViewIndex(3);
// if (mySelectedAssessmentList.isEmpty) {
// Helpers.showErrorToast(
// TranslationBase.of(context)
// .assessmentErrorMsg);
// } else {
// widget.changeLoadingState(true);
// widget.changePageViewIndex(3);
// }
},
),
),
@ -577,4 +570,18 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
});
});
}
@override
nextFunction(model) {
// TODO Elham*
widget.changePageViewIndex(3);
// if (mySelectedAssessmentList.isEmpty) {
// Helpers.showErrorToast(
// TranslationBase.of(context)
// .assessmentErrorMsg);
// } else {
// widget.changeLoadingState(true);
// widget.changePageViewIndex(3);
// }
}
}

@ -0,0 +1,3 @@
abstract class ObjectiveCallBack{
nextFunction(model);
}

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.
import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/patients/profile/soap_update/objective/objectiveCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -43,7 +44,7 @@ class UpdateObjectivePage extends StatefulWidget {
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
}
class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements ObjectiveCallBack {
bool isSysExaminationExpand = false;
List<MySelectedExamination> mySelectedExamination = List();
@ -64,6 +65,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
model.setObjectiveCallBack(this);
mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
@ -71,7 +73,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo:
int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) {
@ -204,70 +205,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
),
),
),
),
SizedBox(
height: 5,
),
],
),
)),
),
);
}
@ -397,4 +335,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
),
);
}
@override
nextFunction(model) async {
await submitUpdateObjectivePage(model);
}
}

@ -0,0 +1,3 @@
abstract class PlanCallBack{
nextFunction(model);
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
@ -9,6 +10,7 @@ import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.
import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/patients/profile/soap_update/plan/planCallBack.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -40,7 +42,7 @@ class UpdatePlanPage extends StatefulWidget {
_UpdatePlanPageState createState() => _UpdatePlanPageState();
}
class _UpdatePlanPageState extends State<UpdatePlanPage> {
class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack {
bool isAddProgress = true;
bool isProgressExpanded = true;
GetPatientProgressNoteResModel patientProgressNote =
@ -73,7 +75,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
}
getPatientProgressNote(model, {bool isAddProgress = false}) async {
getPatientProgressNote(SOAPViewModel model, {bool isAddProgress = false}) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo:
@ -83,11 +85,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
editedBy: '',
doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel);
///TODO set progressNote in model;
if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn =
@ -100,6 +103,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
model.patientProgressNoteList[0].appointmentNo;
setState(() {
isAddProgress = isAddProgress;
model.isAddProgress = isAddProgress;
});
}
}
@ -108,6 +112,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
model.setPlanCallBack(this);
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo:
@ -135,6 +140,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
setState(() {
isAddProgress = false;
model.isAddProgress = false;
});
}
widget.changeLoadingState(false);
@ -320,84 +326,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(2);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
title: isAddProgress
? TranslationBase.of(context).next
: TranslationBase.of(context).finish,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: progressNoteController.text.isEmpty,
onPressed: () async {
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(
TranslationBase.of(context)
.progressNoteErrorMsg);
}
},
),
),
],
),
),
),
),
SizedBox(
height: 5,
),
],
),
)),
),)
);
}
@ -452,6 +381,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
setState(() {
isAddProgress = false;
model.isAddProgress = false;
});
}
}
@ -460,4 +390,20 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);
}
}
@override
nextFunction(model) {
print("dfdfdf");
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(
TranslationBase.of(context)
.progressNoteErrorMsg);
}
}
}

@ -49,7 +49,7 @@ class _AddMedicationState extends State<AddMedication> {
GetMedicationResponseModel _selectedMedication;
GlobalKey key =
new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
bool isFormSubmitted = false;
@override
@ -57,387 +57,440 @@ class _AddMedicationState extends State<AddMedication> {
ProjectViewModel projectViewModel = Provider.of(context);
return FractionallySizedBox(
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.medicationStrengthList.length == 0) {
await model.getMasterLookup(
MasterKeysService.MedicationStrength,
);
}
if (model.medicationFrequencyList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationFrequency);
}
if (model.medicationDoseTimeList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationDoseTime);
}
if (model.medicationRouteList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationRoute);
}
if (model.allMedicationList.length == 0)
await model.getMedicationList();
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(
title: TranslationBase.of(context).addMedication,
),
body: Center(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
onModelReady: (model) async {
if (model.medicationStrengthList.length == 0) {
await model.getMasterLookup(
MasterKeysService.MedicationStrength,
);
}
if (model.medicationFrequencyList.length == 0) {
await model.getMasterLookup(
MasterKeysService.MedicationFrequency);
}
if (model.medicationDoseTimeList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationDoseTime);
}
if (model.medicationRouteList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationRoute);
}
if (model.allMedicationList.length == 0)
await model.getMedicationList();
},
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(
title: TranslationBase
.of(context)
.addMedication,
),
body: Center(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
Expanded(
child: FractionallySizedBox(
widthFactor: 0.9,
child: SingleChildScrollView(
child: Column(
widthFactor: 0.9,
child: SingleChildScrollView(
child: Column(
children: [
SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?2:SizeConfig.isHeightShort?2:2),
),
Container(
// height: screenSize.height * 0.070,
child: InkWell(
onTap: model.allMedicationList != null
? () {
setState(() {
_selectedMedication = null;
});
}
: null,
child: _selectedMedication == null
? CustomAutoCompleteTextField(
isShowError: isFormSubmitted &&
_selectedMedication == null,
child: AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: TextFieldsUtils
.textFieldSelectorDecoration(
TranslationBase.of(
context)
.searchMedicineNameHere,
null,
true,
suffixIcon:
Icons.search),
itemSubmitted: (item) =>
setState(() =>
_selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: AppText(suggestion
.description +
'/' +
suggestion
.genericName),
padding:
EdgeInsets.all(
8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion,
input) =>
suggestion.genericName.toLowerCase().startsWith(input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input
.toLowerCase()),
),
)
: AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
hintText: _selectedMedication !=
null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: TranslationBase.of(
context)
.searchMedicineNameHere,
minLines: 1,
maxLines: 1,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.grey.shade600,
)),
enabled: false,
),
),
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
onClick: model.medicationDoseTimeList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationDoseTimeList,
okText:
TranslationBase.of(context)
.ok,
selectedValue:
_selectedMedicationDose,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationDose =
selectedValue;
SizedBox(
height: SizeConfig.heightMultiplier * (
SizeConfig.isHeightVeryShort ?2:SizeConfig.isHeightShort?
2:2),
),
Container(
// height: screenSize.height * 0.070,
child: InkWell(
onTap: model.allMedicationList != null
? () {
setState(() {
_selectedMedication = null;
});
}
: null,
child: _selectedMedication == null
? CustomAutoCompleteTextField(
isShowError: isFormSubmitted &&
_selectedMedication == null,
child: AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: TextFieldsUtils
.textFieldSelectorDecoration(
TranslationBase
.of(
context)
.searchMedicineNameHere,
null,
true,
suffixIcon:
Icons.search),
itemSubmitted: (item) =>
setState(() =>
_selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: AppText(suggestion
.description +
'/' +
suggestion
.genericName),
padding:
EdgeInsets.all(
8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion,
input) =>
suggestion.genericName.toLowerCase()
.startsWith(input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input
.toLowerCase()),
),
)
: AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
hintText: _selectedMedication !=
null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: TranslationBase
.of(
context)
.searchMedicineNameHere,
minLines: 1,
maxLines: 1,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.grey.shade600,
)),
enabled: false,
),
),
),
doseController
.text = projectViewModel
.isArabic
? _selectedMedicationDose
.nameAr
: _selectedMedicationDose
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).doseTime,
maxLines: 1,
minLines: 1,
isTextFieldHasSuffix: true,
controller: doseController,
validationError: isFormSubmitted &&
_selectedMedicationDose == null
? TranslationBase.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
isTextFieldHasSuffix: true,
onClick: model.medicationStrengthList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationStrengthList,
okText:
TranslationBase.of(context)
.ok,
selectedValue:
_selectedMedicationStrength,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationStrength =
selectedValue;
if(_selectedMedication != null)
Column(
children: [
SizedBox(
height: 3,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.7,
child: AppText(
_selectedMedication.description +
(' (${_selectedMedication.genericName} )'),
color: Color(0xFF575757),
fontSize: 10,
fontWeight: FontWeight.w700,
letterSpacing: -0.4,
),
),
],
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
onClick: model.medicationDoseTimeList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationDoseTimeList,
okText:
TranslationBase
.of(context)
.ok,
selectedValue:
_selectedMedicationDose,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationDose =
selectedValue;
strengthController
.text = projectViewModel
.isArabic
? _selectedMedicationStrength
.nameAr
: _selectedMedicationStrength
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).strength,
maxLines: 1,
minLines: 1,
controller: strengthController,
validationError: isFormSubmitted &&
_selectedMedicationStrength ==
null
? TranslationBase.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
isTextFieldHasSuffix: true,
onClick: model.medicationRouteList != null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model.medicationRouteList,
selectedValue:
_selectedMedicationRoute,
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationRoute =
selectedValue;
doseController
.text = projectViewModel
.isArabic
? _selectedMedicationDose
.nameAr
: _selectedMedicationDose
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase
.of(context)
.doseTime,
maxLines: 1,
minLines: 1,
isTextFieldHasSuffix: true,
controller: doseController,
validationError: isFormSubmitted &&
_selectedMedicationDose == null
? TranslationBase
.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
isTextFieldHasSuffix: true,
onClick: model.medicationStrengthList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationStrengthList,
okText:
TranslationBase
.of(context)
.ok,
selectedValue:
_selectedMedicationStrength,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationStrength =
selectedValue;
routeController
.text = projectViewModel
.isArabic
? _selectedMedicationRoute
.nameAr
: _selectedMedicationRoute
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).route,
maxLines: 1,
minLines: 1,
controller: routeController,
validationError: isFormSubmitted &&
_selectedMedicationRoute == null
? TranslationBase.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
onClick: model.medicationFrequencyList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationFrequencyList,
okText:
TranslationBase.of(context)
.ok,
selectedValue:
_selectedMedicationFrequency,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationFrequency =
selectedValue;
strengthController
.text = projectViewModel
.isArabic
? _selectedMedicationStrength
.nameAr
: _selectedMedicationStrength
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase
.of(context)
.strength,
maxLines: 1,
minLines: 1,
controller: strengthController,
validationError: isFormSubmitted &&
_selectedMedicationStrength ==
null
? TranslationBase
.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
isTextFieldHasSuffix: true,
onClick: model.medicationRouteList != null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model.medicationRouteList,
selectedValue:
_selectedMedicationRoute,
okText:
TranslationBase
.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationRoute =
selectedValue;
frequencyController
.text = projectViewModel
.isArabic
? _selectedMedicationFrequency
.nameAr
: _selectedMedicationFrequency
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).frequency,
enabled: false,
maxLines: 1,
minLines: 1,
isTextFieldHasSuffix: true,
controller: frequencyController,
validationError: isFormSubmitted &&
_selectedMedicationFrequency ==
null
? TranslationBase.of(context)
.emptyMessage
: null,
),
SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?20:SizeConfig.isHeightShort?15:10),
),
routeController
.text = projectViewModel
.isArabic
? _selectedMedicationRoute
.nameAr
: _selectedMedicationRoute
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase
.of(context)
.route,
maxLines: 1,
minLines: 1,
controller: routeController,
validationError: isFormSubmitted &&
_selectedMedicationRoute == null
? TranslationBase
.of(context)
.emptyMessage
: null,
),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
onClick: model.medicationFrequencyList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model
.medicationFrequencyList,
okText:
TranslationBase
.of(context)
.ok,
selectedValue:
_selectedMedicationFrequency,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationFrequency =
selectedValue;
],
),
)),
frequencyController
.text = projectViewModel
.isArabic
? _selectedMedicationFrequency
.nameAr
: _selectedMedicationFrequency
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase
.of(context)
.frequency,
enabled: false,
maxLines: 1,
minLines: 1,
isTextFieldHasSuffix: true,
controller: frequencyController,
validationError: isFormSubmitted &&
_selectedMedicationFrequency ==
null
? TranslationBase
.of(context)
.emptyMessage
: null,
),
SizedBox(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : SizeConfig
.isHeightShort ? 15 : 10),
),
],
),
]),
)),
),
),
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)
: BottomSheetDialogButton(
label:
TranslationBase.of(context).addMedication,
onTap: () {
setState(() {
isFormSubmitted = true;
});
if (_selectedMedication != null &&
_selectedMedicationDose != null &&
_selectedMedicationStrength != null &&
_selectedMedicationRoute != null &&
_selectedMedicationFrequency != null) {
widget.medicationController.text = widget
.medicationController.text +
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
Navigator.of(context).pop();
}
},
)),
),
]),
),
),
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)
: BottomSheetDialogButton(
label:
TranslationBase.of(context).addMedication,
onTap: () {
setState(() {
isFormSubmitted = true;
});
if (_selectedMedication != null &&
_selectedMedicationDose != null &&
_selectedMedicationStrength != null &&
_selectedMedicationRoute != null &&
_selectedMedicationFrequency != null) {
widget.medicationController.text = widget
.medicationController.text +
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
Navigator.of(context).pop();
}
},
)
)
,
)
,
);
}
}

@ -0,0 +1,3 @@
abstract class SubjectiveCallBack{
Function nextFunction(model);
}

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/patients/profile/soap_update/soap_utils.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjectiveCallBack.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -46,7 +47,8 @@ class UpdateSubjectivePage extends StatefulWidget {
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
}
class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
implements SubjectiveCallBack {
bool isChiefExpand = false;
bool isHistoryExpand = false;
bool isAllergiesExpand = false;
@ -208,7 +210,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
onModelReady: (model) async {
myAllergiesList.clear();
myHistoryList.clear();
model.setSubjectiveCallBack(this);
GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN,
@ -270,7 +272,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
),
SizedBox(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 4 : 2),
(SizeConfig.isHeightVeryShort ? 4 : 2),
),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).histories,
@ -312,57 +314,14 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isAllergiesExpand,
),
SizedBox(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : 10),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : 10),
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
color: Colors.red[700],
onPressed: () async {
addSubjectiveInfo(
model: model,
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList);
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
),
),
);
}
@ -371,7 +330,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
{SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList,
List<MySelectedHistory> myHistoryList}) async {
if (FocusScope.of(context).hasFocus) FocusScope.of(context).unfocus();
widget.changeLoadingState(true);
formKey.currentState.save();
@ -380,50 +338,54 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
complaintsControllerError = '';
medicationControllerError = '';
illnessControllerError = '';
if (complaintsController.text.isNotEmpty &&
illnessController.text.isNotEmpty &&
complaintsController.text.length > 25) {
await postChiefComplaint(model: model);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
widget.changeLoadingState(true);
widget.changePageViewIndex(1);
} else {
setState(() {
if (complaintsController.text.isEmpty) {
complaintsControllerError = TranslationBase.of(context).emptyMessage;
} else if (complaintsController.text.length < 25) {
complaintsControllerError =
TranslationBase.of(context).chiefComplaintLength;
}
if (illnessController.text.isEmpty) {
illnessControllerError = TranslationBase.of(context).emptyMessage;
}
if (medicationController.text.isEmpty) {
medicationControllerError = TranslationBase.of(context).emptyMessage;
}
});
widget.changeLoadingState(false);
Helpers.showErrorToast(
TranslationBase.of(context).chiefComplaintErrorMsg);
}
///TODO Elham*
///
widget.changePageViewIndex(1);
// if (complaintsController.text.isNotEmpty &&
// illnessController.text.isNotEmpty &&
// complaintsController.text.length > 25) {
// await postChiefComplaint(model: model);
// if (model.state == ViewState.ErrorLocal) {
// Helpers.showErrorToast(model.error);
// }
// if (myHistoryList.length != 0) {
// await postHistories(model: model, myHistoryList: myHistoryList);
// if (model.state == ViewState.ErrorLocal) {
// Helpers.showErrorToast(model.error);
// }
// }
// if (myAllergiesList.length != 0) {
// await postAllergy(myAllergiesList: myAllergiesList, model: model);
// if (model.state == ViewState.ErrorLocal) {
// Helpers.showErrorToast(model.error);
// }
// }
// widget.changeLoadingState(true);
//
// widget.changePageViewIndex(1);
// } else {
// setState(() {
// if (complaintsController.text.isEmpty) {
// complaintsControllerError = TranslationBase.of(context).emptyMessage;
// } else if (complaintsController.text.length < 25) {
// complaintsControllerError =
// TranslationBase.of(context).chiefComplaintLength;
// }
//
// if (illnessController.text.isEmpty) {
// illnessControllerError = TranslationBase.of(context).emptyMessage;
// }
//
// if (medicationController.text.isEmpty) {
// medicationControllerError = TranslationBase.of(context).emptyMessage;
// }
// });
//
// widget.changeLoadingState(false);
// Helpers.showErrorToast(
// TranslationBase.of(context).chiefComplaintErrorMsg);
// }
}
postAllergy(
@ -528,4 +490,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}
}
}
@override
Function nextFunction(model) {
addSubjectiveInfo(
model: model,
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList);
}
}

@ -1,3 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
@ -6,10 +9,13 @@ import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_histor
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/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'assessment/update_assessment_page.dart';
import 'objective/update_objective_page.dart';
@ -31,10 +37,8 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
List<MySelectedAllergy> myAllergiesList = List();
List<MySelectedHistory> myHistoryList = List();
changePageViewIndex(pageIndex,{isChangeState = true}) {
if (pageIndex != _currentIndex && isChangeState)
changeLoadingState(true);
changePageViewIndex(pageIndex, {isChangeState = true}) {
if (pageIndex != _currentIndex && isChangeState) changeLoadingState(true);
_controller.jumpToPage(pageIndex);
setState(() {
_currentIndex = pageIndex;
@ -60,65 +64,244 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return AppScaffold(
isLoading: _isLoading,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.73,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState)
],
),
)
],
return BaseView<SOAPViewModel>(
builder: (_,model,w)=>AppScaffold(
isLoading: _isLoading,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.73,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState)
],
),
)
],
),
),
],
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
],
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: getBottomSheet(model)
),
),
SizedBox(
height: 5,
),
],
),
),
),
);
}
Widget getBottomSheet(SOAPViewModel model) {
switch (_currentIndex) {
case 0:
{
return Center(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
color: Colors.red[700],
onPressed: () async {
model.nextOnSubjectPage(model);
},
),
);
}
break;
case 1:
{
return Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
changePageViewIndex(0);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await model.nextOnObjectivePage(model);
},
),
),
],
),
);
}
break;
case 2:
{
return Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
changePageViewIndex(1);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
model.nextOnAssessmentPage(model);
},
),
),
],
),
);
}
break;
case 3:
{
return Center(
child: Row(
children: [
Expanded(
child: AppButton(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
changePageViewIndex(2);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
title: model.isAddProgress
? TranslationBase.of(context).next
: TranslationBase.of(context).finish,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.progressNoteText.isEmpty,
onPressed: () async {
model.nextOnPlanPage(model);
},
),
),
],
),
);
}
break;
}
}
}

@ -552,6 +552,6 @@ class PatientProfileAppBar extends StatelessWidget
@override
Size get preferredSize =>
Size(double.maxFinite, height == 0
? isInpatient ? (isFromLabResult?200:170) : isAppointmentHeader ? 290 : SizeConfig.isHeightVeryShort?137:SizeConfig.isHeightShort?180: SizeConfig.heightMultiplier * (SizeConfig.isWidthLarge?25:20)
? isInpatient ? (isFromLabResult?200:190) : isAppointmentHeader ? 290 : SizeConfig.isHeightVeryShort?137:SizeConfig.isHeightShort?190: SizeConfig.heightMultiplier * (SizeConfig.isWidthLarge?25:20)
: height);
}

Loading…
Cancel
Save