Compare commits
14 Commits
dev_v3.13.
...
Dev_3.3_In
| Author | SHA1 | Date |
|---|---|---|
|
|
59b7220a1f | 2 years ago |
|
|
7389010f91 | 2 years ago |
|
|
6310c1c615 | 2 years ago |
|
|
157b73c3e9 | 2 years ago |
|
|
ead27254a6 | 2 years ago |
|
|
fa14f95edb | 2 years ago |
|
|
a13f07ffb1 | 2 years ago |
|
|
375cda502b | 2 years ago |
|
|
1e572a2760 | 2 years ago |
|
|
578325760d | 2 years ago |
|
|
f6243b9ff7 | 2 years ago |
|
|
c6e491a8ac | 2 years ago |
|
|
c2dd561892 | 2 years ago |
|
|
321bf7d8b0 | 2 years ago |
@ -0,0 +1,218 @@
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AdmissionNotice extends StatefulWidget {
|
||||
const AdmissionNotice();
|
||||
|
||||
@override
|
||||
State<AdmissionNotice> createState() => _AdmissionNoticeState();
|
||||
}
|
||||
|
||||
class _AdmissionNoticeState extends State<AdmissionNotice> {
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
List<Widget> inPatientServiceList = getAdmissionNoticeServicesList(context);
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
isShowDecPage: false,
|
||||
showNewAppBarTitle: true,
|
||||
showNewAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).admissionNoticeTitle,
|
||||
body: Container(
|
||||
margin: EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
child: GridView.builder(
|
||||
shrinkWrap: true,
|
||||
primary: false,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: inPatientServiceList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return inPatientServiceList[index];
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> getAdmissionNoticeServicesList(BuildContext context) {
|
||||
List<Widget> serviceList = List();
|
||||
|
||||
serviceList.add(
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// openBirthNotificationsPage(context);
|
||||
viewModalBottomSheet();
|
||||
},
|
||||
child: MedicalProfileItem(
|
||||
title: TranslationBase.of(context).admissionNoticeTitle,
|
||||
imagePath: 'admission.svg',
|
||||
subTitle: TranslationBase.of(context).insuranceSubtitle,
|
||||
width: 50.0,
|
||||
height: 40.0,
|
||||
isInPatient: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return serviceList;
|
||||
}
|
||||
|
||||
void viewModalBottomSheet() {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20, top: 20),
|
||||
child: Text(
|
||||
"Admission Card",
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 21,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
height: 250,
|
||||
child: Container(
|
||||
decoration: cardRadius(20, color: Color(0xFFF2B353E)),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: EdgeInsets.zero,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: EdgeInsets.zero,
|
||||
decoration: projectViewModel.isArabic
|
||||
? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4)
|
||||
: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4),
|
||||
child: Card(
|
||||
color: Colors.transparent,
|
||||
margin: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
mFlex(2),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Text(
|
||||
projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 17,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Text(
|
||||
TranslationBase.of(context).roomNo + " " + (projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.roomID : "Not assigned yet"),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
mFlex(2),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Text(
|
||||
projectViewModel.isPatientAdmitted
|
||||
? projectViewModel.getAdmissionInfoResponseModel.doctorName.toString()
|
||||
: projectViewModel.getAdmissionRequestInfoResponseModel.doctorName,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 17,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
// mFlex(2),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Text(
|
||||
TranslationBase.of(context).clinic +
|
||||
": " +
|
||||
(projectViewModel.isPatientAdmitted
|
||||
? projectViewModel.getAdmissionInfoResponseModel.clinicName.toString()
|
||||
: projectViewModel.getAdmissionRequestInfoResponseModel.clinicName),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Text(
|
||||
TranslationBase.of(context).hospital +
|
||||
": " +
|
||||
(projectViewModel.isPatientAdmitted
|
||||
? projectViewModel.getAdmissionInfoResponseModel.projectName.toString()
|
||||
: projectViewModel.getAdmissionRequestInfoResponseModel.projectName),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
letterSpacing: -0.25,
|
||||
height: 25 / 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
mFlex(1),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 30),
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).close.toUpperCase(),
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
color: CustomColors.accentColor,
|
||||
disabledColor: CustomColors.grey2,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,529 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class InPatientGeneralConsent extends StatelessWidget {
|
||||
InPatientGeneralConsent();
|
||||
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
isShowDecPage: false,
|
||||
showNewAppBarTitle: true,
|
||||
showNewAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).InPatientServicesHeader,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(21.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Card(
|
||||
elevation: 0.0,
|
||||
margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: BorderSide(color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent1,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).hospitalRules,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent2,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).communicationConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent3,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).releaseConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent4,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent5,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).valuables,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent6,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).financialConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent7,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).dataSharingConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent8,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).permissionLeaveConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent9,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).observeConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent10,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).noGuaranteeConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent11,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).disputeConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent12,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).patientsRightsConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent13,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(24.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).acknowledgementConsent,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 21.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
mHeight(12.0),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(
|
||||
TranslationBase.of(context).generalConsent14,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 21.0, right: 21.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: ButtonTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
height: 45.0,
|
||||
child: CustomTextButton(
|
||||
backgroundColor: Color(0xffc5272d),
|
||||
elevation: 0,
|
||||
onPressed: () {
|
||||
acceptRejectConsent(context, 0);
|
||||
},
|
||||
child: Text(TranslationBase.of(context).reject, style: TextStyle(fontSize: 16.0, color: Colors.white)),
|
||||
),
|
||||
),
|
||||
),
|
||||
mWidth(7),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: ButtonTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
height: 45.0,
|
||||
child: CustomTextButton(
|
||||
backgroundColor: CustomColors.green,
|
||||
elevation: 0,
|
||||
onPressed: () {
|
||||
acceptRejectConsent(context, 1);
|
||||
},
|
||||
child: Text(TranslationBase.of(context).acceptLbl, style: TextStyle(fontSize: 16.0, color: Colors.white)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void acceptRejectConsent(BuildContext context, int status) {
|
||||
ClinicListService service = new ClinicListService();
|
||||
GifLoaderDialogUtils.showMyDialog(context);
|
||||
service
|
||||
.insertForGeneralAdmissionConsent(
|
||||
projectViewModel.user.patientID,
|
||||
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo,
|
||||
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID : projectViewModel.getAdmissionRequestInfoResponseModel.clinicId,
|
||||
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID : projectViewModel.getAdmissionRequestInfoResponseModel.projectId,
|
||||
status,
|
||||
context)
|
||||
.then((res) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
if (res["MessageStatus"] == 1) {
|
||||
AppToast.showErrorToast(message: res["SuccessMsg"]);
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res["endUserMessage"]);
|
||||
}
|
||||
Navigator.pop(context);
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue