first step from change steper

merge-requests/787/head
Elham Rababh 5 years ago
parent 13be1c6a00
commit 80b976dff3

@ -45,7 +45,8 @@ class UpdateAssessmentPage extends StatefulWidget {
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
} }
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements AssessmentCallBack{ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
implements AssessmentCallBack {
bool isAssessmentExpand = false; bool isAssessmentExpand = false;
List<MySelectedAssessment> mySelectedAssessmentList = List(); List<MySelectedAssessment> mySelectedAssessmentList = List();
@ -126,7 +127,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
children: [ children: [
SOAPStepHeader( SOAPStepHeader(
currentIndex: widget.currentIndex, currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex), changePageViewIndex: widget.changePageViewIndex,
patientInfo: widget.patientInfo,
),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).assessment, headerTitle: TranslationBase.of(context).assessment,
onTap: () { onTap: () {
@ -170,24 +173,23 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
RichText( RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.4), letterSpacing: -0.4),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: text: "ICD : ".toUpperCase(),
"ICD : ".toUpperCase(),
), ),
new TextSpan( new TextSpan(
text: assessment text: assessment
.selectedICD.code .selectedICD.code
.trim() .trim()
.toUpperCase() ?? .toUpperCase() ??
"" ""),
),
], ],
), ),
), ),
@ -199,7 +201,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *5, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -208,8 +212,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: assessment text: assessment
.selectedICD .selectedICD.description
.description
.toString(), .toString(),
), ),
], ],
@ -219,7 +222,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
RichText( RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -230,18 +235,21 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
context) context)
.appointmentNo, .appointmentNo,
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4, letterSpacing: -0.4,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
), ),
new TextSpan( new TextSpan(
text: assessment text: assessment.appointmentId
.appointmentId
.toString() ?? .toString() ??
"", "",
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
@ -252,11 +260,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
RichText( RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600),
FontWeight.w600),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text: TranslationBase.of(
@ -278,7 +287,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
.selectedDiagnosisCondition .selectedDiagnosisCondition
.nameEn, .nameEn,
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
@ -289,11 +300,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
RichText( RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600),
FontWeight.w600),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text: TranslationBase.of(
@ -315,7 +327,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
.selectedDiagnosisType .selectedDiagnosisType
.nameEn, .nameEn,
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
@ -327,7 +341,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
RichText( RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight:
@ -339,19 +355,23 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
.doctor + .doctor +
' : ', ' : ',
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,letterSpacing: -0.4, fontSize: SizeConfig
color: .getTextMultiplierBasedOnWidth() *
Color(0xFF575757), 3,
letterSpacing: -0.4,
color: Color(0xFF575757),
), ),
), ),
new TextSpan( new TextSpan(
text: assessment text:
.doctorName ?? assessment.doctorName ??
'', '',
style: new TextStyle( style: new TextStyle(
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6,letterSpacing: -0.48, fontSize: SizeConfig
color: .getTextMultiplierBasedOnWidth() *
Color(0xFF2B353E), 3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
), ),
), ),
], ],
@ -370,8 +390,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
height: 6, height: 6,
), ),
AppText( AppText(
(assessment.remark != (assessment.remark != null &&
null &&
assessment.remark != assessment.remark !=
'') '')
? TranslationBase.of( ? TranslationBase.of(
@ -379,14 +398,14 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
.remarks + .remarks +
" : " " : "
: '', : '',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600),
FontWeight.w600),
RemarkText( RemarkText(
remark: remark: assessment.remark ?? "",
assessment.remark ?? "",
), ),
], ],
), ),
@ -403,8 +422,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
CrossAxisAlignment.end, CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
assessment.createdOn != assessment.createdOn != null
null
? AppDateUtils ? AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.parse( DateTime.parse(
@ -412,26 +430,25 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
.createdOn)) .createdOn))
: AppDateUtils : AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime DateTime.now()),
.now()), fontWeight: FontWeight.w600,
fontWeight: fontSize: SizeConfig
FontWeight.w600, .getTextMultiplierBasedOnWidth() *
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, 3.6,
), ),
AppText( AppText(
assessment.createdOn != assessment.createdOn != null
null
? AppDateUtils.getHour( ? AppDateUtils.getHour(
DateTime.parse( DateTime.parse(
assessment assessment
.createdOn)) .createdOn))
: AppDateUtils : AppDateUtils.getHour(
.getHour(DateTime DateTime.now()),
.now()), fontWeight: FontWeight.w600,
fontWeight:
FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
), ),
], ],
), ),
@ -475,7 +492,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
), ),
), ),
), ),
),), ),
),
); );
} }
@ -508,9 +526,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
@override @override
nextFunction(model) { nextFunction(model) {
if (mySelectedAssessmentList.isEmpty) { if (mySelectedAssessmentList.isEmpty) {
Helpers.showErrorToast( Helpers.showErrorToast(TranslationBase.of(context).assessmentErrorMsg);
TranslationBase.of(context)
.assessmentErrorMsg);
} else { } else {
widget.changeLoadingState(true); widget.changeLoadingState(true);
widget.changePageViewIndex(3); widget.changePageViewIndex(3);

@ -111,7 +111,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
children: [ children: [
SOAPStepHeader( SOAPStepHeader(
currentIndex: widget.currentIndex, currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex), changePageViewIndex: widget.changePageViewIndex,
patientInfo: widget.patientInfo,
),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: headerTitle:
TranslationBase.of(context).physicalSystemExamination, TranslationBase.of(context).physicalSystemExamination,

@ -38,13 +38,16 @@ class UpdatePlanPage extends StatefulWidget {
this.changePageViewIndex, this.changePageViewIndex,
this.patientInfo, this.patientInfo,
this.changeLoadingState, this.changeLoadingState,
this.currentIndex, this.sOAPViewModel, this.changeStateFun}); this.currentIndex,
this.sOAPViewModel,
this.changeStateFun});
@override @override
_UpdatePlanPageState createState() => _UpdatePlanPageState(); _UpdatePlanPageState createState() => _UpdatePlanPageState();
} }
class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack { class _UpdatePlanPageState extends State<UpdatePlanPage>
implements PlanCallBack {
bool isAddProgress = true; bool isAddProgress = true;
bool isProgressExpanded = true; bool isProgressExpanded = true;
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel patientProgressNote =
@ -76,8 +79,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
} }
} }
getPatientProgressNote(SOAPViewModel model,
getPatientProgressNote(SOAPViewModel model, {bool isAddProgress = false}) async { {bool isAddProgress = false}) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
appointmentNo: appointmentNo:
@ -86,7 +89,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel
.getPatientProgressNote(getGetProgressNoteReqModel);
///TODO set progressNote in model; ///TODO set progressNote in model;
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
@ -124,7 +129,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel
.getPatientProgressNote(getGetProgressNoteReqModel);
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
@ -161,7 +167,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
children: [ children: [
SOAPStepHeader( SOAPStepHeader(
currentIndex: widget.currentIndex, currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex), changePageViewIndex: widget.changePageViewIndex,
patientInfo: widget.patientInfo,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -191,7 +199,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
patientProgressNote.planNote = value; patientProgressNote.planNote =
value;
model.progressNoteText = value; model.progressNoteText = value;
widget.changeStateFun(); widget.changeStateFun();
}); });
@ -222,7 +231,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
children: [ children: [
AppText( AppText(
'Appointment No: ', 'Appointment No: ',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4, letterSpacing: -0.4,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
@ -237,7 +248,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
), ),
], ],
), ),
@ -253,7 +266,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.now()), DateTime.now()),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
) )
], ],
), ),
@ -286,7 +301,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
DateTime.now()), DateTime.now()),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
) )
], ],
), ),
@ -307,7 +324,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
onTap: () { onTap: () {
setState(() { setState(() {
isAddProgress = true; isAddProgress = true;
widget.sOAPViewModel.isAddProgress = true; widget.sOAPViewModel
.isAddProgress = true;
}); });
}, },
child: Icon( child: Icon(
@ -333,8 +351,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
), ),
), ),
), ),
),) ),
); ));
} }
submitPlan(SOAPViewModel model) async { submitPlan(SOAPViewModel model) async {
@ -350,18 +368,19 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
editedBy: ''); editedBy: '');
if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) {
await widget.sOAPViewModel.postProgressNote(postProgressNoteRequestModel); await widget.sOAPViewModel
.postProgressNote(postProgressNoteRequestModel);
} else { } else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
postProgressNoteRequestModel.editedBy = doctorProfile.doctorID; postProgressNoteRequestModel.editedBy = doctorProfile.doctorID;
await widget.sOAPViewModel.patchProgressNote(postProgressNoteRequestModel); await widget.sOAPViewModel
.patchProgressNote(postProgressNoteRequestModel);
} }
if (widget.sOAPViewModel.state == ViewState.ErrorLocal) { if (widget.sOAPViewModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.sOAPViewModel.error); Helpers.showErrorToast(widget.sOAPViewModel.error);
} else { } else {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
appointmentNo: appointmentNo:
@ -370,7 +389,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel
.getPatientProgressNote(getGetProgressNoteReqModel);
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
widget.sOAPViewModel.patientProgressNoteList[0].planNote); widget.sOAPViewModel.patientProgressNoteList[0].planNote);
@ -407,9 +427,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
} else { } else {
Helpers.showErrorToast( Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);
TranslationBase.of(context)
.progressNoteErrorMsg);
} }
} }
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -7,11 +8,12 @@ import 'package:flutter/material.dart';
class SOAPStepHeader extends StatelessWidget { class SOAPStepHeader extends StatelessWidget {
const SOAPStepHeader({ const SOAPStepHeader({
Key key, Key key,
this.currentIndex, this.changePageViewIndex, this.currentIndex, this.changePageViewIndex, this.patientInfo,
}) : super(key: key); }) : super(key: key);
final int currentIndex; final int currentIndex;
final Function changePageViewIndex; final Function changePageViewIndex;
final PatiantInformtion patientInfo;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -39,6 +41,7 @@ class SOAPStepHeader extends StatelessWidget {
child: StepsWidget( child: StepsWidget(
index: currentIndex, index: currentIndex,
changeCurrentTab: changePageViewIndex, changeCurrentTab: changePageViewIndex,
patientInfo: patientInfo,
), ),
), ),
SizedBox( SizedBox(

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_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/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,8 +13,9 @@ class StepsWidget extends StatelessWidget {
final int index; final int index;
final Function changeCurrentTab; final Function changeCurrentTab;
final double height; final double height;
final PatiantInformtion patientInfo;
StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0}); StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0, this.patientInfo});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -219,8 +219,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
? 0 ? 0
: int.parse(widget.patientInfo.admissionNo), : int.parse(widget.patientInfo.admissionNo),
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
appointmentNo:widget.patientInfo.appointmentNo == null?0: appointmentNo: widget.patientInfo.appointmentNo == null
int.parse(widget.patientInfo.appointmentNo.toString()), ? 0
: int.parse(widget.patientInfo.appointmentNo.toString()),
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo, episodeID: widget.patientInfo.episodeNo,
doctorID: ''); doctorID: '');
@ -236,12 +237,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
'\n \n' '\n \n'
: model.patientChiefComplaintList[0].currentMedication; : model.patientChiefComplaintList[0].currentMedication;
} }
if(widget.patientInfo.appointmentNo != null) { if (widget.patientInfo.appointmentNo != null) {
await getHistory(model); await getHistory(model);
await getAllergies(model); await getAllergies(model);
} }
widget.changeLoadingState(false); widget.changeLoadingState(false);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -258,7 +258,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
children: [ children: [
SOAPStepHeader( SOAPStepHeader(
currentIndex: widget.currentIndex, currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex), changePageViewIndex: widget.changePageViewIndex,
patientInfo: widget.patientInfo,
),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).chiefComplaints, headerTitle: TranslationBase.of(context).chiefComplaints,
onTap: () { onTap: () {
@ -271,9 +273,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
complaintsController: complaintsController, complaintsController: complaintsController,
illnessController: illnessController, illnessController: illnessController,
medicationController: medicationController, medicationController: medicationController,
complaintsControllerError: model.complaintsControllerError, complaintsControllerError:
model.complaintsControllerError,
illnessControllerError: model.illnessControllerError, illnessControllerError: model.illnessControllerError,
medicationControllerError: model.medicationControllerError, medicationControllerError:
model.medicationControllerError,
), ),
isExpanded: isChiefExpand, isExpanded: isChiefExpand,
), ),
@ -370,18 +374,21 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
} else { } else {
setState(() { setState(() {
if (complaintsController.text.isEmpty) { if (complaintsController.text.isEmpty) {
model.complaintsControllerError = TranslationBase.of(context).emptyMessage; model.complaintsControllerError =
TranslationBase.of(context).emptyMessage;
} else if (complaintsController.text.length < 25) { } else if (complaintsController.text.length < 25) {
model.complaintsControllerError = model.complaintsControllerError =
TranslationBase.of(context).chiefComplaintLength; TranslationBase.of(context).chiefComplaintLength;
} }
if (illnessController.text.isEmpty) { if (illnessController.text.isEmpty) {
model.illnessControllerError = TranslationBase.of(context).emptyMessage; model.illnessControllerError =
TranslationBase.of(context).emptyMessage;
} }
if (medicationController.text.isEmpty) { if (medicationController.text.isEmpty) {
model.medicationControllerError = TranslationBase.of(context).emptyMessage; model.medicationControllerError =
TranslationBase.of(context).emptyMessage;
} }
}); });

Loading…
Cancel
Save