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

merge-requests/411/head
Mohammad Aljammal 4 years ago
commit 2cda29a3e2

@ -386,6 +386,7 @@ const Map<String, Map<String, String>> localizedValues = {
'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'},
'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'},
'bmiObese': {'en': "Obese", 'ar': 'سمين'},
'bmiObeseExtreme': {'en': "Extreme Obese", 'ar': 'سمنة مفرطة'},
'method': {'en': "Method", 'ar': 'الطريقة'},
'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'},
'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'},

@ -50,10 +50,12 @@ class BaseService {
onSuccess: (dynamic response, int statusCode) {
patientArrivalList.clear();
response['patientArrivalList']['entityList'].forEach((v) {
PatiantInformtion item = PatiantInformtion.fromJson(v);
patientArrivalList.add(item);
});
if(response['patientArrivalList']['entityList'] != null){
response['patientArrivalList']['entityList'].forEach((v) {
PatiantInformtion item = PatiantInformtion.fromJson(v);
patientArrivalList.add(item);
});
}
},
onFailure: (String error, int statusCode) {
hasError = true;

@ -101,14 +101,16 @@ class VitalSignsViewModel extends BaseViewModel {
int getBMIStatus() {
var bodyMassIndex = double.parse(bodyMax);
if (bodyMassIndex <= 18.5) {
if (bodyMassIndex < 18.5) {
return 1;
} else if (bodyMassIndex <= 25.0) {
} else if (bodyMassIndex >= 18.5 && bodyMassIndex <= 24.9) {
return 2;
} else if (bodyMassIndex <= 30) {
} else if (bodyMassIndex >= 25 && bodyMassIndex <= 29.9) {
return 3;
} else {
} else if (bodyMassIndex >= 30 && bodyMassIndex <= 34.9) {
return 4;
} else {
return 5;
}
}

@ -1220,7 +1220,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container(
height: 150,
margin: EdgeInsets.all(5),
width: ((SizeConfig.screenWidth * .55) / 5),
width: ((SizeConfig.screenWidth * .55) / 5.3),
child: SizedBox(),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
@ -1246,7 +1246,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Align(
child: AppText(
value.kPIParameter + ' (' + value.value.toString() + ') ',
fontSize: 11,
fontSize: 10,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
)),

@ -114,16 +114,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText(
"${TranslationBase.of(context).bmiUnderWeight}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier * 1.15,
color: mode.getBMIStatus() == 1
? Color(0XFFD02127)
: null,
fontWeight: FontWeight.w700,
),
AppText(
"(1-10)",
"(<18.5)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier * 1.15,
color: mode.getBMIStatus() == 1
? Color(0XFFD02127)
: null,
@ -145,19 +145,21 @@ class VitalSignDetailsScreen extends StatelessWidget {
const SizedBox(
height: 4,
),
AppText(
"${TranslationBase.of(context).bmiHealthy}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2
? Color(0XFFD02127)
: null,
Container(
child: AppText(
"${TranslationBase.of(context).normal}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2
? Color(0XFFD02127)
: null,
),
),
AppText(
"(11-20)",
"(18.5-24.9)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2
? Color(0XFFD02127)
@ -182,16 +184,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText(
"${TranslationBase.of(context).bmiOverWeight}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3
? Color(0XFFD02127)
: null,
),
AppText(
"(21-30)",
"(25-29.9)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3
? Color(0XFFD02127)
@ -201,38 +203,72 @@ class VitalSignDetailsScreen extends StatelessWidget {
)),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
mode.getBMIStatus() != 4
? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png',
height:
MediaQuery.of(context).size.height * 0.10,
),
const SizedBox(
height: 4,
),
AppText(
"${TranslationBase.of(context).bmiObese}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
AppText(
"(31-40>)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
],
)),
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
mode.getBMIStatus() != 4
? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png',
height:
MediaQuery.of(context).size.height * 0.10,
),
const SizedBox(
height: 4,
),
AppText(
"${TranslationBase.of(context).bmiObese}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
AppText(
"(30-34.9)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
],
)),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
mode.getBMIStatus() != 5
? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png',
height:
MediaQuery.of(context).size.height * 0.10,
),
const SizedBox(
height: 4,
),
AppText(
"${TranslationBase.of(context).bmiObeseExtreme}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
AppText(
"(35<)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
],
)),
],
)
],

@ -50,17 +50,19 @@ class VitalSignItem extends StatelessWidget {
AppText(
"$lastVal",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w800,
margin: 0,
),
AppText(
"$unit",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.w700,
color: HexColor('#B8382C'),
margin: 0,
Expanded(
child: AppText(
"$unit",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.2,
fontWeight: FontWeight.w700,
color: HexColor('#B8382C'),
margin: 0,
),
),
],
),
@ -85,7 +87,7 @@ class VitalSignItem extends StatelessWidget {
child: AppText(
"$des",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.5,
fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.w600,
),
),

@ -661,6 +661,7 @@ class TranslationBase {
String get bmiOverWeight =>
localizedValues['bmiOverWeight'][locale.languageCode];
String get bmiObese => localizedValues['bmiObese'][locale.languageCode];
String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode];
String get method => localizedValues['method'][locale.languageCode];

@ -41,16 +41,18 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
),
patient.gender == 1
? Icon(

Loading…
Cancel
Save