|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
|
|
|
|
import '../../config/size_config.dart';
|
|
|
|
|
import '../../util/text_validator.dart';
|
|
|
|
|
import '../../widgets/shared/app_buttons_widget.dart';
|
|
|
|
|
import '../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import '../../widgets/shared/app_text_form_field.dart';
|
|
|
|
@ -15,6 +15,7 @@ import 'package:flutter/rendering.dart';
|
|
|
|
|
import '../../lookups/patient_lookup.dart';
|
|
|
|
|
import '../../models/patient_model.dart';
|
|
|
|
|
import '../../widgets/patients/dynamic_elements.dart';
|
|
|
|
|
import '../../config/config.dart';
|
|
|
|
|
|
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
|
|
|
|
@ -57,12 +58,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
PatientOutSA: false);
|
|
|
|
|
|
|
|
|
|
void _validateInputs() {
|
|
|
|
|
print({_patientSearchFormValues.ProjectID});
|
|
|
|
|
print("####IBRAHIM TEST#####"+_patientSearchFormValues.From);
|
|
|
|
|
// _patientSearchFormValues.TokenID =
|
|
|
|
|
|
|
|
|
|
if (_formKey.currentState.validate()) {
|
|
|
|
|
// If all data are correct then save data to out variables
|
|
|
|
|
// _formKey.currentState.save();
|
|
|
|
|
_formKey.currentState.save();
|
|
|
|
|
|
|
|
|
|
sharedPref.getString(TOKEN).then((token) {
|
|
|
|
|
print(token+"EEEEEE");
|
|
|
|
@ -173,9 +174,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.FirstName = value;
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateName(value);
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
@ -185,9 +187,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.MiddleName = value;
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateName(value);
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
@ -197,9 +200,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.LastName = value;
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateName(value);
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
@ -207,9 +211,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
hintText: 'Phone Number',
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateMobile(value);
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateMobile(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.PatientMobileNumber =
|
|
|
|
|
value;
|
|
|
|
@ -221,9 +226,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
hintText: 'Patiant ID',
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateIdNumber(value);
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.PatientID = 89000;
|
|
|
|
|
}),
|
|
|
|
@ -233,9 +237,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
hintText: 'Patiant File',
|
|
|
|
|
validator: (value) {
|
|
|
|
|
return TextValidator().validateIdNumber(value);
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateIdNumber(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
//_patientSearchFormValues. = value;
|
|
|
|
|
},
|
|
|
|
|