|
|
|
@ -93,6 +93,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
"patientSearchForm": _patientSearchFormValues,
|
|
|
|
|
"selectedType": _selectedType,
|
|
|
|
|
"isSearch": true,
|
|
|
|
|
"isView": isView
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -180,7 +181,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText:
|
|
|
|
|
TranslationBase.of(context).phoneNumber,
|
|
|
|
|
TranslationBase.of(context).patientID,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
textInputAction: TextInputAction.done,
|
|
|
|
@ -188,15 +189,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
focusNode: _nodeText1,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = value;
|
|
|
|
|
? _patientSearchFormValues.setPatientID =
|
|
|
|
|
0
|
|
|
|
|
: _patientSearchFormValues.setPatientID =
|
|
|
|
|
int.parse(value);
|
|
|
|
|
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0";
|
|
|
|
|
_patientSearchFormValues.setPatientID = 0;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -263,7 +263,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return PATIENT_TYPE_Des.map((item) {
|
|
|
|
|
return PATIENT_TYPE_Des.map(
|
|
|
|
|
(item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
@ -292,7 +293,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
int.parse(_selectedType);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: PATIENT_TYPE_Des.map((item) {
|
|
|
|
|
items:
|
|
|
|
|
PATIENT_TYPE_Des.map((item) {
|
|
|
|
|
!projectsProvider.isArabic
|
|
|
|
|
? itemText = item['text']
|
|
|
|
|
: itemText =
|
|
|
|
@ -347,35 +349,39 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
if (_selectedType != '7')
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: TranslationBase.of(context)
|
|
|
|
|
.middleName,
|
|
|
|
|
.phoneNumber,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
textInputAction: TextInputAction.done,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
focusNode: _nodeText1,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setMiddleName = "0"
|
|
|
|
|
.setPatientMobileNumber = "0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setMiddleName = value;
|
|
|
|
|
.setPatientMobileNumber =
|
|
|
|
|
value;
|
|
|
|
|
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setMiddleName = "0";
|
|
|
|
|
.setPatientMobileNumber = "0";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
@ -389,20 +395,23 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: TranslationBase.of(context)
|
|
|
|
|
.lastName,
|
|
|
|
|
.middleName,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setLastName = "0"
|
|
|
|
|
.setMiddleName = "0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setLastName = value;
|
|
|
|
|
.setMiddleName = value;
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setLastName = "0";
|
|
|
|
|
.setMiddleName = "0";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
@ -418,25 +427,54 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: TranslationBase.of(context)
|
|
|
|
|
.patientID,
|
|
|
|
|
.lastName,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
focusNode: _nodeText2,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setPatientID = 0
|
|
|
|
|
.setLastName = "0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setPatientID =
|
|
|
|
|
int.parse(value);
|
|
|
|
|
.setLastName = value;
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.trim().toString().isEmpty) {
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientID = 0;
|
|
|
|
|
.setLastName = "0";
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 10,
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
// Radius.circular(6.0)),
|
|
|
|
|
// border: Border.all(
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// color: HexColor("#CCCCCC"))),
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
// child: AppTextFormField(
|
|
|
|
|
// labelText: TranslationBase.of(context)
|
|
|
|
|
// .patientID,
|
|
|
|
|
// borderColor: Colors.white,
|
|
|
|
|
// textInputType: TextInputType.number,
|
|
|
|
|
// inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
// focusNode: _nodeText2,
|
|
|
|
|
// onSaved: (value) {
|
|
|
|
|
// value == null || value == ''
|
|
|
|
|
// ? _patientSearchFormValues
|
|
|
|
|
// .setPatientID = 0
|
|
|
|
|
// : _patientSearchFormValues
|
|
|
|
|
// .setPatientID =
|
|
|
|
|
// int.parse(value);
|
|
|
|
|
// if (value != null &&
|
|
|
|
|
// value.trim().toString().isEmpty) {
|
|
|
|
|
// _patientSearchFormValues
|
|
|
|
|
// .setPatientID = 0;
|
|
|
|
|
// }
|
|
|
|
|
// }),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|