Merge branch 'soap_refactor' into 'development'

Soap refactor

See merge request Cloud_Solution/doctor_app_flutter!513
merge-requests/515/merge
Mohammad Aljammal 4 years ago
commit 43c254de05

@ -21,7 +21,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode
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/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'base/lookup-service.dart';

@ -25,7 +25,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode
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/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
@ -13,14 +12,13 @@ import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_
import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/live_care/video_call.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart';
import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart';
import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart';
@ -28,7 +26,6 @@ import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart';
import './screens/auth/verify_account_screen.dart';
import './screens/blood_bank_screen.dart';
import 'screens/home/home_screen.dart';
import './screens/doctor/message_screen.dart';
import './screens/doctor/my_schedule_screen.dart';
import './screens/doctor/services_screen.dart';

@ -12,8 +12,8 @@ import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dar
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/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
@ -24,7 +24,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../custom_validation_error.dart';
import '../../../../../widgets/shared/user-guid/custom_validation_error.dart';
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
@ -74,7 +74,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (widget.mySelectedAssessment.selectedICD != null)
icdNameController.text = widget.mySelectedAssessment.selectedICD.code;
}
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{IconData icon}) {
@ -143,31 +142,15 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 55.0,
hintText:
TranslationBase.of(context).appointmentNumber,
//fontSize: 13.5,
// hintColor: Colors.black,
//hasLabelText: appointmentIdController.text != ''
// ? true
// : false,
//showLabelText: true,
//fontWeight: FontWeight.w600,
//readOnly: true,
isDropDown: false,
enabled: false,
controller: appointmentIdController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
),
SizedBox(
height: 10,
),
Container(
// height: 60.0,
child: InkWell(
onTap: model.listOfICD10 != null
? () {
@ -284,25 +267,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
);
}
: null,
//hasLabelText:
// conditionController.text != '' ? true : false,
//showLabelText: true,
hintText: TranslationBase.of(context).condition,
//fontSize: 13.5,
//readOnly: true,
//suffixIcon: EvaIcons.arrowDown,
// hintColor: Colors.black,
//fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: conditionController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
isDropDown: true,
enabled: false,
),
@ -324,8 +292,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction:
(MasterKeyModel selectedValue) {
setState(() {
// _selectedDiagnosisType =
// selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
selectedValue;
@ -345,28 +311,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
);
}
: null,
//hasLabelText:
// typeController.text != '' ? true : false,
//prefixIcon: Icon(Icons.add),
//showLabelText: true,
hintText: TranslationBase.of(context).dType,
//fontSize: 13.5,
//readOnly: true,
// hintColor: Colors.black,
//suffixIcon: EvaIcons.arrowDown,
//fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
enabled: false,
isDropDown: true,
controller: typeController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
),
if (isFormSubmitted &&
widget.mySelectedAssessment
@ -381,7 +331,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextFields(
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
@ -518,12 +467,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
mySelectedAssessment.doctorName = doctorProfile.doctorName;
if (!isUpdate) {
// widget.mySelectedAssessmentList.add(mySelectedAssessment);
widget.addSelectedAssessment(mySelectedAssessment, isUpdate);
}
Navigator.of(context).pop();
}
// widget.changePageViewIndex(3);
}
}

@ -18,11 +18,12 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart';
import '../SOAP_step_header.dart';
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 '../expandable_SOAP_widget.dart';
// ignore: must_be_immutable
class UpdateAssessmentPage extends StatefulWidget {
final Function changePageViewIndex;
List<MySelectedAssessment> mySelectedAssessmentList;
@ -107,7 +108,6 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -0,0 +1,148 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'examinations_list_search_widget.dart';
class AddExaminationPage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
AddExaminationPage(
{this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination});
@override
_AddExaminationPageState createState() => _AddExaminationPageState();
}
class _AddExaminationPageState extends State<AddExaminationPage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding:
EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).addExamination}",
fontSize: SizeConfig.textMultiplier * 3.3,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
size: 40,
),
)
],
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(16.0),
padding: EdgeInsets.all(0.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
child: Column(
children: [
ExaminationsListSearchWidget(
masterList: model.physicalExaminationList,
isServiceSelected: (master) =>
isServiceSelected(master),
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (selectedExamination) {
setState(() {
widget.mySelectedExamination
.add(selectedExamination);
});
},
),
],
),
),
],
),
),
),
Container(
padding: EdgeInsets.all(16),
color: Colors.white,
child: BorderedButton(
"${TranslationBase.of(context).addExamination}",
backgroundColor: HexColor("#359846"),
textColor: Colors.white,
vPadding: 12,
radius: 12,
fontWeight: FontWeight.w600,
fontSize: SizeConfig.textMultiplier * 2.5,
fontFamily: 'Poppins',
handler: () {
widget.addSelectedExamination();
},
),
)
],
),
),
);
}
isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) {
return true;
}
return false;
}
}

@ -1,254 +1,17 @@
// ignore: must_be_immutable
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
// Author Mosa Abuzaid
class AddExaminationPage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
AddExaminationPage(
{this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination});
@override
_AddExaminationPageState createState() => _AddExaminationPageState();
}
class _AddExaminationPageState extends State<AddExaminationPage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding:
EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).addExamination}",
fontSize: SizeConfig.textMultiplier * 3.3,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
size: 40,
),
)
],
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(16.0),
padding: EdgeInsets.all(0.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
child: Column(
children: [
ExaminationsListSearchWidget(
masterList: model.physicalExaminationList,
isServiceSelected: (master) =>
isServiceSelected(master),
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (selectedExamination) {
setState(() {
widget.mySelectedExamination
.add(selectedExamination);
});
},
),
],
),
),
],
),
),
),
Container(
padding: EdgeInsets.all(16),
color: Colors.white,
child: BorderedButton(
"${TranslationBase.of(context).addExamination}",
backgroundColor: HexColor("#359846"),
textColor: Colors.white,
vPadding: 12,
radius: 12,
fontWeight: FontWeight.w600,
fontSize: SizeConfig.textMultiplier * 2.5,
fontFamily: 'Poppins',
handler: () {
widget.addSelectedExamination();
},
),
)
],
),
),
);
}
isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) {
return true;
}
return false;
}
}
class ExaminationsListSearchWidget extends StatefulWidget {
final Function(MasterKeyModel) removeHistory;
final Function(MySelectedExamination) addHistory;
final bool Function(MasterKeyModel) isServiceSelected;
final List<MasterKeyModel> masterList;
ExaminationsListSearchWidget(
{this.removeHistory,
this.addHistory,
this.isServiceSelected,
this.masterList});
@override
_ExaminationsListSearchWidgetState createState() =>
_ExaminationsListSearchWidgetState();
}
class _ExaminationsListSearchWidgetState
extends State<ExaminationsListSearchWidget> {
int expandedIndex = -1;
List<MasterKeyModel> items = List();
TextEditingController filteredSearchController = TextEditingController();
@override
void initState() {
items.addAll(widget.masterList);
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.080,
hintText: TranslationBase.of(context).searchExamination,
isDropDown: true,
hasBorder: false,
controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
DividerWithSpacesAround(
height: 2,
),
...items.mapIndexed((index, item) {
return AddExaminationWidget(
item: item,
addHistory: widget.addHistory,
removeHistory: widget.removeHistory,
isServiceSelected: widget.isServiceSelected,
isExpand: index == expandedIndex,
expandClick: () {
setState(() {
if (expandedIndex == index) {
expandedIndex = -1;
} else {
expandedIndex = index;
}
});
},
);
}).toList(),
],
);
}
void filterSearchResults(String query) {
List<MasterKeyModel> dummySearchList = List();
dummySearchList.addAll(widget.masterList);
if (query.isNotEmpty) {
List<MasterKeyModel> dummyListData = List();
dummySearchList.forEach((item) {
if (item.nameAr.toLowerCase().contains(query.toLowerCase()) ||
item.nameEn.toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item);
}
});
setState(() {
items.clear();
items.addAll(dummyListData);
});
return;
} else {
setState(() {
items.clear();
items.addAll(widget.masterList);
});
}
}
}
// ignore: must_be_immutable
class AddExaminationWidget extends StatefulWidget {
MasterKeyModel item;
final Function(MasterKeyModel) removeHistory;
@ -277,10 +40,10 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
@override
void initState() {
examination.selectedExamination = widget.item;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -481,7 +244,7 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
onChanged: (value) {
examination.remark = value;
},
),
@ -494,13 +257,3 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
);
}
}
extension FicListExtension<T> on List<T> {
/// Maps each element of the list.
/// The [map] function gets both the original [item] and its [index].
Iterable<E> mapIndexed<E>(E Function(int index, T item) map) sync* {
for (var index = 0; index < length; index++) {
yield map(index, this[index]);
}
}
}

@ -6,11 +6,11 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ExaminationIitemCard extends StatelessWidget {
class ExaminationItemCard extends StatelessWidget {
final MySelectedExamination examination;
final Function removeExamination;
ExaminationIitemCard(this.examination, this.removeExamination);
ExaminationItemCard(this.examination, this.removeExamination);
@override
Widget build(BuildContext context) {

@ -0,0 +1,115 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:flutter/material.dart';
import 'add_examination_widget.dart';
class ExaminationsListSearchWidget extends StatefulWidget {
final Function(MasterKeyModel) removeHistory;
final Function(MySelectedExamination) addHistory;
final bool Function(MasterKeyModel) isServiceSelected;
final List<MasterKeyModel> masterList;
ExaminationsListSearchWidget(
{this.removeHistory,
this.addHistory,
this.isServiceSelected,
this.masterList});
@override
_ExaminationsListSearchWidgetState createState() =>
_ExaminationsListSearchWidgetState();
}
class _ExaminationsListSearchWidgetState
extends State<ExaminationsListSearchWidget> {
int expandedIndex = -1;
List<MasterKeyModel> items = List();
TextEditingController filteredSearchController = TextEditingController();
@override
void initState() {
items.addAll(widget.masterList);
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.080,
hintText: TranslationBase.of(context).searchExamination,
isDropDown: true,
hasBorder: false,
controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
DividerWithSpacesAround(
height: 2,
),
...items.mapIndexed((index, item) {
return AddExaminationWidget(
item: item,
addHistory: widget.addHistory,
removeHistory: widget.removeHistory,
isServiceSelected: widget.isServiceSelected,
isExpand: index == expandedIndex,
expandClick: () {
setState(() {
if (expandedIndex == index) {
expandedIndex = -1;
} else {
expandedIndex = index;
}
});
},
);
}).toList(),
],
);
}
void filterSearchResults(String query) {
List<MasterKeyModel> dummySearchList = List();
dummySearchList.addAll(widget.masterList);
if (query.isNotEmpty) {
List<MasterKeyModel> dummyListData = List();
dummySearchList.forEach((item) {
if (item.nameAr.toLowerCase().contains(query.toLowerCase()) ||
item.nameEn.toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item);
}
});
setState(() {
items.clear();
items.addAll(dummyListData);
});
return;
} else {
setState(() {
items.clear();
items.addAll(widget.masterList);
});
}
}
}
extension FicListExtension<T> on List<T> {
/// Maps each element of the list.
/// The [map] function gets both the original [item] and its [index].
Iterable<E> mapIndexed<E>(E Function(int index, T item) map) sync* {
for (var index = 0; index < length; index++) {
yield map(index, this[index]);
}
}
}

@ -1,5 +1,4 @@
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/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -19,18 +18,17 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import 'examination-item-card.dart';
import 'objective-add-examination-page.dart';
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_examination_page.dart';
import 'examination_item_card.dart';
class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex;
final Function changeLoadingState;
final int currentIndex;
final int currentIndex;
final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo;
@ -63,9 +61,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.mySelectedExamination.clear();
@ -103,7 +98,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
@ -130,8 +124,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationIitemCard(examination, () {
removeExamination(examination.selectedExamination);
return ExaminationItemCard(examination, () {
removeExamination(
examination.selectedExamination);
});
}).toList(),
)
@ -234,7 +229,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
@ -263,10 +257,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changePageViewIndex(2);
}
} else {
// widget.changeLoadingState(true);
//
// widget.changePageViewIndex(2);
helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
}
}

@ -19,8 +19,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'SOAP_step_header.dart';
import 'expandable_SOAP_widget.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex;
@ -99,7 +99,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -34,7 +33,7 @@ class SOAPStepHeader extends StatelessWidget {
child: StepsWidget(
index: currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17,
height: 100,
),
),
SizedBox(

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class BottomSheetTitle extends StatelessWidget {
const BottomSheetTitle({

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -42,7 +41,6 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
if(isRequired)

@ -13,7 +13,6 @@ class StepsWidget extends StatelessWidget {
StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0});
// TODO : Add translation to name
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -24,7 +23,6 @@ class StepsWidget extends StatelessWidget {
height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent,
// child:,
),
Positioned(
top: 30
@ -245,7 +243,6 @@ class StepsWidget extends StatelessWidget {
AppText(
"Plan",
fontWeight: FontWeight.bold,
// textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(

@ -12,9 +12,8 @@ import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_all
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../bottom_sheet_title.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
class AddAllergies extends StatefulWidget {
final Function addAllergiesFun;
@ -30,8 +29,6 @@ class AddAllergies extends StatefulWidget {
class _AddAllergiesState extends State<AddAllergies> {
List<MasterKeyModel> allergiesList;
List<MasterKeyModel> allergySeverityList;
MasterKeyModel _selectedAllergySeverity;
MasterKeyModel _selectedAllergy;
TextEditingController remarkController = TextEditingController();
TextEditingController severityController = TextEditingController();
TextEditingController allergyController = TextEditingController();
@ -74,8 +71,6 @@ class _AddAllergiesState extends State<AddAllergies> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final screenSize = MediaQuery.of(context).size;
return FractionallySizedBox(
heightFactor: 1,
child: BaseView<SOAPViewModel>(
@ -121,8 +116,8 @@ class _AddAllergiesState extends State<AddAllergies> {
},
addAllergy:
(MySelectedAllergy mySelectedAllergy) {
AddAllergyLocally(mySelectedAllergy);
},
addAllergyLocally(mySelectedAllergy);
},
addSelectedAllergy: () => widget
.addAllergiesFun(myAllergiesListLocal),
isServiceSelected: (master) =>
@ -210,33 +205,29 @@ class _AddAllergiesState extends State<AddAllergies> {
return null;
}
AddAllergyLocally(MySelectedAllergy mySelectedAllergy) {
addAllergyLocally(MySelectedAllergy mySelectedAllergy) {
if (mySelectedAllergy.selectedAllergy == null) {
helpers.showErrorToast(TranslationBase.of(context).requiredMsg);
helpers.showErrorToast(TranslationBase
.of(context)
.requiredMsg);
} else {
setState(() {
List<MySelectedAllergy> allergy =
// ignore: missing_return
myAllergiesListLocal
.where((element) =>
mySelectedAllergy.selectedAllergy.id ==
element.selectedAllergy.id)
// ignore: missing_return
myAllergiesListLocal
.where((element) =>
mySelectedAllergy.selectedAllergy.id ==
element.selectedAllergy.id)
.toList();
if (allergy.isEmpty) {
myAllergiesListLocal.add(mySelectedAllergy);
// Navigator.of(context).pop();
} else {
allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy;
allergy.first.selectedAllergySeverity =
mySelectedAllergy.selectedAllergySeverity;
allergy.first.remark = mySelectedAllergy.remark;
allergy.first.isChecked = mySelectedAllergy.isChecked;
// Navigator.of(context).pop();
// helpers.showErrorToast(TranslationBase
// .of(context)
// .itemExist);
}
});
}

@ -1,28 +1,18 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_allergies.dart';
// ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget {
List<MySelectedAllergy> myAllergiesList;
@ -77,7 +67,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn
.toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
@ -90,11 +79,9 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
: selectedAllergy.selectedAllergySeverity
.nameEn
.toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: Color(0xFFCC9B14)),
],
),

@ -1,10 +1,10 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/medication/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../custom_validation_error.dart';
import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart';
import '../medication/update_medication_widget.dart';
class UpdateChiefComplaints extends StatelessWidget {
const UpdateChiefComplaints({

@ -11,8 +11,8 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../bottom_sheet_title.dart';
import 'PriorityBar.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
import 'priority_bar.dart';
class AddHistoryDialog extends StatefulWidget {
final Function changePageViewIndex;
@ -74,7 +74,6 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
controller: widget.controller,
onPageChanged: (index) {
setState(() {
// currentIndex = index;
});
},
scrollDirection: Axis.horizontal,

@ -69,7 +69,7 @@ class _PriorityBarState extends State<PriorityBar> {
style: TextStyle(
fontSize: 14,
color: Colors.black, //Colors.black,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),

@ -1,26 +1,14 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import 'PriorityBar.dart';
import '../bottom_sheet_title.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_history_dialog.dart';
class UpdateHistoryWidget extends StatefulWidget {
@ -35,7 +23,6 @@ class UpdateHistoryWidget extends StatefulWidget {
class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 0;
changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex);
@ -80,7 +67,6 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: Colors.black),
width: MediaQuery
.of(context)
@ -101,9 +87,7 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
),
Icon(
FontAwesomeIcons.times,

@ -17,9 +17,10 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../custom_validation_error.dart';
import '../bottom_sheet_title.dart';
import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
// ignore: must_be_immutable
class AddMedication extends StatefulWidget {
final Function addMedicationFun;
TextEditingController medicationController;
@ -37,7 +38,6 @@ class _AddMedicationState extends State<AddMedication> {
MasterKeyModel _selectedMedicationRoute;
MasterKeyModel _selectedMedicationFrequency;
MasterKeyModel _selectedAllergy;
TextEditingController doseController = TextEditingController();
TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController();
@ -243,7 +243,6 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).doseTime,
//TODO add translation
maxLines: 2,
minLines: 2,
isDropDown: true,
@ -294,8 +293,6 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).strength,
// hintColor: Colors.black,
// fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 2,
controller: strengthController,
@ -391,9 +388,7 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).frequency,
//TODO add translation
enabled: false,
// hintColor: Colors.black,
maxLines: 2,
minLines: 2,
isDropDown: true,

@ -0,0 +1,54 @@
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_medication.dart';
class UpdateMedicationWidget extends StatefulWidget {
final TextEditingController medicationController;
UpdateMedicationWidget({
Key key,
this.medicationController,
});
@override
_UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState();
}
class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
@override
Widget build(BuildContext context) {
return Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)
],
);
}
openMedicationList(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
isDismissible: false,
context: context,
builder: (context) {
return AddMedication(
addMedicationFun: (MySelectedAllergy mySelectedAllergy) {},
medicationController: widget.medicationController,
);
});
}
}

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
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/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -17,18 +16,16 @@ 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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/history/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import '../steps_widget.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'allergies/update_allergies_widget.dart';
import 'history/update_history_widget.dart';
import 'cheif_complaints/update_Chief_complaints.dart';
class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex;
@ -228,7 +225,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -485,7 +481,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
//TODO: make static value dynamic
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -514,7 +509,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save();
if(formKey.currentState.validate()){
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
//TODO: make static value dynamic
new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
@ -528,7 +522,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel);
} else {

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/size_config.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/my_selected_allergy.dart';
@ -7,18 +6,15 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart';
import 'assessment/update_assessment_page.dart';
import 'objective/update_objective_page.dart';
import 'plan/update_plan_page.dart';
class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate;
@ -54,7 +50,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
@override
void initState() {
// TODO: implement initState
_controller = new PageController();
super.initState();
@ -72,7 +67,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
PatiantInformtion patient = routeArgs['patient'];
return BaseView<DoctorReplayViewModel>(
builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
isLoading: _isLoading,
isShowAppBar: false,
body: SingleChildScrollView(
@ -88,7 +82,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7',),
Container(
width: double.infinity,

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

@ -1,77 +0,0 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import '../../custom_validation_error.dart';
import '../bottom_sheet_title.dart';
import 'add_medication.dart';
class UpdateMedicationWidget extends StatefulWidget {
final TextEditingController medicationController;
UpdateMedicationWidget({
Key key,
this.medicationController,
});
@override
_UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState();
}
class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)
],
);
}
openMedicationList(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
isDismissible: false,
context: context,
builder: (context) {
return AddMedication(
addMedicationFun: (MySelectedAllergy mySelectedAllergy) {},
medicationController: widget.medicationController,
);
});
}
}

@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';

Loading…
Cancel
Save