From 7c291f8d63fda16d71bfffac8527a4063f6f4df8 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 6 May 2020 14:17:54 +0300 Subject: [PATCH] add comment and fix some pugs --- lib/interceptor/http_interceptor.dart | 1 + lib/models/patient/lab_orders_req_model.dart | 8 ++++++++ lib/models/patient/lab_orders_res_model.dart | 7 +++++++ lib/models/patient/prescription_req_model.dart | 7 +++++++ lib/models/patient/prescription_res_model.dart | 7 +++++++ lib/models/patient/radiology_req_model.dart | 7 +++++++ lib/models/patient/radiology_res_model.dart | 7 +++++++ lib/models/patient/vital_sign_res_model.dart | 7 +++++++ lib/providers/patients_provider.dart | 2 +- lib/routes.dart | 8 ++++---- lib/screens/patients/patients_screen.dart | 1 - 11 files changed, 56 insertions(+), 6 deletions(-) diff --git a/lib/interceptor/http_interceptor.dart b/lib/interceptor/http_interceptor.dart index c27b3cb9..4d0f9c33 100644 --- a/lib/interceptor/http_interceptor.dart +++ b/lib/interceptor/http_interceptor.dart @@ -25,6 +25,7 @@ class HttpInterceptor extends InterceptorContract { Future interceptRequest({RequestData data}) async { print('RequestData ${data.body}'); + print('RequestData ${data.url}'); try { data.headers["Content-Type"] = "application/json"; data.headers["Accept"] = "application/json"; diff --git a/lib/models/patient/lab_orders_req_model.dart b/lib/models/patient/lab_orders_req_model.dart index dc0fb584..0295ce8d 100644 --- a/lib/models/patient/lab_orders_req_model.dart +++ b/lib/models/patient/lab_orders_req_model.dart @@ -1,3 +1,11 @@ + +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:LabOrdersReqModel + *@desc: LabOrdersReqModel class + */ class LabOrdersReqModel { int patientID; int patientTypeID; diff --git a/lib/models/patient/lab_orders_res_model.dart b/lib/models/patient/lab_orders_res_model.dart index 41d41125..556f0474 100644 --- a/lib/models/patient/lab_orders_res_model.dart +++ b/lib/models/patient/lab_orders_res_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:LabOrdersResModel + *@desc: LabOrdersResModel class + */ class LabOrdersResModel { String setupID; int projectID; diff --git a/lib/models/patient/prescription_req_model.dart b/lib/models/patient/prescription_req_model.dart index a4bfe1b7..45ca2d74 100644 --- a/lib/models/patient/prescription_req_model.dart +++ b/lib/models/patient/prescription_req_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:PrescriptionReqModel + *@desc: PrescriptionReqModel class + */ class PrescriptionReqModel { int patientID; int setupID; diff --git a/lib/models/patient/prescription_res_model.dart b/lib/models/patient/prescription_res_model.dart index 5ff08e3e..7bb545ee 100644 --- a/lib/models/patient/prescription_res_model.dart +++ b/lib/models/patient/prescription_res_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:PrescriptionResModel + *@desc: PrescriptionResModel class + */ class PrescriptionResModel { String setupID; int projectID; diff --git a/lib/models/patient/radiology_req_model.dart b/lib/models/patient/radiology_req_model.dart index 35b398bf..b39fb393 100644 --- a/lib/models/patient/radiology_req_model.dart +++ b/lib/models/patient/radiology_req_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:RadiologyReqModel + *@desc: RadiologyReqModel class + */ class RadiologyReqModel { int patientID; int projectID; diff --git a/lib/models/patient/radiology_res_model.dart b/lib/models/patient/radiology_res_model.dart index 45161195..6c6509a9 100644 --- a/lib/models/patient/radiology_res_model.dart +++ b/lib/models/patient/radiology_res_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:RadiologyResModel + *@desc: RadiologyResModel class + */ class RadiologyResModel { String setupID; int projectID; diff --git a/lib/models/patient/vital_sign_res_model.dart b/lib/models/patient/vital_sign_res_model.dart index 70aa135b..6066e4b0 100644 --- a/lib/models/patient/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign_res_model.dart @@ -1,3 +1,10 @@ +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: + *@return:VitalSignResModel + *@desc: VitalSignResModel class + */ class VitalSignResModel { var transNo; var projectID; diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index bf22e565..0b63f598 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -44,7 +44,7 @@ class PatientsProvider with ChangeNotifier { // 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/"; + 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]; // print("a===========$url=======a"); diff --git a/lib/routes.dart b/lib/routes.dart index e58f3d4d..1cf0901a 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -40,10 +40,10 @@ const String PHARMACIES_LIST = 'medicine/pharmacies-list'; const String MESSAGES = 'messages'; const String SERVICES = 'services'; const String SETTINGS = 'settings'; -const String VITAL_SIGN = 'vital-sign'; -const String LAB_ORDERS = 'lab_orders'; -const String PRESCRIPTIONS = 'Prescription'; -const String RADIOLOGY = 'Radiology'; +const String VITAL_SIGN = 'patients/vital-sign'; +const String LAB_ORDERS = 'patients/lab_orders'; +const String PRESCRIPTIONS = 'patients/prescription'; +const String RADIOLOGY = 'patients/radiology'; var routes = { diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index fc2eb3d6..979c4158 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -77,7 +77,6 @@ class _PatientsScreenState extends State { if (_isInit) { PatientsProvider patientsProv = Provider.of(context); patientsProv.getPatientList(patient, patientType).then((res) { - print('List_MyInPatient${(res['List_MyInPatient'])}'); setState(() { int val2 = int.parse(patientType); litems = res[SERVICES_PATIANT2[val2]];