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.
219 lines
7.4 KiB
Dart
219 lines
7.4 KiB
Dart
import 'package:doctor_app_flutter/config/config.dart';
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import '../../../config/size_config.dart';
|
|
import '../../shared/app_texts_widget.dart';
|
|
import '../../shared/rounded_container_widget.dart';
|
|
|
|
/*
|
|
*@author: Elham Rababah
|
|
*@Date:22/4/2020
|
|
*@param:
|
|
*@return:ProfileMedicalInfoWidget
|
|
*@desc: Profile Medical Info Widget
|
|
*/
|
|
class ProfileMedicalInfoWidget extends StatelessWidget {
|
|
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
|
|
PatiantInformtion patient;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
String url = "assets/images/";
|
|
final double contWidth = SizeConfig.realScreenWidth * 0.70;
|
|
final double contHeight = SizeConfig.screenHeight * 0.30;
|
|
|
|
return RoundedContainer(
|
|
child: ListView(
|
|
children: <Widget>[
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 14),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
AppText(
|
|
'Patient Medical Information ',
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
fontWeight: FontWeight.w700,
|
|
color: Hexcolor('#58434F'),
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: <Widget>[
|
|
InkWell(
|
|
onTap: () {
|
|
navigator(context, VITAL_SIGN_DETAILS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Vital Sign',
|
|
url: url + 'heartbeat.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
InkWell(
|
|
onTap: () {
|
|
navigator(context, LAB_ORDERS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Lab Result',
|
|
url: url + 'lab.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
InkWell(
|
|
onTap: () {
|
|
navigator(context, PRESCRIPTIONS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Prescription',
|
|
url: url + 'note.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
InkWell(
|
|
//RADIOLOGY
|
|
onTap: () {
|
|
navigator(context, RADIOLOGY);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Radiology',
|
|
url: url + 'radiology-1.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: <Widget>[
|
|
Visibility(
|
|
visible: selectedPatientType != 0 && selectedPatientType != 5 ,
|
|
child: InkWell(
|
|
onTap: () {
|
|
navigator(context, PROGRESS_NOTE);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Progress Notes',
|
|
url: url + 'heartbeat.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
),
|
|
Visibility(
|
|
|
|
child: InkWell(
|
|
onTap: () {
|
|
navigator(context, PATIENT_INSURANCE_APPROVALS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Insurance Aprovals',
|
|
url: url + 'lab.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
),
|
|
Visibility(
|
|
visible: selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 2,
|
|
child: InkWell(
|
|
onTap: () {
|
|
navigator(context, PRESCRIPTIONS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Refer Patient ',
|
|
url: url + 'note.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
),
|
|
Visibility(
|
|
visible: selectedPatientType != 0 && selectedPatientType != 5,
|
|
child: InkWell(
|
|
onTap: () {
|
|
navigator(context, PATIENT_ORDERS);
|
|
},
|
|
child: CircleAvatarWidget(
|
|
des: 'Orders',
|
|
url: url + 'radiology-1.png',
|
|
width: (contWidth) / 4.5,
|
|
height: (contWidth) / 4.5,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
width: contWidth,
|
|
height: contHeight,
|
|
);
|
|
}
|
|
|
|
void navigator(BuildContext context, route) {
|
|
Navigator.of(context).pushNamed(route, arguments: {'patient': patient});
|
|
}
|
|
}
|
|
|
|
class CircleAvatarWidget extends StatelessWidget {
|
|
const CircleAvatarWidget(
|
|
{Key key,
|
|
@required this.url,
|
|
@required this.des,
|
|
this.height,
|
|
this.width})
|
|
: super(key: key);
|
|
|
|
final String url;
|
|
final String des;
|
|
|
|
final double height;
|
|
final double width;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: Column(
|
|
children: <Widget>[
|
|
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,
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
textAlign: TextAlign.center,
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|