Merge branch 'fridayf-fix-bug' into 'development'

Fridayf fix bug

See merge request Cloud_Solution/doctor_app_flutter!556
merge-requests/557/merge
Mohammad Aljammal 5 years ago
commit e68b53bfcd

@ -37,8 +37,8 @@ class VitalSignsViewModel extends BaseViewModel {
}
}
Future getPatientVitalSignHistory(
PatiantInformtion patient, String from, String to, bool isInPatient) async {
Future getPatientVitalSignHistory(PatiantInformtion patient, String from,
String to, bool isInPatient) async {
setState(ViewState.Busy);
if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
@ -47,11 +47,11 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
// if(isInPatient){
if (isInPatient) {
await _vitalSignService.getInPatientVitalSignHistory(patient);
// }else {
// await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
// }
} else {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
}
if (_vitalSignService.hasError) {
error = _vitalSignService.error;

@ -62,6 +62,8 @@ class MyReferredPatientModel {
String nursingStationName;
String priorityDescription;
String referringClinicDescription;
String referralDoctorName;
String referralClinicDescription;
String referringDoctorName;
bool isReferralDoctorSameBranch;
@ -127,6 +129,8 @@ class MyReferredPatientModel {
this.referringClinicDescription,
this.referringDoctorName,
this.isReferralDoctorSameBranch,
this.referralDoctorName,
this.referralClinicDescription,
});
MyReferredPatientModel.fromJson(Map<String, dynamic> json) {
@ -190,6 +194,8 @@ class MyReferredPatientModel {
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName'];
referralDoctorName = json['ReferralDoctorName'];
referralClinicDescription = json['ReferralClinicDescription'];
}
Map<String, dynamic> toJson() {
@ -254,6 +260,8 @@ class MyReferredPatientModel {
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName;
data['ReferralDoctorName'] = this.referralDoctorName;
data['ReferralClinicDescription'] = this.referralClinicDescription;
return data;
}
}

@ -58,7 +58,7 @@ class PatientProfileScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
!isFromSearch && patientType == "1"
!isFromSearch && isInpatient/*patientType == "1"*/
? PatientProfileHeaderNewDesignInPatient(
patient, patientType, arrivalType)
: PatientProfileHeaderNewDesign(

@ -23,7 +23,7 @@ class ReferredPatientScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
Container(
height: 100,
),
Image.asset('assets/images/no-data.png'),
@ -37,22 +37,24 @@ class ReferredPatientScreen extends StatelessWidget {
],
),
)
: SingleChildScrollView(
: SingleChildScrollView(// DoctorApplication.svc/REST/GtMyReferredPatient
child: Container(
margin: EdgeInsets.only(top: 70),
child: Column(
children: [
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
// const Divider(
// color: Color(0xffCCCCCC),
// height: 1,
// thickness: 2,
// indent: 0,
// endIndent: 0,
// ),
...List.generate(
model.listMyReferredPatientModel.length,
(index) =>
PatientReferralItemWidget(
referralStatus: "${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}",
referralStatusCode: model.getReferredPatientItem(index).referralStatus,
patientName: "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
patientGender: model.getReferredPatientItem(index).gender,
referredDate: DateUtils.convertDateFromServerFormat(model.getReferredPatientItem(index).referralDate, "dd/MM/yyyy"),
@ -70,8 +72,8 @@ class ReferredPatientScreen extends StatelessWidget {
model.getReferredPatientItem(index).nationalityFlagURL,
doctorAvatar:
model.getReferredPatientItem(index).doctorImageURL,
referralDoctorName: "${model.getReferredPatientItem(index).referringDoctorName}(${model.getReferredPatientItem(index).referringClinicDescription})",
clinicDescription: null,
referralDoctorName: "Dr. ${model.getReferredPatientItem(index).referralDoctorName}",
clinicDescription: model.getReferredPatientItem(index).referralClinicDescription,
),
),
],

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -84,17 +85,27 @@ class VitalSignItem extends StatelessWidget {
),
Container(
width: double.infinity,
child: Align(
alignment: Alignment.topLeft,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: AppText(
"$des",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.bold,
child: Column(
children: [
Align(
alignment: Alignment.topRight,
child: Icon(
EvaIcons.eye,
),
),
),
Align(
alignment: Alignment.topLeft,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: AppText(
"$des",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
],

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-
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/util/date-utils.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/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -38,54 +39,54 @@ class VitalSingChartBloodPressure extends StatelessWidget {
@override
Widget build(BuildContext context) {
generateData();
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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)
),
return timeSeriesData1.length != 0 || timeSeriesData2.length != 0
? Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.3,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
children: <Widget>[
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,
),
),
SizedBox(height: 8,),
VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
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.3,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
SizedBox(
height: 8,
),
VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
],
),
),
],
),
),
/*AppExpandableNotifier(
/*AppExpandableNotifier(
// isExpand: true,
headerWid: LineChartCurvedBloodPressure(
title: name,
@ -102,9 +103,16 @@ class VitalSingChartBloodPressure extends StatelessWidget {
viewKey2: viewKey2,
),
),*/
],
),
);
],
),
)
: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height,
child: Center(
child: AppText(TranslationBase.of(context).vitalSignDetailEmpty),
),
);
}
generateData() {

@ -12,6 +12,7 @@ import 'package:provider/provider.dart';
class PatientReferralItemWidget extends StatelessWidget {
final String referralStatus;
final int referralStatusCode;
final String patientName;
final int patientGender;
final String referredDate;
@ -29,6 +30,7 @@ class PatientReferralItemWidget extends StatelessWidget {
PatientReferralItemWidget(
{this.referralStatus,
this.referralStatusCode,
this.patientName,
this.patientGender,
this.referredDate,
@ -54,11 +56,11 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [
Container(
child: CardWithBgWidget(
bgColor: referralStatus != null
? referralStatus == 'Pending'
? Color(0xffc4aa54)
: Colors.red[800]
: Colors.grey[500],
bgColor: referralStatusCode == 1
? Color(0xffc4aa54)
: referralStatusCode == 46
? Colors.green[700]
: Colors.red[700],
hasBorder: false,
widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
@ -74,13 +76,11 @@ class PatientReferralItemWidget extends StatelessWidget {
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: referralStatus != null
? referralStatus == 'Pending'
? Color(0xffc4aa54)
: referralStatus == 'Accepted'
? Colors.green[700]
: Colors.red[700]
: Colors.grey[500],
color: referralStatusCode == 1
? Color(0xffc4aa54)
: referralStatusCode == 46
? Colors.green[700]
: Colors.red[700],
),
AppText(
referredDate,
@ -222,6 +222,7 @@ class PatientReferralItemWidget extends StatelessWidget {
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
maxLines: 1,
),
),
],
@ -246,18 +247,27 @@ class PatientReferralItemWidget extends StatelessWidget {
child: Container(
width: 40,
height: 40,
child: doctorAvatar !=null?ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
doctorAvatar,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
)):Container(),
child: doctorAvatar != null
? ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
doctorAvatar,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
))
: Container(
child: Image.asset(
patientGender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
),
),
Expanded(
@ -266,14 +276,23 @@ class PatientReferralItemWidget extends StatelessWidget {
margin: EdgeInsets.only(
left: 10, top: 25, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
referralDoctorName,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w800,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
color: Colors.black,
),
if (clinicDescription != null)
AppText(
clinicDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.4 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
),
),

@ -185,7 +185,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
fontSize: 1.2 * SizeConfig.textMultiplier,
),
AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.createdOn)).inDays + 1}",
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays}",
fontSize: 1.4 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700),
],

Loading…
Cancel
Save