Changes for AI Lab analysis

haroon_dev
Haroon Amjad 2 weeks 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['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
body['PatientID'] = 2007395; // body['PatientID'] = 2007395;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q"; // body['SessionID'] = "45786230487560q";

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

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

@ -164,7 +164,7 @@ class LabResultByClinic extends StatelessWidget {
padding: EdgeInsets.only(right: 4.w, left: 4.w), padding: EdgeInsets.only(right: 4.w, left: 4.w),
child: Utils.buildSvgWithAssets(icon: AppAssets.aiOverView, width: 16.h, height: 16.h, iconColor: Colors.white), 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 { ).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/material.dart';
import 'package:flutter_svg/flutter_svg.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/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/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/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/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.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 { class AiAnalysisWidget extends StatelessWidget {
final LabOrderResponseByAi data; 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); LabViewModel labViewModel = Provider.of<LabViewModel>(context, listen: false);
final appState = getIt.get<AppState>(); final appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
body: Column( body: Consumer<LabViewModel>(builder: (context, labVM, child) {
return Column(
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
@ -76,7 +77,7 @@ class LabResultDetails extends StatelessWidget {
), ),
), ),
), ),
Container( labVM.labOrderResponseByAi == null ? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
@ -104,7 +105,7 @@ class LabResultDetails extends StatelessWidget {
padding: EdgeInsets.only(right: 4.w, left: 4.w), padding: EdgeInsets.only(right: 4.w, left: 4.w),
child: Utils.buildSvgWithAssets(icon: AppAssets.aiOverView, width: 16.h, height: 16.h, iconColor: Colors.white), 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 { ).paddingSymmetrical(24.h, 24.h).onPress(() async {
@ -123,9 +124,10 @@ class LabResultDetails extends StatelessWidget {
context.pop(); context.pop();
}); });
}), }),
), ) : SizedBox.shrink(),
], ],
), );
}),
); );
} }

Loading…
Cancel
Save