Medical Report New Design

merge-requests/381/head
hussam al-habibeh 5 years ago
parent a1b0872cc1
commit 79fe067fe2

@ -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/screens/patients/profile/patient_profile_screen.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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/app_texts_widget.dart';
@ -20,6 +21,7 @@ class MedicalFileDetails extends StatefulWidget {
String gender; String gender;
int encounterNumber; int encounterNumber;
int pp; int pp;
PatiantInformtion patient;
MedicalFileDetails( MedicalFileDetails(
{this.age, {this.age,
@ -27,7 +29,8 @@ class MedicalFileDetails extends StatefulWidget {
this.lastName, this.lastName,
this.gender, this.gender,
this.encounterNumber, this.encounterNumber,
this.pp}); this.pp,
this.patient});
@override @override
_MedicalFileDetailsState createState() => _MedicalFileDetailsState( _MedicalFileDetailsState createState() => _MedicalFileDetailsState(
@ -36,7 +39,9 @@ class MedicalFileDetails extends StatefulWidget {
lastName: lastName, lastName: lastName,
gender: gender, gender: gender,
encounterNumber: encounterNumber, encounterNumber: encounterNumber,
pp: pp); pp: pp,
patient: patient,
);
} }
class _MedicalFileDetailsState extends State<MedicalFileDetails> { class _MedicalFileDetailsState extends State<MedicalFileDetails> {
@ -46,6 +51,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
String lastName; String lastName;
String gender; String gender;
int pp; int pp;
PatiantInformtion patient;
_MedicalFileDetailsState( _MedicalFileDetailsState(
{this.age, {this.age,
@ -53,7 +59,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
this.lastName, this.lastName,
this.gender, this.gender,
this.encounterNumber, this.encounterNumber,
this.pp}); this.pp,
this.patient});
bool isPhysicalExam = false; bool isPhysicalExam = false;
bool isProcedureExpand = false; bool isProcedureExpand = false;
bool isHistoryExpand = false; bool isHistoryExpand = false;
@ -75,57 +82,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Padding( PatientProfileHeaderNewDesign(patient,
padding: EdgeInsets.all(8.0), patient.patientType.toString(), patient.arrivedOn),
child: Row(
children: <Widget>[
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,
),
model.medicalFileList.length != 0 && model.medicalFileList.length != 0 &&
model model
.medicalFileList[0] .medicalFileList[0]
@ -191,7 +149,6 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
TranslationBase.of(context) TranslationBase.of(context)
.clinic + .clinic +
": ", ": ",
fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList if (model.medicalFileList
.length != .length !=
@ -214,6 +171,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.timeLineEvents[0] .timeLineEvents[0]
.consulations[0] .consulations[0]
.clinicName, .clinicName,
fontWeight: FontWeight.w700,
), ),
], ],
), ),
@ -245,6 +203,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.consulations[0] .consulations[0]
.episodeID .episodeID
.toString(), .toString(),
fontWeight: FontWeight.w700,
), ),
], ],
), ),
@ -267,14 +226,17 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.consulations .consulations
.length != .length !=
0) 0)
AppText(model AppText(
model
.medicalFileList[0] .medicalFileList[0]
.entityList[0] .entityList[0]
.timelines[encounterNumber] .timelines[encounterNumber]
.timeLineEvents[0] .timeLineEvents[0]
.consulations[0] .consulations[0]
.appointmentDate .appointmentDate
.toString()), .toString(),
fontWeight: FontWeight.w700,
),
SizedBox(width: 35.0), SizedBox(width: 35.0),
// AppText( // AppText(
// 'Appt Date : ', // 'Appt Date : ',
@ -349,7 +311,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
//physics: , physics:
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model
@ -471,7 +434,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
//physics: , physics:
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model

@ -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/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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-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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
@ -30,7 +31,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
patient = routeArgs['patient'];
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId),
builder: builder:
@ -48,57 +48,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// ? MainAxisAlignment.start // ? MainAxisAlignment.start
// : MainAxisAlignment.center, // : MainAxisAlignment.center,
children: [ children: [
Container( PatientProfileHeaderNewDesign(
padding: EdgeInsets.only(left: 12.0), patient, patient.patientType.toString(), arrivalType),
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,
),
Padding( Padding(
padding: padding:
EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
@ -111,7 +62,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [ children: [
AppText( AppText(
'Medical', 'Medical',
fontSize: 13.0, fontSize: 15.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
@ -310,6 +261,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
gender: patient.genderDescription, gender: patient.genderDescription,
encounterNumber: index, encounterNumber: index,
pp: patient.patientId, pp: patient.patientId,
patient: patient,
)), )),
); );
}, },

Loading…
Cancel
Save