|
|
|
@ -1,16 +1,18 @@
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
|
|
|
import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
|
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../../../config/size_config.dart';
|
|
|
|
import '../../../../config/size_config.dart';
|
|
|
|
import '../../../../models/patient/vital_sign_res_model.dart';
|
|
|
|
import '../../../../models/patient/vital_sign_res_model.dart';
|
|
|
|
import '../../../../widgets/patients/profile/profile_medical_info_widget.dart';
|
|
|
|
|
|
|
|
import '../../../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import '../../../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
|
|
|
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
|
|
|
|
|
|
|
class VitalSignDetailsScreen extends StatefulWidget {
|
|
|
|
class VitalSignDetailsScreen extends StatefulWidget {
|
|
|
|
@ -74,54 +76,192 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
|
|
|
|
return AppScaffold(
|
|
|
|
return AppScaffold(
|
|
|
|
appBarTitle: "vital Sing ",
|
|
|
|
appBarTitle: "vital Sing ",
|
|
|
|
isloading: patientsProv.isLoading,
|
|
|
|
isloading: patientsProv.isLoading,
|
|
|
|
body: CustomScrollView(
|
|
|
|
body: Container(
|
|
|
|
primary: false,
|
|
|
|
child: Column(
|
|
|
|
slivers: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SliverPadding(
|
|
|
|
Row(
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
|
|
|
|
sliver: SliverGrid.count(
|
|
|
|
|
|
|
|
childAspectRatio: 0.7,
|
|
|
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
|
|
|
mainAxisSpacing: 0,
|
|
|
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap: (){
|
|
|
|
onTap: () {
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS);
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'Body Measurements',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.bodyMeasurements
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: CircleAvatarWidget(
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Body Measurements',
|
|
|
|
des: 'Body Measurements',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
|
|
|
|
lastVal: patientsProv
|
|
|
|
|
|
|
|
.patientVitalSignOrderdSubList[0].heightCm
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
unit: 'Cm',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'Temperature',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.temperature
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Temperature',
|
|
|
|
des: 'Temperature',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'pulse',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.pulse
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Pulse',
|
|
|
|
des: 'Pulse',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
),
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'pespiration',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.pespiration
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Respiration',
|
|
|
|
des: 'Respiration',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'Blood Pressure',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.bloodPressure
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Blood Pressure',
|
|
|
|
des: 'Blood Pressure',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
),
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'Oxygenation',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.oxygenation
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Oxygenation',
|
|
|
|
des: 'Oxygenation',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CircleAvatarWidget(
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
|
|
|
|
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'title': 'Pain Scale',
|
|
|
|
|
|
|
|
'key': vitalSignDetails.painScale
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: VitalSignItem(
|
|
|
|
des: 'Pain Scale',
|
|
|
|
des: 'Pain Scale',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
url: url + 'heartbeat.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VitalSignItem extends StatelessWidget {
|
|
|
|
|
|
|
|
const VitalSignItem(
|
|
|
|
|
|
|
|
{Key key,
|
|
|
|
|
|
|
|
@required this.url,
|
|
|
|
|
|
|
|
@required this.des,
|
|
|
|
|
|
|
|
this.lastVal = 'N/A',
|
|
|
|
|
|
|
|
this.unit = '',
|
|
|
|
|
|
|
|
this.height,
|
|
|
|
|
|
|
|
this.width})
|
|
|
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final String url;
|
|
|
|
|
|
|
|
final String des;
|
|
|
|
|
|
|
|
final String lastVal;
|
|
|
|
|
|
|
|
final String unit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final double height;
|
|
|
|
|
|
|
|
final double width;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
|
|
|
height: 0.14 * SizeConfig.realScreenHeight,
|
|
|
|
|
|
|
|
width: 0.45 * SizeConfig.realScreenWidth,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
des,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
|
|
url,
|
|
|
|
|
|
|
|
height: SizeConfig.heightMultiplier * 7,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: RichText(
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
|
|
|
style: TextStyle(color: Colors.black),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
new TextSpan(text: lastVal),
|
|
|
|
|
|
|
|
new TextSpan(
|
|
|
|
|
|
|
|
text: ' ${unit}',
|
|
|
|
|
|
|
|
style:
|
|
|
|
|
|
|
|
TextStyle(color: Theme.of(context).primaryColor)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|