diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 9af0820f..3fe1f22d 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -1,2 +1,3 @@ final TOKEN = 'token'; -final PROJECT_ID="projectID"; \ No newline at end of file +final PROJECT_ID="projectID"; +final SLECTED_PATIENT_TYPE="slectedPatientType"; \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 4710b91c..a205b379 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,14 +20,12 @@ class MyApp extends StatelessWidget { SizeConfig().init(constraints, orientation); return MultiProvider( providers: [ - ChangeNotifierProvider.value(value: PatientsProvider()), - ChangeNotifierProvider.value(value: AuthProvider()), - ChangeNotifierProvider.value(value: ProjectsProvider()), + ChangeNotifierProvider(create: (context) => PatientsProvider()), + ChangeNotifierProvider(create: (context) => AuthProvider()), + ChangeNotifierProvider(create: (context) => ProjectsProvider()), ], child: MaterialApp( - //******amjad*****To remove debug app******************* showSemanticsDebugger: false, - //******************************** title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, diff --git a/lib/models/patient/lab_orders_req_model.dart b/lib/models/patient/lab_orders_req_model.dart new file mode 100644 index 00000000..dc0fb584 --- /dev/null +++ b/lib/models/patient/lab_orders_req_model.dart @@ -0,0 +1,60 @@ +class LabOrdersReqModel { + int patientID; + int patientTypeID; + int projectID; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + + LabOrdersReqModel( + {this.patientID, + this.patientTypeID, + this.projectID, + this.languageID, + this.tokenID, + this.stamp = '2020-04-26T09:32:18.317Z', + this.iPAdress='11.11.11.11', + this.versionID=1.2, + this.channel=9, + this.sessionID='E2bsEeYEJo', + this.isLoginForDoctorApp =true, + this.patientOutSA=false}); + + LabOrdersReqModel.fromJson(Map json) { + patientID = json['PatientID']; + patientTypeID = json['PatientTypeID']; + projectID = json['ProjectID']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['PatientTypeID'] = this.patientTypeID; + data['ProjectID'] = this.projectID; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} diff --git a/lib/models/patient/lab_orders_res_model.dart b/lib/models/patient/lab_orders_res_model.dart new file mode 100644 index 00000000..41d41125 --- /dev/null +++ b/lib/models/patient/lab_orders_res_model.dart @@ -0,0 +1,96 @@ +class LabOrdersResModel { + String setupID; + int projectID; + int patientID; + int patientType; + int orderNo; + String orderDate; + int invoiceTransactionType; + int invoiceNo; + int clinicId; + int doctorId; + int status; + String createdBy; + Null createdByN; + String createdOn; + String editedBy; + Null editedByN; + String editedOn; + String clinicName; + String doctorImageURL; + String doctorName; + String projectName; + + LabOrdersResModel( + {this.setupID, + this.projectID, + this.patientID, + this.patientType, + this.orderNo, + this.orderDate, + this.invoiceTransactionType, + this.invoiceNo, + this.clinicId, + this.doctorId, + this.status, + this.createdBy, + this.createdByN, + this.createdOn, + this.editedBy, + this.editedByN, + this.editedOn, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.projectName}); + + LabOrdersResModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + orderNo = json['OrderNo']; + orderDate = json['OrderDate']; + invoiceTransactionType = json['InvoiceTransactionType']; + invoiceNo = json['InvoiceNo']; + clinicId = json['ClinicId']; + doctorId = json['DoctorId']; + status = json['Status']; + createdBy = json['CreatedBy']; + createdByN = json['CreatedByN']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedByN = json['EditedByN']; + editedOn = json['EditedOn']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['OrderNo'] = this.orderNo; + data['OrderDate'] = this.orderDate; + data['InvoiceTransactionType'] = this.invoiceTransactionType; + data['InvoiceNo'] = this.invoiceNo; + data['ClinicId'] = this.clinicId; + data['DoctorId'] = this.doctorId; + data['Status'] = this.status; + data['CreatedBy'] = this.createdBy; + data['CreatedByN'] = this.createdByN; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedByN'] = this.editedByN; + data['EditedOn'] = this.editedOn; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['ProjectName'] = this.projectName; + return data; + } +} diff --git a/lib/models/patient/prescription_req_model.dart b/lib/models/patient/prescription_req_model.dart new file mode 100644 index 00000000..a4bfe1b7 --- /dev/null +++ b/lib/models/patient/prescription_req_model.dart @@ -0,0 +1,64 @@ +class PrescriptionReqModel { + int patientID; + int setupID; + int projectID; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + int patientTypeID; + + PrescriptionReqModel( + {this.patientID, + this.setupID, + this.projectID, + this.languageID, + this.stamp = '2020-04-26T09:32:18.317Z', + this.iPAdress = '11.11.11.11', + this.versionID = 1.2, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.tokenID, + this.isLoginForDoctorApp = true, + this.patientOutSA = false, + this.patientTypeID}); + + PrescriptionReqModel.fromJson(Map json) { + patientID = json['PatientID']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/models/patient/prescription_res_model.dart b/lib/models/patient/prescription_res_model.dart new file mode 100644 index 00000000..5ff08e3e --- /dev/null +++ b/lib/models/patient/prescription_res_model.dart @@ -0,0 +1,144 @@ +class PrescriptionResModel { + String setupID; + int projectID; + int patientID; + int appointmentNo; + String appointmentDate; + String doctorName; + String clinicDescription; + String name; + int episodeID; + int actualDoctorRate; + int admission; + int clinicID; + String companyName; + String despensedStatus; + String dischargeDate; + int dischargeNo; + int doctorID; + String doctorImageURL; + int doctorRate; + String doctorTitle; + int gender; + String genderDescription; + bool isActiveDoctorProfile; + bool isDoctorAllowVedioCall; + bool isExecludeDoctor; + bool isInOutPatient; + String isInOutPatientDescription; + String isInOutPatientDescriptionN; + bool isInsurancePatient; + String nationalityFlagURL; + int noOfPatientsRate; + String qR; + List speciality; + + PrescriptionResModel( + {this.setupID, + this.projectID, + this.patientID, + this.appointmentNo, + this.appointmentDate, + this.doctorName, + this.clinicDescription, + this.name, + this.episodeID, + this.actualDoctorRate, + this.admission, + this.clinicID, + this.companyName, + this.despensedStatus, + this.dischargeDate, + this.dischargeNo, + this.doctorID, + this.doctorImageURL, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isInOutPatient, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.isInsurancePatient, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.qR, + this.speciality}); + + PrescriptionResModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + doctorName = json['DoctorName']; + clinicDescription = json['ClinicDescription']; + name = json['Name']; + episodeID = json['EpisodeID']; + actualDoctorRate = json['ActualDoctorRate']; + admission = json['Admission']; + clinicID = json['ClinicID']; + companyName = json['CompanyName']; + despensedStatus = json['Despensed_Status']; + dischargeDate = json['DischargeDate']; + dischargeNo = json['DischargeNo']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatient = json['IsInOutPatient']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + isInsurancePatient = json['IsInsurancePatient']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + qR = json['QR']; + speciality = json['Speciality'].cast(); + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['DoctorName'] = this.doctorName; + data['ClinicDescription'] = this.clinicDescription; + data['Name'] = this.name; + data['EpisodeID'] = this.episodeID; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['Admission'] = this.admission; + data['ClinicID'] = this.clinicID; + data['CompanyName'] = this.companyName; + data['Despensed_Status'] = this.despensedStatus; + data['DischargeDate'] = this.dischargeDate; + data['DischargeNo'] = this.dischargeNo; + data['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['IsInsurancePatient'] = this.isInsurancePatient; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['QR'] = this.qR; + data['Speciality'] = this.speciality; + return data; + } +} diff --git a/lib/models/patient/radiology_req_model.dart b/lib/models/patient/radiology_req_model.dart new file mode 100644 index 00000000..35b398bf --- /dev/null +++ b/lib/models/patient/radiology_req_model.dart @@ -0,0 +1,60 @@ +class RadiologyReqModel { + int patientID; + int projectID; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + int patientTypeID; + + RadiologyReqModel( + {this.patientID, + this.projectID, + this.languageID, + this.stamp = '2020-04-26T09:32:18.317Z', + this.iPAdress = '11.11.11.11', + this.versionID = 1.2, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.tokenID, + this.isLoginForDoctorApp = true, + this.patientOutSA = false, + this.patientTypeID}); + + RadiologyReqModel.fromJson(Map json) { + patientID = json['PatientID']; + projectID = json['ProjectID']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/models/patient/radiology_res_model.dart b/lib/models/patient/radiology_res_model.dart new file mode 100644 index 00000000..45161195 --- /dev/null +++ b/lib/models/patient/radiology_res_model.dart @@ -0,0 +1,72 @@ +class RadiologyResModel { + String setupID; + int projectID; + int patientID; + int invoiceLineItemNo; + int invoiceNo; + String reportData; + String imageURL; + int clinicId; + int doctorId; + String reportDate; + String clinicName; + String doctorImageURL; + String doctorName; + String projectName; + Null statusDescription; + + RadiologyResModel( + {this.setupID, + this.projectID, + this.patientID, + this.invoiceLineItemNo, + this.invoiceNo, + this.reportData, + this.imageURL, + this.clinicId, + this.doctorId, + this.reportDate, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.projectName, + this.statusDescription}); + + RadiologyResModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + invoiceLineItemNo = json['InvoiceLineItemNo']; + invoiceNo = json['InvoiceNo']; + reportData = json['ReportData']; + imageURL = json['ImageURL']; + clinicId = json['ClinicId']; + doctorId = json['DoctorId']; + reportDate = json['ReportDate']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + projectName = json['ProjectName']; + statusDescription = json['StatusDescription']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['InvoiceLineItemNo'] = this.invoiceLineItemNo; + data['InvoiceNo'] = this.invoiceNo; + data['ReportData'] = this.reportData; + data['ImageURL'] = this.imageURL; + data['ClinicId'] = this.clinicId; + data['DoctorId'] = this.doctorId; + data['ReportDate'] = this.reportDate; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['ProjectName'] = this.projectName; + data['StatusDescription'] = this.statusDescription; + return data; + } +} diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index 69309178..ce00c085 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -1,6 +1,10 @@ import 'dart:convert'; +import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart'; +import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart'; +import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart'; import 'package:http_interceptor/http_client_with_interceptor.dart'; @@ -14,12 +18,19 @@ import '../util/helpers.dart'; const GET_PATIENT_VITAL_SIGN = BASE_URL + 'Doctors.svc/REST/Doctor_GetPatientVitalSign'; - +const GET_PATIENT_LAB_OREDERS =BASE_URL + 'DoctorApplication.svc/REST/GetPatientLabOreders'; +const GET_PRESCRIPTION =BASE_URL+'Patients.svc/REST/GetPrescriptionApptList'; +const GET_RADIOLOGY = BASE_URL+'DoctorApplication.svc/REST/GetPatientRadResult'; class PatientsProvider with ChangeNotifier { bool isLoading = true; bool isError = false; String error = ''; List patientVitalSignList = []; + List patientLabResultOrdersList = []; + List patientPrescriptionsList = []; + List patientRadiologyList = []; + + Client client = HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]); @@ -71,8 +82,8 @@ class PatientsProvider with ChangeNotifier { /* *@author: Elham Rababah *@Date:27/4/2020 - *@param: - *@return:Future + *@param: patient + *@return: *@desc: getPatientVitalSign */ getPatientVitalSign(patient) async { @@ -90,11 +101,10 @@ class PatientsProvider with ChangeNotifier { var res = json.decode(response.body); print('$res'); if (res['MessageStatus'] == 1) { - patientVitalSignList=[]; + patientVitalSignList = []; res['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignList - .add(new VitalSignResModel.fromJson(v)); - }); + patientVitalSignList.add(new VitalSignResModel.fromJson(v)); + }); // patientVitalSignList = res['List_DoctorPatientVitalSign']; } else { isError = true; @@ -120,4 +130,132 @@ class PatientsProvider with ChangeNotifier { // return _selectedPatient; _selectedPatient = patient; } + +/*@author: Elham Rababah + *@Date:27/4/2020 + *@param: patient + *@return: + *@desc: getLabResult Orders + */ + getLabResultOrders(patient) async { + try { + if (await Helpers.checkConnection()) { + final response = await client.post(GET_PATIENT_LAB_OREDERS, + body: json.encode(patient)); + final int statusCode = response.statusCode; + isLoading = false; + + if (statusCode < 200 || statusCode >= 400 || json == null) { + isError = true; + error = 'Error While Fetching data'; + } else { + var res = json.decode(response.body); + print('$res'); + if (res['MessageStatus'] == 1) { + patientLabResultOrdersList = []; + print("res['List_GetLabOreders']"); + res['List_GetLabOreders'].forEach((v) { + patientLabResultOrdersList.add(new LabOrdersResModel.fromJson(v)); + }); + } else { + isError = true; + error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; + } + } + } else { + isLoading = false; + isError = true; + error = 'Please Check The Internet Connection'; + } + notifyListeners(); + } catch (error) { + throw error; + } + } + +/*@author: Elham Rababah + *@Date:3/5/2020 + *@param: patient + *@return: + *@desc: getPatientPrescriptions + */ +getPatientPrescriptions(patient) async { + try { + if (await Helpers.checkConnection()) { + final response = await client.post(GET_PRESCRIPTION, + body: json.encode(patient)); + final int statusCode = response.statusCode; + isLoading = false; + + if (statusCode < 200 || statusCode >= 400 || json == null) { + isError = true; + error = 'Error While Fetching data'; + } else { + var res = json.decode(response.body); + print('$res'); + if (res['MessageStatus'] == 1) { + patientPrescriptionsList = []; + print("res['PatientPrescriptionList']"); + res['PatientPrescriptionList'].forEach((v) { + patientPrescriptionsList.add(new PrescriptionResModel.fromJson(v)); + }); + } else { + isError = true; + error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; + } + } + } else { + isLoading = false; + isError = true; + error = 'Please Check The Internet Connection'; + } + notifyListeners(); + } catch (error) { + throw error; + } + } + +/*@author: Elham Rababah + *@Date:3/5/2020 + *@param: patient + *@return: + *@desc: getPatientRadiology + */ +getPatientRadiology(patient) async { + try { + if (await Helpers.checkConnection()) { + final response = await client.post(GET_RADIOLOGY, + body: json.encode(patient)); + final int statusCode = response.statusCode; + isLoading = false; + + if (statusCode < 200 || statusCode >= 400 || json == null) { + isError = true; + error = 'Error While Fetching data'; + } else { + var res = json.decode(response.body); + print('$res'); + if (res['MessageStatus'] == 1) { + patientRadiologyList = []; + print("res['List_GetRadOreders']"); + res['List_GetRadOreders'].forEach((v) { + patientRadiologyList.add(new RadiologyResModel .fromJson(v)); + }); + } else { + isError = true; + error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; + } + } + } else { + isLoading = false; + isError = true; + error = 'Please Check The Internet Connection'; + } + notifyListeners(); + } catch (error) { + throw error; + } + } + + } diff --git a/lib/providers/schedule_provider.dart b/lib/providers/schedule_provider.dart index 6b75556a..14bc4571 100644 --- a/lib/providers/schedule_provider.dart +++ b/lib/providers/schedule_provider.dart @@ -18,21 +18,7 @@ class ScheduleProvider with ChangeNotifier { bool isLoading = true; bool isError = false; String error = ''; - RequestSchedule requestSchedule = RequestSchedule( - 15, - 1, - 70907, - 7, - 2, - '2020-04-22T11:25:57.640Z', - '11.11.11.11', - 1.2, - 9, - '2lMDFT8U+Uy5jxRzCO8n2w==', - 'vV6tg9yyVJ222', - true, - false, - 1); + RequestSchedule requestSchedule = RequestSchedule(15, 1, 70907, 7, 2, '2020-04-22T11:25:57.640Z', '11.11.11.11', 1.2, 9, '2lMDFT8U+Uy5jxRzCO8n2w==', 'vV6tg9yyVJ222', true, false, 1); ScheduleProvider() { getDoctorSchedule(); @@ -62,7 +48,7 @@ class ScheduleProvider with ChangeNotifier { isError = true; error = 'Please Check The Internet Connection'; } - print('Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer'); + notifyListeners(); } catch (error) { throw error; diff --git a/lib/routes.dart b/lib/routes.dart index 9c135640..e58f3d4d 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,10 +1,3 @@ -import 'package:doctor_app_flutter/screens/doctor/message_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/services_screen.dart'; - -import './screens/doctor/my_schedule_screen.dart'; - -import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; - import './screens/QR_reader_screen.dart'; import './screens/auth/change_password_screen.dart'; import './screens/auth/login_screen.dart'; @@ -12,14 +5,21 @@ import './screens/auth/verification_methods_screen.dart'; import './screens/auth/verify_account_screen.dart'; import './screens/blood_bank_screen.dart'; import './screens/dashboard_screen.dart'; -import 'screens/doctor/doctor_reply_screen.dart'; +import './screens/doctor/message_screen.dart'; +import './screens/doctor/my_schedule_screen.dart'; +import './screens/doctor/services_screen.dart'; import './screens/medicine/medicine_search_screen.dart'; -import './screens/patients/profile/patient_profile_screen.dart'; +import './screens/medicine/pharmacies_list_screen.dart'; import './screens/patients/patient_search_screen.dart'; import './screens/patients/patients_screen.dart'; +import './screens/patients/profile/lab_result/lab_orders_screen.dart'; +import './screens/patients/profile/patient_profile_screen.dart'; +import './screens/patients/profile/prescriptions/prescriptions_screen.dart'; +import './screens/patients/profile/radiology/radiology_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_screen.dart'; import './screens/profile_screen.dart'; import './screens/settings/settings_screen.dart'; +import 'screens/doctor/doctor_reply_screen.dart'; const String INIT_ROUTE = LOGIN; const String HOME = '/'; @@ -41,6 +41,10 @@ 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'; + var routes = { HOME: (_) => DashboardScreen(), @@ -61,5 +65,8 @@ var routes = { PHARMACIES_LIST: (_) => PharmaciesListScreen(itemID: null,), VITAL_SIGN: (_) => VitalSignScreen(), MESSAGES: (_) => MessagesScreen(), - SERVICES: (_) => ServicesScreen() + SERVICES: (_) => ServicesScreen(), + LAB_ORDERS:(_)=>LabOrdersScreen(), + PRESCRIPTIONS:(_)=>PrescriptionScreen(), + RADIOLOGY:(_)=>RadiologyScreen() }; diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 591d3059..97987ff0 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State { var _patientSearchFormValues = PatientModel( ProjectID: 15, - ClinicID: 90, - DoctorID: 145642, + ClinicID: 14, + DoctorID: 243763, FirstName: "0", MiddleName: "0", LastName: "0", @@ -64,6 +64,9 @@ class _PatientSearchScreenState extends State { 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); + print('_selectedType${_selectedType}'); String token = await sharedPref.getString(TOKEN); int projectID = await sharedPref.getInt(PROJECT_ID); _patientSearchFormValues.TokenID = token; @@ -85,7 +88,6 @@ class _PatientSearchScreenState extends State { Widget build(BuildContext context) { return AppScaffold( appBarTitle: "SEARCH FOR PATIENT", - current: 1, body: ListView( children: [ RoundedContainer( @@ -241,7 +243,7 @@ class _PatientSearchScreenState extends State { //_patientSearchFormValues. = value; }, ), - (!(_selectedType == '3' || _selectedType == '5')) + (!(_selectedType == '2' || _selectedType == '4')) ? DynamicElements(_patientSearchFormValues) : SizedBox( height: 0, diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index f49e4417..91c15022 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -33,8 +33,19 @@ class PatientsScreen extends StatefulWidget { class _PatientsScreenState extends State { List litems; + // final List parsed; + List parsed; + //********** + List date; + List unfilterDate; + //*********** List responseModelList; + List responseModelList2; + + + + List _locations = ['Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; @@ -60,7 +71,7 @@ class _PatientsScreenState extends State { patientType = routeArgs['selectedType']; patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; - print("**************patiant Type**************"); + print(patientType); if (_isInit) { @@ -71,9 +82,10 @@ class _PatientsScreenState extends State { int val2 = int.parse(patientType); litems = res[SERVICES_PATIANT2[val2]]; - final List parsed = litems; + parsed = litems; responseModelList = new ModelResponse.fromJson(parsed).list; + responseModelList2=responseModelList; //******************** _isLoading = false; _hasError = res['ErrorEndUserMessage']; @@ -86,6 +98,40 @@ class _PatientsScreenState extends State { _isInit = false; super.didChangeDependencies(); } +/* + *@author: Amjad Amireh + *@Date:2/5/2020 + *@param: + *@return:PatientsScreen Search textbox + + *@desc: + */ + searchData(String str) { + var strExist = str.length > 0 ? true : false; + if (strExist) { + List filterData=[] ; + for (var i = 0; i < responseModelList2.length; i++) { + + String firstName = responseModelList[i].firstName.toUpperCase(); + String lastName = responseModelList[i].lastName.toUpperCase(); + if (firstName.contains(str.toUpperCase())||lastName.contains(str.toUpperCase())) { + print("==========data done==========="); + filterData.add(responseModelList[i]); + } + } + setState(() { + print("==========data good==========="); + this.responseModelList = filterData; + }); + } else { + setState(() { + print("==========no data==========="); + + this.responseModelList =this.responseModelList2; + }); + } + } + @override Widget build(BuildContext context) { @@ -95,11 +141,13 @@ class _PatientsScreenState extends State { appBarTitle: patientTypetitle, //***********Modify by amjad (create List view to insert all new data webservise in scroll )************* body: Container( + // margin: EdgeInsets.all(20), child: ListView(scrollDirection: Axis.vertical, children: [ Container( child: litems == null ? Column() - : Column( + : + Column( children: [ Padding( padding: EdgeInsets.only( @@ -111,50 +159,56 @@ class _PatientsScreenState extends State { width: SizeConfig.screenWidth * 0.80, child: TextField( controller: _controller, - onSubmitted: (value) { - // fetch all the news related to the keyword - if (value.isNotEmpty) { - // vm.search(value); - } + + onChanged: (String str){ + // print(str); + this.searchData(str); + }, decoration: buildInputDecoration(context, 'Search patiant'), ), ), - Column( - children: - responseModelList.map((PatiantInformtion item) { - return InkWell( - child: CardWithBgWidget( - widget: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - item.nationalityName, - fontSize: 2.5 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText(item.lastName, - fontSize: - 2.5 * SizeConfig.textMultiplier), - SizedBox( - height: 8, - ), - AppText(item.middleName, - fontSize: - 2.5 * SizeConfig.textMultiplier), - ], + Container( + margin: EdgeInsets.fromLTRB(15, 0, 15, 0), + child: Column( + + children: + responseModelList.map((PatiantInformtion item) { + return InkWell( + child: CardWithBgWidget( + + widget: Column( + + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + item.firstName, + fontSize: 2.5 * SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText(item.lastName, + fontSize: + 2.5 * SizeConfig.textMultiplier), + SizedBox( + height: 8, + ), + AppText(item.middleName, + fontSize: + 2.5 * SizeConfig.textMultiplier), + ], + ), ), - ), - onTap: () { - Navigator.of(context).pushNamed( - PATIENTS_PROFILE, - arguments: {"patient": item}); - }, - ); - }).toList(), + onTap: () { + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: {"patient": item}); + }, + ); + }).toList(), + ), ), ], )) diff --git a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart new file mode 100644 index 00000000..7f576f8c --- /dev/null +++ b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart @@ -0,0 +1,160 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/shared_pref_kay.dart'; +import '../../../../config/size_config.dart'; +import '../../../../models/patient/lab_orders_req_model.dart'; +import '../../../../models/patient/patiant_info_model.dart'; +import '../../../../providers/patients_provider.dart'; +import '../../../../util/dr_app_shared_pref.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/app_texts_widget.dart'; +import '../../../../widgets/shared/card_with_bg_widget.dart'; +import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +/* + *@author: Elham Rababah + *@Date:26/4/2020 + *@param: + *@return:LabOrdersScreen + *@desc: LabOrdersScreen class + */ + +class LabOrdersScreen extends StatefulWidget { + @override + _LabOrdersScreenState createState() => _LabOrdersScreenState(); +} + +class _LabOrdersScreenState extends State { + PatientsProvider patientsProv; + var _isInit = true; + + /* + *@author: Elham Rababah + *@Date:28/4/2020 + *@param: context + *@return: + *@desc: getVitalSignList Function + */ + getLabResultOrders(context) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String token = await sharedPref.getString(TOKEN); + // String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + // int inOutpatientType = 1; + // if (type == '0') { + // inOutpatientType = 2; + // } + // print(type); + LabOrdersReqModel labOrdersReqModel = LabOrdersReqModel( + patientID: patient.patientId, + projectID: patient.projectId, + tokenID: token, + patientTypeID: patient.patientType, + languageID: 2); + + patientsProv.getLabResultOrders(labOrdersReqModel.toJson()); + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + if (_isInit) { + patientsProv = Provider.of(context); + getLabResultOrders(context); + } + _isInit = false; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "Lab Orders", + showAppDrawer: false, + showBottomBar: false, + body: patientsProv.isLoading + ? DrAppCircularProgressIndeicator() + : patientsProv.isError + ? Center( + child: Text( + patientsProv.error, + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : patientsProv.patientLabResultOrdersList.length == 0 + ? Center( + child: Text( + 'You don\'t have any Orders', + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : Container( + margin: EdgeInsets.fromLTRB( + SizeConfig.realScreenWidth * 0.05, + 0, + SizeConfig.realScreenWidth * 0.05, + 0), + child: ListView.builder( + itemCount: + patientsProv.patientLabResultOrdersList.length, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: CardWithBgWidget( + widget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + CircleAvatar( + radius: + SizeConfig.imageSizeMultiplier * + 12, + backgroundImage: NetworkImage( + patientsProv + .patientLabResultOrdersList[ + index] + .doctorImageURL), + backgroundColor: Colors.transparent, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientLabResultOrdersList[index].doctorName}', + fontSize: 2.5 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + ' ${patientsProv.patientLabResultOrdersList[index].clinicName}', + fontSize: 2.5 * + SizeConfig + .textMultiplier), + SizedBox( + height: 8, + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + onTap: () {}, + ); + }), + ), + ); + } +} diff --git a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart new file mode 100644 index 00000000..ab1769d7 --- /dev/null +++ b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart @@ -0,0 +1,161 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/shared_pref_kay.dart'; +import '../../../../models/patient/vital_sign_req_model.dart'; +import '../../../../providers/patients_provider.dart'; + +import '../../../../util/dr_app_shared_pref.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/card_with_bg_widget.dart'; +import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +/* + *@author: Elham Rababah + *@Date:26/4/2020 + *@param: + *@return:PrescriptionScreen + *@desc: PrescriptionScreen class + */ + +class PrescriptionScreen extends StatefulWidget { + @override + _PrescriptionScreenState createState() => _PrescriptionScreenState(); +} + +class _PrescriptionScreenState extends State { + PatientsProvider patientsProv; + var _isInit = true; + + /* + *@author: Elham Rababah + *@Date:28/4/2020 + *@param: context + *@return: + *@desc: getPrescriptionsList Function + */ + getPrescriptionsList(context) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String token = await sharedPref.getString(TOKEN); + // String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + // int inOutpatientType = 1; + // if (type == '0') { + // inOutpatientType = 2; + // } + // print(type); + PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel( + patientID: patient.patientId, + projectID: patient.projectId, + tokenID: token, + patientTypeID: patient.patientType, + languageID: 2, + setupID: 0 + ); + patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson()); + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + if (_isInit) { + patientsProv = Provider.of(context); + getPrescriptionsList(context); + } + _isInit = false; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "Prescriptions", + showAppDrawer: false, + showBottomBar: false, + body: patientsProv.isLoading + ? DrAppCircularProgressIndeicator() + : patientsProv.isError + ? Center( + child: Text( + patientsProv.error, + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : patientsProv.patientPrescriptionsList.length == 0 + ? Center( + child: Text( + 'You don\'t have any Prescriptions', + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : Container( + margin: EdgeInsets.fromLTRB( + SizeConfig.realScreenWidth * 0.05, + 0, + SizeConfig.realScreenWidth * 0.05, + 0), + child: ListView.builder( + itemCount: patientsProv.patientPrescriptionsList.length, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: CardWithBgWidget( + widget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + CircleAvatar( + radius: + SizeConfig.imageSizeMultiplier * + 12, + backgroundImage: NetworkImage( + patientsProv + .patientPrescriptionsList[index] + .doctorImageURL), + backgroundColor: Colors.transparent, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientPrescriptionsList[index].doctorName}', + fontSize: 2.5 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + ' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', + fontSize: 2.5 * + SizeConfig + .textMultiplier), + SizedBox( + height: 8, + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + onTap: () {}, + ); + }), + ), + ); + } +} diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart new file mode 100644 index 00000000..8f0aaf55 --- /dev/null +++ b/lib/screens/patients/profile/radiology/radiology_screen.dart @@ -0,0 +1,168 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/radiology_req_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/shared_pref_kay.dart'; +import '../../../../models/patient/vital_sign_req_model.dart'; +import '../../../../providers/patients_provider.dart'; + +import '../../../../util/dr_app_shared_pref.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/card_with_bg_widget.dart'; +import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +/* + *@author: Elham Rababah + *@Date:26/4/2020 + *@param: + *@return:RadiologyScreen + *@desc: RadiologyScreen class + */ + +class RadiologyScreen extends StatefulWidget { + @override + _RadiologyScreenState createState() => _RadiologyScreenState(); +} + +class _RadiologyScreenState extends State { + PatientsProvider patientsProv; + var _isInit = true; + + /* + *@author: Elham Rababah + *@Date:28/4/2020 + *@param: context + *@return: + *@desc: getRadiologyList Function + */ + getRadiologyList(context) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String token = await sharedPref.getString(TOKEN); + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + int inOutpatientType = 1; + if (type == '0') { + inOutpatientType = 2; + } + print(type); + RadiologyReqModel radiologyReqModel = RadiologyReqModel( + patientID: patient.patientId, + projectID: patient.projectId, + tokenID: token, + patientTypeID: patient.patientType, + languageID: 2, + ); + patientsProv.getPatientRadiology(radiologyReqModel.toJson()); + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + if (_isInit) { + patientsProv = Provider.of(context); + getRadiologyList(context); + } + _isInit = false; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "Radiology", + showAppDrawer: false, + showBottomBar: false, + body: patientsProv.isLoading + ? DrAppCircularProgressIndeicator() + : patientsProv.isError + ? Center( + child: Text( + patientsProv.error, + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : patientsProv.patientRadiologyList.length == 0 + ? Center( + child: Text( + 'You don\'t have any Vital Sign', + style: TextStyle(color: Theme.of(context).errorColor), + ), + ) + : Container( + margin: EdgeInsets.fromLTRB( + SizeConfig.realScreenWidth * 0.05, + 0, + SizeConfig.realScreenWidth * 0.05, + 0), + child: ListView.builder( + itemCount: patientsProv.patientRadiologyList.length, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: CardWithBgWidget( + widget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + CircleAvatar( + radius: + SizeConfig.imageSizeMultiplier * + 12, + backgroundImage: NetworkImage( + patientsProv + .patientRadiologyList[index] + .doctorImageURL), + backgroundColor: Colors.transparent, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientRadiologyList[index].doctorName}', + fontSize: 2.5 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', + fontSize: 2.5 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + ' ${patientsProv.patientRadiologyList[index].clinicName}', + fontSize: 2.5 * + SizeConfig + .textMultiplier), + SizedBox( + height: 8, + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + onTap: () {}, + ); + }), + ), + ); + } +} diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart index 6510af35..8c97588b 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart @@ -43,12 +43,18 @@ class _VitalSignScreenState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String token = await sharedPref.getString(TOKEN); + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + int inOutpatientType = 1; + if (type == '0') { + inOutpatientType = 2; + } + print(type); VitalSignReqModel vitalSignReqModel = VitalSignReqModel( patientID: patient.patientId, projectID: patient.projectId, tokenID: token, patientTypeID: patient.patientType, - inOutpatientType: 1, + inOutpatientType: inOutpatientType, languageID: 2, transNo: patient.admissionNo != null ? int.parse(patient.admissionNo) : 0); @@ -83,7 +89,7 @@ class _VitalSignScreenState extends State { : patientsProv.patientVitalSignList.length == 0 ? Center( child: Text( - 'You don\'t have any Schedule', + 'You don\'t have any Vital Sign', style: TextStyle(color: Theme.of(context).errorColor), ), ) @@ -113,27 +119,32 @@ class _VitalSignScreenState extends State { .doctorImageURL), backgroundColor: Colors.transparent, ), - Padding( - padding: const EdgeInsets.fromLTRB(8,0,0,0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - '${patientsProv.patientVitalSignList[index].doctorName}', - fontSize: 2.5 * - SizeConfig.textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${patientsProv.patientVitalSignList[index].clinicName}', + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientVitalSignList[index].doctorName}', fontSize: 2.5 * - SizeConfig.textMultiplier), - SizedBox( - height: 8, - ), - ], + SizeConfig.textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + ' ${patientsProv.patientVitalSignList[index].clinicName}', + fontSize: 2.5 * + SizeConfig + .textMultiplier), + SizedBox( + height: 8, + ), + ], + ), ), ) ], @@ -148,17 +159,3 @@ class _VitalSignScreenState extends State { ); } } - -// patientsProv.patientVitalSignList.map((VitalSignResModel item) { -// return InkWell( -// child: CardWithBgWidget( -// line1Text: 'DoctorName - ${item.doctorName}', -// line2Text: -// 'PainScoreDesc - ${item.painScoreDesc}', -// heightPercentage: 0.15, -// widthPercentage: 0.80), -// onTap: () { -// Navigator.of(context).pushNamed(VITAL_SIGN); -// }, -// ); -// }).toList() diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 1621438c..7817e9b0 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -46,7 +46,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { children: [ InkWell( onTap: () { - navigator(context,VITAL_SIGN); + navigator(context, VITAL_SIGN); }, child: CircleAvatarWidget( des: 'Vital Sign', @@ -55,23 +55,39 @@ class ProfileMedicalInfoWidget extends StatelessWidget { height: (contWidth) / 3.5, ), ), - CircleAvatarWidget( - des: 'Lab Result', - url: url + 'lab.png', - width: (contWidth) / 3.5, - height: (contWidth) / 3.5, + InkWell( + onTap: () { + navigator(context, LAB_ORDERS); + }, + child: CircleAvatarWidget( + des: 'Lab Result', + url: url + 'lab.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), ), - CircleAvatarWidget( - des: 'Prescription', - url: url + 'note.png', - width: (contWidth) / 3.5, - height: (contWidth) / 3.5, + InkWell( + onTap: () { + navigator(context, PRESCRIPTIONS); + }, + child: CircleAvatarWidget( + des: 'Prescription', + url: url + 'note.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), ), - CircleAvatarWidget( - des: 'Radiology', - url: url + 'radiology-1.png', - width: (contWidth) / 3.5, - height: (contWidth) / 3.5, + InkWell( + //RADIOLOGY + onTap: () { + navigator(context, RADIOLOGY); + }, + child: CircleAvatarWidget( + des: 'Radiology', + url: url + 'radiology-1.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), ), ], ) @@ -85,9 +101,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget { ); } - void navigator(BuildContext context,route) { - Navigator.of(context).pushNamed(VITAL_SIGN, - arguments: {'patient': patient}); + void navigator(BuildContext context, route) { + Navigator.of(context).pushNamed(route, arguments: {'patient': patient}); } } diff --git a/pubspec.lock b/pubspec.lock index f0f825ee..14612a67 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.5" + version: "0.39.8" archive: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" + version: "2.4.1" bazel_worker: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.0.0" build: dependency: transitive description: @@ -84,21 +84,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "1.3.4" + version: "1.3.7" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" build_web_compilers: dependency: "direct dev" description: @@ -119,14 +119,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "7.0.9" + version: "7.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" checked_yaml: dependency: transitive description: @@ -134,6 +134,13 @@ 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: @@ -147,7 +154,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.14.12" connectivity: dependency: "direct main" description: @@ -168,7 +175,7 @@ packages: name: connectivity_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.5" convert: dependency: transitive description: @@ -204,6 +211,13 @@ 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: @@ -236,7 +250,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "1.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -281,7 +295,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_interceptor: dependency: "direct main" description: @@ -310,13 +324,6 @@ 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: @@ -358,7 +365,7 @@ packages: name: local_auth url: "https://pub.dartlang.org" source: hosted - version: "0.6.1+3" + version: "0.6.2+1" logging: dependency: transitive description: @@ -387,6 +394,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.9.6+3" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" node_interop: dependency: transitive description: @@ -414,7 +428,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.7.0" pedantic: dependency: transitive description: @@ -429,13 +443,6 @@ 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: @@ -477,7 +484,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.0.5+1" pub_semver: dependency: transitive description: @@ -526,14 +533,14 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.6+3" + version: "0.5.7" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+6" + version: "0.0.1+7" shared_preferences_platform_interface: dependency: transitive description: @@ -580,7 +587,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.7.0" stack_trace: dependency: transitive description: @@ -622,7 +629,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.11" + version: "0.2.15" timing: dependency: transitive description: @@ -650,7 +657,7 @@ packages: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+14" + version: "0.9.7+15" web_socket_channel: dependency: transitive description: @@ -658,20 +665,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: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 1f7041ad..20f3f50a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: flutter_device_type: ^0.2.0 intl: ^0.16.1 http: ^0.12.0+4 - provider: ^3.0.0 + provider: ^4.0.5+1 i18n: any shared_preferences: ^0.5.6+3 imei_plugin: ^1.1.6