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 0c533c52..0f9dff6f 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -43,10 +43,16 @@ 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]; + // print("a===========$url=======a"); +>>>>>>> 8d3aa791dfc0074fddba54520ff4c13f5aa02bad try { final response = await client.post(url, diff --git a/lib/routes.dart b/lib/routes.dart index e58f3d4d..dcef9fbe 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -16,6 +16,7 @@ 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_details_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_screen.dart'; import './screens/profile_screen.dart'; import './screens/settings/settings_screen.dart'; @@ -40,10 +41,12 @@ 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'; +const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; + var routes = { @@ -68,5 +71,7 @@ var routes = { SERVICES: (_) => ServicesScreen(), LAB_ORDERS:(_)=>LabOrdersScreen(), PRESCRIPTIONS:(_)=>PrescriptionScreen(), - RADIOLOGY:(_)=>RadiologyScreen() + RADIOLOGY:(_)=>RadiologyScreen(), + VITAL_SIGN_DETAILS:(_)=>VitalSignDetailsScreen(), + }; 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]]; diff --git a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart index c8364296..d26ab4c7 100644 --- a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart +++ b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart @@ -108,9 +108,11 @@ class _LabOrdersScreenState extends State { children: [ Row( children: [ - ProfileImageWidget(url:patientsProv - .patientLabResultOrdersList[index] - .doctorImageURL), + ProfileImageWidget( + url: patientsProv + .patientLabResultOrdersList[ + index] + .doctorImageURL), Expanded( child: Padding( padding: const EdgeInsets.fromLTRB( @@ -123,15 +125,18 @@ class _LabOrdersScreenState extends State { '${patientsProv.patientLabResultOrdersList[index].doctorName}', fontSize: 2.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), SizedBox( height: 8, ), AppText( - ' ${patientsProv.patientLabResultOrdersList[index].clinicName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier), + ' ${patientsProv.patientLabResultOrdersList[index].clinicName}', + fontSize: 2 * + SizeConfig.textMultiplier, + color: Theme.of(context) + .primaryColor, + ), SizedBox( height: 8, ), diff --git a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart index 061bf648..47fff706 100644 --- a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart +++ b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart @@ -55,8 +55,7 @@ class _PrescriptionScreenState extends State { tokenID: token, patientTypeID: patient.patientType, languageID: 2, - setupID: 0 - ); + setupID: 0); patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson()); } @@ -99,7 +98,8 @@ class _PrescriptionScreenState extends State { SizeConfig.realScreenWidth * 0.05, 0), child: ListView.builder( - itemCount: patientsProv.patientPrescriptionsList.length, + itemCount: + patientsProv.patientPrescriptionsList.length, itemBuilder: (BuildContext ctxt, int index) { return InkWell( child: CardWithBgWidget( @@ -108,9 +108,10 @@ class _PrescriptionScreenState extends State { children: [ Row( children: [ - ProfileImageWidget(url:patientsProv - .patientPrescriptionsList[index] - .doctorImageURL), + ProfileImageWidget( + url: patientsProv + .patientPrescriptionsList[index] + .doctorImageURL), Expanded( child: Padding( padding: const EdgeInsets.fromLTRB( @@ -123,15 +124,18 @@ class _PrescriptionScreenState extends State { '${patientsProv.patientPrescriptionsList[index].doctorName}', fontSize: 2.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), SizedBox( height: 8, ), AppText( ' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', - fontSize: 2.5 * + fontSize: 2 * SizeConfig - .textMultiplier), + .textMultiplier, + color: Theme.of(context) + .primaryColor), SizedBox( height: 8, ), diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart index a55c2704..8b48e88c 100644 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_screen.dart @@ -123,23 +123,27 @@ class _RadiologyScreenState extends State { '${patientsProv.patientRadiologyList[index].doctorName}', fontSize: 2.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold ), SizedBox( height: 8, ), AppText( 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', - fontSize: 2.5 * + fontSize: 2 * SizeConfig.textMultiplier, + ), SizedBox( height: 8, ), AppText( - ' ${patientsProv.patientRadiologyList[index].clinicName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier), + ' ${patientsProv.patientRadiologyList[index].clinicName}', + fontSize: 2 * + SizeConfig.textMultiplier, + color: Theme.of(context) + .primaryColor, + ), SizedBox( height: 8, ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart new file mode 100644 index 00000000..bf4aad6b --- /dev/null +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; + +import '../../../../config/size_config.dart'; +import '../../../../models/patient/vital_sign_res_model.dart'; +import '../../../../widgets/patients/profile/profile_medical_info_widget.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/rounded_container_widget.dart'; + +class VitalSignDetailsScreen extends StatelessWidget { + // VitalSignDetailsScreen({Key key, this.vitalSing}) : super(key: key); + VitalSignResModel vitalSing; + String url = "assets/images/"; + final double contWidth = SizeConfig.realScreenWidth * 0.70; + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + vitalSing = routeArgs['vitalSing']; + return AppScaffold( + appBarTitle: "vital Sing ", + body: RoundedContainer( + height: SizeConfig.realScreenHeight *0.7, + child: CustomScrollView( + primary: false, + slivers: [ + SliverPadding( + padding: const EdgeInsets.all(10), + sliver: SliverGrid.count( + childAspectRatio: 0.7, + crossAxisSpacing: 10, + mainAxisSpacing: 0, + crossAxisCount: 3, + children: [ + CircleAvatarWidget( + des: 'Body Measurements', + url: url + 'heartbeat.png', + + ), CircleAvatarWidget( + des: 'Temperature', + url: url + 'heartbeat.png', + ), + CircleAvatarWidget( + des: 'Pulse', + url: url + 'heartbeat.png', + + ), + CircleAvatarWidget( + des: 'Respiration', + url: url + 'heartbeat.png', + ), + CircleAvatarWidget( + des: 'Blood Pressure', + url: url + 'heartbeat.png', + ), + CircleAvatarWidget( + des: 'Oxygenation', + url: url + 'heartbeat.png', + ), CircleAvatarWidget( + des: 'Pain Scale', + url: url + 'heartbeat.png', + ), + ], + ), + ), + ], + ), + // height: 500, + )); + } +} 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 da604792..570a5aa1 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -109,9 +110,10 @@ class _VitalSignScreenState extends State { children: [ Row( children: [ - ProfileImageWidget(url:patientsProv - .patientVitalSignList[index] - .doctorImageURL), + ProfileImageWidget( + url: patientsProv + .patientVitalSignList[index] + .doctorImageURL), Expanded( child: Padding( padding: const EdgeInsets.fromLTRB( @@ -124,15 +126,18 @@ class _VitalSignScreenState extends State { '${patientsProv.patientVitalSignList[index].doctorName}', fontSize: 2.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), SizedBox( height: 8, ), AppText( - ' ${patientsProv.patientVitalSignList[index].clinicName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier), + ' ${patientsProv.patientVitalSignList[index].clinicName}', + fontSize: 2 * + SizeConfig.textMultiplier, + color: Theme.of(context) + .primaryColor, + ), SizedBox( height: 8, ), @@ -145,7 +150,9 @@ class _VitalSignScreenState extends State { ], ), ), - onTap: () {}, + onTap: () { + Navigator.of(context).pushNamed(VITAL_SIGN_DETAILS,arguments: {'vitalSing':patientsProv.patientVitalSignList[index]}); + }, ); }), ), diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index 72d287b0..4dbcf39b 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -15,38 +15,7 @@ import './profile_status_info_widget.dart'; *@desc: Patient Profile Widget */ class PatientProfileWidget extends StatelessWidget { - // Map patient = { - // "ProjectID": 15, - // "ClinicID": null, - // "DoctorID": 70907, - // "PatientID": 3315674, - // "DoctorName": "MOQBIL ABDULLAH AL HODAITHY", - // "DoctorNameN": null, - // "FirstName": "WALEED", - // "MiddleName": "ALI", - // "LastName": "AL-YAZIDI", - // "FirstNameN": null, - // "MiddleNameN": null, - // "LastNameN": null, - // "Gender": 1, - // "DateofBirth": "/Date(534286800000+0300)/", - // "NationalityID": null, - // "MobileNumber": "0500014559", - // "EmailAddress": "unknown@unknown.com", - // "PatientIdentificationNo": "1063236754", - // "NationalityName": "Saudi", - // "NationalityNameN": null, - // "PatientStatusType": null, - // "PatientType": 1, - // "AppointmentDate": "/Date(1587848400000+0300)/", - // "StartTime": "13:00:00", - // "Age": "34 Yr", - // "ClinicDescription": "INTERNAL MEDICINE CLINIC", - // "GenderDescription": "Male", - // "AdmissionDate": "/Date(1587848400000+0300)/", - // "AdmissionNo": "2020008652" - // }; - + PatiantInformtion patient; diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 7817e9b0..5bf83cf0 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -79,7 +79,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { ), InkWell( //RADIOLOGY - onTap: () { + onTap: () { navigator(context, RADIOLOGY); }, child: CircleAvatarWidget( @@ -123,26 +123,34 @@ class CircleAvatarWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - children: [ - Container( - height: height, - width: width, - decoration: new BoxDecoration( - // color: Colors.green, // border color - shape: BoxShape.circle, - border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)), - child: CircleAvatar( - radius: SizeConfig.imageSizeMultiplier * 12, - child: Image.asset(url), - backgroundColor: Colors.transparent, + return Container( + child: Column( + children: [ + Container( + height: height, + width: width, + // width: 50, + // height: 50, + decoration: new BoxDecoration( + // color: Colors.green, // border color + shape: BoxShape.circle, + border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)), + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier * 12, + child: Image.asset(url), + backgroundColor: Colors.transparent, + ), ), - ), - SizedBox( - height: 10, - ), - AppText(des) - ], + SizedBox( + height: 10, + ), + AppText( + des, + fontSize: 2 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + ) + ], + ), ); } } diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index db4f1b2c..100f9bd9 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - // OWNER : Ibrahim albitar // DATE : 12-04-2020 // DESCRIPTION : Customization for Texts in app @@ -19,6 +18,7 @@ class AppText extends StatefulWidget { final double marginBottom; final double marginLeft; final bool visibility; + final TextAlign textAlign; AppText(this.data, {this.color = Colors.black, @@ -30,7 +30,8 @@ class AppText extends StatefulWidget { this.marginRight = 0, this.marginBottom = 0, this.marginLeft = 0, - this.visibility = true}); + this.visibility = true, + this.textAlign}); @override _AppTextState createState() => _AppTextState(); @@ -39,18 +40,19 @@ class AppText extends StatefulWidget { class _AppTextState extends State { @override Widget build(BuildContext context) { - return Visibility( visible: widget.visibility, - child: Container( - margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only( - top: widget.marginTop, - right: widget.marginRight, - bottom: widget.marginBottom, - left: widget.marginLeft - ), + child: Container( + margin: widget.margin != null + ? EdgeInsets.all(widget.margin) + : EdgeInsets.only( + top: widget.marginTop, + right: widget.marginRight, + bottom: widget.marginBottom, + left: widget.marginLeft), child: Text( widget.data, + textAlign: widget.textAlign, style: TextStyle( color: widget.color, fontWeight: widget.fontWeight,