diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index a0dc3b4a..651d3752 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -63,7 +64,6 @@ class _AllLabSpecialResultState extends State { SizedBox( height: 12, ), - Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -83,44 +83,6 @@ class _AllLabSpecialResultState extends State { ], ), ), - // if (patient.patientStatusType != null && patient.patientStatusType == 43) - // Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // TranslationBase.of(context).lab, - // style: "caption2", - // color: Colors.black, - // fontSize: 13, - // ), - // AppText( - // TranslationBase.of(context).result, - // bold: true, - // fontSize: 22, - // ), - // ], - // ), - // ), - // if ((patient.patientStatusType != null && patient.patientStatusType == 43) || - // (isFromLiveCare && patient.appointmentNo != null)) - // AddNewOrder( - // onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => BaseAddProcedureTabPage( - // patient: patient, - // model: model, - // procedureType: ProcedureType.LAB_RESULT, - // ), - // settings: RouteSettings(name: 'AddProcedureTabPage'), - // ), - // ); - // }, - // label: TranslationBase.of(context).applyForNewLabOrder, - // ), ...List.generate( model.allSpecialLabList.length, (index) => Container( @@ -167,18 +129,15 @@ class _AllLabSpecialResultState extends State { Expanded( child: DoctorCard( isNoMargin: true, - // onTap: () => Navigator.push( - // context, - // FadePage( - // page: LaboratoryResultPage( - // patientLabOrders: model.patientLabOrdersList[index], - // patient: patient, - // isInpatient: isInpatient, - // arrivalType: arrivalType, - // patientType: patientType, - // ), - // ), - // ), + onTap: () => Navigator.push( + context, + FadePage( + page: SpecialLabResultDetailsPage( + resultData: model.allSpecialLabList[index].resultDataHTML, + patient: patient, + ), + ), + ), doctorName: model.allSpecialLabList[index].doctorName, invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}', profileUrl: model.allSpecialLabList[index].doctorImageURL, diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart new file mode 100644 index 00000000..db86dd72 --- /dev/null +++ b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart @@ -0,0 +1,83 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; + +class SpecialLabResultDetailsPage extends StatelessWidget { + final String resultData; + final PatiantInformtion patient; + + const SpecialLabResultDetailsPage({Key key, this.resultData, this.patient}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + patient, + ), + body: Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Special Lab ", + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), + ), + AppText( + "Result", + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), + ) + ], + ), + ), + resultData != null + ? Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(8)), + border: Border.fromBorderSide( + BorderSide( + color: Colors.white, + width: 1.0, + ), + ), + ), + child: Html(data: resultData ?? ""), + ) + : Container( + child: ErrorMessage( + error: "No Data", + ), + ), + ], + ), + ), + ), + ), + ); + } +}