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();
if(response['patientArrivalList']['entityList'] != null){
response['patientArrivalList']['entityList'].forEach((v) { response['patientArrivalList']['entityList'].forEach((v) {
PatiantInformtion item = PatiantInformtion.fromJson(v); PatiantInformtion item = PatiantInformtion.fromJson(v);
patientArrivalList.add(item); 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(
"${TranslationBase.of(context).normal}",
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)
: null, : 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)
@ -216,16 +218,50 @@ class VitalSignDetailsScreen extends StatelessWidget {
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,
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, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 4
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
AppText( AppText(
"(31-40>)", "(35<)",
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)

@ -50,18 +50,20 @@ 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(
child: AppText(
"$unit", "$unit",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3, fontSize: SizeConfig.textMultiplier * 1.2,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: HexColor('#B8382C'), color: HexColor('#B8382C'),
margin: 0, 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,7 +41,8 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
child: AppText(
patient.firstName != null ? patient.firstName != null ?
(Helpers.capitalize(patient.firstName) + (Helpers.capitalize(patient.firstName) +
" " + " " +
@ -52,6 +53,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
),
patient.gender == 1 patient.gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,

Loading…
Cancel
Save