medical file updates

pull/30/head
haroon amjad 2 months ago
parent 9aadb37a2b
commit 151351c0bf

@ -0,0 +1,5 @@
<svg width="15" height="18" viewBox="0 0 15 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.3341 2.73593C13.3465 0.996493 11.1438 0.387116 9.41507 1.40204L1.9783 5.76797C0.259805 6.77686 -0.316545 8.99649 0.665687 10.7264C1.25916 11.7717 2.29147 12.4098 3.39807 12.5307C3.79951 12.5746 4.16073 12.2868 4.20487 11.888C4.24902 11.4891 3.95937 11.1302 3.55794 11.0864C2.90888 11.0155 2.2965 10.6413 1.93949 10.0125C1.34085 8.95816 1.70266 7.61757 2.7223 7.01897L5.81204 5.20506L6.50525 6.3668C6.7112 6.71196 7.15978 6.82588 7.50718 6.62126C7.85458 6.41663 7.96924 5.97095 7.76329 5.62579L7.07116 4.46586L10.1591 2.65303C11.1684 2.06046 12.4671 2.40504 13.0603 3.44987C13.5393 4.29342 13.4044 5.3279 12.8 6.01304C12.5338 6.31478 12.5642 6.7738 12.8679 7.03829C13.1716 7.30278 13.6336 7.27258 13.8998 6.97083C14.9042 5.83238 15.1252 4.1292 14.3341 2.73593Z" fill="#ED1C2B"/>
<path d="M13.7153 8.93673C13.6985 9.04274 13.5953 9.10233 13.3889 9.22151L5.54435 13.7505C5.33793 13.8697 5.23473 13.9293 5.13452 13.8908C5.03432 13.8523 4.99968 13.7456 4.9304 13.5322C4.20822 11.3077 5.10997 8.80563 7.21681 7.58925C9.32364 6.37287 11.9414 6.84295 13.5068 8.58065C13.657 8.74735 13.732 8.83071 13.7153 8.93673Z" fill="#ED1C2B"/>
<path d="M14.3613 10.0554C14.2611 10.017 14.1579 10.0765 13.9515 10.1957L6.10671 14.7249C5.90032 14.8441 5.79713 14.9036 5.78034 15.0096C5.76356 15.1156 5.83862 15.199 5.98875 15.3657C7.55409 17.1039 10.1722 17.5743 12.2793 16.3578C14.3864 15.1412 15.2881 12.6387 14.5654 10.4139C14.4961 10.2006 14.4615 10.0939 14.3613 10.0554Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -100,6 +100,7 @@ class AppAssets {
static const String forward_chevron_icon = '$svgBasePath/forward_chevron_icon.svg';
static const String logout = '$svgBasePath/logout.svg';
static const String alarm_clock_icon = '$svgBasePath/alarm_clock_icon.svg';
static const String all_medications_icon = '$svgBasePath/all_medications_icon.svg';
//bottom navigation//
static const String homeBottom = '$svgBasePath/home_bottom.svg';

@ -21,8 +21,9 @@ class CollapsingListView extends StatelessWidget {
VoidCallback? history;
Widget? bottomChild;
bool isClose;
bool isLeading;
CollapsingListView({required this.title, this.child, this.search, this.isClose = false, this.bottomChild, this.report, this.logout, this.history});
CollapsingListView({required this.title, this.child, this.search, this.isClose = false, this.bottomChild, this.report, this.logout, this.history, this.isLeading = true});
@override
Widget build(BuildContext context) {
@ -33,17 +34,18 @@ class CollapsingListView extends StatelessWidget {
CustomScrollView(
slivers: [
SliverAppBar(
automaticallyImplyLeading: false,
pinned: true,
expandedHeight: 100,
stretch: true,
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
surfaceTintColor: Colors.transparent,
backgroundColor: AppColors.bgScaffoldColor,
leading: IconButton(
leading: isLeading ? IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h),
padding: EdgeInsets.only(left: 12),
onPressed: () => Navigator.pop(context),
),
) : SizedBox.shrink(),
flexibleSpace: LayoutBuilder(
builder: (context, constraints) {
final double maxHeight = 100;

@ -22,14 +22,17 @@ import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insur
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/lab_rad_card.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
import 'package:provider/provider.dart';
import '../prescriptions/prescription_detail_page.dart';
import 'widgets/medical_file_appointment_card.dart';
class MedicalFilePage extends StatefulWidget {
@ -61,13 +64,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appState = getIt.get<AppState>();
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(top: 80.0),
body: CollapsingListView(
title: LocaleKeys.medicalFile.tr(context: context),
isLeading: false,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.medicalFile.tr(context: context).toText22(isBold: true).paddingSymmetrical(24.h, 0.0),
SizedBox(height: 16.h),
TextInputWidget(
labelText: LocaleKeys.search.tr(context: context),
@ -342,37 +345,36 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: FadeInAnimation(
child: Row(
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.prescription_item_icon,
width: 40.h,
height: 40.h,
),
SizedBox(width: 8.h),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Column(
children: [
// SizedBox(width: 150.h, child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText12(isBold: true, maxLine: 1)),
// SizedBox(
// width: 150.h,
// child:
// "Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
// .needTranslation
// .toText10(weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4),
// ),
],
),
SizedBox(width: 68.h),
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
),
],
Image.network(
prescriptionVM.patientPrescriptionOrders[index].doctorImageURL!,
width: 63.h,
height: 63.h,
fit: BoxFit.fill,
).circle(100),
SizedBox(width: 16.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
prescriptionVM.patientPrescriptionOrders[index].doctorName!.toText16(isBold: true),
SizedBox(height: 4.h),
Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate), false),
),
],
),
],
),
),
SizedBox(width: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor),
],
),
),
@ -382,11 +384,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
).onPress(() {
prescriptionVM.setPrescriptionsDetailsLoading();
// Navigator.of(context).push(
// FadePage(
// page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()),
// ),
// );
Navigator.of(context).push(
FadePage(
page: PrescriptionDetailPage(prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
),
);
}),
SizedBox(height: 16.h),
const Divider(color: AppColors.dividerColor),
@ -397,16 +399,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: CustomButton(
text: "All Prescriptions".needTranslation,
onPressed: () {
// Navigator.of(context)
// .push(
// FadePage(
// page: PrescriptionsListPage(),
// ),
// )
// .then((val) {
// prescriptionsViewModel.setPrescriptionsDetailsLoading();
// prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
// });
Navigator.of(context).push(
FadePage(
page: PrescriptionsListPage(),
),
);
},
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
@ -420,6 +417,23 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
iconSize: 16.h,
),
),
SizedBox(width: 10.h),
Expanded(
child: CustomButton(
text: "All Medications".needTranslation,
onPressed: () {},
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14,
fontWeight: FontWeight.w500,
borderRadius: 12.h,
height: 40.h,
icon: AppAssets.all_medications_icon,
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
),
),
],
),
],

Loading…
Cancel
Save