|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/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';
|
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_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/shared/Text.dart';
|
|
|
|
@ -236,7 +239,7 @@ class _AssessmentPageState extends State<AssessmentPage> {
|
|
|
|
|
height: 6,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"Some short remark about the allergy",
|
|
|
|
|
widget.mySelectedAssessment.remark,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
),
|
|
|
|
@ -268,7 +271,9 @@ class _AssessmentPageState extends State<AssessmentPage> {
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {},
|
|
|
|
|
onTap: () {
|
|
|
|
|
openAssessmentDialog(context);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(EvaIcons
|
|
|
|
|
.edit2Outline),
|
|
|
|
|
)
|
|
|
|
@ -283,24 +288,55 @@ class _AssessmentPageState extends State<AssessmentPage> {
|
|
|
|
|
isExpand: isAssessmentExpand,
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.next,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.changePageViewIndex(3);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await submitAssessment(model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitAssessment(SOAPViewModel model) async {
|
|
|
|
|
// if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
|
|
|
|
|
// widget.mySelectedAssessment.selectedDiagnosisType != null) {
|
|
|
|
|
// PostAssessmentRequestModel postAssessmentRequestModel =
|
|
|
|
|
// new PostAssessmentRequestModel(
|
|
|
|
|
// patientMRN: 3120690,
|
|
|
|
|
// episodeId: 200012117,
|
|
|
|
|
// appointmentNo: 2016054573,
|
|
|
|
|
// icdCodeDetails: [
|
|
|
|
|
// new IcdCodeDetails(
|
|
|
|
|
// remarks: widget.mySelectedAssessment.remark,
|
|
|
|
|
// complexDiagnosis: true,
|
|
|
|
|
// conditionId:
|
|
|
|
|
// widget.mySelectedAssessment.selectedDiagnosisCondition.id,
|
|
|
|
|
// diagnosisTypeId:
|
|
|
|
|
// widget.mySelectedAssessment.selectedDiagnosisType.id,
|
|
|
|
|
// icdcode10Id: "1")
|
|
|
|
|
// ]);
|
|
|
|
|
//
|
|
|
|
|
// await model.postAssessment(postAssessmentRequestModel);
|
|
|
|
|
//
|
|
|
|
|
// if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
// helpers.showErrorToast(model.error);
|
|
|
|
|
// } else {
|
|
|
|
|
// widget.changePageViewIndex(3);
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// helpers.showErrorToast('Please add required field correctly');
|
|
|
|
|
// }
|
|
|
|
|
widget.changePageViewIndex(3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openAssessmentDialog(BuildContext context) {
|
|
|
|
@ -334,14 +370,15 @@ class AddAssessmentDetails extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
MasterKeyModel _selectedDiagnosisCondition;
|
|
|
|
|
MasterKeyModel _selectedDiagnosisType;
|
|
|
|
|
// MasterKeyModel _selectedDiagnosisCondition;
|
|
|
|
|
// MasterKeyModel _selectedDiagnosisType;
|
|
|
|
|
TextEditingController remarkController = TextEditingController();
|
|
|
|
|
TextEditingController appointmentIdController = TextEditingController(
|
|
|
|
|
text: "234567");
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
remarkController.text = widget.mySelectedAssessment.remark??"";
|
|
|
|
|
final screenSize = MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size;
|
|
|
|
@ -379,6 +416,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
if (model.listOfDiagnosisType.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.DiagnosisType);
|
|
|
|
|
}
|
|
|
|
|
if (model.listOfICD10.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.ICD10);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
@ -428,45 +468,48 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
Container(
|
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: model.listOfDiagnosisCondition !=
|
|
|
|
|
null
|
|
|
|
|
? () {
|
|
|
|
|
MasterKeyDailog dialog = MasterKeyDailog(
|
|
|
|
|
list: model.listOfDiagnosisCondition,
|
|
|
|
|
okText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.ok,
|
|
|
|
|
okFunction: (
|
|
|
|
|
MasterKeyModel selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDiagnosisCondition =
|
|
|
|
|
selectedValue;
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisCondition =
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
"Condition",
|
|
|
|
|
_selectedDiagnosisCondition != null
|
|
|
|
|
? _selectedDiagnosisCondition
|
|
|
|
|
.nameEn
|
|
|
|
|
: null,
|
|
|
|
|
true),
|
|
|
|
|
enabled: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: model.listOfICD10 != null
|
|
|
|
|
? () {
|
|
|
|
|
MasterKeyDailog dialog = MasterKeyDailog(
|
|
|
|
|
isICD: true,
|
|
|
|
|
list: model.listOfICD10,
|
|
|
|
|
selectedValue: widget
|
|
|
|
|
.mySelectedAssessment
|
|
|
|
|
.selectedICD,
|
|
|
|
|
okText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.ok,
|
|
|
|
|
okFunction:
|
|
|
|
|
(MasterKeyModel selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedICD =
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
"Name / ICD",
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedICD !=
|
|
|
|
|
null
|
|
|
|
|
? widget.mySelectedAssessment
|
|
|
|
|
.selectedICD.nameEn
|
|
|
|
|
: null,
|
|
|
|
|
true),
|
|
|
|
|
enabled: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
@ -485,7 +528,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
okFunction: (
|
|
|
|
|
MasterKeyModel selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDiagnosisCondition =
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisCondition =
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -502,8 +546,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
"Condition",
|
|
|
|
|
_selectedDiagnosisCondition != null
|
|
|
|
|
? _selectedDiagnosisCondition
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisCondition != null
|
|
|
|
|
? widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisCondition
|
|
|
|
|
.nameEn
|
|
|
|
|
: null,
|
|
|
|
|
true),
|
|
|
|
@ -527,11 +573,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
okFunction: (
|
|
|
|
|
MasterKeyModel selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDiagnosisType =
|
|
|
|
|
selectedValue;
|
|
|
|
|
// _selectedDiagnosisType =
|
|
|
|
|
// selectedValue;
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisType =
|
|
|
|
|
_selectedDiagnosisType;
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
@ -547,8 +593,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
"Type",
|
|
|
|
|
_selectedDiagnosisType != null
|
|
|
|
|
? _selectedDiagnosisType.nameEn
|
|
|
|
|
widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisType != null
|
|
|
|
|
? widget.mySelectedAssessment
|
|
|
|
|
.selectedDiagnosisType.nameEn
|
|
|
|
|
: null,
|
|
|
|
|
true),
|
|
|
|
|
enabled: false,
|
|
|
|
|