diff --git a/lib/core/service/prescription_service.dart b/lib/core/service/prescription_service.dart index 67b3491c..643c719d 100644 --- a/lib/core/service/prescription_service.dart +++ b/lib/core/service/prescription_service.dart @@ -112,7 +112,7 @@ class PrescriptionService extends LookupService { }, body: _drugRequestModel.toJson()); } - Future getMedicationList({String drug}) async { + Future getMedicationList({String drug =''}) async { hasError = false; _drugRequestModel.search = ["$drug"]; await baseAppClient.post(SEARCH_DRUG, diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index a2083bd9..a0ac3678 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -220,6 +220,12 @@ class _AddAssessmentDetailsState extends State { maxLines: 2, minLines: 1, controller: icdNameController, + // hasBorder: true, + // validationError: isFormSubmitted && + // widget.mySelectedAssessment + // .selectedICD == null?TranslationBase + // .of(context) + // .emptyMessage:null, enabled: true, ) @@ -273,12 +279,14 @@ class _AddAssessmentDetailsState extends State { controller: conditionController, isDropDown: true, enabled: false, + hasBorder: true, + validationError: isFormSubmitted && + widget.mySelectedAssessment + .selectedDiagnosisCondition == null?TranslationBase + .of(context) + .emptyMessage:null, ), - if (isFormSubmitted && - widget.mySelectedAssessment - .selectedDiagnosisCondition == - null) - CustomValidationError(), + SizedBox( height: 10, ), @@ -317,38 +325,28 @@ class _AddAssessmentDetailsState extends State { enabled: false, isDropDown: true, controller: typeController, + hasBorder: true, + validationError: isFormSubmitted && + widget.mySelectedAssessment + .selectedDiagnosisType == null?TranslationBase + .of(context) + .emptyMessage:null, ), - if (isFormSubmitted && - widget.mySelectedAssessment - .selectedDiagnosisType == - null) - CustomValidationError(), SizedBox( height: 10, ), Container( margin: EdgeInsets.only(left: 0, right: 0, top: 15), - child: TextFields( + child: AppTextFieldCustom( hintText: TranslationBase.of(context).remarks, - fontSize: 13.5, - 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, diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index abb62808..dfdb21f9 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -131,9 +131,14 @@ class _UpdateObjectivePageState extends State { }).toList(), ) ], + ), isExpanded: isSysExaminationExpand, ), + SizedBox(height: MediaQuery + .of(context) + .size + .height * 0.12,) ], ), ), diff --git a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart index cdc6cad5..821e8334 100644 --- a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -1,4 +1,5 @@ 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/new_text_Field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -35,33 +36,28 @@ class UpdateChiefComplaints extends StatelessWidget { height: 20, ), //TODO handel error cases - NewTextFields( + AppTextFieldCustom( hintText: TranslationBase.of(context).addChiefComplaints, controller: complaintsController, maxLines: 25, - minLines: 3, - ), + minLines: 7, + hasBorder: true, + validationError:complaintsController.text.isEmpty && complaintsControllerError !=''?complaintsControllerError:null , - Container( - child: CustomValidationError( - error: complaintsControllerError, - )), + ), SizedBox( height: 20, ), - NewTextFields( + AppTextFieldCustom( hintText: TranslationBase .of(context) .historyOfPresentIllness, controller: illnessController, maxLines: 25, - minLines: 3, - ), - Container( - child: CustomValidationError(error: illnessControllerError,)), - SizedBox( - height: 20, + minLines: 7, + hasBorder: true, + validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null , ), SizedBox( height: 10, @@ -72,16 +68,17 @@ class UpdateChiefComplaints extends StatelessWidget { SizedBox( height: 10, ), - NewTextFields( + AppTextFieldCustom( hintText: TranslationBase .of(context) .currentMedications, controller: medicationController, - maxLines: 25, - minLines: 3, + maxLines: 25, + minLines: 7, + hasBorder: true, + validationError:medicationController.text.isEmpty && medicationControllerError !=''?medicationControllerError:null , + ), - Container(child: CustomValidationError( - error: medicationControllerError,)), SizedBox( height: 10, ), diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 3b96cd65..6773ae98 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -204,7 +204,7 @@ class _AddMedicationState extends State { ), if (isFormSubmitted && _selectedMedication == null) - CustomValidationError(), + Container(child: CustomValidationError()), SizedBox( height: 5, ), @@ -231,6 +231,7 @@ class _AddMedicationState extends State { .nameEn; }); }, + ); showDialog( barrierDismissible: false, @@ -247,16 +248,14 @@ class _AddMedicationState extends State { minLines: 2, isDropDown: true, controller: doseController, + validationError:isFormSubmitted && + _selectedMedicationDose == null?TranslationBase + .of(context) + .emptyMessage:null, ), SizedBox( height: 5, ), - if (isFormSubmitted && - _selectedMedicationDose == null) - CustomValidationError(), - SizedBox( - height: 5, - ), AppTextFieldCustom( enabled: false, isDropDown: true, @@ -296,13 +295,14 @@ class _AddMedicationState extends State { maxLines: 2, minLines: 2, controller: strengthController, + validationError:isFormSubmitted && + _selectedMedicationStrength == null?TranslationBase + .of(context) + .emptyMessage:null, ), SizedBox( height: 5, ), - if (isFormSubmitted && - _selectedMedicationStrength == null) - CustomValidationError(), SizedBox( height: 5, ), @@ -344,13 +344,14 @@ class _AddMedicationState extends State { maxLines: 2, minLines: 2, controller: routeController, + validationError:isFormSubmitted && + _selectedMedicationRoute == null?TranslationBase + .of(context) + .emptyMessage:null, ), SizedBox( height: 5, ), - if (isFormSubmitted && - _selectedMedicationRoute == null) - CustomValidationError(), SizedBox( height: 5, ), @@ -393,13 +394,14 @@ class _AddMedicationState extends State { minLines: 2, isDropDown: true, controller: frequencyController, + validationError:isFormSubmitted && + _selectedMedicationFrequency == null?TranslationBase + .of(context) + .emptyMessage:null, ), SizedBox( height: 5, ), - if (isFormSubmitted && - _selectedMedicationFrequency == null) - CustomValidationError(), SizedBox( height: 30, ),