|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
|
|
|
@ -13,6 +14,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
|
|
|
@ -25,6 +27,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
|
|
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class UpdateObjectivePage extends StatefulWidget {
|
|
|
|
@ -33,8 +36,13 @@ class UpdateObjectivePage extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
final List<MySelectedExamination> mySelectedExamination;
|
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
|
|
|
|
|
|
UpdateObjectivePage(
|
|
|
|
|
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState});
|
|
|
|
|
{Key key,
|
|
|
|
|
this.changePageViewIndex,
|
|
|
|
|
this.mySelectedExamination,
|
|
|
|
|
this.patientInfo,
|
|
|
|
|
this.changeLoadingState});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
|
|
|
|
@ -55,6 +63,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
@ -97,30 +106,55 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
|
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
body: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color.fromRGBO(248, 248, 248, 1),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
widthFactor: 0.95,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
border: Border.fromBorderSide(BorderSide(
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
width: 0.4,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase.of(context).physicalSystemExamination,
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).physicalSystemExamination}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
fontWeight: isSysExaminationExpand ? FontWeight.w700 : FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
/*Texts(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.physicalSystemExamination,
|
|
|
|
|
variant: isSysExaminationExpand
|
|
|
|
|
? "bodyText"
|
|
|
|
|
: '',
|
|
|
|
|
bold: isSysExaminationExpand ? true : false,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
bold: isSysExaminationExpand
|
|
|
|
|
? true
|
|
|
|
|
: false,
|
|
|
|
|
color: Colors.black),*/
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.asterisk,
|
|
|
|
|
color: AppGlobal.appPrimaryColor,
|
|
|
|
@ -136,8 +170,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(isSysExaminationExpand
|
|
|
|
|
? EvaIcons.minus
|
|
|
|
|
: EvaIcons.plus))
|
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
|
: Icons.keyboard_arrow_down))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Column(children: [
|
|
|
|
@ -147,18 +181,21 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).physicalSystemExamination,
|
|
|
|
|
hintText: TranslationBase.of(context)
|
|
|
|
|
.physicalSystemExamination,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
onTapTextFields: () {
|
|
|
|
|
openExaminationList(context);
|
|
|
|
|
},
|
|
|
|
|
readOnly: true,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
|
suffixIcon: EvaIcons.plusCircleOutline,
|
|
|
|
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
|
|
|
|
suffixIcon:
|
|
|
|
|
EvaIcons.plusCircleOutline,
|
|
|
|
|
suffixIconColor:
|
|
|
|
|
AppGlobal.appPrimaryColor,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
// controller: messageController,
|
|
|
|
|
validator: (value) {
|
|
|
|
@ -173,9 +210,12 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children:
|
|
|
|
|
widget.mySelectedExamination.map((examination) {
|
|
|
|
|
TextEditingController remarksController= TextEditingController(text :examination.remark);
|
|
|
|
|
children: widget.mySelectedExamination
|
|
|
|
|
.map((examination) {
|
|
|
|
|
TextEditingController
|
|
|
|
|
remarksController =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: examination.remark);
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
@ -183,11 +223,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
child: Column(children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
( examination
|
|
|
|
|
.selectedExamination.nameEn )
|
|
|
|
|
(examination
|
|
|
|
|
.selectedExamination
|
|
|
|
|
.nameEn)
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
@ -199,44 +241,46 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
screenSize.height *
|
|
|
|
|
height: screenSize
|
|
|
|
|
.height *
|
|
|
|
|
0.070,
|
|
|
|
|
decoration:
|
|
|
|
|
containerBorderDecoration(
|
|
|
|
|
decoration: containerBorderDecoration(
|
|
|
|
|
examination
|
|
|
|
|
.isNormal
|
|
|
|
|
? Color(
|
|
|
|
|
0xFF515A5D)
|
|
|
|
|
: Colors
|
|
|
|
|
.white,
|
|
|
|
|
Colors.grey),
|
|
|
|
|
Colors
|
|
|
|
|
.grey),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
child:
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.all(8.0),
|
|
|
|
|
const EdgeInsets.all(
|
|
|
|
|
8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).normal,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color:
|
|
|
|
|
examination
|
|
|
|
|
.isNormal
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.normal,
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(
|
|
|
|
|
fontSize:
|
|
|
|
|
12,
|
|
|
|
|
color: examination.isNormal
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors
|
|
|
|
|
.black,
|
|
|
|
|
: Colors.black,
|
|
|
|
|
//Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -244,11 +288,15 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
examination.isAbnormal =
|
|
|
|
|
examination
|
|
|
|
|
.isAbnormal =
|
|
|
|
|
false;
|
|
|
|
|
examination.isNormal =
|
|
|
|
|
examination
|
|
|
|
|
.isNormal =
|
|
|
|
|
true;
|
|
|
|
|
examination.notExamined = false;
|
|
|
|
|
examination
|
|
|
|
|
.notExamined =
|
|
|
|
|
false;
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(
|
|
|
|
@ -257,37 +305,38 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
screenSize.height *
|
|
|
|
|
height: screenSize
|
|
|
|
|
.height *
|
|
|
|
|
0.070,
|
|
|
|
|
decoration:
|
|
|
|
|
containerBorderDecoration(
|
|
|
|
|
decoration: containerBorderDecoration(
|
|
|
|
|
examination
|
|
|
|
|
.isAbnormal
|
|
|
|
|
? Color(
|
|
|
|
|
0xFF515A5D)
|
|
|
|
|
: Colors
|
|
|
|
|
.white,
|
|
|
|
|
Colors.black),
|
|
|
|
|
Colors
|
|
|
|
|
.black),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
child:
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.all(8.0),
|
|
|
|
|
const EdgeInsets.all(
|
|
|
|
|
8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).abnormal,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color:
|
|
|
|
|
examination
|
|
|
|
|
.isAbnormal
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.abnormal,
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(
|
|
|
|
|
fontSize:
|
|
|
|
|
12,
|
|
|
|
|
color: examination.isAbnormal
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors
|
|
|
|
|
.black,
|
|
|
|
|
: Colors.black,
|
|
|
|
|
//Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -295,49 +344,53 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
examination.isNormal =
|
|
|
|
|
examination
|
|
|
|
|
.isNormal =
|
|
|
|
|
false;
|
|
|
|
|
examination.isAbnormal =
|
|
|
|
|
examination
|
|
|
|
|
.isAbnormal =
|
|
|
|
|
true;
|
|
|
|
|
examination.notExamined = false;
|
|
|
|
|
examination
|
|
|
|
|
.notExamined =
|
|
|
|
|
false;
|
|
|
|
|
});
|
|
|
|
|
}),SizedBox(
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 12,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
screenSize.height *
|
|
|
|
|
height: screenSize
|
|
|
|
|
.height *
|
|
|
|
|
0.070,
|
|
|
|
|
decoration:
|
|
|
|
|
containerBorderDecoration(
|
|
|
|
|
decoration: containerBorderDecoration(
|
|
|
|
|
examination
|
|
|
|
|
.notExamined
|
|
|
|
|
? Color(
|
|
|
|
|
0xFF515A5D)
|
|
|
|
|
: Colors
|
|
|
|
|
.white,
|
|
|
|
|
Colors.black),
|
|
|
|
|
Colors
|
|
|
|
|
.black),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
child:
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.all(8.0),
|
|
|
|
|
const EdgeInsets.all(
|
|
|
|
|
8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Not Examined",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color:
|
|
|
|
|
examination
|
|
|
|
|
.notExamined
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(
|
|
|
|
|
fontSize:
|
|
|
|
|
12,
|
|
|
|
|
color: examination.notExamined
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors
|
|
|
|
|
.black,
|
|
|
|
|
: Colors.black,
|
|
|
|
|
//Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -345,24 +398,28 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
examination.isAbnormal =
|
|
|
|
|
examination
|
|
|
|
|
.isAbnormal =
|
|
|
|
|
false;
|
|
|
|
|
examination.isNormal =
|
|
|
|
|
examination
|
|
|
|
|
.isNormal =
|
|
|
|
|
false;
|
|
|
|
|
examination.notExamined = true;
|
|
|
|
|
examination
|
|
|
|
|
.notExamined =
|
|
|
|
|
true;
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
FontAwesomeIcons.trash,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
size: 20,
|
|
|
|
|
),
|
|
|
|
|
onTap: () => removeExamination(
|
|
|
|
|
examination.selectedExamination),
|
|
|
|
|
examination
|
|
|
|
|
.selectedExamination),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -373,21 +430,31 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0, right: 0, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hasLabelText: remarksController.text != ''?true:false,
|
|
|
|
|
hasLabelText:
|
|
|
|
|
remarksController
|
|
|
|
|
.text !=
|
|
|
|
|
''
|
|
|
|
|
? true
|
|
|
|
|
: false,
|
|
|
|
|
showLabelText: true,
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.remarks,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 4,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
controller:
|
|
|
|
|
remarksController,
|
|
|
|
|
onChanged: (val) {
|
|
|
|
|
examination.remark = val;
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return TranslationBase.of(context)
|
|
|
|
|
return TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
@ -404,43 +471,70 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
]),
|
|
|
|
|
isExpand: isSysExaminationExpand,
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(height: 30,),
|
|
|
|
|
AppButton(
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).previous,
|
|
|
|
|
color: HexColor("#EAEAEA"),
|
|
|
|
|
fontColor: Colors.black,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.changePageViewIndex(0);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
color: HexColor("#A5A5A5"),
|
|
|
|
|
fontColor: HexColor("#5A5A5A"),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await submitUpdateObjectivePage(model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitUpdateObjectivePage(SOAPViewModel model) async {
|
|
|
|
|
|
|
|
|
|
if(widget.mySelectedExamination.isNotEmpty){
|
|
|
|
|
if (widget.mySelectedExamination.isNotEmpty) {
|
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
|
|
|
|
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
|
|
|
|
|
new PostPhysicalExamRequestModel();
|
|
|
|
|
widget.mySelectedExamination.forEach((exam) {
|
|
|
|
|
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
|
|
|
|
|
null)
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
|
|
|
|
|
[];
|
|
|
|
|
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
|
|
|
|
|
ListHisProgNotePhysicalExaminationVM(
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
|
|
|
|
|
.add(ListHisProgNotePhysicalExaminationVM(
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeId: widget.patientInfo.episodeNo,
|
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
|
remarks: exam.remark ?? '',
|
|
|
|
|
createdBy: exam.createdBy??doctorProfile.doctorID,
|
|
|
|
|
createdBy: exam.createdBy ?? doctorProfile.doctorID,
|
|
|
|
|
createdOn: DateTime.now().toIso8601String(),
|
|
|
|
|
editedBy: doctorProfile.doctorID,
|
|
|
|
|
editedOn: DateTime.now().toIso8601String(),
|
|
|
|
@ -450,15 +544,20 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
isNormal: exam.isNormal,
|
|
|
|
|
// masterDescription: exam.selectedExamination,
|
|
|
|
|
notExamined: exam.notExamined,
|
|
|
|
|
examinationType: exam.isNormal?1:exam.isAbnormal?2:3,
|
|
|
|
|
examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined",
|
|
|
|
|
isNew:exam.isNew
|
|
|
|
|
|
|
|
|
|
));
|
|
|
|
|
examinationType: exam.isNormal
|
|
|
|
|
? 1
|
|
|
|
|
: exam.isAbnormal
|
|
|
|
|
? 2
|
|
|
|
|
: 3,
|
|
|
|
|
examinationTypeName: exam.isNormal
|
|
|
|
|
? "Normal"
|
|
|
|
|
: exam.isAbnormal
|
|
|
|
|
? 'AbNormal'
|
|
|
|
|
: "Not Examined",
|
|
|
|
|
isNew: exam.isNew));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if(model.patientPhysicalExamList.isEmpty) {
|
|
|
|
|
|
|
|
|
|
if (model.patientPhysicalExamList.isEmpty) {
|
|
|
|
|
await model.postPhysicalExam(postPhysicalExamRequestModel);
|
|
|
|
|
} else {
|
|
|
|
|
await model.patchPhysicalExam(postPhysicalExamRequestModel);
|
|
|
|
@ -482,8 +581,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
|
|
|
|
|
removeExamination(MasterKeyModel masterKey) {
|
|
|
|
|
Iterable<MySelectedExamination> history = widget.mySelectedExamination
|
|
|
|
|
.where(
|
|
|
|
|
(element) =>
|
|
|
|
|
.where((element) =>
|
|
|
|
|
masterKey.id == element.selectedExamination.id &&
|
|
|
|
|
masterKey.typeId == element.selectedExamination.typeId);
|
|
|
|
|
|
|
|
|
@ -494,11 +592,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openExaminationList(BuildContext context) {
|
|
|
|
|
final screenSize = MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size;
|
|
|
|
|
InputDecoration textFieldSelectorDecoration(String hintText,
|
|
|
|
|
String selectedText, bool isDropDown) {
|
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
|
InputDecoration textFieldSelectorDecoration(
|
|
|
|
|
String hintText, String selectedText, bool isDropDown) {
|
|
|
|
|
return InputDecoration(
|
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
|
|
|
@ -533,7 +629,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
removeExamination: (masterKey) => removeExamination(masterKey),);
|
|
|
|
|
removeExamination: (masterKey) => removeExamination(masterKey),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -541,10 +638,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
class AddExaminationDailog extends StatefulWidget {
|
|
|
|
|
final List<MySelectedExamination> mySelectedExamination;
|
|
|
|
|
final Function addSelectedExamination;
|
|
|
|
|
final Function (MasterKeyModel) removeExamination;
|
|
|
|
|
final Function(MasterKeyModel) removeExamination;
|
|
|
|
|
|
|
|
|
|
const AddExaminationDailog(
|
|
|
|
|
{Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
|
|
|
|
|
{Key key,
|
|
|
|
|
this.mySelectedExamination,
|
|
|
|
|
this.addSelectedExamination,
|
|
|
|
|
this.removeExamination})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@ -559,12 +659,11 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
|
|
|
|
child: BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
if (model.physicalExaminationList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(
|
|
|
|
|
MasterKeysService.PhysicalExamination);
|
|
|
|
|
await model
|
|
|
|
|
.getMasterLookup(MasterKeysService.PhysicalExamination);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: Center(
|
|
|
|
@ -587,29 +686,30 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
|
|
|
|
),
|
|
|
|
|
MasterKeyCheckboxSearchWidget(
|
|
|
|
|
model: model,
|
|
|
|
|
hintSearchText: TranslationBase.of(context).searchExamination,
|
|
|
|
|
buttonName: TranslationBase.of(context).addExamination,
|
|
|
|
|
hintSearchText:
|
|
|
|
|
TranslationBase.of(context).searchExamination,
|
|
|
|
|
buttonName:
|
|
|
|
|
TranslationBase.of(context).addExamination,
|
|
|
|
|
masterList: model.physicalExaminationList,
|
|
|
|
|
removeHistory: (history){
|
|
|
|
|
removeHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.removeExamination(history);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addHistory: (history){
|
|
|
|
|
addHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
MySelectedExamination mySelectedExamination = new MySelectedExamination(
|
|
|
|
|
selectedExamination: history
|
|
|
|
|
);
|
|
|
|
|
widget
|
|
|
|
|
.mySelectedExamination
|
|
|
|
|
.add(
|
|
|
|
|
mySelectedExamination);
|
|
|
|
|
MySelectedExamination mySelectedExamination =
|
|
|
|
|
new MySelectedExamination(
|
|
|
|
|
selectedExamination: history);
|
|
|
|
|
widget.mySelectedExamination
|
|
|
|
|
.add(mySelectedExamination);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addSelectedHistories: (){
|
|
|
|
|
addSelectedHistories: () {
|
|
|
|
|
widget.addSelectedExamination();
|
|
|
|
|
},
|
|
|
|
|
isServiceSelected: (master) =>isServiceSelected(master),
|
|
|
|
|
isServiceSelected: (master) =>
|
|
|
|
|
isServiceSelected(master),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
))),
|
|
|
|
@ -618,10 +718,8 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isServiceSelected(MasterKeyModel masterKey) {
|
|
|
|
|
Iterable<MySelectedExamination> exam =
|
|
|
|
|
widget
|
|
|
|
|
.mySelectedExamination
|
|
|
|
|
.where((element) =>
|
|
|
|
|
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
|
|
|
|
|
(element) =>
|
|
|
|
|
masterKey.id == element.selectedExamination.id &&
|
|
|
|
|
masterKey.typeId == element.selectedExamination.typeId);
|
|
|
|
|
if (exam.length > 0) {
|
|
|
|
|