no message

pull/233/head
Sultan khan 1 day ago
parent 730a4f0040
commit a144f30f42

@ -307,6 +307,7 @@
"vitalSignObese": "بدين", "vitalSignObese": "بدين",
"vitalSignOverweight": "زيادة الوزن", "vitalSignOverweight": "زيادة الوزن",
"vitalSignUnderweight": "نقص الوزن", "vitalSignUnderweight": "نقص الوزن",
"vitalSignSkinny": "نحيف جداً",
"myMedical": "نشط", "myMedical": "نشط",
"myMedicalSubtitle": "الأدوية", "myMedicalSubtitle": "الأدوية",
"myDoctor": "أطبائي", "myDoctor": "أطبائي",

@ -306,6 +306,7 @@
"vitalSignObese": "Obese", "vitalSignObese": "Obese",
"vitalSignOverweight": "Overweight", "vitalSignOverweight": "Overweight",
"vitalSignUnderweight": "Underweight", "vitalSignUnderweight": "Underweight",
"vitalSignSkinny": "Underweight",
"myMedical": "Active", "myMedical": "Active",
"myMedicalSubtitle": "Medications", "myMedicalSubtitle": "Medications",
"myDoctor": "My Doctors", "myDoctor": "My Doctors",

@ -198,9 +198,9 @@ class ApiClientImp implements ApiClient {
url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo"; url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
} }
//
// body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
// body['PatientID'] = 1018977; body['PatientID'] = 1018977;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q"; // body['SessionID'] = "45786230487560q";

@ -11,6 +11,7 @@ enum VitalSignStatus {
obese, obese,
overweight, overweight,
underweight, underweight,
skinny,
} }
/// UI-only helper model for Vital Sign cards. /// UI-only helper model for Vital Sign cards.
@ -34,8 +35,9 @@ class VitalSignUiModel {
/// ///
/// Rules: /// Rules:
/// - Height is always blue. /// - Height is always blue.
/// - High, Obese, Overweight => red scheme. /// - High, Obese => red scheme.
/// - Low, Underweight => yellow scheme. /// - Overweight => orange scheme.
/// - Low, Underweight, Skinny => yellow scheme.
/// - Otherwise => green scheme (Normal). /// - Otherwise => green scheme (Normal).
static VitalSignUiModel scheme({required VitalSignStatus? status, required String label}) { static VitalSignUiModel scheme({required VitalSignStatus? status, required String label}) {
final l = label.toLowerCase(); final l = label.toLowerCase();
@ -50,10 +52,8 @@ class VitalSignUiModel {
); );
} }
// High, Obese, Overweight => red scheme (health concerns) // High, Obese => red scheme (health concerns)
if (status == VitalSignStatus.high || if (status == VitalSignStatus.high || status == VitalSignStatus.obese) {
status == VitalSignStatus.obese ||
status == VitalSignStatus.overweight) {
return VitalSignUiModel( return VitalSignUiModel(
iconBg: AppColors.chipSecondaryLightRedColor, iconBg: AppColors.chipSecondaryLightRedColor,
iconFg: AppColors.primaryRedColor, iconFg: AppColors.primaryRedColor,
@ -62,8 +62,20 @@ class VitalSignUiModel {
); );
} }
// Low, Underweight => yellow scheme (warning) // Overweight => orange scheme (warning)
if (status == VitalSignStatus.low || status == VitalSignStatus.underweight) { if (status == VitalSignStatus.overweight) {
return VitalSignUiModel(
iconBg: AppColors.warningColorYellow.withValues(alpha: 0.12),
iconFg: AppColors.warningColorYellow,
chipBg: AppColors.warningColorYellow.withValues(alpha: 0.12),
chipFg: AppColors.warningColorYellow,
);
}
// Low, Underweight, Skinny => yellow scheme (warning)
if (status == VitalSignStatus.low ||
status == VitalSignStatus.underweight ||
status == VitalSignStatus.skinny) {
final Color yellowBg = AppColors.highAndLow.withValues(alpha: 0.12); final Color yellowBg = AppColors.highAndLow.withValues(alpha: 0.12);
return VitalSignUiModel( return VitalSignUiModel(
iconBg: yellowBg, iconBg: yellowBg,
@ -98,6 +110,8 @@ class VitalSignUiModel {
return LocaleKeys.vitalSignOverweight.tr(); return LocaleKeys.vitalSignOverweight.tr();
case VitalSignStatus.underweight: case VitalSignStatus.underweight:
return LocaleKeys.vitalSignUnderweight.tr(); return LocaleKeys.vitalSignUnderweight.tr();
case VitalSignStatus.skinny:
return LocaleKeys.vitalSignSkinny.tr();
} }
} }
@ -131,22 +145,30 @@ class VitalSignUiModel {
return null; return null;
} }
// BMI >= 25 (Overweight or Obese) => High // BMI >= 30 (Obese) => Red
if (bmiResult >= 25) { if (bmiResult >= 30) {
return VitalSignStatus.high; return VitalSignStatus.obese;
}
// BMI >= 25 (Overweight) => Orange
else if (bmiResult >= 25) {
return VitalSignStatus.overweight;
} }
// BMI >= 18.5 and < 25 => Normal // BMI >= 18.5 (Normal) => Green
else if (bmiResult >= 18.5) { else if (bmiResult >= 18.5) {
return VitalSignStatus.normal; return VitalSignStatus.normal;
} }
// BMI < 18.5 (Underweight) => Low // BMI >= 16 (Underweight) => Yellow
else if (bmiResult >= 16) {
return VitalSignStatus.underweight;
}
// BMI < 16 (Skinny/Severely underweight) => Yellow
else { else {
return VitalSignStatus.low; return VitalSignStatus.skinny;
} }
} }
/// Weight status based on BMI with detailed classification /// Weight status based on BMI with detailed classification
/// Returns: Obese, Overweight, Normal, Underweight /// Returns: Obese, Overweight, Normal, Underweight, Skinny
static VitalSignStatus? weightStatus(dynamic bmi) { static VitalSignStatus? weightStatus(dynamic bmi) {
// Return null if BMI is not available or is 0 // Return null if BMI is not available or is 0
final double bmiResult = double.tryParse(bmi.toString()) ?? 0; final double bmiResult = double.tryParse(bmi.toString()) ?? 0;
@ -155,15 +177,26 @@ class VitalSignUiModel {
return null; return null;
} }
// BMI >= 30 (Obese) => Red
if (bmiResult >= 30) { if (bmiResult >= 30) {
return VitalSignStatus.obese; return VitalSignStatus.obese;
} else if (bmiResult >= 25) { }
// BMI >= 25 (Overweight) => Orange
else if (bmiResult >= 25) {
return VitalSignStatus.overweight; return VitalSignStatus.overweight;
} else if (bmiResult >= 18.5) { }
// BMI >= 18.5 (Normal) => Green
else if (bmiResult >= 18.5) {
return VitalSignStatus.normal; return VitalSignStatus.normal;
} else { }
// BMI >= 16 (Underweight) => Yellow
else if (bmiResult >= 16) {
return VitalSignStatus.underweight; return VitalSignStatus.underweight;
} }
// BMI < 16 (Skinny/Severely underweight) => Yellow
else {
return VitalSignStatus.skinny;
}
} }
} }

@ -191,6 +191,7 @@ class InsuranceViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
}, },
(apiResponse) { (apiResponse) {
patientInsuranceApprovalsList =[];
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) { } else if (apiResponse.messageStatus == 1) {

@ -52,6 +52,8 @@ class MyInvoicesViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
}, },
(apiResponse) { (apiResponse) {
_originalInvoicesList =[];
allInvoicesList =[];
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) { } else if (apiResponse.messageStatus == 1) {

@ -322,6 +322,7 @@ class CodegenLoader extends AssetLoader{
"vitalSignObese": "بدين", "vitalSignObese": "بدين",
"vitalSignOverweight": "زيادة الوزن", "vitalSignOverweight": "زيادة الوزن",
"vitalSignUnderweight": "نقص الوزن", "vitalSignUnderweight": "نقص الوزن",
"vitalSignSkinny": "نحيف جداً",
"myMedical": "نشط", "myMedical": "نشط",
"myMedicalSubtitle": "الأدوية", "myMedicalSubtitle": "الأدوية",
"myDoctor": "أطبائي", "myDoctor": "أطبائي",
@ -2034,6 +2035,7 @@ static const Map<String,dynamic> _en_US = {
"vitalSignObese": "Obese", "vitalSignObese": "Obese",
"vitalSignOverweight": "Overweight", "vitalSignOverweight": "Overweight",
"vitalSignUnderweight": "Underweight", "vitalSignUnderweight": "Underweight",
"vitalSignSkinny": "Underweight",
"myMedical": "Active", "myMedical": "Active",
"myMedicalSubtitle": "Medications", "myMedicalSubtitle": "Medications",
"myDoctor": "My Doctors", "myDoctor": "My Doctors",

@ -308,6 +308,7 @@ abstract class LocaleKeys {
static const vitalSignObese = 'vitalSignObese'; static const vitalSignObese = 'vitalSignObese';
static const vitalSignOverweight = 'vitalSignOverweight'; static const vitalSignOverweight = 'vitalSignOverweight';
static const vitalSignUnderweight = 'vitalSignUnderweight'; static const vitalSignUnderweight = 'vitalSignUnderweight';
static const vitalSignSkinny = 'vitalSignSkinny';
static const myMedical = 'myMedical'; static const myMedical = 'myMedical';
static const myMedicalSubtitle = 'myMedicalSubtitle'; static const myMedicalSubtitle = 'myMedicalSubtitle';
static const myDoctor = 'myDoctor'; static const myDoctor = 'myDoctor';

@ -236,7 +236,9 @@ class _VitalSignPageState extends State<VitalSignPage> {
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
Image.asset( Image.asset(
AppAssets.bmiFullBody, getIt.get<AppState>().getAuthenticatedUser()?.gender == 1
? AppAssets.fullBodyFrontMale
: AppAssets.fullBodyFrontFemale,
fit: BoxFit.cover, fit: BoxFit.cover,
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
), ),

Loading…
Cancel
Save