diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e964dc05..c59b691b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1173,5 +1173,9 @@ const Map> localizedValues = { "previousChiefCompaints": {"en": "Previous Chief Compaints", "ar":"رئيس الرسامين السابق"}, "listOfActiveEpisodes": {"en": "List of active episodes , select one to procedd", "ar":"قائمة الحلقات النشطة ، حدد واحدة لتقديمها"}, "select": {"en": "Select", "ar":"اختار"}, + "historyOfIllness": {"en": "History of Present Illness*", "ar":"تاريخ المرض الحالي*"}, + "historyTakenFrom": {"en": "History taken from", "ar":"التاريخ مأخوذ من"}, + "familySpecify": {"en": "Family, Specify", "ar":"العائلة، حدد"}, + "otherSpecify": {"en": "Other, Specify", "ar":"أخرى، حدد"}, }; diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/ComplaintSelection.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/ComplaintSelection.dart index 03ddd396..fd83e263 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/ComplaintSelection.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/ComplaintSelection.dart @@ -112,6 +112,7 @@ class _ComplaintSelectionState extends State { child: CheckboxListTile( value: true, enabled: false, + checkColor: Colors.white, activeColor: Color(0xFFD02127), side: MaterialStateBorderSide.resolveWith( (Set states) { @@ -140,6 +141,8 @@ class _ComplaintSelectionState extends State { child: CheckboxListTile( value: true, activeColor: Color(0xFFD02127), + checkColor: Colors.white, + controlAffinity: ListTileControlAffinity.leading, side: MaterialStateBorderSide.resolveWith( (Set states) { @@ -166,6 +169,7 @@ class _ComplaintSelectionState extends State { horizontalTitleGap: 0, child: CheckboxListTile( activeColor: Color(0xFFD02127), + checkColor: Colors.white, contentPadding: EdgeInsets.zero, side: MaterialStateBorderSide.resolveWith( (Set states) { diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/present_illness/update_present_illness.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/present_illness/update_present_illness.dart new file mode 100644 index 00000000..c40ec72b --- /dev/null +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/present_illness/update_present_illness.dart @@ -0,0 +1,200 @@ +import 'package:flutter/material.dart'; + +import '../../../../../../utils/translations_delegate_base_utils.dart'; +import '../../../../../../widgets/shared/app_texts_widget.dart'; +import '../../../../../../widgets/shared/text_fields/app-textfield-custom.dart'; + +class UpdatePresentIllness extends StatefulWidget { + @override + State createState() => _UpdatePresentIllnessState(); +} + +class _UpdatePresentIllnessState extends State { + bool isPatientSelected = false; + bool isFamilySelected = false; + bool isOtherSelected = false; + + final TextEditingController familyController = TextEditingController(); + final TextEditingController otherController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + AppText( + TranslationBase.of(context).historyTakenFrom, + fontSize: 14, + fontWeight: FontWeight.w600, + textAlign: TextAlign.start, + color: Colors.black, + ), + + ListTileTheme( + horizontalTitleGap: 0, + child: CheckboxListTile( + value: isPatientSelected, + activeColor: Color(0xFFD02127), + checkColor: Colors.white, + controlAffinity: ListTileControlAffinity.leading, + side: MaterialStateBorderSide.resolveWith( + (Set states) { + if (states.contains(MaterialState.selected)) { + return const BorderSide(color: Color(0xFFD02127)); + } + return const BorderSide(color: Color(0xFFE6E6E6)); + }, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16)), + onChanged: (bool? value) { + setState(() { + isPatientSelected = value ?? false; + }); + }, + title: AppText( + TranslationBase.of(context).patient, + color: Color(0XFF575757), + fontSize: 14, + fontWeight: FontWeight.w400, + ), + contentPadding: EdgeInsets.zero), + ), + + ListTileTheme( + horizontalTitleGap: 0, + child: CheckboxListTile( + value: isFamilySelected, + activeColor: Color(0xFFD02127), + checkColor: Colors.white, + controlAffinity: ListTileControlAffinity.leading, + side: MaterialStateBorderSide.resolveWith( + (Set states) { + if (states.contains(MaterialState.selected)) { + return const BorderSide(color: Color(0xFFD02127)); + } + return const BorderSide(color: Color(0xFFE6E6E6)); + }, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16)), + onChanged: (bool? value) { + setState(() { + isFamilySelected = value ?? false; + }); + }, + title: AppText( + TranslationBase.of(context).familySpecify, + color: Color(0XFF575757), + fontSize: 14, + fontWeight: FontWeight.w400, + ), + contentPadding: EdgeInsets.zero), + ), + Visibility( + visible: isFamilySelected, + child: Column(children: [ + AppTextFieldCustom( + hintText: TranslationBase.of(context).remarks, + controller: familyController, + inputType: TextInputType.multiline, + maxLines: 25, + minLines: 3, + hasBorder: true, + onClick: () {}, + onChanged: (value) {}, + onFieldSubmitted: () {}, + ), + ])), + + ListTileTheme( + horizontalTitleGap: 0, + child: CheckboxListTile( + value: isOtherSelected, + activeColor: Color(0xFFD02127), + checkColor: Colors.white, + controlAffinity: ListTileControlAffinity.leading, + side: MaterialStateBorderSide.resolveWith( + (Set states) { + if (states.contains(MaterialState.selected)) { + return const BorderSide(color: Color(0xFFD02127)); + } + return const BorderSide(color: Color(0xFFE6E6E6)); + }, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16)), + onChanged: (bool? value) { + setState(() { + isOtherSelected = value ?? false; + }); + }, + title: AppText( + TranslationBase.of(context).otherSpecify, + color: Color(0XFF575757), + fontSize: 14, + fontWeight: FontWeight.w400, + ), + contentPadding: EdgeInsets.zero), + ), + Visibility( + visible: isOtherSelected, + child: Column( + children: [ + AppTextFieldCustom( + hintText: TranslationBase.of(context).remarks, + controller: otherController, + inputType: TextInputType.multiline, + maxLines: 25, + minLines: 3, + hasBorder: true, + onClick: () {}, + onChanged: (value) {}, + onFieldSubmitted: () {}, + ), + ], + ), + ), + + Divider(), + SizedBox( + height: 8, + ), + AppText( + TranslationBase.of(context).historyOfIllness, + fontSize: 14, + fontWeight: FontWeight.w600, + textAlign: TextAlign.start, + color: Colors.black, + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).remarks, + controller: otherController, + inputType: TextInputType.multiline, + maxLines: 25, + minLines: 3, + hasBorder: true, + onClick: () {}, + onChanged: (value) {}, + onFieldSubmitted: () {}, + ), + SizedBox( + height: 8, + ), + AppText( + 'Last saved: 22-10-2024 08:07 am [3 hours ago]', + fontSize: 10, + fontWeight: FontWeight.normal, + textAlign: TextAlign.start, + color: Color(0XFF575757), + ), + ], + ); + } +} diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page_vida_plus.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page_vida_plus.dart index 4c332c11..1f208e5c 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page_vida_plus.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page_vida_plus.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjective_call_back.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/present_illness/update_present_illness.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -176,7 +177,7 @@ class _UpdateSubjectivePageVidaPlusState extends State localizedValues['select']![locale.languageCode]!; String get noKnownAllergies => localizedValues['noKnownAllergies']![locale.languageCode]!; + String get historyTakenFrom => localizedValues['historyTakenFrom']![locale.languageCode]!; + String get familySpecify => localizedValues['familySpecify']![locale.languageCode]!; + String get otherSpecify => localizedValues['otherSpecify']![locale.languageCode]!; + String get historyOfIllness => localizedValues['historyOfIllness']![locale.languageCode]!; } class TranslationBaseDelegate extends LocalizationsDelegate {