Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services

merge-requests/424/head
Mohammad Aljammal 5 years ago
commit c66357a4ce

@ -121,7 +121,7 @@ const GET_DASHBOARD =
const GET_SICKLEAVE_STATISTIC = const GET_SICKLEAVE_STATISTIC =
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL = const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList'; 'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
@ -143,6 +143,9 @@ const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT =

@ -156,7 +156,7 @@ class PatientReferralService extends LookupService {
hasError = false; hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile(); DoctorProfileModel doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 0; // body['ClinicID'] = 0;
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile.doctorID;
await baseAppClient.post( await baseAppClient.post(

@ -209,7 +209,27 @@ class MyReferralDetailScreen extends StatelessWidget {
), ),
], ],
) )
: Container( : Column(
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),
),
Expanded(
child: AppText("" ,
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
),
]),
),
Container(
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg, TranslationBase.of(context).patientNoDetailErrMsg,
@ -219,6 +239,8 @@ class MyReferralDetailScreen extends StatelessWidget {
), ),
), ),
), ),
],
),
), ),
); );
} }

@ -39,11 +39,11 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
// backgroundColor: Colors.white, // backgroundColor: Colors.white,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0), preferredSize: Size.fromHeight(60.0),
child: Center( child: Center(
child: Container( child: Container(
height: 60.0, height: 60.0,
margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9, width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(

@ -1,4 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -23,23 +25,29 @@ class LineChartCurved extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white, // color: Colors.white,
), ),
child: Stack( child: Column(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
Text( Container(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
title, title,
style: TextStyle( fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black, fontWeight: FontWeight.bold,
fontSize: 15, backGroundcolor: Colors.black,
letterSpacing: 2), fontFamily: 'Poppins',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox(height: 10,), ],
),
),
SizedBox(height: 16,),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0), padding: const EdgeInsets.only(right: 18.0, left: 16.0),
@ -54,8 +62,6 @@ class LineChartCurved extends StatelessWidget {
), ),
], ],
), ),
],
),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.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/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -26,20 +27,28 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white, // color: Colors.white,
), ),
child: Stack( child: Column(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
const SizedBox( const SizedBox(
height: 15, height: 4,
), ),
Text( Container(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
title, title,
style: TextStyle( fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black, fontSize: 15, letterSpacing: 2), fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
],
),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -91,8 +100,6 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
) )
], ],
), ),
],
),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
@ -17,7 +18,13 @@ class VitalSignBloodPressureWidget extends StatefulWidget {
final String viewKey2; final String viewKey2;
VitalSignBloodPressureWidget( VitalSignBloodPressureWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2}); {Key key,
this.vitalList,
this.title1,
this.title2,
this.viewKey1,
this.title3,
this.viewKey2});
@override @override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
@ -28,62 +35,108 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( /*decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1), border: Border.all(color: Colors.grey, width: 1),
), ),*/
margin: EdgeInsets.all(20), margin: EdgeInsets.all(0),
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( Row(
border: TableBorder.symmetric( children: [
inside: BorderSide(width: 2.0, color: Colors.grey[300]), Expanded(
child: Container(
child: Container(
padding: EdgeInsets.all(8),
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
children: fullData(projectViewModel), ),*/
child: AppText(
TranslationBase.of(context).date,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
], // height: 60,
), ),
), ),
); ),
} Expanded(
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
), ),
child: Center( ),*/
child: AppText( child: AppText(
TranslationBase.of(context).date, widget.title2,
color: Colors.white, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
// height: 60
), ),
height: 60,
), ),
), ),
Container( Expanded(
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
child: Center( ),*/
child: AppText(widget.title2, color: Colors.white), child: AppText(
widget.title3,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
), ),
height: 60),
), ),
),
],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
/* tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -98,7 +151,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
), ),
height: 60), height: 60),
), ),
])); ]));*/
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey1]; var data = vital.toJson()[widget.viewKey1];
DateTime elementDate = DateTime elementDate =
@ -109,11 +162,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center(
child: AppText( child: AppText(
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
@ -121,11 +176,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center(
child: AppText( child: AppText(
'${vital.toJson()[widget.viewKey1]}', '${vital.toJson()[widget.viewKey1]}',
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
@ -133,11 +190,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center(
child: AppText( child: AppText(
'${vital.toJson()[widget.viewKey2]}', '${vital.toJson()[widget.viewKey2]}',
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),

@ -252,11 +252,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
FittedBox( FittedBox(
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
child: AppText( child: AppText(
"${TranslationBase.of(context).bmiObeseExtreme} fdsd", "${TranslationBase.of(context).bmiObeseExtreme}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 5
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
@ -266,7 +266,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 5
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
@ -280,7 +280,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 8.0), margin: EdgeInsets.symmetric(horizontal: 8.0),
child : GridView.count( child: GridView.count(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 4, crossAxisSpacing: 4,
@ -296,10 +296,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Height, pageKey: vitalSignDetails.Height,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).height,
.height,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
@ -307,8 +309,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).height, des: TranslationBase.of(context).height,
imagePath: imagePath: "${assetBasePath}height.png",
"${assetBasePath}height.png",
lastVal: mode.heightCm, lastVal: mode.heightCm,
unit: TranslationBase.of(context).cm, unit: TranslationBase.of(context).cm,
), ),
@ -322,10 +323,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Weight, pageKey: vitalSignDetails.Weight,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).weight,
.weight,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
@ -343,23 +346,22 @@ class VitalSignDetailsScreen extends StatelessWidget {
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.Temperature,
vitalSignDetails.Temperature, pageTitle: TranslationBase.of(context)
pageTitle:
TranslationBase.of(context)
.temperature, .temperature,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
: null, : null,
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: des: TranslationBase.of(context).temperature,
TranslationBase.of(context).temperature, imagePath: "${assetBasePath}temperature.png",
imagePath:
"${assetBasePath}temperature.png",
lastVal: mode.temperatureCelcius, lastVal: mode.temperatureCelcius,
unit: TranslationBase.of(context).tempC, unit: TranslationBase.of(context).tempC,
), ),
@ -373,18 +375,19 @@ class VitalSignDetailsScreen extends StatelessWidget {
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.heart, pageKey: vitalSignDetails.heart,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).heart,
.heart,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).heart, des: TranslationBase.of(context).heart,
imagePath: imagePath: "${assetBasePath}heart_rate.png",
"${assetBasePath}heart_rate.png",
lastVal: mode.hartRat, lastVal: mode.hartRat,
unit: TranslationBase.of(context).bpm, unit: TranslationBase.of(context).bpm,
), ),
@ -395,25 +398,24 @@ class VitalSignDetailsScreen extends StatelessWidget {
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.Respiration,
vitalSignDetails.Respiration, pageTitle: TranslationBase.of(context)
pageTitle:
TranslationBase.of(context)
.respirationRate, .respirationRate,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).respirationRate,
.respirationRate, imagePath: "${assetBasePath}respiration_rate.png",
imagePath:
"${assetBasePath}respiration_rate.png",
lastVal: mode.respirationBeatPerMinute, lastVal: mode.respirationBeatPerMinute,
unit: TranslationBase.of(context) unit:
.respirationSigns, TranslationBase.of(context).respirationSigns,
), ),
), ),
InkWell( InkWell(
@ -422,22 +424,21 @@ class VitalSignDetailsScreen extends StatelessWidget {
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.BloodPressure,
vitalSignDetails.BloodPressure, pageTitle: TranslationBase.of(context)
pageTitle:
TranslationBase.of(context)
.bloodPressure, .bloodPressure,
vitalList: vitalList:
mode.patientVitalSignsHistory, mode.patientVitalSignsHistory,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: des: TranslationBase.of(context).bloodPressure,
TranslationBase.of(context).bloodPressure, imagePath: "${assetBasePath}blood_pressure.png",
imagePath:
"${assetBasePath}blood_pressure.png",
lastVal: mode.bloodPressure, lastVal: mode.bloodPressure,
unit: TranslationBase.of(context).sysDias, unit: TranslationBase.of(context).sysDias,
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
@ -27,66 +28,88 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( /*decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1), border: Border.all(color: Colors.grey, width: 1),
), ),*/
margin: EdgeInsets.all(20), margin: EdgeInsets.all(0),
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( Row(
border: TableBorder.symmetric( children: [
inside: BorderSide(width: 2.0, color: Colors.grey[300]), Expanded(
), child: Container(
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
), ),*/
child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).date, TranslationBase.of(context).date,
color: Colors.white, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
// height: 60,
), ),
height: 60,
), ),
), ),
Container( Expanded(
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
),*/
child: AppText(
widget.title2,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
), ),
child: Center(
child: AppText(widget.title2, color: Colors.white),
), ),
height: 60),
) )
])); ],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
/* tableRow.add(TableRow(children: [
]));*/
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey]; var data = vital.toJson()[widget.viewKey];
DateTime elementDate = DateTime elementDate =
@ -95,25 +118,29 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center(
child: AppText( child: AppText(
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center(
child: AppText( child: AppText(
'${vital.toJson()[widget.viewKey]}', '${vital.toJson()[widget.viewKey]}',
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),

@ -1,10 +1,15 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.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/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -12,8 +17,17 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
final vitalSignDetails pageKey; final vitalSignDetails pageKey;
final String pageTitle; final String pageTitle;
List<Map> VSchart; List<Map> VSchart;
PatiantInformtion patient;
VitalSignItemDetailsScreen({this.vitalList, this.pageKey, this.pageTitle}); String patientType;
String arrivalType;
VitalSignItemDetailsScreen(
{this.vitalList,
this.pageKey,
this.pageTitle,
this.patient,
this.patientType,
this.arrivalType});
final List<VitalSignHistory> vitalList; final List<VitalSignHistory> vitalList;
@ -31,7 +45,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'title2Ar': 'الكتلة', 'title2Ar': 'الكتلة',
'viewKey': 'BodyMassIndex', 'viewKey': 'BodyMassIndex',
}, },
]; ];
break; break;
@ -87,7 +100,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'title3Ar': 'الإنبساط', 'title3Ar': 'الإنبساط',
'viewKey': 'BloodPressure', 'viewKey': 'BloodPressure',
}, },
]; ];
break; break;
@ -161,36 +173,80 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
} }
return AppScaffold( return AppScaffold(
appBarTitle: pageTitle, appBarTitle: pageTitle,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true, isShowAppBar: true,
body: ListView( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${patient.firstName ?? patient.patientDetails.firstName}'s",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
TranslationBase.of(context).vitalSign,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
Container(
child: ListView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: VSchart.map((chartInfo) { children: VSchart.map((chartInfo) {
var vitalListTemp = vitalList.where( var vitalListTemp = vitalList.where(
(element) => element.toJson()[chartInfo['viewKey']] != null, (element) => element.toJson()[chartInfo['viewKey']] != null,
); );
if(vitalListTemp.length != 0 && chartInfo['viewKey']=='BloodPressure'){ if (vitalListTemp.length != 0 &&
chartInfo['viewKey'] == 'BloodPressure') {
return VitalSingChartBloodPressure( return VitalSingChartBloodPressure(
vitalList: vitalList, vitalList: vitalList,
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], name: projectViewModel.isArabic
? chartInfo['nameAr']
: chartInfo['name'],
title1: chartInfo['title1'], title1: chartInfo['title1'],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], title2: projectViewModel.isArabic
title3:projectViewModel.isArabic?chartInfo['title3Ar']: chartInfo['title3'], ? chartInfo['title2Ar']
: chartInfo['title2'],
title3: projectViewModel.isArabic
? chartInfo['title3Ar']
: chartInfo['title3'],
viewKey1: 'BloodPressureHigher', viewKey1: 'BloodPressureHigher',
viewKey2: 'BloodPressureLower', viewKey2: 'BloodPressureLower',
); );
} }
return vitalListTemp.length != 0 return vitalListTemp.length != 0
? VitalSingChartAndDetials( ? VitalSingChartAndDetials(
vitalList: vitalList, vitalList: vitalList,
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], name: projectViewModel.isArabic
? chartInfo['nameAr']
: chartInfo['name'],
title1: chartInfo['title1'], title1: chartInfo['title1'],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], title2: projectViewModel.isArabic
? chartInfo['title2Ar']
: chartInfo['title2'],
viewKey: chartInfo['viewKey']) viewKey: chartInfo['viewKey'])
: Container(); : Container();
}).toList(), }).toList(),
), ),
),
],
),
),
); );
} }
} }

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart';
@ -32,9 +33,52 @@ class VitalSingChartAndDetials extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
generateData(); generateData();
return timeSeriesData.length != 0 ? Column( return timeSeriesData.length != 0
? Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppExpandableNotifier( Container(
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurved(
title: name,
timeSeries: timeSeriesData,
indexes: timeSeriesData.length ~/ 5.5,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(height: 8,),
VitalSignDetailsWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
viewKey: viewKey,
),
],
),
),
/*AppExpandableNotifier(
// isExpand: true, // isExpand: true,
headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,), headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,),
bodyWid: VitalSignDetailsWidget( bodyWid: VitalSignDetailsWidget(
@ -43,9 +87,11 @@ class VitalSingChartAndDetials extends StatelessWidget {
title2: title2, title2: title2,
viewKey: viewKey, viewKey: viewKey,
), ),
), ),*/
], ],
) : Container( ),
)
: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
child: Center( child: Center(
@ -58,11 +104,14 @@ class VitalSingChartAndDetials extends StatelessWidget {
if (vitalList.length > 0) { if (vitalList.length > 0) {
vitalList.reversed.toList().forEach( vitalList.reversed.toList().forEach(
(element) { (element) {
DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn); DateTime elementDate =
if(element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0) DateUtils.getDateTimeFromServerFormat(element.createdOn);
if (element.toJson()[viewKey] != null &&
element.toJson()[viewKey]?.toInt() != 0)
timeSeriesData.add( timeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(elementDate.year, elementDate.month, elementDate.day), new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey].toDouble(), element.toJson()[viewKey].toDouble(),
), ),
); );

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
@ -36,9 +38,54 @@ class VitalSingChartBloodPressure extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
generateData(); generateData();
return Column( return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppExpandableNotifier( Container(
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurvedBloodPressure(
title: name,
timeSeries1: timeSeriesData1,
timeSeries2: timeSeriesData2,
indexes: timeSeriesData1.length ~/ 5.5,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(height: 8,),
VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
],
),
),
/*AppExpandableNotifier(
// isExpand: true, // isExpand: true,
headerWid: LineChartCurvedBloodPressure( headerWid: LineChartCurvedBloodPressure(
title: name, title: name,
@ -54,8 +101,9 @@ class VitalSingChartBloodPressure extends StatelessWidget {
viewKey1: viewKey1, viewKey1: viewKey1,
viewKey2: viewKey2, viewKey2: viewKey2,
), ),
), ),*/
], ],
),
); );
} }

@ -230,76 +230,77 @@ class AddSickLeavScreen extends StatelessWidget {
)); ));
}).toList(), }).toList(),
) )
: new Builder(builder: (context) { : SizedBox()
return Column( // : new Builder(builder: (context) {
crossAxisAlignment: CrossAxisAlignment.start, // return Column(
children: [ // crossAxisAlignment: CrossAxisAlignment.start,
Padding( // children: [
padding: EdgeInsets.all(10), // Padding(
child: Column( // padding: EdgeInsets.all(10),
crossAxisAlignment: CrossAxisAlignment.start, // child: Column(
children: [ // crossAxisAlignment: CrossAxisAlignment.start,
AppText( // children: [
TranslationBase.of(context).patient, // AppText(
fontWeight: FontWeight.bold, // TranslationBase.of(context).patient,
), // fontWeight: FontWeight.bold,
AppText( // ),
TranslationBase.of(context).sickLeave, // AppText(
fontSize: 24, // TranslationBase.of(context).sickLeave,
fontWeight: FontWeight.bold, // fontSize: 24,
), // fontWeight: FontWeight.bold,
], // ),
)), // ],
Container( // )),
width: SizeConfig.screenWidth, // Container(
margin: EdgeInsets.only( // width: SizeConfig.screenWidth,
left: 20, right: 20, top: 20, bottom: 20), // margin: EdgeInsets.only(
padding: EdgeInsets.all(20), // left: 20, right: 20, top: 20, bottom: 20),
decoration: BoxDecoration( // padding: EdgeInsets.all(20),
borderRadius: BorderRadius.circular(10), // decoration: BoxDecoration(
color: HexColor('#EAEAEA')), // borderRadius: BorderRadius.circular(10),
child: Column( // color: HexColor('#EAEAEA')),
mainAxisAlignment: MainAxisAlignment.start, // child: Column(
children: [ // mainAxisAlignment: MainAxisAlignment.start,
Container( // children: [
child: Container( // Container(
decoration: BoxDecoration( // child: Container(
color: Colors.grey, // decoration: BoxDecoration(
borderRadius: // color: Colors.grey,
BorderRadius.circular(10)), // borderRadius:
padding: EdgeInsets.all(3), // BorderRadius.circular(10)),
child: IconButton( // padding: EdgeInsets.all(3),
icon: Icon( // child: IconButton(
Icons.add, // icon: Icon(
size: 35, // Icons.add,
color: Colors.white, // size: 35,
), // color: Colors.white,
onPressed: () { // ),
openSickLeave( // onPressed: () {
context, // openSickLeave(
false, // context,
); // false,
}), // );
)), // }),
Padding( // )),
child: AppText( // Padding(
TranslationBase.of(context) // child: AppText(
.noSickLeaveApplied, // TranslationBase.of(context)
fontWeight: FontWeight.bold, // .noSickLeaveApplied,
fontFamily: 'Poppins', // fontWeight: FontWeight.bold,
fontSize: 16, // fontFamily: 'Poppins',
textAlign: TextAlign.center, // fontSize: 16,
color: HexColor('#7E7E7E')), // textAlign: TextAlign.center,
padding: EdgeInsets.all(10), // color: HexColor('#7E7E7E')),
), // padding: EdgeInsets.all(10),
], // ),
)), // ],
SizedBox( // )),
height: SizeConfig.screenHeight * .6, // SizedBox(
) // height: SizeConfig.screenHeight * .6,
], // )
); // ],
}), // );
// }),
])))); ]))));
} }

@ -30,6 +30,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
model.getSickLeave(patient.patientMRN ?? patient.patientId), model.getSickLeave(patient.patientMRN ?? patient.patientId),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).sickleave, appBarTitle: TranslationBase.of(context).sickleave,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(

@ -44,7 +44,11 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( AppText(
patient.firstName!=null? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize(patient.lastName)):'', patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,

@ -0,0 +1,61 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
class ExpandableSOAPWidget extends StatelessWidget {
final bool isExpanded;
final Widget child;
final Function onTap;
final headerTitle;
const ExpandableSOAPWidget(
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
child: HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false,
fontSize: 20,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: onTap,
child: Icon(
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline))
],
),
bodyWidget: child,
isExpand: isExpanded,
),
);
}
}

@ -1,5 +1,4 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
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/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
@ -20,14 +19,13 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart';
import '../expandable_SOAP_widget.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -220,6 +218,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model, // baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
@ -232,46 +233,31 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
HeaderBodyExpandableNotifier( ExpandableSOAPWidget(
headerWidget: Row( headerTitle: TranslationBase
mainAxisAlignment: MainAxisAlignment.spaceBetween, .of(context)
children: [ .chiefComplaints
Row( .toUpperCase(),
children: [
Texts(TranslationBase.of(context).chiefComplaints.toUpperCase(),
variant: isChiefExpand ? "bodyText" : '',
bold: isChiefExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isChiefExpand = !isChiefExpand; isChiefExpand = !isChiefExpand;
}); });
}, },
child: Icon( child: Form(
isChiefExpand ? EvaIcons.minus : EvaIcons.plus))
],
),
bodyWidget: Form(
key: formKey, key: formKey,
child: Column(children: [ child: Column(children: [
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hasLabelText: complaintsController.text != '' hasLabelText: complaintsController.text != ''
? true ? true
: false, : false,
hintText: TranslationBase.of(context) hintText: TranslationBase
.of(context)
.addChiefComplaints, .addChiefComplaints,
fontSize: 13.5, fontSize: 13.5,
// hintColor: Colors.black, // hintColor: Colors.black,
@ -297,11 +283,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
height: 20, height: 20,
), ),
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hasLabelText: illnessController.text != '' hasLabelText:
? true illnessController.text != '' ? true : false,
: false,
showLabelText: true, showLabelText: true,
hintText: TranslationBase hintText: TranslationBase
.of(context) .of(context)
@ -326,12 +312,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
UpdateMedicationWidget(medicationController: medicationController,), UpdateMedicationWidget(
medicationController: medicationController,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hasLabelText: medicationController.text != '' hasLabelText: medicationController.text != ''
? true ? true
@ -358,117 +347,94 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
]), ]),
), ),
isExpand: isChiefExpand, isExpanded: isChiefExpand,
), ),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
Container(
width: double.infinity,
height: 1, ExpandableSOAPWidget(
color: Color(0xffCCCCCC), headerTitle: TranslationBase
),
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(TranslationBase
.of(context) .of(context)
.histories .histories
.toUpperCase(), .toUpperCase(),
variant: isHistoryExpand ? "bodyText" : '',
bold: isHistoryExpand ? true : false,
color: Colors.black),
],
),
InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isHistoryExpand = !isHistoryExpand; isHistoryExpand = !isHistoryExpand;
}); });
}, },
child: Icon(isHistoryExpand child: Column(
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(
children: [ children: [
UpdateHistoryWidget(myHistoryList: widget.myHistoryList) UpdateHistoryWidget(myHistoryList: widget.myHistoryList)
], ],
), ),
isExpand: isHistoryExpand, isExpanded: isHistoryExpand,
), ),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
Container(
width: double.infinity,
height: 1, ExpandableSOAPWidget(
color: Color(0xffCCCCCC), headerTitle: TranslationBase
),
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(TranslationBase
.of(context) .of(context)
.allergiesSoap .allergiesSoap
.toUpperCase(), .toUpperCase(),
variant: isAllergiesExpand ? "bodyText" : '',
bold: isAllergiesExpand ? true : false,
color: Colors.black),
],
),
InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isAllergiesExpand = !isAllergiesExpand; isAllergiesExpand = !isAllergiesExpand;
}); });
}, },
child: Icon(isAllergiesExpand child: Column(
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget:Column(
children: [ children: [
UpdateAllergiesWidget(myAllergiesList: widget.myAllergiesList,), UpdateAllergiesWidget(myAllergiesList: widget
.myAllergiesList,),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
], ],
) ),
, isExpanded: isAllergiesExpand,
isExpand: isAllergiesExpand,
), ),
SizedBox( SizedBox(
height: 30, height:MediaQuery.of(context).size.height * 0.2,
),
],
),
),
), ),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
), ),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
height: MediaQuery
.of(context)
.size
.height * 0.15,
width: double.infinity,
child: Column(
children: [
SizedBox( SizedBox(
height: 30, height: 15,
), ),
AppButton( Container(child: FractionallySizedBox(
title: TranslationBase.of(context).next, widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase
.of(context)
.next,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
addSubjectiveInfo( addSubjectiveInfo(
@ -477,11 +443,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
myHistoryList: widget.myHistoryList); myHistoryList: widget.myHistoryList);
}, },
), ),
],
),
),
), ),
),),
SizedBox(
height: 15,
), ),
],
),),
), ),
); );
} }
@ -624,12 +592,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
numberOfWeeks: 0); numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) { if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work // TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy=''; postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel); await model.postChiefComplaint(postChiefComplaintRequestModel);
} else { } else {
await model.patchChiefComplaint(postChiefComplaintRequestModel); await model.patchChiefComplaint(postChiefComplaintRequestModel);
} }
} }
} }
} }

@ -6,8 +6,6 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.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/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
@ -17,11 +15,13 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart';
class UpdateSoapIndex extends StatefulWidget { class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate; final bool isUpdate;
const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key); const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key);
@override @override
_UpdateSoapIndexState createState() => _UpdateSoapIndexState(); _UpdateSoapIndexState createState() => _UpdateSoapIndexState();
} }
@ -65,30 +65,39 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
// baseViewModel: model, // baseViewModel: model,
isLoading: _isLoading, isLoading: _isLoading,
appBarTitle: TranslationBase.of(context).healthRecordInformation, isShowAppBar: false,
// appBarTitle: TranslationBase.of(context).healthRecordInformation,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
decoration: decoration: BoxDecoration(
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white), boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
PatientPageHeaderWidget(patient), // PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7'),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
FractionallySizedBox( FractionallySizedBox(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.75, height: MediaQuery.of(context).size.height * 0.75,
child: Column( child: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: left: MediaQuery.of(context).size.width *
MediaQuery.of(context).size.width * 0.05, 0.05,
right: right: MediaQuery.of(context).size.width *
MediaQuery.of(context).size.width * 0.05), 0.05),
child: StepsWidget( child: StepsWidget(
index: _currentIndex, index: _currentIndex,
changeCurrentTab: changePageViewIndex, changeCurrentTab: changePageViewIndex,
@ -96,6 +105,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
), ),
Expanded( Expanded(
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _controller, controller: _controller,
onPageChanged: (index) { onPageChanged: (index) {
@ -110,28 +120,28 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
myAllergiesList: myAllergiesList, myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList, myHistoryList: myHistoryList,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdateObjectivePage( UpdateObjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
mySelectedExamination: mySelectedExamination:
mySelectedExamination, mySelectedExamination,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdateAssessmentPage( UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList: mySelectedAssessmentList:
mySelectedAssessment, mySelectedAssessment,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdatePlanPage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
patientInfo: patient, patientInfo: patient,
patientProgressNote: patientProgressNote, patientProgressNote: patientProgressNote,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
) )
], ],

Loading…
Cancel
Save