You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
7.3 KiB
Dart
174 lines
7.3 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_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/network_base_view.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class MedicalFilePage extends StatefulWidget {
|
|
@override
|
|
_MedicalFilePageState createState() => _MedicalFilePageState();
|
|
}
|
|
|
|
class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
PatiantInformtion patient;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
patient = routeArgs['patient'];
|
|
return BaseView<MedicalFileViewModel>(
|
|
onModelReady: (model) => model.getMedicalFile(),
|
|
builder:
|
|
(BuildContext context, MedicalFileViewModel model, Widget child) =>
|
|
AppScaffold(
|
|
isShowAppBar: true,
|
|
appBarTitle: 'medical Report'.toUpperCase(),
|
|
body: NetworkBaseView(
|
|
baseViewModel: model,
|
|
child: Container(
|
|
child: Column(
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsets.all(8.0),
|
|
child: Row(
|
|
children: <Widget>[
|
|
AvatarWidget(
|
|
Icon(
|
|
patient.genderDescription == "Male"
|
|
? DoctorApp.male
|
|
: DoctorApp.female_icon,
|
|
size: 70,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 20,
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(
|
|
patient.firstName + ' ' + patient.lastName,
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
TranslationBase.of(context).fileNo,
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
SizedBox(
|
|
width: 5.0,
|
|
),
|
|
AppText(
|
|
patient.age.toString(),
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.normal,
|
|
),
|
|
],
|
|
),
|
|
AppText(
|
|
"ALLERGIC TO: FOOD, ASPIRIN",
|
|
color: Color(0xFFB9382C),
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
Divider(
|
|
height: 1.0,
|
|
thickness: 1.0,
|
|
color: Colors.grey,
|
|
),
|
|
ListView.builder(
|
|
scrollDirection: Axis.vertical,
|
|
shrinkWrap: true,
|
|
itemCount: 2,
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
return Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
horizontal: 12.0, vertical: 8.0),
|
|
child: InkWell(
|
|
child: Container(
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
'Branch : ',
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
AppText(
|
|
model.medicalFileList[0].entityList[0]
|
|
.admissions[index].projectName,
|
|
),
|
|
],
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
'Doctor : '.toUpperCase(),
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
AppText(
|
|
model.medicalFileList[0].entityList[0]
|
|
.admissions[index].doctor
|
|
.toUpperCase(),
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
],
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
'Clinic : ',
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
AppText(
|
|
model.medicalFileList[0].entityList[0]
|
|
.admissions[index].clinic,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 10.0),
|
|
Divider(
|
|
height: 1.0,
|
|
thickness: 1.0,
|
|
color: Colors.grey.shade400,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => MedicalFileDetails(
|
|
age: patient.age,
|
|
firstName: patient.firstName,
|
|
lastName: patient.lastName,
|
|
gender: patient.genderDescription,
|
|
)),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
})
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|