Changes for AI Lab analysis

pull/199/head
Haroon Amjad 2 months ago
parent 30bdfac442
commit 657f886391

File diff suppressed because it is too large Load Diff

@ -199,8 +199,8 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n";
}
body['TokenID'] = "@dm!n";
body['PatientID'] = 2007395;
// body['TokenID'] = "@dm!n";
// body['PatientID'] = 2007395;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q";

@ -106,6 +106,11 @@ class LabViewModel extends ChangeNotifier {
notifyListeners();
}
closeAILabResultAnalysis() {
labOrderResponseByAi = null;
notifyListeners();
}
void setIsSortByClinic(bool value) {
isSortByClinic = value;
patientLabOrdersViewList = isSortByClinic ? patientLabOrdersByClinic : patientLabOrdersByHospital;

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -101,18 +100,12 @@ class DoctorProfilePage extends StatelessWidget {
children: [
Column(
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.doctor_profile_rating_icon,
width: 48.w,
height: 48.h,
fit: BoxFit.contain,
applyThemeColor: false
),
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_rating_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h),
"Ratings".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
bookAppointmentsViewModel.doctorsProfileResponseModel.decimalDoctorRate
.toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor),
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
],
).onPress(() {
bookAppointmentsViewModel.getDoctorRatingDetails();
@ -128,18 +121,12 @@ class DoctorProfilePage extends StatelessWidget {
SizedBox(width: 36.w),
Column(
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.doctor_profile_reviews_icon,
width: 48.w,
height: 48.h,
fit: BoxFit.contain,
applyThemeColor: false
),
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_reviews_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h),
"Reviews".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
bookAppointmentsViewModel.doctorsProfileResponseModel.noOfPatientsRate
.toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor),
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
],
).onPress(() {
bookAppointmentsViewModel.getDoctorRatingDetails();

@ -164,7 +164,7 @@ class LabResultByClinic extends StatelessWidget {
padding: EdgeInsets.only(right: 4.w, left: 4.w),
child: Utils.buildSvgWithAssets(icon: AppAssets.aiOverView, width: 16.h, height: 16.h, iconColor: Colors.white),
),
LocaleKeys.generateAiAnalysis.tr(context: context).toText16(isBold: true)
LocaleKeys.generateAiAnalysis.tr(context: context).toText16(isBold: true, color: Colors.white)
],
),
).paddingSymmetrical(24.h, 24.h).onPress(() async {

@ -2,11 +2,14 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_order_response_by_ai_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
class AiAnalysisWidget extends StatelessWidget {
final LabOrderResponseByAi data;
@ -71,6 +74,14 @@ class AiAnalysisWidget extends StatelessWidget {
),
],
),
SizedBox(height: 16.h),
CustomButton(
height: 50.h,
text: LocaleKeys.close.tr(context: context),
onPressed: () {
getIt.get<LabViewModel>().closeAILabResultAnalysis();
},
),
],
),
),

@ -35,7 +35,8 @@ class LabResultDetails extends StatelessWidget {
LabViewModel labViewModel = Provider.of<LabViewModel>(context, listen: false);
final appState = getIt.get<AppState>();
return Scaffold(
body: Column(
body: Consumer<LabViewModel>(builder: (context, labVM, child) {
return Column(
children: [
Expanded(
child: CollapsingListView(
@ -76,7 +77,7 @@ class LabResultDetails extends StatelessWidget {
),
),
),
Container(
labVM.labOrderResponseByAi == null ? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
@ -104,7 +105,7 @@ class LabResultDetails extends StatelessWidget {
padding: EdgeInsets.only(right: 4.w, left: 4.w),
child: Utils.buildSvgWithAssets(icon: AppAssets.aiOverView, width: 16.h, height: 16.h, iconColor: Colors.white),
),
LocaleKeys.generateAiAnalysisResult.tr(context: context).toText16(isBold: true)
LocaleKeys.generateAiAnalysisResult.tr(context: context).toText16(isBold: true, color: Colors.white)
],
),
).paddingSymmetrical(24.h, 24.h).onPress(() async {
@ -123,9 +124,10 @@ class LabResultDetails extends StatelessWidget {
context.pop();
});
}),
),
) : SizedBox.shrink(),
],
),
);
}),
);
}

Loading…
Cancel
Save