Radiology details & assessment fix

merge-requests/451/head
hussam al-habibeh 5 years ago
parent f89eb0f76b
commit 26672dbb6e

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_head
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -80,27 +81,27 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 100, height: 100,
), ),
], ],
), ),
), ),
], ],
), ),
), ),
bottomSheet: model.radImageURL.isNotEmpty ?Container( bottomSheet: model.radImageURL.isNotEmpty
width: double.maxFinite, ? Container(
height: 100, width: double.maxFinite,
child: Container( child: Container(
margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12), margin:
child: Button( EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12),
color: Colors.red, child: AppButton(
onTap: () { onPressed: () {
launch(model.radImageURL); launch(model.radImageURL);
}, },
title: TranslationBase.of(context).openRad, title: TranslationBase.of(context).openRad,
), ),
), ),
):null, )
: null,
), ),
); );
} }

@ -46,24 +46,24 @@ class StepsWidget extends StatelessWidget {
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@ -72,8 +72,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 0,), StatusLabel(
selectedStepId: index,
stepId: 0,
),
], ],
), ),
], ],
@ -82,10 +84,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.28,
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -98,23 +97,25 @@ class StepsWidget extends StatelessWidget {
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -124,9 +125,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(
StatusLabel(selectedStepId: index, stepId: 1,), selectedStepId: index,
stepId: 1,
),
], ],
), ),
], ],
@ -135,14 +137,10 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.52,
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (index >= 3) if (index >= 3) changeCurrentTab(2);
changeCurrentTab(2);
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -154,23 +152,25 @@ class StepsWidget extends StatelessWidget {
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFCC9B14) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -180,7 +180,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 2,), StatusLabel(
selectedStepId: index,
stepId: 2,
),
], ],
), ),
], ],
@ -202,38 +205,43 @@ class StepsWidget extends StatelessWidget {
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"Plan",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(
selectedStepId: index,
stepId: 3,
),
],
),
), ),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"Plan",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 3,),
],
),
),
], ],
), ),
), ),
@ -244,10 +252,7 @@ class StepsWidget extends StatelessWidget {
children: [ children: [
Container( Container(
height: 150, height: 150,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Divider(
@ -272,24 +277,24 @@ class StepsWidget extends StatelessWidget {
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"شخصي", "شخصي",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -301,10 +306,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.28,
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -317,28 +319,28 @@ class StepsWidget extends StatelessWidget {
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"هدف", "هدف",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
], ],
), ),
@ -346,10 +348,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.52,
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
@ -362,32 +361,33 @@ class StepsWidget extends StatelessWidget {
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: AppText( child: AppText(
"تقدير", "تقدير",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
), ),
], ],
), ),
@ -408,44 +408,48 @@ class StepsWidget extends StatelessWidget {
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(right:index == 3? 15:0), margin: EdgeInsets.only(right: index == 3 ? 15 : 0),
child: AppText( child: AppText(
"خطة", "خطة",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
), ),
], ],
), ),
), ),
), ),
], ],
); );
} }
} }
class StatusLabel extends StatelessWidget { class StatusLabel extends StatelessWidget {
const StatusLabel({ const StatusLabel({
Key key, this.stepId, this.selectedStepId, Key key,
this.stepId,
this.selectedStepId,
}) : super(key: key); }) : super(key: key);
final int stepId; final int stepId;
@ -457,24 +461,30 @@ class StatusLabel extends StatelessWidget {
width: 65, width: 65,
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3), padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC), ? Color(0xFFF1E9D3)
: stepId < selectedStepId
? Color(0xFFD8E8DB)
: Color(0xFFCCCCCC),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
), ),
border: Border.all( border: Border.all(color: HexColor('#707070'), width: 0.30),
color: HexColor('#707070'),
width: 0.30),
), ),
child: AppText( child: AppText(
stepId == selectedStepId ? "inProgress" : stepId < selectedStepId stepId == selectedStepId
? "Completed" ? "inProgress"
: " Locked ", : stepId < selectedStepId
? "Completed"
: " Locked ",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: 10, fontSize: 10,
color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFF359846) : Color(0xFF969696), ? Color(0xFFCC9B14)
: stepId < selectedStepId
? Color(0xFF359846)
: Color(0xFF969696),
), ),
); );
} }

@ -54,495 +54,510 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
widget.mySelectedAssessmentList.clear(); widget.mySelectedAssessmentList.clear();
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: '', doctorID: '',
appointmentNo: widget.patientInfo.appointmentNo); appointmentNo: widget.patientInfo.appointmentNo);
await model.getPatientAssessment(getAssessmentReqModel); await model.getPatientAssessment(getAssessmentReqModel);
if (model.patientAssessmentList.isNotEmpty) { if (model.patientAssessmentList.isNotEmpty) {
if (model.listOfDiagnosisCondition.length == 0) { if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition); await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
} }
if (model.listOfDiagnosisType.length == 0) { if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType); await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
model.patientAssessmentList.forEach((element) {
MasterKeyModel diagnosisType = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisType,
id: element.diagnosisTypeID,
);
MasterKeyModel selectedICD = model.getOneMasterKey(
masterKeys: MasterKeysService.ICD10,
id: element.icdCode10ID,
);
MasterKeyModel diagnosisCondition = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisCondition,
id: element.conditionID,
);
if (diagnosisCondition != null &&
diagnosisType != null &&
diagnosisCondition != null) {
MySelectedAssessment temMySelectedAssessment =
MySelectedAssessment(
appointmentId: element.appointmentNo,
remark: element.remarks,
selectedDiagnosisType: diagnosisType,
selectedDiagnosisCondition: diagnosisCondition,
selectedICD: selectedICD,
doctorID: element.doctorID,
doctorName: element.doctorName,
createdBy: element.createdBy,
createdOn: element.createdOn,
icdCode10ID: element.icdCode10ID);
widget.mySelectedAssessmentList.add(temMySelectedAssessment);
}
});
} }
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
model.patientAssessmentList.forEach((element) {
MasterKeyModel diagnosisType = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisType,
id: element.diagnosisTypeID,
);
MasterKeyModel selectedICD = model.getOneMasterKey(
masterKeys: MasterKeysService.ICD10,
id: element.icdCode10ID,
);
MasterKeyModel diagnosisCondition = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisCondition,
id: element.conditionID,
);
if (diagnosisCondition != null &&
diagnosisType != null &&
diagnosisCondition != null) {
MySelectedAssessment temMySelectedAssessment =
MySelectedAssessment(
appointmentId: element.appointmentNo,
remark: element.remarks,
selectedDiagnosisType: diagnosisType,
selectedDiagnosisCondition: diagnosisCondition,
selectedICD: selectedICD,
doctorID: element.doctorID,
doctorName: element.doctorName,
createdBy: element.createdBy,
createdOn: element.createdOn,
icdCode10ID: element.icdCode10ID);
widget.changeLoadingState(false); widget.mySelectedAssessmentList.add(temMySelectedAssessment);
}, }
builder: (_, model, w) => AppScaffold( });
isShowAppBar: false, }
// baseViewModel: model,
body: SingleChildScrollView( widget.changeLoadingState(false);
physics: ScrollPhysics(), },
child: Container( builder: (_, model, w) => AppScaffold(
color: Color(0xffF8F8F8), isShowAppBar: false,
child: Center( // baseViewModel: model,
child: FractionallySizedBox( body: SingleChildScrollView(
widthFactor: 0.9, physics: ScrollPhysics(),
child: Column( child: Container(
mainAxisAlignment: MainAxisAlignment.start, color: Color(0xffF8F8F8),
children: [ child: Center(
SizedBox( child: FractionallySizedBox(
height: 30, widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 30,
),
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
), ),
Container( border: Border.all(color: Colors.grey[200], width: 0.5),
width: double.infinity, ),
margin: EdgeInsets.only(top: 10, left: 10, right: 10), child: HeaderBodyExpandableNotifier(
padding: EdgeInsets.all(8.0), headerWidget: Row(
decoration: BoxDecoration( mainAxisAlignment: MainAxisAlignment.spaceBetween,
color: Colors.white, children: [
borderRadius: BorderRadius.all( Padding(
Radius.circular(10.0), padding: EdgeInsets.all(12.0),
child: Row(
children: [
Texts(TranslationBase.of(context).assessment,
variant:
isAssessmentExpand ? "bodyText" : '',
bold: isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: Colors.black,
size: 10,
)
],
),
), ),
border: InkWell(
Border.all(color: Colors.grey[200], width: 0.5), onTap: () {
setState(() {
isAssessmentExpand = !isAssessmentExpand;
});
},
child: Icon(isAssessmentExpand
? EvaIcons.arrowUp
: EvaIcons.arrowDown))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 20,
), ),
child: HeaderBodyExpandableNotifier( Column(
headerWidget: Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, Container(
children: [ margin:
Padding( EdgeInsets.only(left: 5, right: 5, top: 15),
padding: EdgeInsets.all(12.0), child: TextFields(
child: Row( hintText: TranslationBase.of(context)
children: [ .addAssessment,
Texts( fontSize: 13.5,
TranslationBase.of(context) onTapTextFields: () {
.assessment, openAssessmentDialog(context,
variant: isAssessmentExpand isUpdate: false, model: model);
? "bodyText"
: '',
bold:
isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: Colors.black,
size: 10,
)
],
),
),
InkWell(
onTap: () {
setState(() {
isAssessmentExpand =
!isAssessmentExpand;
});
}, },
child: Icon(isAssessmentExpand readOnly: true,
? EvaIcons.arrowUp suffixIcon: EvaIcons.plusSquare,
: EvaIcons.arrowDown)) suffixIconColor: Colors.black,
], fontWeight: FontWeight.w600,
), validator: (value) {
bodyWidget: Column(children: [ if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Column( Column(
children: [ children: widget.mySelectedAssessmentList
Container( .map((assessment) {
return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 5, right: 5, top: 15), left: 5, right: 5, top: 15),
child: TextFields( child: Row(
hintText: TranslationBase.of(context) mainAxisAlignment:
.addAssessment, MainAxisAlignment.spaceBetween,
fontSize: 13.5, crossAxisAlignment:
onTapTextFields: () { CrossAxisAlignment.start,
openAssessmentDialog(context, children: [
isUpdate: false, model: model); Column(
},
readOnly: true,
suffixIcon: EvaIcons.plusSquare,
suffixIconColor: Colors.black,
fontWeight: FontWeight.w600,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
Column(
children: widget.mySelectedAssessmentList
.map((assessment) {
return Container(
margin: EdgeInsets.only(
left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Column( Row(
children: [
AppText(
"ICD : ".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
Container(
child: AppText(
assessment.selectedICD.code
.trim()
.toUpperCase() ??
"",
fontWeight: FontWeight.w700,
fontSize: 11,
),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Row( AppText(
children: [ TranslationBase.of(context)
AppText( .ICDName +
"ICD : ".toUpperCase(), " : ",
fontSize: 10, fontSize: 13,
color: Colors.grey, color: Colors.grey,
),
Container(
child: AppText(
assessment.selectedICD
.code
.trim()
.toUpperCase() ??
"",
fontWeight:
FontWeight.w700,
fontSize: 11,
),
),
],
), ),
Row( Container(
mainAxisAlignment: width: MediaQuery.of(context)
MainAxisAlignment.start, .size
crossAxisAlignment: .width *
CrossAxisAlignment.start, 0.29,
children: [ child: AppText(
AppText( assessment
TranslationBase.of( .selectedICD.description
context) .toString(),
.ICDName + fontWeight: FontWeight.w700,
" : ", fontSize: 10,
fontSize: 13, ),
color: Colors.grey,
),
Container(
width:
MediaQuery.of(context)
.size
.width *
0.29,
child: AppText(
assessment.selectedICD
.description
.toString(),
fontWeight:
FontWeight.w700,
fontSize: 10,
),
),
],
), ),
Row( ],
mainAxisAlignment: ),
MainAxisAlignment.start, Row(
children: [ mainAxisAlignment:
AppText( MainAxisAlignment.start,
TranslationBase.of( children: [
context) AppText(
.appointmentNo, TranslationBase.of(context)
fontSize: 10, .appointmentNo,
color: Colors.grey, fontSize: 10,
), color: Colors.grey,
AppText(
assessment.appointmentId
.toString(),
fontSize: 11,
fontWeight:
FontWeight.w700,
),
],
), ),
Row( AppText(
mainAxisAlignment: assessment.appointmentId
MainAxisAlignment.start, .toString(),
children: [ fontSize: 11,
AppText( fontWeight: FontWeight.w700,
TranslationBase.of(
context)
.condition +
" : ",
fontSize: 10,
color: Colors.grey,
),
AppText(
projectViewModel.isArabic
? assessment
.selectedDiagnosisCondition
.nameAr
: assessment
.selectedDiagnosisCondition
.nameEn,
fontSize: 11,
fontWeight:
FontWeight.w700,
),
],
), ),
Row( ],
mainAxisAlignment: ),
MainAxisAlignment.start, Row(
children: [ mainAxisAlignment:
AppText( MainAxisAlignment.start,
TranslationBase.of( children: [
context) AppText(
.dType + TranslationBase.of(context)
' : ', .condition +
fontSize: 10, " : ",
color: Colors.grey, fontSize: 10,
), color: Colors.grey,
AppText(
projectViewModel.isArabic
? assessment
.selectedDiagnosisType
.nameAr
: assessment
.selectedDiagnosisType
.nameEn,
fontSize: 11,
fontWeight:
FontWeight.w700,
),
],
), ),
if (assessment.doctorName != AppText(
null) projectViewModel.isArabic
Row( ? assessment
mainAxisAlignment: .selectedDiagnosisCondition
MainAxisAlignment.start, .nameAr
children: [ : assessment
AppText( .selectedDiagnosisCondition
TranslationBase.of( .nameEn,
context) fontSize: 11,
.doc, fontWeight: FontWeight.w700,
fontSize: 10, ),
color: Colors.grey, ],
), ),
AppText( Row(
assessment.doctorName ?? mainAxisAlignment:
'', MainAxisAlignment.start,
fontSize: 11, children: [
fontWeight: AppText(
FontWeight.w700, TranslationBase.of(context)
), .dType +
], ' : ',
fontSize: 10,
color: Colors.grey,
),
AppText(
projectViewModel.isArabic
? assessment
.selectedDiagnosisType
.nameAr
: assessment
.selectedDiagnosisType
.nameEn,
fontSize: 11,
fontWeight: FontWeight.w700,
),
],
),
if (assessment.doctorName != null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.doc,
fontSize: 10,
color: Colors.grey,
),
AppText(
assessment.doctorName ?? '',
fontSize: 11,
fontWeight: FontWeight.w700,
), ),
],
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox( SizedBox(
height: 6, height: 6,
), ),
Row( AppText(
mainAxisAlignment: assessment.remark != null ||
MainAxisAlignment.start, assessment.remark ==
children: [ ''
SizedBox( ? TranslationBase.of(
height: 6, context)
), .remarks +
AppText( " : "
assessment.remark != : '',
null || fontSize: 10,
assessment color: Colors.grey,
.remark == ),
'' Container(
? TranslationBase.of( width: MediaQuery.of(context)
context) .size
.remarks + .width *
" : " 0.38,
: '', child: AppText(
fontSize: 10, assessment.remark ?? "",
color: Colors.grey, fontSize: 11,
), fontWeight: FontWeight.w700,
Container( ),
width:
MediaQuery.of(context)
.size
.width *
0.38,
child: AppText(
assessment.remark ?? "",
fontSize: 11,
fontWeight:
FontWeight.w700,
),
),
],
), ),
], ],
), ),
Column( ],
crossAxisAlignment: ),
CrossAxisAlignment.start, Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [ children: [
Row( AppText(
children: [ assessment.createdOn != null
AppText( ? DateTime.parse(
assessment.createdOn != assessment
.createdOn)
.day
.toString()
: DateTime.now()
.day
.toString(),
fontWeight: FontWeight.bold,
fontSize: 15,
),
AppText(" "),
AppText(
Helpers.getMonth(assessment
.createdOn !=
null null
? DateTime.parse( ? DateTime.parse(
assessment assessment
.createdOn) .createdOn)
.day .month
.toString()
: DateTime.now() : DateTime.now()
.day .month)
.toString(), .toUpperCase(),
fontWeight: fontSize: 13,
FontWeight.bold, color: Colors.grey,
fontSize: 15,
),
AppText(" "),
AppText(
Helpers.getMonth(assessment
.createdOn !=
null
? DateTime.parse(
assessment
.createdOn)
.month
: DateTime.now()
.month)
.toUpperCase(),
fontSize: 13,
color: Colors.grey,
),
],
),
SizedBox(
height: MediaQuery.of(context)
.size
.height *
0.05,
), ),
InkWell(
onTap: () {
openAssessmentDialog(
context,
isUpdate: true,
assessment: assessment,
model: model);
},
child: Icon(EvaIcons.edit2),
)
], ],
), ),
// Column( SizedBox(
// children: [ height: MediaQuery.of(context)
// // SizedBox( .size
// // height: 60, .height *
// // ), 0.05,
// InkWell( ),
// onTap: () { InkWell(
// openAssessmentDialog( onTap: () {
// context, openAssessmentDialog(context,
// isUpdate: true, isUpdate: true,
// assessment: assessment, assessment: assessment,
// model: model); model: model);
// }, },
// child: Icon(EvaIcons.edit2), child: Icon(EvaIcons.edit2),
// ) )
// ],
// ),
], ],
), ),
); // Column(
}).toList(), // children: [
) // // SizedBox(
], // // height: 60,
// // ),
// InkWell(
// onTap: () {
// openAssessmentDialog(
// context,
// isUpdate: true,
// assessment: assessment,
// model: model);
// },
// child: Icon(EvaIcons.edit2),
// )
// ],
// ),
],
),
);
}).toList(),
) )
]), ],
isExpand: isAssessmentExpand, )
), ]),
), isExpand: isAssessmentExpand,
DividerWithSpacesAround( ),
height: 30,
),
Row(
children: [
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: 'Previous',
color: Colors.white38,
fontColor: Colors.black,
fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
Navigator.pop(context);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.05,
),
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) {
helpers.showErrorToast(
TranslationBase.of(context)
.assessmentErrorMsg);
} else {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
}
},
),
),
],
),
SizedBox(
height: 30,
),
],
), ),
), DividerWithSpacesAround(
height: 30,
),
// Row(
// children: [
// Container(
// width: MediaQuery.of(context).size.width * 0.4,
// child: AppButton(
// title: 'Previous',
// color: Colors.white38,
// fontColor: Colors.black,
// fontWeight: FontWeight.w700,
// loading: model.state == ViewState.BusyLocal,
// onPressed: () async {
// Navigator.pop(context);
// },
// ),
// ),
// SizedBox(
// width: MediaQuery.of(context).size.width * 0.05,
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.4,
// child: AppButton(
// title: TranslationBase.of(context).next,
// fontWeight: FontWeight.w700,
// loading: model.state == ViewState.BusyLocal,
// onPressed: () async {
// if (widget.mySelectedAssessmentList.isEmpty) {
// helpers.showErrorToast(
// TranslationBase.of(context)
// .assessmentErrorMsg);
// } else {
// widget.changePageViewIndex(3);
// widget.changeLoadingState(true);
// }
// },
// ),
// ),
// ],
// ),
SizedBox(
height: 130,
),
],
),
),
),
),
),
bottomSheet: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: 'Previous',
color: Colors.white38,
fontColor: Colors.black,
fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
Navigator.pop(context);
},
), ),
), ),
))); SizedBox(
width: MediaQuery.of(context).size.width * 0.05,
),
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) {
helpers.showErrorToast(
TranslationBase.of(context).assessmentErrorMsg);
} else {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
}
},
),
),
],
),
),
),
);
} }
openAssessmentDialog(BuildContext context, openAssessmentDialog(BuildContext context,

Loading…
Cancel
Save