|
|
|
|
@ -50,6 +50,18 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
dynamic _selectedRoomCategory;
|
|
|
|
|
dynamic _selectedAdmissionType;
|
|
|
|
|
|
|
|
|
|
String costError;
|
|
|
|
|
String plansError;
|
|
|
|
|
String otherInterventionsError;
|
|
|
|
|
String expectedDaysError;
|
|
|
|
|
String expectedDatesError;
|
|
|
|
|
String floorError;
|
|
|
|
|
String roomError;
|
|
|
|
|
String treatmentsError;
|
|
|
|
|
String complicationsError;
|
|
|
|
|
String proceduresError;
|
|
|
|
|
String admissionTypeError;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
@ -125,6 +137,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).estimatedCost,
|
|
|
|
|
controller: _estimatedCostController,
|
|
|
|
|
validationError: costError,
|
|
|
|
|
inputType: TextInputType.number,
|
|
|
|
|
inputFormatters: [
|
|
|
|
|
FilteringTextInputFormatter.allow(
|
|
|
|
|
@ -138,6 +151,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
hintText: TranslationBase.of(context).postPlans,
|
|
|
|
|
controller: _postPlansEstimatedCostController,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
validationError: plansError,
|
|
|
|
|
minLines: 4,
|
|
|
|
|
maxLines: 6,
|
|
|
|
|
),
|
|
|
|
|
@ -150,6 +164,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
controller:
|
|
|
|
|
_otherDepartmentsInterventionsController,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
validationError: otherInterventionsError,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
maxLines: 4,
|
|
|
|
|
),
|
|
|
|
|
@ -170,6 +185,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).expectedDays,
|
|
|
|
|
controller: _expectedDaysController,
|
|
|
|
|
validationError: expectedDaysError,
|
|
|
|
|
inputType: TextInputType.number,
|
|
|
|
|
inputFormatters: [
|
|
|
|
|
FilteringTextInputFormatter.allow(
|
|
|
|
|
@ -188,6 +204,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
: null,
|
|
|
|
|
enabled: false,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
validationError: expectedDatesError,
|
|
|
|
|
suffixIcon: Icon(
|
|
|
|
|
Icons.calendar_today,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
@ -215,6 +232,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
: null,
|
|
|
|
|
enabled: false,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
validationError: floorError,
|
|
|
|
|
onClick: model.floorList != null &&
|
|
|
|
|
model.floorList.length > 0
|
|
|
|
|
? () {
|
|
|
|
|
@ -314,6 +332,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
: null,
|
|
|
|
|
enabled: false,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
validationError: roomError,
|
|
|
|
|
onClick: model.roomCategoryList != null &&
|
|
|
|
|
model.roomCategoryList.length > 0
|
|
|
|
|
? () {
|
|
|
|
|
@ -365,6 +384,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
TranslationBase.of(context).treatmentLine,
|
|
|
|
|
controller: _treatmentLineController,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
validationError: treatmentsError,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -376,6 +396,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
TranslationBase.of(context).complications,
|
|
|
|
|
controller: _complicationsController,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
validationError: complicationsError,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -387,6 +408,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
TranslationBase.of(context).otherProcedure,
|
|
|
|
|
controller: _otherProceduresController,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
validationError: proceduresError,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -402,6 +424,7 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
: null,
|
|
|
|
|
enabled: false,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
validationError: admissionTypeError,
|
|
|
|
|
onClick: model.admissionTypeList != null &&
|
|
|
|
|
model.admissionTypeList.length > 0
|
|
|
|
|
? () {
|
|
|
|
|
@ -533,6 +556,75 @@ class _AdmissionRequestSecondScreenState
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
TranslationBase.of(context).pleaseFill);
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
if (_estimatedCostController.text == "") {
|
|
|
|
|
costError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
costError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_postPlansEstimatedCostController.text == "") {
|
|
|
|
|
plansError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
plansError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_expectedDaysController.text == "") {
|
|
|
|
|
expectedDaysError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
expectedDaysError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_expectedAdmissionDate == null) {
|
|
|
|
|
expectedDatesError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
expectedDatesError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_otherDepartmentsInterventionsController.text == "") {
|
|
|
|
|
otherInterventionsError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
otherInterventionsError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_selectedFloor == null) {
|
|
|
|
|
floorError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
floorError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_selectedRoomCategory == null) {
|
|
|
|
|
roomError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
roomError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_treatmentLineController.text == "") {
|
|
|
|
|
treatmentsError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
treatmentsError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_complicationsController.text == "") {
|
|
|
|
|
complicationsError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
complicationsError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_otherProceduresController.text == "") {
|
|
|
|
|
proceduresError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
proceduresError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_selectedAdmissionType == null) {
|
|
|
|
|
admissionTypeError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
admissionTypeError = null;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|