From ba1827140f19de188bbe207a67fc828a73049949 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Sun, 10 May 2020 11:39:03 +0300 Subject: [PATCH 1/3] patiant drop dawn --- lib/providers/patients_provider.dart | 10 ++-- pubspec.lock | 84 +++++++++++++++++++++------- 2 files changed, 68 insertions(+), 26 deletions(-) diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index bf22e565..0c533c52 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -41,12 +41,12 @@ class PatientsProvider with ChangeNotifier { Future getPatientList(PatientModel patient, patientType) async { /* const url = 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); - final url ="https://uat.hmgwebservices.com/Services/DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];///"https://uat.hmgwebservices.com/Services/Doctors.svc/REST/"; - //BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val]; - // print("a===========$url=======a"); + //**********Modify url by amjad amireh for patiant type********* + final url = + BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val]; + try { final response = await client.post(url, diff --git a/pubspec.lock b/pubspec.lock index 14612a67..0d78e107 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" + version: "2.4.0" bazel_worker: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "1.0.5" build: dependency: transitive description: @@ -126,7 +126,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.2" checked_yaml: dependency: transitive description: @@ -134,13 +134,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" code_builder: dependency: transitive description: @@ -154,7 +147,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.12" + version: "1.14.11" connectivity: dependency: "direct main" description: @@ -211,13 +204,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.4" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" fixnum: dependency: transitive description: @@ -324,6 +310,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.9.10" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" imei_plugin: dependency: "direct main" description: @@ -373,6 +366,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.11.4" + maps_launcher: + dependency: "direct main" + description: + name: maps_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -428,7 +428,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.6.4" pedantic: dependency: transitive description: @@ -443,6 +443,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" platform: dependency: transitive description: @@ -587,7 +594,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.5.5" stack_trace: dependency: transitive description: @@ -629,7 +636,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.11" timing: dependency: transitive description: @@ -644,6 +651,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.6" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "5.4.5" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+5" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.6" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+4" vector_math: dependency: transitive description: @@ -665,6 +700,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" yaml: dependency: transitive description: From f3c35758b18305864f87e76edee84c048702b10d Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Mon, 11 May 2020 00:18:05 +0300 Subject: [PATCH 2/3] modify comment --- lib/providers/patients_provider.dart | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index 0f9dff6f..afe24758 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -43,16 +43,11 @@ class PatientsProvider with ChangeNotifier { BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/ int val = int.parse(patientType); -<<<<<<< HEAD //**********Modify url by amjad amireh for patiant type********* - final url = - BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val]; + -======= - final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];///"https://uat.hmgwebservices.com/Services/Doctors.svc/REST/"; - //BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val]; + final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val]; // print("a===========$url=======a"); ->>>>>>> 8d3aa791dfc0074fddba54520ff4c13f5aa02bad try { final response = await client.post(url, From ac4489c452895bda8ec13841a86657c921b599a6 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Mon, 11 May 2020 16:44:32 +0300 Subject: [PATCH 3/3] patiant model modify --- lib/models/patient/patient_model.dart | 96 +++++++++++++++++-- .../patients/patient_search_screen.dart | 30 ++++-- lib/screens/patients/patients_screen.dart | 13 +-- 3 files changed, 119 insertions(+), 20 deletions(-) diff --git a/lib/models/patient/patient_model.dart b/lib/models/patient/patient_model.dart index e49f64ea..93e77c18 100644 --- a/lib/models/patient/patient_model.dart +++ b/lib/models/patient/patient_model.dart @@ -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 { int ProjectID; int ClinicID; int DoctorID; String FirstName; + String MiddleName; String LastName; String PatientMobileNumber; @@ -21,13 +31,87 @@ class PatientModel { bool PatientOutSA; - getFirstName() { - return this.FirstName; - } + int get getProjectID => ProjectID; + + 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; - } diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 2582310a..4704b564 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -62,15 +62,32 @@ class _PatientSearchScreenState extends State { // _patientSearchFormValues.TokenID = if (_formKey.currentState.validate()) { -// If all data are correct then save data to out variables - // _formKey.currentState.save(); - sharedPref.setString(TOKEN,'@dm!n'); - sharedPref.setString(SLECTED_PATIENT_TYPE,_selectedType); +//*****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(); + //*********************************** */ + sharedPref.setString(TOKEN, '@dm!n'); + sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); print('_selectedType${_selectedType}'); String token = await sharedPref.getString(TOKEN); int projectID = await sharedPref.getInt(PROJECT_ID); _patientSearchFormValues.TokenID = token; - _patientSearchFormValues.ProjectID = 15;//projectID; + _patientSearchFormValues.ProjectID = 15; //projectID; // print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf"); Navigator.of(context).pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, @@ -173,7 +190,8 @@ class _PatientSearchScreenState extends State { AppTextFormField( hintText: 'First Name', onSaved: (value) { - _patientSearchFormValues.FirstName = value; + // _patientSearchFormValues.FirstName = value; + _patientSearchFormValues.setFirstName = value; }, // validator: (value) { // return TextValidator().validateName(value); diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 979c4158..676f9589 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -285,15 +285,12 @@ class _PatientsScreenState extends State { Container( child: Center( child: - DrAppCircularProgressIndeicator()), + Padding( + padding: const EdgeInsets.fromLTRB(0, 250, 0, 0), + child: DrAppCircularProgressIndeicator(), + )), ), - Container( - child: Text( - "Sorry There is No Data", - style: TextStyle( - color: Theme.of(context).errorColor), - ), - ) + ], ) : Column(