You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
5.9 KiB
Dart
134 lines
5.9 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
|
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
|
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.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/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'steps_widget.dart';
|
|
|
|
class AddSOAPIndex extends StatefulWidget {
|
|
final bool isUpdate;
|
|
|
|
const AddSOAPIndex({Key key, this.isUpdate}) : super(key: key);
|
|
@override
|
|
_AddSOAPIndexState createState() => _AddSOAPIndexState();
|
|
}
|
|
|
|
class _AddSOAPIndexState extends State<AddSOAPIndex>
|
|
with TickerProviderStateMixin {
|
|
PageController _controller;
|
|
int _currentIndex = 0;
|
|
List<MySelectedAllergy> myAllergiesList= List();
|
|
List<MasterKeyModel> myHistoryList = List();
|
|
List<MySelectedExamination> mySelectedExamination = List();
|
|
MySelectedAssessment mySelectedAssessment = new MySelectedAssessment();
|
|
changePageViewIndex(pageIndex) {
|
|
_controller.jumpToPage(pageIndex);
|
|
}
|
|
|
|
@override
|
|
void initState() {
|
|
// TODO: implement initState
|
|
_controller = new PageController();
|
|
|
|
super.initState();
|
|
}
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
return BaseView<DoctorReplayViewModel>(
|
|
builder: (_, model, w) => AppScaffold(
|
|
baseViewModel: model,
|
|
appBarTitle: TranslationBase.of(context).healthRecordInformation,
|
|
body: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
decoration:
|
|
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: <Widget>[
|
|
PatientPageHeaderWidget(patient),
|
|
FractionallySizedBox(
|
|
child: SingleChildScrollView(
|
|
child: Container(
|
|
height: MediaQuery.of(context).size.height * 0.75,
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(
|
|
left:
|
|
MediaQuery.of(context).size.width * 0.05,
|
|
right:
|
|
MediaQuery.of(context).size.width * 0.05),
|
|
child: StepsWidget(
|
|
index: _currentIndex,
|
|
changeCurrentTab: changePageViewIndex,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: PageView(
|
|
physics: NeverScrollableScrollPhysics(),
|
|
controller: _controller,
|
|
onPageChanged: (index) {
|
|
setState(() {
|
|
_currentIndex = index;
|
|
});
|
|
},
|
|
scrollDirection: Axis.horizontal,
|
|
children: <Widget>[
|
|
SubjectivePage(
|
|
changePageViewIndex: changePageViewIndex,
|
|
myAllergiesList: myAllergiesList,
|
|
myHistoryList: myHistoryList,
|
|
patientInfo: patient,
|
|
),
|
|
ObjectivePage(
|
|
changePageViewIndex: changePageViewIndex,
|
|
mySelectedExamination:
|
|
mySelectedExamination,
|
|
patientInfo: patient,
|
|
),
|
|
AssessmentPage(
|
|
changePageViewIndex: changePageViewIndex,
|
|
mySelectedAssessment:
|
|
mySelectedAssessment,
|
|
patientInfo: patient,
|
|
),
|
|
PlanPage(
|
|
changePageViewIndex: changePageViewIndex,
|
|
patientInfo: patient,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|