diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 63006f65..77fddfe5 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -20,6 +21,7 @@ class MedicalFileDetails extends StatefulWidget { String gender; int encounterNumber; int pp; + PatiantInformtion patient; MedicalFileDetails( {this.age, @@ -27,16 +29,19 @@ class MedicalFileDetails extends StatefulWidget { this.lastName, this.gender, this.encounterNumber, - this.pp}); + this.pp, + this.patient}); @override _MedicalFileDetailsState createState() => _MedicalFileDetailsState( - firstName: firstName, - age: age, - lastName: lastName, - gender: gender, - encounterNumber: encounterNumber, - pp: pp); + firstName: firstName, + age: age, + lastName: lastName, + gender: gender, + encounterNumber: encounterNumber, + pp: pp, + patient: patient, + ); } class _MedicalFileDetailsState extends State { @@ -46,6 +51,7 @@ class _MedicalFileDetailsState extends State { String lastName; String gender; int pp; + PatiantInformtion patient; _MedicalFileDetailsState( {this.age, @@ -53,7 +59,8 @@ class _MedicalFileDetailsState extends State { this.lastName, this.gender, this.encounterNumber, - this.pp}); + this.pp, + this.patient}); bool isPhysicalExam = false; bool isProcedureExpand = false; bool isHistoryExpand = false; @@ -75,57 +82,8 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Padding( - padding: EdgeInsets.all(8.0), - child: Row( - children: [ - AvatarWidget( - Icon( - gender == "Male" - ? DoctorApp.male - : DoctorApp.female_icon, - size: 70, - color: Colors.white, - ), - ), - SizedBox( - width: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - firstName + ' ' + lastName, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - Row( - children: [ - AppText( - TranslationBase.of(context).age2, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - SizedBox( - width: 5.0, - ), - AppText( - age, - color: Colors.black, - fontWeight: FontWeight.normal, - ), - ], - ), - ], - ) - ], - ), - ), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), + PatientProfileHeaderNewDesign(patient, + patient.patientType.toString(), patient.arrivedOn), model.medicalFileList.length != 0 && model .medicalFileList[0] @@ -191,7 +149,6 @@ class _MedicalFileDetailsState extends State { TranslationBase.of(context) .clinic + ": ", - fontWeight: FontWeight.w700, ), if (model.medicalFileList .length != @@ -214,6 +171,7 @@ class _MedicalFileDetailsState extends State { .timeLineEvents[0] .consulations[0] .clinicName, + fontWeight: FontWeight.w700, ), ], ), @@ -245,6 +203,7 @@ class _MedicalFileDetailsState extends State { .consulations[0] .episodeID .toString(), + fontWeight: FontWeight.w700, ), ], ), @@ -267,14 +226,17 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString()), + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .appointmentDate + .toString(), + fontWeight: FontWeight.w700, + ), SizedBox(width: 35.0), // AppText( // 'Appt Date : ', @@ -349,7 +311,8 @@ class _MedicalFileDetailsState extends State { ], ), bodyWidget: ListView.builder( - //physics: , + physics: + NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: model @@ -471,7 +434,8 @@ class _MedicalFileDetailsState extends State { ], ), bodyWidget: ListView.builder( - //physics: , + physics: + NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: model diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index ae50e9a2..5f53c2b9 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -30,7 +31,6 @@ class _MedicalFilePageState extends State { String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; - patient = routeArgs['patient']; return BaseView( onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), builder: @@ -48,57 +48,8 @@ class _MedicalFilePageState extends State { // ? MainAxisAlignment.start // : MainAxisAlignment.center, children: [ - Container( - padding: EdgeInsets.only(left: 12.0), - child: Row(children: [ - IconButton( - icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pop(context), - ), - AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize(patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', - ), - patient.gender == 1 - ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) - : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), - ]), - ), - Row(children: [ - Padding( - padding: EdgeInsets.only(left: 12.0), - child: Container( - width: 60, - height: 60, - child: Image.asset( - patient.gender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, - ), - ), - ), - SizedBox( - width: 10, - ), - ]), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), + PatientProfileHeaderNewDesign( + patient, patient.patientType.toString(), arrivalType), Padding( padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), @@ -111,7 +62,7 @@ class _MedicalFilePageState extends State { children: [ AppText( 'Medical', - fontSize: 13.0, + fontSize: 15.0, fontWeight: FontWeight.w600, fontFamily: 'Poppins', ), @@ -310,6 +261,7 @@ class _MedicalFilePageState extends State { gender: patient.genderDescription, encounterNumber: index, pp: patient.patientId, + patient: patient, )), ); },