|
|
|
|
@ -38,6 +38,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
final _postPlansEstimatedCostController = TextEditingController();
|
|
|
|
|
final _estimatedCostController = TextEditingController();
|
|
|
|
|
final _expectedDaysController = TextEditingController();
|
|
|
|
|
final _intendedLengthDaysController = TextEditingController();
|
|
|
|
|
final _otherDepartmentsInterventionsController = TextEditingController();
|
|
|
|
|
final _treatmentLineController = TextEditingController();
|
|
|
|
|
final _complicationsController = TextEditingController();
|
|
|
|
|
@ -54,6 +55,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
plansError = '',
|
|
|
|
|
otherInterventionsError = '',
|
|
|
|
|
expectedDaysError = '',
|
|
|
|
|
intendedDaysError = '',
|
|
|
|
|
expectedDatesError = '',
|
|
|
|
|
floorError = '',
|
|
|
|
|
roomError = '',
|
|
|
|
|
@ -188,6 +190,24 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: screenSize.height * 0.075,
|
|
|
|
|
hintText: TranslationBase.of(context).intendedLengthStay,
|
|
|
|
|
controller: _intendedLengthDaysController,
|
|
|
|
|
validationError: intendedDaysError,
|
|
|
|
|
inputType: TextInputType.number,
|
|
|
|
|
inputFormatters: [
|
|
|
|
|
FilteringTextInputFormatter.allow(
|
|
|
|
|
RegExp(ONLY_NUMBERS),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
onClick: () {},
|
|
|
|
|
onChanged: (value) {},
|
|
|
|
|
onFieldSubmitted: () {},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: screenSize.height * 0.075,
|
|
|
|
|
hintText: TranslationBase.of(context).expectedAdmissionDate,
|
|
|
|
|
@ -444,6 +464,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
if (_estimatedCostController.text != "" &&
|
|
|
|
|
_postPlansEstimatedCostController.text != "" &&
|
|
|
|
|
_expectedDaysController.text != "" &&
|
|
|
|
|
_intendedLengthDaysController.text != "" &&
|
|
|
|
|
_expectedAdmissionDate != null &&
|
|
|
|
|
_otherDepartmentsInterventionsController.text != "" &&
|
|
|
|
|
_selectedFloor != null &&
|
|
|
|
|
@ -458,7 +479,11 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
model.admissionRequestData!.elementsForImprovement = _postPlansEstimatedCostController.text;
|
|
|
|
|
|
|
|
|
|
model.admissionRequestData!.expectedDays = int.parse(_expectedDaysController.text);
|
|
|
|
|
model.admissionRequestData.intendedLengthOfStayId = int.parse(_intendedLengthDaysController.text);
|
|
|
|
|
|
|
|
|
|
model.admissionRequestData!.admissionDate = _expectedAdmissionDate!.toIso8601String();
|
|
|
|
|
model.admissionRequestData!.expectedadmissionDate = _expectedAdmissionDate!.toIso8601String();
|
|
|
|
|
|
|
|
|
|
model.admissionRequestData.otherDepartmentinterventions = _otherDepartmentsInterventionsController.text;
|
|
|
|
|
model.admissionRequestData!.admissionLocationID = _selectedFloor['floorID'];
|
|
|
|
|
model.admissionRequestData!.wardID = _selectedWard != null ? _selectedWard['nursingStationID'] : 0;
|
|
|
|
|
@ -495,6 +520,14 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
|
|
|
|
|
expectedDaysError = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_intendedLengthDaysController.text == "") {
|
|
|
|
|
intendedDaysError = TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.fieldRequired;
|
|
|
|
|
}else{
|
|
|
|
|
intendedDaysError = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_expectedAdmissionDate == null) {
|
|
|
|
|
expectedDatesError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
|