Merge branch 'Amjad_search' into 'master'

Amjad search

See merge request Cloud_Solution/doctor_app_flutter!55
merge-requests/56/merge
amjad nabil amireh 6 years ago
commit 6134347e8e

@ -1,8 +1,18 @@
/*
*@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020
*@param:
*@return:PatientsScreen Search textbox filter
*@desc:
*/
class PatientModel { class PatientModel {
int ProjectID; int ProjectID;
int ClinicID; int ClinicID;
int DoctorID; int DoctorID;
String FirstName; String FirstName;
String MiddleName; String MiddleName;
String LastName; String LastName;
String PatientMobileNumber; String PatientMobileNumber;
@ -21,13 +31,87 @@ class PatientModel {
bool PatientOutSA; bool PatientOutSA;
getFirstName() { int get getProjectID => ProjectID;
return this.FirstName;
} set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
int get getClinicID => ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
int get getDoctorID => DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
String get getFirstName => FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
String get getMiddleName => MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
String get getLastName => LastName;
set setLastName(String LastName) => this.LastName = LastName;
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber;
// String get getPatientIdentificationID => PatientIdentificationID;
// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID;
int get getPatientID => PatientID;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getFrom => From;
set setFrom(String From) => this.From = From;
String get getTo => To;
set setTo(String To) => this.To = To;
int get getLanguageID => LanguageID;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
String get getStamp => stamp;
set setStamp(String stamp) => this.stamp = stamp;
String get getIPAdress => IPAdress;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
double get getVersionID => VersionID;
set setVersionID(double VersionID) => this.VersionID = VersionID;
int get getChannel => Channel;
set setChannel(int Channel) => this.Channel = Channel;
String get getTokenID => TokenID;
set setTokenID(String TokenID) => this.TokenID = TokenID;
String get getSessionID => SessionID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
setFirstName( FirstName) {
this.FirstName = FirstName;
}

@ -41,11 +41,12 @@ class PatientsProvider with ChangeNotifier {
Future<Map> getPatientList(PatientModel patient, patientType) async { Future<Map> getPatientList(PatientModel patient, patientType) async {
/* const url = /* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/ BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType); int val = int.parse(patientType);
final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];///"https://uat.hmgwebservices.com/Services/Doctors.svc/REST/"; //**********Modify url by amjad amireh for patiant type*********
//BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];
// print("a===========$url=======a"); // print("a===========$url=======a");
try { try {

@ -62,15 +62,32 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
// _patientSearchFormValues.TokenID = // _patientSearchFormValues.TokenID =
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables //*****If all data are correct then save data to out variables****
if (_patientSearchFormValues.getFirstName == null ||
_patientSearchFormValues.getMiddleName == null ||
_patientSearchFormValues.getLastName == null ||
_patientSearchFormValues.getPatientMobileNumber == null) {
_patientSearchFormValues.setFirstName = "0";
_patientSearchFormValues.setLastName = "0";
_patientSearchFormValues.setMiddleName = "0";
_patientSearchFormValues.setPatientMobileNumber = "0";
_patientSearchFormValues.setPatientID = 0;
_patientSearchFormValues.From = "0";
_patientSearchFormValues.To = "0";
//_formKey.currentState.save();
} else {
_formKey.currentState.save();
}
// _formKey.currentState.save(); // _formKey.currentState.save();
sharedPref.setString(TOKEN,'@dm!n'); //*********************************** */
sharedPref.setString(SLECTED_PATIENT_TYPE,_selectedType); sharedPref.setString(TOKEN, '@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('_selectedType${_selectedType}'); print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token; _patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = 15;//projectID; _patientSearchFormValues.ProjectID = 15; //projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf"); // print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
@ -173,7 +190,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField( AppTextFormField(
hintText: 'First Name', hintText: 'First Name',
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.FirstName = value; // _patientSearchFormValues.FirstName = value;
_patientSearchFormValues.setFirstName = value;
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);

@ -285,15 +285,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
Container( Container(
child: Center( child: Center(
child: child:
DrAppCircularProgressIndeicator()), Padding(
), padding: const EdgeInsets.fromLTRB(0, 250, 0, 0),
Container( child: DrAppCircularProgressIndeicator(),
child: Text( )),
"Sorry There is No Data",
style: TextStyle(
color: Theme.of(context).errorColor),
), ),
)
], ],
) )
: Column( : Column(

@ -35,7 +35,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.1" version: "2.4.0"
bazel_worker: bazel_worker:
dependency: transitive dependency: transitive
description: description:
@ -49,7 +49,7 @@ packages:
name: boolean_selector name: boolean_selector
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "1.0.5"
build: build:
dependency: transitive dependency: transitive
description: description:
@ -126,7 +126,7 @@ packages:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.3" version: "1.1.2"
checked_yaml: checked_yaml:
dependency: transitive dependency: transitive
description: description:
@ -134,13 +134,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
code_builder: code_builder:
dependency: transitive dependency: transitive
description: description:
@ -154,7 +147,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.14.12" version: "1.14.11"
connectivity: connectivity:
dependency: "direct main" dependency: "direct main"
description: description:
@ -211,13 +204,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.4" version: "1.3.4"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -433,7 +419,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.6.4"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:
@ -448,6 +434,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1+1" version: "2.1.1+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -578,7 +571,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.5.5"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -620,7 +613,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.15" version: "0.2.11"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -684,6 +677,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save