|
|
|
|
@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
|
|
|
|
|
var _patientSearchFormValues = PatientModel(
|
|
|
|
|
ProjectID: 15,
|
|
|
|
|
ClinicID: 0,
|
|
|
|
|
DoctorID: 4709,
|
|
|
|
|
ClinicID: 90,
|
|
|
|
|
DoctorID: 145642,
|
|
|
|
|
FirstName: "0",
|
|
|
|
|
MiddleName: "0",
|
|
|
|
|
LastName: "0",
|
|
|
|
|
@ -57,26 +57,36 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
IsLoginForDoctorApp: true,
|
|
|
|
|
PatientOutSA: false);
|
|
|
|
|
|
|
|
|
|
void _validateInputs() {
|
|
|
|
|
print("####IBRAHIM TEST#####"+_patientSearchFormValues.From);
|
|
|
|
|
void _validateInputs() async {
|
|
|
|
|
print("####IBRAHIM TEST#####" + _patientSearchFormValues.From);
|
|
|
|
|
// _patientSearchFormValues.TokenID =
|
|
|
|
|
|
|
|
|
|
if (_formKey.currentState.validate()) {
|
|
|
|
|
// If all data are correct then save data to out variables
|
|
|
|
|
<<<<<<< lib/screens/patients/patient_search_screen.dart
|
|
|
|
|
// _formKey.currentState.save();
|
|
|
|
|
|
|
|
|
|
sharedPref.getString(TOKEN).then((token) {
|
|
|
|
|
_patientSearchFormValues.TokenID = '@dm!n';
|
|
|
|
|
_patientSearchFormValues.ProjectID= 15;
|
|
|
|
|
_patientSearchFormValues.TokenID = _patientSearchFormValues,
|
|
|
|
|
_patientSearchFormValues.ProjectID= _selectedType
|
|
|
|
|
|
|
|
|
|
//"patientSearchForm": _patientSearchFormValues,
|
|
|
|
|
//"selectedType": _selectedType
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS, arguments: {
|
|
|
|
|
"patientSearchForm": _patientSearchFormValues,
|
|
|
|
|
"selectedType": _selectedType
|
|
|
|
|
});
|
|
|
|
|
=======
|
|
|
|
|
// _formKey.currentState.save();
|
|
|
|
|
String token = await sharedPref.getString(TOKEN);
|
|
|
|
|
int projectID = await sharedPref.getInt(PROJECT_ID);
|
|
|
|
|
_patientSearchFormValues.TokenID = token;
|
|
|
|
|
_patientSearchFormValues.ProjectID = projectID;
|
|
|
|
|
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS, arguments: {
|
|
|
|
|
"patientSearchForm": _patientSearchFormValues,
|
|
|
|
|
"selectedType": _selectedType
|
|
|
|
|
>>>>>>> lib/screens/patients/patient_search_screen.dart
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// If all data are not valid then start auto validation.
|
|
|
|
|
@ -173,41 +183,38 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText: 'First Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.FirstName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
hintText: 'First Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.FirstName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText: 'Middle Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.MiddleName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
hintText: 'Middle Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.MiddleName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText: 'Last Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.LastName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS
|
|
|
|
|
),
|
|
|
|
|
hintText: 'Last Name',
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.LastName = value;
|
|
|
|
|
},
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// return TextValidator().validateName(value);
|
|
|
|
|
// },
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
@ -229,7 +236,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
hintText: 'Patiant ID',
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_patientSearchFormValues.PatientID = 89000;
|
|
|
|
|
|