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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save