Merge branch 'Stepper_header' into 'development'

Stepper header

See merge request Cloud_Solution/doctor_app_flutter!484
merge-requests/485/merge
Mohammad Aljammal 4 years ago
commit 8ed9b3c023

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

@ -287,7 +287,7 @@ const Map<String, Map<String, String>> localizedValues = {
'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'},
'previous': {'en': 'PREVIOUS', 'ar': 'السابق'},
'previous': {'en': 'Previous', 'ar': 'السابق'},
'healthRecordInformation': {
'en': 'HEALTH RECORD INFORMATION',
'ar': 'معلومات السجل الصحي'
@ -596,8 +596,8 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "The verification code expires in",
"ar": "تنتهي صلاحية رمز التحقق خلال"
},
'addAssessment': {'en': "Add ASSESSMENT", 'ar': "أضف التقييم"},
'assessment': {'en': "ASSESSMENT", 'ar': " التقييم"},
'addAssessment': {'en': "Add Assessment", 'ar': "أضف التقييم"},
'assessment': {'en': "Assessment", 'ar': " التقييم"},
'physicalSystemExamination': {
'en': "Physical System / Examination",
'ar': "الفحص البدني / النظام"
@ -848,8 +848,8 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "هذه الخانة مطلوبه"
},
"applyOrRescheduleLeave": {
"en": "Apply Or Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة"
"en": "Apply Reschedule Leave",
"ar": "التقدم بطلب إعادة جدولة الإجازة"
},"myQRCode": {
"en": "My QR Code",
"ar": "My QR Code"

@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';

@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';

@ -0,0 +1,48 @@
class PatchAssessmentReqModel {
int patientMRN;
int appointmentNo;
int episodeID;
String icdcode10Id;
String prevIcdCode10ID;
int conditionId;
int diagnosisTypeId;
bool complexDiagnosis;
String remarks;
PatchAssessmentReqModel(
{this.patientMRN,
this.appointmentNo,
this.episodeID,
this.icdcode10Id,
this.prevIcdCode10ID,
this.conditionId,
this.diagnosisTypeId,
this.complexDiagnosis,
this.remarks});
PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
icdcode10Id = json['Icdcode10Id'];
prevIcdCode10ID = json['PrevIcdCode10ID'];
conditionId = json['ConditionId'];
diagnosisTypeId = json['DiagnosisTypeId'];
complexDiagnosis = json['ComplexDiagnosis'];
remarks = json['Remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['Icdcode10Id'] = this.icdcode10Id;
data['PrevIcdCode10ID'] = this.prevIcdCode10ID;
data['ConditionId'] = this.conditionId;
data['DiagnosisTypeId'] = this.diagnosisTypeId;
data['ComplexDiagnosis'] = this.complexDiagnosis;
data['Remarks'] = this.remarks;
return data;
}
}

@ -0,0 +1,62 @@
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';
class SOAPOpenItems extends StatelessWidget {
final Function onTap;
final String label;
const SOAPOpenItems({Key key, this.onTap, this.label}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8, horizontal: 8.0),
margin: EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade400, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(8),
),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"$label",
fontSize:15,
color: Colors.black,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize:13,
color: Colors.grey.shade700,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
);
}
}

@ -19,13 +19,14 @@ class SOAPStepHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 15,),
AppText(
TranslationBase.of(context).createNew,
fontSize: 3 * SizeConfig.textMultiplier,
fontSize: 14,
fontWeight: FontWeight.w500,
),
AppText(TranslationBase.of(context).episode,
fontSize: 3.5 * SizeConfig.textMultiplier,
fontSize: 26,
fontWeight: FontWeight.bold,
),
Container(

@ -0,0 +1,563 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.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';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
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/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';
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/dialogs/master_key_dailog.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../custom_validation_error.dart';
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
final List<MySelectedAssessment> mySelectedAssessmentList;
final Function(MySelectedAssessment mySelectedAssessment, bool isUpdate)
addSelectedAssessment;
final PatiantInformtion patientInfo;
final bool isUpdate;
AddAssessmentDetails(
{Key key,
this.mySelectedAssessment,
this.addSelectedAssessment,
this.patientInfo,
this.isUpdate = false,
this.mySelectedAssessmentList});
@override
_AddAssessmentDetailsState createState() => _AddAssessmentDetailsState();
}
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController();
TextEditingController conditionController = TextEditingController();
TextEditingController typeController = TextEditingController();
TextEditingController icdNameController = TextEditingController();
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
bool isFormSubmitted = false;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
remarkController.text = widget.mySelectedAssessment.remark ?? "";
appointmentIdController.text =
widget.mySelectedAssessment.appointmentId.toString();
if (widget.isUpdate) {
if (widget.mySelectedAssessment.selectedDiagnosisCondition != null)
conditionController.text = projectViewModel.isArabic
? widget.mySelectedAssessment.selectedDiagnosisCondition.nameAr
: widget.mySelectedAssessment.selectedDiagnosisCondition.nameEn;
if (widget.mySelectedAssessment.selectedDiagnosisType != null)
typeController.text = projectViewModel.isArabic
? widget.mySelectedAssessment.selectedDiagnosisType.nameAr
: widget.mySelectedAssessment.selectedDiagnosisType.nameEn;
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}) {
return InputDecoration(
fillColor: Colors.white,
contentPadding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff), width: 1.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff), width: 1.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff), width: 1.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null,
filled: true,
hintStyle: TextStyle(
fontSize: 10,
color: Colors.grey.shade600,
),
);
}
return FractionallySizedBox(
heightFactor: 1,
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
child: Column(
children: [
BottomSheetTitle(
title: TranslationBase.of(context).addAssessmentDetails),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: AppTextFieldCustom(
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: 55.0,
child: InkWell(
onTap: model.listOfICD10 != null
? () {
setState(() {
widget.mySelectedAssessment
.selectedICD = null;
icdNameController.text = null;
});
}
: null,
child: widget
.mySelectedAssessment.selectedICD ==
null
? AutoCompleteTextField<MasterKeyModel>(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.nameOrICD,
widget.mySelectedAssessment
.selectedICD !=
null
? widget.mySelectedAssessment
.selectedICD.nameEn
: null,
true,
icon: Icons.keyboard_arrow_down),
itemSubmitted: (item) => setState(() {
widget.mySelectedAssessment
.selectedICD = item;
icdNameController.text = item.code;
}),
key: key,
suggestions: model.listOfICD10,
itemBuilder: (context, suggestion) =>
new Padding(
child: Texts(suggestion
.description +
" / " +
suggestion.code.toString()),
padding: EdgeInsets.all(8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.code
.toLowerCase()
.startsWith(
input.toLowerCase()),
)
: AppTextFieldCustom(
onClick: model.listOfICD10 != null
? () {
setState(() {
widget.mySelectedAssessment
.selectedICD = null;
icdNameController.text = null;
});
}
: null,
//hasLabelText:
// icdNameController.text != ''
// ? true
// : false,
//showLabelText: true,
hintText: TranslationBase.of(context)
.nameOrICD,
//fontSize: 13.5,
//readOnly: true,
//fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: icdNameController,
//suffixIcon: EvaIcons.search,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
isDropDown: true,
enabled: false,
height: 55.0,
)
// TextField(
// decoration: textFieldSelectorDecoration(
// widget.mySelectedAssessment.selectedICD !=
// null ? widget.mySelectedAssessment
// .selectedICD.code : "Name or ICD",
// widget.mySelectedAssessment.selectedICD !=
// null ? projectViewModel.isArabic
// ? widget.mySelectedAssessment
// .selectedICD.nameAr
// : widget.mySelectedAssessment
// .selectedICD.nameEn : null, true,
// icon: EvaIcons.search),
// enabled: false,
// ),
),
),
if (isFormSubmitted &&
widget.mySelectedAssessment.selectedICD == null)
CustomValidationError(),
SizedBox(
height: 7,
),
AppTextFieldCustom(
height: 55.0,
onClick: model.listOfDiagnosisCondition != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase.of(context).ok,
okFunction:
(MasterKeyModel selectedValue) {
setState(() {
widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue;
conditionController
.text = projectViewModel
.isArabic
? widget
.mySelectedAssessment
.selectedDiagnosisCondition
.nameAr
: widget
.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: 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,
),
if (isFormSubmitted &&
widget.mySelectedAssessment
.selectedDiagnosisCondition ==
null)
CustomValidationError(),
SizedBox(
height: 10,
),
AppTextFieldCustom(
height: 55.0,
onClick: model.listOfDiagnosisType != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisType,
okText: TranslationBase.of(context).ok,
okFunction:
(MasterKeyModel selectedValue) {
setState(() {
// _selectedDiagnosisType =
// selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
selectedValue;
typeController.text =
projectViewModel.isArabic
? selectedValue.nameAr
: selectedValue.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: 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
.selectedDiagnosisType ==
null)
CustomValidationError(),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
hasLabelText:
remarkController.text != '' ? true : false,
showLabelText: true,
controller: remarkController,
onChanged: (value) {
widget.mySelectedAssessment.remark =
remarkController.text;
},
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
])),
),
],
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
color: Colors.green,
title: (widget.isUpdate
? 'Update Assessment Details'
: 'Add Assessment Details'),
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
setState(() {
isFormSubmitted = true;
});
widget.mySelectedAssessment.remark =
remarkController.text;
widget.mySelectedAssessment.appointmentId =
int.parse(appointmentIdController.text);
if (widget.mySelectedAssessment
.selectedDiagnosisCondition !=
null &&
widget.mySelectedAssessment
.selectedDiagnosisType !=
null &&
widget.mySelectedAssessment.selectedICD != null) {
await submitAssessment(
isUpdate: widget.isUpdate,
model: model,
mySelectedAssessment:
widget.mySelectedAssessment);
}
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
),
),
),
);
}
submitAssessment(
{SOAPViewModel model,
MySelectedAssessment mySelectedAssessment,
bool isUpdate = false}) async {
if (isUpdate) {
PatchAssessmentReqModel patchAssessmentReqModel = PatchAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId: mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: mySelectedAssessment.selectedICD.code,
prevIcdCode10ID: mySelectedAssessment.icdCode10ID);
await model.patchAssessment(patchAssessmentReqModel);
} else {
PostAssessmentRequestModel postAssessmentRequestModel =
new PostAssessmentRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
icdCodeDetails: [
new IcdCodeDetails(
remarks: mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId: mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: mySelectedAssessment.selectedICD.code)
]);
await model.postAssessment(postAssessmentRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code;
mySelectedAssessment.doctorName = doctorProfile.doctorName;
if (!isUpdate) {
// widget.mySelectedAssessmentList.add(mySelectedAssessment);
widget.addSelectedAssessment(mySelectedAssessment, isUpdate);
}
Navigator.of(context).pop();
}
// widget.changePageViewIndex(3);
}
}

@ -31,28 +31,35 @@ class ExpandableSOAPWidget extends StatelessWidget {
width: 0.30),
),
child: HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
if(isRequired)
Icon(
FontAwesomeIcons.asterisk,
size: 12,
)
],
),
InkWell(
headerWidget: InkWell(
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: onTap,
child: Row(
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
if(isRequired)
Icon(
FontAwesomeIcons.asterisk,
size: 12,
)
],
),
),
InkWell(
onTap: onTap,
child: Icon(
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline))
],
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline),
)
],
),
),
bodyWidget: child,
isExpand: isExpanded,

@ -36,7 +36,7 @@ class ExaminationIitemCard extends StatelessWidget {
: examination.selectedExamination.nameEn,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
color: Color(0x2B353E),
color: Color(0xFF2B353E),
fontSize: SizeConfig.textMultiplier * 1.8,
),
)),

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.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';
@ -14,19 +13,17 @@ 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/shared/Text.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/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.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 '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import 'examination-item-card.dart';
import 'objective-add-examination-page.dart';
@ -104,205 +101,110 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
// baseViewModel: model,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
color: Color.fromRGBO(248, 248, 248, 1),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.95,
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(12.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(
mainAxisAlignment: MainAxisAlignment.start,
children: [
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).physicalSystemExamination}",
fontFamily: 'Poppins',
fontSize:
SizeConfig.textMultiplier * 2.1,
fontWeight: isSysExaminationExpand
? FontWeight.w700
: FontWeight.normal,
color: Color(0xFF2E303A),
),
Icon(
FontAwesomeIcons.asterisk,
color: Colors.black/*AppGlobal.appPrimaryColor*/,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isSysExaminationExpand =
!isSysExaminationExpand;
});
},
child: Icon(isSysExaminationExpand
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down))
],
),
bodyWidget: Column(
children: [
InkWell(
onTap: () {
openExaminationList(context);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8, horizontal: 8.0),
margin:
EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade400,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(8),
),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).addExamination}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
/* ...List.generate(
widget.mySelectedExamination.length,
(index) => Container(
child: ExaminationIitemCard(
widget.mySelectedExamination[
index], () {
removeExamination(widget
.mySelectedExamination[
index]
.selectedExamination);
}),
)),*/
Column(
children: widget.mySelectedExamination
.map((examination) {
return ExaminationIitemCard(
examination, () {
removeExamination(examination
.selectedExamination);
});
}).toList(),
)
],
),
isExpand: isSysExaminationExpand,
),
],
),
),
),
),
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(
currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle:
TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () {
openExaminationList(context);
},),
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationIitemCard(examination, () {
removeExamination(examination.selectedExamination);
});
}).toList(),
)
],
),
isExpanded: isSysExaminationExpand,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: HexColor("#EAEAEA"),
fontColor: Colors.black,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 10,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal,
color: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? HexColor("#D02127")
: HexColor("#A5A5A5"),
fontColor: widget.mySelectedExamination != null &&
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
width: double.infinity,
child: FractionallySizedBox(
widthFactor: 0.9,
child: Row(
children: [
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width *0.1,
),
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
color: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? Colors.red[700]
: HexColor("#A5A5A5"),
fontColor: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"),
disabled: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? false
: true,
fontWeight: FontWeight.bold,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
disabled: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? false
: true,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
),
],
)));
],
),
),
),
),
);
}
submitUpdateObjectivePage(SOAPViewModel model) async {
@ -462,33 +364,6 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
SizedBox(
height: 16,
),
/*MasterKeyCheckboxSearchWidget(
model: model,
hintSearchText:
TranslationBase.of(context).searchExamination,
buttonName:
TranslationBase.of(context).addExamination,
masterList: model.physicalExaminationList,
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (history) {
setState(() {
MySelectedExamination mySelectedExamination =
new MySelectedExamination(
selectedExamination: history);
widget.mySelectedExamination
.add(mySelectedExamination);
});
},
addSelectedHistories: () {
widget.addSelectedExamination();
},
isServiceSelected: (master) =>
isServiceSelected(master),
),*/
]),
))),
)),

@ -6,10 +6,12 @@ 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/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../bottom_sheet_title.dart';
@ -133,9 +135,48 @@ class _AddAllergiesState extends State<AddAllergies> {
),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.11,
),
]),
),
)),
),bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title:
TranslationBase.of(context).addAllergies,
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addAllergiesFun(myAllergiesListLocal);
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
),),
),
);
}

@ -20,6 +20,7 @@ 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 'add_allergies.dart';
class UpdateAllergiesWidget extends StatefulWidget {
@ -43,61 +44,11 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
return Column(
children: [
InkWell(
onTap: () {
openAllergiesList(context, changeAllState);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8, horizontal: 8.0),
margin:
EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade400,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(8),
),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).addAllergies}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addAllergies}",onTap: () {
openAllergiesList(context, changeAllState);
},),
SizedBox(
height: 20,
),
@ -242,11 +193,11 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
});
if (isAllDataFilled) {
mySelectedAllergy.forEach((element) {
if (!widget.myAllergiesList.contains(element)) {
if (!widget.myAllergiesList.contains(element.selectedAllergySeverity.id)) {
widget.myAllergiesList.add(element);
}
});
// changeParentState();
changeParentState();
Navigator.of(context).pop();
} else {
helpers.showErrorToast(TranslationBase

@ -40,7 +40,7 @@ class BottomSheetTitle extends StatelessWidget {
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 20)),
fontSize: 22)),
],
),
),

@ -65,8 +65,10 @@ class _PriorityBarState extends State<PriorityBar> {
(projectViewModel.isArabic)
? _prioritiesAr[index]
: item,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
color: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),

@ -4,13 +4,15 @@ 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/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../PriorityBar.dart';
import '../bottom_sheet_title.dart';
import 'PriorityBar.dart';
class AddHistoryDialog extends StatefulWidget {
final Function changePageViewIndex;
@ -140,15 +142,55 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
addSelectedHistories: (){
widget.addSelectedHistories();
},
isServiceSelected: (master) =>isServiceSelected(master),
),
),
],
isServiceSelected: (master) =>
isServiceSelected(master),
),
),
],
),
),
),
SizedBox(height:MediaQuery.of(context).size.height * 0.11 ,)
],
)
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title:
TranslationBase.of(context).addSelectedHistories,
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addSelectedHistories();
},
),
),
],
)),
),
),
SizedBox(
height: 5,
),
],
),
),
),
));

@ -18,7 +18,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../PriorityBar.dart';
import '../../SOAP_open_items.dart';
import 'PriorityBar.dart';
import '../bottom_sheet_title.dart';
import 'add_history_dialog.dart';
@ -52,61 +53,11 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
children: [
InkWell(
onTap: () {
openHistoryList(context);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8, horizontal: 8.0),
margin:
EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade400,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(8),
),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).addHistory}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addHistory}",onTap: () {
openHistoryList(context);
},),
SizedBox(
height: 20,
),

@ -21,6 +21,7 @@ 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';
@ -44,53 +45,11 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column(
children: [
InkWell(
onTap: () {
openMedicationList(context);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8, horizontal: 8.0),
margin:
EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey.shade400,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(8),
),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).addMedication}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)

@ -345,7 +345,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w600,
color:Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(

@ -21,8 +21,10 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'SOAP_step_header.dart';
import 'expandable_SOAP_widget.dart';
class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex;
@ -46,6 +48,7 @@ class UpdatePlanPage extends StatefulWidget {
class _UpdatePlanPageState extends State<UpdatePlanPage> {
bool isAddProgress = true;
bool isProgressExpanded = true;
TextEditingController progressNoteController =
TextEditingController(text: null);
@ -101,149 +104,154 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
},
builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
backgroundColor: Colors.grey[200],
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.95,
widthFactor: 0.90,
child: Column(
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
SizedBox(height: 10,),
Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(12.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).progressNote
,
onTap: () {
setState(() {
isProgressExpanded = !isProgressExpanded;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(isAddProgress)
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: Texts(TranslationBase
.of(context)
.progressNote)),
if(isAddProgress)
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
widget.patientProgressNote.planNote = value;
},
),
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
widget.patientProgressNote.planNote = value;
},
),
SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
),
SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Texts('Appointment No: ',fontSize: 12,),
Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
Texts('Appointment No: ',fontSize: 12,),
Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
Row(
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Row(
children: [
Texts('Condition: ',
Texts('Condition: ',
fontSize: 12,),
Texts(
widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
],
),
widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
],
),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Texts(
progressNoteController.text,
fontSize: 10,
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Texts(
progressNoteController.text,
fontSize: 10,
),
InkWell(
onTap: (){
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
InkWell(
onTap: (){
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
],
),
)
],
),
)
],
),
],
),
isExpanded: isProgressExpanded,
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
),
width: double.maxFinite,
height: 90,
child: Padding(
@ -256,10 +264,10 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
children: [
Expanded(
child: AppButton(
title: 'Previous',
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w400,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
setState(() {
@ -272,9 +280,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
Expanded(
child: AppButton(
title: isAddProgress? TranslationBase.of(context).next: "Finish",
fontWeight: FontWeight.w400,
loading: model.state == ViewState.BusyLocal,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
disabled: progressNoteController.text.isEmpty,
onPressed: () async {

@ -89,7 +89,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
PatientProfileHeaderNewDesign(patient, '7', '7',),
Container(
width: double.infinity,
height: 1,

@ -16,6 +16,7 @@ import 'package:provider/provider.dart';
import 'app-textfield-custom.dart';
import 'app_texts_widget.dart';
import 'dialogs/master_key_dailog.dart';
import 'divider_with_spaces_around.dart';
import 'expandable-widget-header-body.dart';
class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget {
@ -77,17 +78,21 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
color: Colors.white),
child: Column(
children: [
TextFields(
hintText: widget.hintSearchText ??
TranslationBase.of(context).selectAllergy,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search,
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.070,
hintText: TranslationBase.of(context).selectAllergy,
isDropDown: true,
hasBorder: false,
// controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
DividerWithSpacesAround(),
SizedBox(
height: 10,
),
@ -240,106 +245,113 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
.arrowIosDownwardOutline))
],
),
bodyWidget: Column(
children: [
AppTextFieldCustom(
onClick: widget.model
.allergySeverityList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: widget.model
.allergySeverityList,
okText:
TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
mySelectedAllergy
.selectedAllergySeverity =
selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
context: context,
builder: (BuildContext
context) {
return dialog;
},
);
}
: null,
isDropDown: true,
hintText:
TranslationBase
.of(context)
.selectSeverity,
enabled: false,
maxLines: 2,
minLines: 2,
controller: severityController,),
SizedBox(
height: 5,
),
if(isSubmitted && mySelectedAllergy !=null &&
mySelectedAllergy
.selectedAllergySeverity == null)
Row(
bodyWidget: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Center(
child: Column(
children: [
AppTextFieldCustom(
onClick: widget.model
.allergySeverityList !=
null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: widget.model
.allergySeverityList,
okText:
TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
mySelectedAllergy
.selectedAllergySeverity =
selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
context: context,
builder: (BuildContext
context) {
return dialog;
},
);
}
: null,
isDropDown: true,
hintText:
TranslationBase
.of(context)
.selectSeverity,
enabled: false,
maxLines: 2,
minLines: 2,
controller: severityController,),
SizedBox(
height: 5,
),
if(isSubmitted && mySelectedAllergy !=null &&
mySelectedAllergy
.selectedAllergySeverity == null)
Row(
children: [
CustomValidationError(),
],
mainAxisAlignment: MainAxisAlignment.start,
),
children: [
CustomValidationError(),
],
mainAxisAlignment: MainAxisAlignment.start,
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: NewTextFields(
hintText: TranslationBase
.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 3,
initialValue: isSelected
? mySelectedAllergy
.remark : '',
// controller: remarkControlle
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: NewTextFields(
hintText: TranslationBase
.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 3,
initialValue: isSelected
? mySelectedAllergy
.remark : '',
// controller: remarkControlle
onChanged: (value) {
if (isSelected) {
mySelectedAllergy
.remark = value;
}
},
onChanged: (value) {
if (isSelected) {
mySelectedAllergy
.remark = value;
}
},
validator: (value) {
if (value == null)
return TranslationBase
.of(
context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
validator: (value) {
if (value == null)
return TranslationBase
.of(
context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
],),
),
),
],),
),
isExpand: mySelectedAllergy != null
? mySelectedAllergy.isExpanded
: false,
@ -357,18 +369,6 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
SizedBox(
height: 10,
),
if (widget.model.state == ViewState.Idle)
AppButton(
title: "Add Selected Allergy",
padding: 10,
color: Color(0xFF359846),
onPressed: () {
setState(() {
isSubmitted = true;
});
widget.addSelectedAllergy();
},
),
],
),
),

@ -3,16 +3,15 @@ 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/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_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'app-textfield-custom.dart';
import 'app_texts_widget.dart';
class MasterKeyCheckboxSearchWidget extends StatefulWidget {
@ -56,7 +55,16 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
children: [
Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.62,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
height: MediaQuery.of(context).size.height * 0.60,
child: Center(
child: Container(
decoration: BoxDecoration(
@ -64,18 +72,21 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
color: Colors.white),
child: ListView(
children: [
TextFields(
hintText: widget.hintSearchText ?? TranslationBase
.of(context)
.searchHistory,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search,
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.070,
hintText: TranslationBase.of(context).searchHistory,
isDropDown: true,
hasBorder: false,
// controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
// SizedBox(height: 15,),
DividerWithSpacesAround(),
Container(
@ -143,15 +154,6 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
SizedBox(
height: 10,
),
if (widget.model.state == ViewState.Idle)
AppButton(
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addSelectedHistories();
},
),
],
),
);

Loading…
Cancel
Save