|
|
|
|
@ -7,6 +7,7 @@ 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/widget_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_special_result.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';
|
|
|
|
|
@ -15,8 +16,9 @@ import 'package:provider/provider.dart';
|
|
|
|
|
class LabOrderSpecialResult extends StatelessWidget {
|
|
|
|
|
String projectID;
|
|
|
|
|
String setupID;
|
|
|
|
|
PatientLabSpecialResult patientLabSpecialResult;
|
|
|
|
|
|
|
|
|
|
LabOrderSpecialResult({super.key, required this.projectID, required this.setupID});
|
|
|
|
|
LabOrderSpecialResult({super.key, required this.projectID, required this.setupID, required this.patientLabSpecialResult});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -47,7 +49,7 @@ class LabOrderSpecialResult extends StatelessWidget {
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
if(data.isNotEmpty ) {
|
|
|
|
|
if (data.isNotEmpty) {
|
|
|
|
|
return AnimatedContainer(
|
|
|
|
|
duration: Duration(milliseconds: 300),
|
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
|
@ -65,11 +67,10 @@ class LabOrderSpecialResult extends StatelessWidget {
|
|
|
|
|
spacing: 8.h,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
// ...labOrder!.testDetails!.map((detail) {
|
|
|
|
|
LocaleKeys.specialResult
|
|
|
|
|
.tr()
|
|
|
|
|
.toText14(isBold: true)
|
|
|
|
|
.toShimmer2(isShow: isLoading),
|
|
|
|
|
(patientLabSpecialResult.testDescription ?? LocaleKeys.specialResult.tr()).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 3.h),
|
|
|
|
|
(patientLabSpecialResult.testShortDescription ?? LocaleKeys.specialResult.tr()).toText13(weight: FontWeight.w600, color: AppColors.textColorLight),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
data.isEmpty
|
|
|
|
|
? LocaleKeys.noSpecialResult
|
|
|
|
|
.tr()
|
|
|
|
|
@ -77,8 +78,9 @@ class LabOrderSpecialResult extends StatelessWidget {
|
|
|
|
|
isBold: true,
|
|
|
|
|
color: AppColors.textColorLight)
|
|
|
|
|
.toShimmer2(isShow: isLoading)
|
|
|
|
|
: HtmlWidget(data).toShimmer2(isShow: isLoading),
|
|
|
|
|
CustomButton(
|
|
|
|
|
: HtmlWidget(patientLabSpecialResult.resultDataHTML ?? "").toShimmer2(isShow: isLoading),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
icon: AppAssets.document,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
@ -86,7 +88,7 @@ class LabOrderSpecialResult extends StatelessWidget {
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
getIt
|
|
|
|
|
.get<LabViewModel>()
|
|
|
|
|
.openSpecialLabResultsAttachmentSheet(specialLabResult: getIt.get<LabViewModel>().patientSpecialLabResultsList.first, projectID: projectID, setupID: setupID);
|
|
|
|
|
.openSpecialLabResultsAttachmentSheet(specialLabResult: patientLabSpecialResult, projectID: projectID, setupID: setupID);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.primaryRedColor.withAlpha(20),
|
|
|
|
|
borderColor: AppColors.primaryRedColor.withAlpha(0),
|
|
|
|
|
|