|
|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
|
|
|
|
|
@ -15,7 +14,6 @@ import 'package:provider/provider.dart';
|
|
|
|
|
import '../../config/config.dart';
|
|
|
|
|
import '../../config/size_config.dart';
|
|
|
|
|
import '../../lookups/patient_lookup.dart';
|
|
|
|
|
import '../../models/doctor/doctor_profile_model.dart';
|
|
|
|
|
import '../../widgets/patients/dynamic_elements.dart';
|
|
|
|
|
import '../../widgets/shared/app_buttons_widget.dart';
|
|
|
|
|
import '../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
@ -87,7 +85,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
error = err;
|
|
|
|
|
error = err.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -244,13 +242,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
TranslationBase.of(context).firstName,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues.setFirstName =
|
|
|
|
|
"0"
|
|
|
|
|
: _patientSearchFormValues.setFirstName =
|
|
|
|
|
value;
|
|
|
|
|
|
|
|
|
|
if (value.toString().trim().isEmpty) {
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues.setFirstName = "0";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -274,14 +273,17 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
TranslationBase.of(context).middleName,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues.setMiddleName =
|
|
|
|
|
"0"
|
|
|
|
|
: _patientSearchFormValues.setMiddleName =
|
|
|
|
|
value;
|
|
|
|
|
if (value.toString().trim().isEmpty) {
|
|
|
|
|
if (value != null && value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues.setMiddleName =
|
|
|
|
|
"0";
|
|
|
|
|
"0";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
@ -303,12 +305,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
labelText: TranslationBase.of(context).lastName,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues.setLastName =
|
|
|
|
|
"0"
|
|
|
|
|
: _patientSearchFormValues.setLastName =
|
|
|
|
|
value;
|
|
|
|
|
if (value.toString().trim().isEmpty) {
|
|
|
|
|
if (value != null && value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues.setLastName = "0";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -331,13 +336,16 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = value;
|
|
|
|
|
|
|
|
|
|
if (value.toString().trim().isEmpty) {
|
|
|
|
|
if (value != null && value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0";
|
|
|
|
|
}
|
|
|
|
|
@ -366,7 +374,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
0
|
|
|
|
|
: _patientSearchFormValues.setPatientID =
|
|
|
|
|
int.parse(value);
|
|
|
|
|
if (value.trim().toString().isEmpty) {
|
|
|
|
|
if (value != null && value
|
|
|
|
|
.trim()
|
|
|
|
|
.toString()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues.setPatientID = 0;
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
|