radiology ai lab analysis & lab ai analysis api end points updates.

pull/217/head
aamir-csol 1 day ago
parent 10fa8c46cf
commit 2d7aa5d80d

@ -26,9 +26,9 @@ abstract class LabRepo {
Future<Either<Failure, GenericApiModel<dynamic>>> getLabResultsByAppointmentNo({required num appointmentNo, required num projectID, required num clinicID});
Future<Either<Failure, GenericApiModel<LabOrdersResponseByAi>>> getPatientAiOverViewLabOrders(var payload);
Future<Either<Failure, GenericApiModel<LabOrdersResponseByAi>>> getPatientAiOverViewLabOrders({required int langId, required dynamic payload});
Future<Either<Failure, GenericApiModel<LabOrderResponseByAi>>> getPatientAiOverViewLabOrder(var payload);
Future<Either<Failure, GenericApiModel<LabOrderResponseByAi>>> getPatientAiOverViewLabOrder(var payloa);
}
class LabRepoImp implements LabRepo {
@ -358,7 +358,7 @@ class LabRepoImp implements LabRepo {
}
@override
Future<Either<Failure, GenericApiModel<LabOrdersResponseByAi>>> getPatientAiOverViewLabOrders(var labOrder) async {
Future<Either<Failure, GenericApiModel<LabOrdersResponseByAi>>> getPatientAiOverViewLabOrders({required int langId, required dynamic payload}) async {
try {
GenericApiModel<LabOrdersResponseByAi>? apiResponse;
Failure? failure;
@ -372,7 +372,7 @@ class LabRepoImp implements LabRepo {
'X-API-KEY': '9d9d2ac4c1fc302299dbb0fbb1b7fea1',
'accept': 'application/json',
},
body: {"lab_results": labOrder},
body: {"lab_results": payload, "language_id": langId},
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},

@ -447,20 +447,19 @@ class LabViewModel extends ChangeNotifier {
minY = resultValue;
}
// if (highRefrenceValue < double.parse(element.referenceHigh ?? "0.0")) {
highRefrenceValue = double.parse(element.referenceHigh ?? "0.0");
flagForHighReferenceRange = element.calculatedResultFlag;
highRefrenceValue = double.parse(element.referenceHigh ?? "0.0");
flagForHighReferenceRange = element.calculatedResultFlag;
// }
// if (lowRefenceValue > double.parse(element.referenceLow ?? "0.0")) {
lowRefenceValue = double.parse(element.referenceLow ?? "0.0");
flagForLowReferenceRange = element.calculatedResultFlag;
lowRefenceValue = double.parse(element.referenceLow ?? "0.0");
flagForLowReferenceRange = element.calculatedResultFlag;
// }
if(double.parse(element.referenceHigh ?? "0.0") == 0 ){
if (double.parse(element.referenceHigh ?? "0.0") == 0) {
highRefrenceValue = double.negativeInfinity;
}
if(double.parse(element.referenceLow ?? "0.0") == 0 ){
if (double.parse(element.referenceLow ?? "0.0") == 0) {
lowRefenceValue = double.negativeInfinity;
}
@ -473,18 +472,16 @@ class LabViewModel extends ChangeNotifier {
time: DateUtil.convertStringToDate(element.verifiedOnDateTime),
referenceValue: element.calculatedResultFlag ?? "",
));
} catch (e) {
}
} catch (e) {}
});
if (flagForLowReferenceRange == null && flagForHighReferenceRange == null) {
highRefrenceValue = maxY;
lowRefenceValue = minY;
}
//
if (lowRefenceValue != double.negativeInfinity &&minY > lowRefenceValue) {
if (lowRefenceValue != double.negativeInfinity && minY > lowRefenceValue) {
minY = lowRefenceValue - getInterval();
}else if (highRefrenceValue != double.negativeInfinity && minY > highRefrenceValue) {
} else if (highRefrenceValue != double.negativeInfinity && minY > highRefrenceValue) {
minY = highRefrenceValue - getInterval();
}
@ -494,17 +491,16 @@ class LabViewModel extends ChangeNotifier {
lowTransformedReferenceValue = double.parse(transformValueInRange(lowRefenceValue, flagForLowReferenceRange ?? "").toStringAsFixed(1));
this.highRefrenceValue = double.parse(highRefrenceValue.toStringAsFixed(2));
this.lowRefenceValue = double.parse(lowRefenceValue.toStringAsFixed(2));
if(highRefrenceValue != double.negativeInfinity &&maxY<highRefrenceValue){
maxY = highRefrenceValue+ getInterval();
if (highRefrenceValue != double.negativeInfinity && maxY < highRefrenceValue) {
maxY = highRefrenceValue + getInterval();
maxX = maxY;
}else if(lowRefenceValue != double.negativeInfinity && maxY<lowRefenceValue){
maxY = lowRefenceValue+ getInterval()/2;
} else if (lowRefenceValue != double.negativeInfinity && maxY < lowRefenceValue) {
maxY = lowRefenceValue + getInterval() / 2;
maxX = maxY;
}
// if (maxY < highRefrenceValue) {
// minY = highRefrenceValue - getInterval();
// }
@ -530,15 +526,16 @@ class LabViewModel extends ChangeNotifier {
bool isNumeric(String s) {
return num.tryParse(s) != null;
}
num getInterval() {
// return .1;
var maxX = maxY;
if(maxX<1) return .2;
if(maxX >=1.0 && maxX < 5.0) return .3;
if(maxX >=5.0 && maxX < 10.0) return 1.5;
if(maxX >=10.0 && maxX < 50.0) return 2.5;
if(maxX >=50.0 && maxX < 100.0) return 5;
if(maxX >=100.0 && maxX < 200.0) return 10;
if (maxX < 1) return .2;
if (maxX >= 1.0 && maxX < 5.0) return .3;
if (maxX >= 5.0 && maxX < 10.0) return 1.5;
if (maxX >= 10.0 && maxX < 50.0) return 2.5;
if (maxX >= 50.0 && maxX < 100.0) return 5;
if (maxX >= 100.0 && maxX < 200.0) return 10;
return 15;
}
@ -617,7 +614,7 @@ class LabViewModel extends ChangeNotifier {
rangeStart = 40.0;
rangeEnd = 59.0;
break;
// throw ArgumentError('Invalid flag: $flag');
// throw ArgumentError('Invalid flag: $flag');
}
// Clamp input value to 0-100 and map it to the range bounds
@ -845,9 +842,7 @@ class LabViewModel extends ChangeNotifier {
notifyListeners();
}
Future<void> getAiOverviewLabOrders({required PatientLabOrdersResponseModel labOrder, required String loadingText}) async {
// LoadingUtils.showFullScreenLoader(loadingText: "Loading and analysing your data,\nPlease be patient and let the AI do the magic. \nPlease be patient, This might take some time.");
// LoadingUtils.showFullScreenLoader(loadingText: loadingText);
Future<void> getAiOverviewLabOrders({required int langId, required PatientLabOrdersResponseModel labOrder, required String loadingText}) async {
isLabAIAnalysisNeedsToBeShown = true;
notifyListeners();
@ -875,7 +870,8 @@ class LabViewModel extends ChangeNotifier {
}
orderData["results"] = testResults;
results.add(orderData);
final result = await labRepo.getPatientAiOverViewLabOrders(results);
final result = await labRepo.getPatientAiOverViewLabOrders(payload: results, langId: langId);
result.fold(
(failure) async {
LoaderBottomSheet.hideLoader();
@ -903,7 +899,7 @@ class LabViewModel extends ChangeNotifier {
// LoadingUtils.hideFullScreenLoader();
}
Future<void> getAiOverviewSingleLabResult({required String langId, required LabResult recentLabResult, required String loadingText}) async {
Future<void> getAiOverviewSingleLabResult({required int langId, required LabResult recentLabResult, required String loadingText}) async {
LoaderBottomSheet.showLoader(
loadingText: loadingText,
showCloseButton: true,

@ -19,7 +19,7 @@ abstract class RadiologyRepo {
Future<Either<Failure, GenericApiModel<List<PatientRadiologyResponseModel>>>> getPatientRadiologyOrderByAppointment({required num appointmentNo, required num projectID});
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData});
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData, required int langId,});
}
class RadiologyRepoImp implements RadiologyRepo {
@ -223,9 +223,10 @@ class RadiologyRepoImp implements RadiologyRepo {
}
@override
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData}) async {
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData, required int langId}) async {
Map<String, dynamic> payload = {
"text": reportData,
"language_id": langId
};
try {

@ -127,8 +127,7 @@ class RadiologyViewModel extends ChangeNotifier {
);
}
Future<void> getRadiologyImage(
{required PatientRadiologyResponseModel patientRadiologyResponseModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
Future<void> getRadiologyImage({required PatientRadiologyResponseModel patientRadiologyResponseModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await radiologyRepo.getRadiologyImage(patientRadiologyResponseModel: patientRadiologyResponseModel);
result.fold(
@ -149,12 +148,8 @@ class RadiologyViewModel extends ChangeNotifier {
}
Future<void> getRadiologyPDF(
{required PatientRadiologyResponseModel patientRadiologyResponseModel,
required AuthenticatedUser authenticatedUser,
Function(dynamic)? onSuccess,
Function(String)? onError}) async {
final result =
await radiologyRepo.getRadiologyReportPDF(patientRadiologyResponseModel: patientRadiologyResponseModel, authenticatedUser: authenticatedUser);
{required PatientRadiologyResponseModel patientRadiologyResponseModel, required AuthenticatedUser authenticatedUser, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await radiologyRepo.getRadiologyReportPDF(patientRadiologyResponseModel: patientRadiologyResponseModel, authenticatedUser: authenticatedUser);
result.fold(
(failure) async => await errorHandlerService.handleError(
@ -229,7 +224,7 @@ class RadiologyViewModel extends ChangeNotifier {
notifyListeners();
}
Future<void> getRadiologyAiAnalysis({required String reportData, required String loadingText}) async {
Future<void> getRadiologyAiAnalysis({required String reportData, required String loadingText, required int langId}) async {
LoaderBottomSheet.showLoader(
loadingText: loadingText,
showCloseButton: true,
@ -238,7 +233,7 @@ class RadiologyViewModel extends ChangeNotifier {
},
);
final result = await radiologyRepo.getRadiologyAiAnalysis(reportData: reportData);
final result = await radiologyRepo.getRadiologyAiAnalysis(reportData: reportData, langId: langId);
result.fold(
(failure) async {

@ -168,15 +168,16 @@ class LabResultByClinic extends StatelessWidget {
],
),
).paddingSymmetrical(24.h, 24.h).onPress(() async {
final _dialogService = getIt.get<DialogService>();
await _dialogService.showCommonBottomSheetWithoutH(
final dialogService = getIt.get<DialogService>();
final appState = getIt.get<AppState>();
await dialogService.showCommonBottomSheetWithoutH(
message: LocaleKeys.aiDisclaimer.tr(),
label: LocaleKeys.consent.tr(),
okLabel: LocaleKeys.acceptLbl.tr(),
cancelLabel: LocaleKeys.rejectView.tr(),
onOkPressed: () {
context.pop();
labViewModel.getAiOverviewLabOrders(labOrder: labOrder, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context));
labViewModel.getAiOverviewLabOrders(langId: appState.getLanguageID(), labOrder: labOrder, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context));
},
onCancelPressed: () {
context.pop();

@ -197,7 +197,7 @@ class _LabResultDetailsState extends State<LabResultDetails> {
onOkPressed: () {
context.pop();
labViewModel.getAiOverviewSingleLabResult(
langId: appState.getLanguageID().toString(), recentLabResult: recentLabResult, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context));
langId: appState.getLanguageID(), recentLabResult: recentLabResult, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context));
},
onCancelPressed: () {
context.pop();

@ -48,6 +48,14 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
super.initState();
}
@override
void dispose() {
// Clear AI analysis data when leaving the screen
radiologyViewModel.closeRadiologyAIAnalysis();
radiologyViewModel.setIsRadiologyAIAnalysisNeedsToBeShown(true);
super.dispose();
}
@override
Widget build(BuildContext context) {
radiologyViewModel = Provider.of<RadiologyViewModel>(context, listen: false);
@ -80,198 +88,199 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
});
return Column(
children: [
Expanded(
child: CollapsingListView(
title: LocaleKeys.radiologyResult.tr(context: context),
downloadReport: () async {
LoaderBottomSheet.showLoader();
await radiologyViewModel
.getRadiologyPDF(
patientRadiologyResponseModel: widget.patientRadiologyResponseModel,
authenticatedUser: _appState.getAuthenticatedUser()!,
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
})
.then((val) async {
LoaderBottomSheet.hideLoader();
if (radiologyViewModel.patientRadiologyReportPDFBase64.isNotEmpty) {
String path = await Utils.createFileFromString(radiologyViewModel.patientRadiologyReportPDFBase64, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
children: [
Expanded(
child: CollapsingListView(
title: LocaleKeys.radiologyResult.tr(context: context),
downloadReport: () async {
LoaderBottomSheet.showLoader();
await radiologyViewModel
.getRadiologyPDF(
patientRadiologyResponseModel: widget.patientRadiologyResponseModel,
authenticatedUser: _appState.getAuthenticatedUser()!,
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
})
.then((val) async {
LoaderBottomSheet.hideLoader();
if (radiologyViewModel.patientRadiologyReportPDFBase64.isNotEmpty) {
String path = await Utils.createFileFromString(radiologyViewModel.patientRadiologyReportPDFBase64, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}
}
}
});
},
// viewImage: () {
// if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
// Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
// launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
// } else {
// Utils.showToast("Radiology image not available");
// }
// },
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: true,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
// widget.patientRadiologyResponseModel.description!.toText16(isBold: true),
SizedBox(height: 8.h),
Directionality(
textDirection: ui.TextDirection.ltr,
child: widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight, isEnglishOnly: true),
),
SizedBox(height: 16.h),
// CustomButton(
// text: LocaleKeys.viewRadiologyImage.tr(context: context),
// onPressed: () async {
// if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
// Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
// launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
// } else {
// Utils.showToast("Radiology image not available");
// }
// },
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// textColor: Colors.white,
// fontSize: 14,
// isBold: true,
// borderRadius: 12,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 40.h,
// icon: AppAssets.download,
// iconColor: Colors.white,
// iconSize: 20.h,
// ),
// SizedBox(height: 16.h),
],
).paddingSymmetrical(16.h, 0.h),
),
SizedBox(height: 24.h),
if (radVM.radiologyAiAnalysisResponse != null)
RadiologyAiAnalysisWidget(
key: _aiAnalysisKey,
data: radVM.radiologyAiAnalysisResponse!,
});
},
// viewImage: () {
// if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
// Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
// launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
// } else {
// Utils.showToast("Radiology image not available");
// }
// },
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: true,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
// widget.patientRadiologyResponseModel.description!.toText16(isBold: true),
SizedBox(height: 8.h),
Directionality(
textDirection: ui.TextDirection.ltr,
child: widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight, isEnglishOnly: true),
),
SizedBox(height: 16.h),
// CustomButton(
// text: LocaleKeys.viewRadiologyImage.tr(context: context),
// onPressed: () async {
// if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
// Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
// launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
// } else {
// Utils.showToast("Radiology image not available");
// }
// },
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// textColor: Colors.white,
// fontSize: 14,
// isBold: true,
// borderRadius: 12,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 40.h,
// icon: AppAssets.download,
// iconColor: Colors.white,
// iconSize: 20.h,
// ),
// SizedBox(height: 16.h),
],
).paddingSymmetrical(16.h, 0.h),
),
],
SizedBox(height: 24.h),
if (radVM.radiologyAiAnalysisResponse != null)
RadiologyAiAnalysisWidget(
key: _aiAnalysisKey,
data: radVM.radiologyAiAnalysisResponse!,
),
],
),
),
),
),
),
),
radVM.radiologyAiAnalysisResponse == null
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
child: Column(
children: [
SizedBox(height: 24.h),
widget.patientRadiologyResponseModel.dIAPACSURL != ""
? CustomButton(
text: LocaleKeys.openRad.tr(context: context),
onPressed: () async {
if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
Utils.showToast("Radiology image not available");
}
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16,
isBold: true,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,
icon: AppAssets.imageIcon,
iconColor: Colors.white,
iconSize: 20.h,
).paddingSymmetrical(24.h, 0.h)
: SizedBox.shrink(),
Container(
height: 56.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.r),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.236, 1.0], // 53.6% and 100%
colors: [
Color(0xFF8A38F5), // Transparent
Color(0xFFE20BBB), // Solid #F8F8F8
radVM.radiologyAiAnalysisResponse == null
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
child: Column(
children: [
SizedBox(height: 24.h),
widget.patientRadiologyResponseModel.dIAPACSURL != ""
? CustomButton(
text: LocaleKeys.openRad.tr(context: context),
onPressed: () async {
if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
Utils.showToast("Radiology image not available");
}
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16,
isBold: true,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,
icon: AppAssets.imageIcon,
iconColor: Colors.white,
iconSize: 20.h,
).paddingSymmetrical(24.h, 0.h)
: SizedBox.shrink(),
Container(
height: 56.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.r),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.236, 1.0], // 53.6% and 100%
colors: [
Color(0xFF8A38F5), // Transparent
Color(0xFFE20BBB), // Solid #F8F8F8
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
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.generateAiAnalysisRadResult.tr(context: context).toText16(isBold: true, color: Colors.white)
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
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.generateAiAnalysisRadResult.tr(context: context).toText16(isBold: true, color: Colors.white)
],
),
).paddingSymmetrical(24.h, 12.h).onPress(() async {
final _dialogService = getIt.get<DialogService>();
await _dialogService.showCommonBottomSheetWithoutH(
message: LocaleKeys.aiDisclaimer.tr(),
label: LocaleKeys.consent.tr(),
okLabel: LocaleKeys.acceptLbl.tr(),
cancelLabel: LocaleKeys.rejectView.tr(),
onOkPressed: () {
context.pop();
radiologyViewModel.getRadiologyAiAnalysis(
reportData: widget.patientRadiologyResponseModel.reportData ?? "",
loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context),
);
},
onCancelPressed: () {
context.pop();
},
);
}),
],
),
)
: SizedBox.shrink(),
],
);
).paddingSymmetrical(24.h, 12.h).onPress(() async {
final _dialogService = getIt.get<DialogService>();
await _dialogService.showCommonBottomSheetWithoutH(
message: LocaleKeys.aiDisclaimer.tr(),
label: LocaleKeys.consent.tr(),
okLabel: LocaleKeys.acceptLbl.tr(),
cancelLabel: LocaleKeys.rejectView.tr(),
onOkPressed: () {
context.pop();
radiologyViewModel.getRadiologyAiAnalysis(
reportData: widget.patientRadiologyResponseModel.reportData ?? "",
loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context),
langId: _appState.getLanguageID(),
);
},
onCancelPressed: () {
context.pop();
},
);
}),
],
),
)
: SizedBox.shrink(),
],
);
}),
);
}

Loading…
Cancel
Save