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/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<MedicalFileDetails> {
@ -46,6 +51,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
String lastName;
String gender;
int pp;
PatiantInformtion patient;
_MedicalFileDetailsState(
{this.age,
@ -53,7 +59,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
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<MedicalFileDetails> {
child: Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(8.0),
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,
),
PatientProfileHeaderNewDesign(patient,
patient.patientType.toString(), patient.arrivedOn),
model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
@ -191,7 +149,6 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
TranslationBase.of(context)
.clinic +
": ",
fontWeight: FontWeight.w700,
),
if (model.medicalFileList
.length !=
@ -214,6 +171,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.timeLineEvents[0]
.consulations[0]
.clinicName,
fontWeight: FontWeight.w700,
),
],
),
@ -245,6 +203,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.consulations[0]
.episodeID
.toString(),
fontWeight: FontWeight.w700,
),
],
),
@ -267,14 +226,17 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.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<MedicalFileDetails> {
],
),
bodyWidget: ListView.builder(
//physics: ,
physics:
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
@ -471,7 +434,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
],
),
bodyWidget: ListView.builder(
//physics: ,
physics:
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
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/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<MedicalFilePage> {
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
patient = routeArgs['patient'];
return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId),
builder:
@ -48,57 +48,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// ? 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<MedicalFilePage> {
children: [
AppText(
'Medical',
fontSize: 13.0,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
@ -310,6 +261,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
)),
);
},

Loading…
Cancel
Save