|
|
|
|
@ -19,31 +19,41 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
List<String> patientState = ["", "Stable", "Not Stable", "Not Defined"];
|
|
|
|
|
|
|
|
|
|
class EnterDiagnosis extends StatefulWidget {
|
|
|
|
|
class EditDiagnosis extends StatefulWidget {
|
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
|
final PatientPreviousDiagnosis diagnosis;
|
|
|
|
|
|
|
|
|
|
const EnterDiagnosis({super.key, required this.patientInfo, required this.diagnosis});
|
|
|
|
|
const EditDiagnosis(
|
|
|
|
|
{super.key, required this.patientInfo, required this.diagnosis});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<EnterDiagnosis> createState() => _EnterDiagnosisState();
|
|
|
|
|
State<EditDiagnosis> createState() => _EditDiagnosisState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
class _EditDiagnosisState extends State<EditDiagnosis> {
|
|
|
|
|
final TextEditingController filteredSearchController =
|
|
|
|
|
TextEditingController();
|
|
|
|
|
TextEditingController();
|
|
|
|
|
bool showAllDiagnosis = true;
|
|
|
|
|
String status = '';
|
|
|
|
|
String? selectedDiagnosisItem;
|
|
|
|
|
String? selectedDiagnosisItemValue;
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
Timer? _tTimer;
|
|
|
|
|
SOAPViewModel? model;
|
|
|
|
|
SearchDiagnosis? selectedDiagnosis;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
filteredSearchController.text = widget.diagnosis.selectedDisease ?? '';
|
|
|
|
|
filteredSearchController.text = widget.diagnosis.remarks ?? '';
|
|
|
|
|
status = widget.diagnosis.condition ?? '';
|
|
|
|
|
selectedDiagnosisItemValue = widget.diagnosis?.diagnosisType ?? '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _onTextChanged(String text) {
|
|
|
|
|
if (_tTimer != null) {
|
|
|
|
|
_tTimer!.cancel();
|
|
|
|
|
@ -59,15 +69,31 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) {
|
|
|
|
|
this.model = model;
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isLoading: model.state == ViewState.BusyLocal ,
|
|
|
|
|
return BaseView<SOAPViewModel>(onModelReady: (model) {
|
|
|
|
|
this.model = model;
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
model.getConditionAndType(widget.patientInfo);
|
|
|
|
|
});
|
|
|
|
|
}, builder: (_, model, w) {
|
|
|
|
|
if (selectedDiagnosisItem == null && model.diagnosisTypeList.isNotEmpty) {
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
if (mounted) {
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedDiagnosisItem = model.diagnosisTypeList.keys.firstWhere(
|
|
|
|
|
(k) =>
|
|
|
|
|
model.diagnosisTypeList[k] == selectedDiagnosisItemValue,
|
|
|
|
|
orElse: () => '');
|
|
|
|
|
if (selectedDiagnosisItem?.isEmpty == true)
|
|
|
|
|
selectedDiagnosisItem = null;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
isLoading: model.state == ViewState.BusyLocal,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBar: PatientSearchHeader(
|
|
|
|
|
title: TranslationBase.of(context).addDiagnosis),
|
|
|
|
|
title: TranslationBase.of(context).editDiagnosis),
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
|
|
|
|
@ -75,7 +101,7 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).addDiagnosis,
|
|
|
|
|
TranslationBase.of(context).editDiagnosis,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
@ -90,7 +116,7 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
controller: filteredSearchController,
|
|
|
|
|
onClick: () {
|
|
|
|
|
setState(
|
|
|
|
|
() {
|
|
|
|
|
() {
|
|
|
|
|
selectedDiagnosis = null;
|
|
|
|
|
filteredSearchController.text = '';
|
|
|
|
|
model.selectedIcd = '';
|
|
|
|
|
@ -124,12 +150,12 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
child: AppText(model.icdVersionList[index]),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(
|
|
|
|
|
() {
|
|
|
|
|
() {
|
|
|
|
|
selectedDiagnosis =
|
|
|
|
|
model.findTheDiagnosisItem(
|
|
|
|
|
model.icdVersionList[index]);
|
|
|
|
|
filteredSearchController.text =
|
|
|
|
|
model.icdVersionList[index];
|
|
|
|
|
model.icdVersionList[index];
|
|
|
|
|
model.searchDiagnosisList.clear();
|
|
|
|
|
model.icdVersionList.clear();
|
|
|
|
|
},
|
|
|
|
|
@ -145,34 +171,34 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Switch(
|
|
|
|
|
value: showAllDiagnosis,
|
|
|
|
|
activeColor: Colors.red,
|
|
|
|
|
onChanged: (bool value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
showAllDiagnosis = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 8,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).showAllDiagnosis,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SvgPicture.asset('assets/images/svgs/information.svg'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
// children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Switch(
|
|
|
|
|
// value: showAllDiagnosis,
|
|
|
|
|
// activeColor: Colors.red,
|
|
|
|
|
// onChanged: (bool value) {
|
|
|
|
|
// setState(() {
|
|
|
|
|
// showAllDiagnosis = value;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context).showAllDiagnosis,
|
|
|
|
|
// fontWeight: FontWeight.w500,
|
|
|
|
|
// color: Color(0xFF2E303A),
|
|
|
|
|
// fontSize: 11,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// SvgPicture.asset('assets/images/svgs/information.svg'),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 12),
|
|
|
|
|
child: AppText(
|
|
|
|
|
@ -190,43 +216,44 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: model.conditionTypeList.length,
|
|
|
|
|
itemBuilder: (context, index) => InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
status = model.conditionTypeList[index];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(2.0),
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 6),
|
|
|
|
|
width: 20,
|
|
|
|
|
height: 20,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: status ==
|
|
|
|
|
model.conditionTypeList[index]
|
|
|
|
|
? HexColor("#D02127")
|
|
|
|
|
: Colors.white,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
status = model.conditionTypeList[index];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(2.0),
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 6),
|
|
|
|
|
width: 20,
|
|
|
|
|
height: 20,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: status ==
|
|
|
|
|
model.conditionTypeList[index]
|
|
|
|
|
.toLowerCase()
|
|
|
|
|
? HexColor("#D02127")
|
|
|
|
|
: Colors.white,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.conditionTypeList[index],
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 1.6,
|
|
|
|
|
AppText(
|
|
|
|
|
model.conditionTypeList[index],
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 1.6,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
@ -258,38 +285,38 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
model.diagnosisTypeList.isEmpty
|
|
|
|
|
? EmptyDropDown()
|
|
|
|
|
: DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
dropdownColor: Colors.white,
|
|
|
|
|
iconEnabledColor: Colors.black,
|
|
|
|
|
icon: Icon(Icons.keyboard_arrow_down),
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: selectedDiagnosisItem == null
|
|
|
|
|
? model.diagnosisTypeList.keys.first
|
|
|
|
|
: selectedDiagnosisItem,
|
|
|
|
|
iconSize: 25,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
onChanged: (newValue) async {
|
|
|
|
|
if (newValue != null)
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedDiagnosisItem = newValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
items:
|
|
|
|
|
model.diagnosisTypeList.keys.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
child: AppText(
|
|
|
|
|
item ?? '',
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
letterSpacing: -0.96,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
dropdownColor: Colors.white,
|
|
|
|
|
iconEnabledColor: Colors.black,
|
|
|
|
|
icon: Icon(Icons.keyboard_arrow_down),
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: selectedDiagnosisItem == null
|
|
|
|
|
? model.diagnosisTypeList.keys.first
|
|
|
|
|
: selectedDiagnosisItem,
|
|
|
|
|
iconSize: 25,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
onChanged: (newValue) async {
|
|
|
|
|
if (newValue != null)
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedDiagnosisItem = newValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
items:
|
|
|
|
|
model.diagnosisTypeList.keys.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
child: AppText(
|
|
|
|
|
item ?? '',
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
letterSpacing: -0.96,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
),
|
|
|
|
|
value: item,
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
value: item,
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -310,35 +337,35 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 16,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
if (selectedDiagnosis != null) {
|
|
|
|
|
SearchDiagnosis? diagnosis =
|
|
|
|
|
await model.addToFavoriteDiagnosis(widget.patientInfo,
|
|
|
|
|
diagnosis: selectedDiagnosis);
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedDiagnosis = diagnosis;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(selectedDiagnosis?.isFavorite == true
|
|
|
|
|
? 'assets/images/svgs/favoriteadded.svg'
|
|
|
|
|
: 'assets/images/svgs/favorite.svg'),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 4,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).addToFavorite,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Color(0xFF449BF1),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
// InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// if (selectedDiagnosis != null) {
|
|
|
|
|
// SearchDiagnosis? diagnosis =
|
|
|
|
|
// await model.addToFavoriteDiagnosis(widget.patientInfo,
|
|
|
|
|
// diagnosis: selectedDiagnosis);
|
|
|
|
|
// setState(() {
|
|
|
|
|
// selectedDiagnosis = diagnosis;
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// SvgPicture.asset(selectedDiagnosis?.isFavorite == true
|
|
|
|
|
// ? 'assets/images/svgs/favoriteadded.svg'
|
|
|
|
|
// : 'assets/images/svgs/favorite.svg'),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context).addToFavorite,
|
|
|
|
|
// textAlign: TextAlign.start,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// fontSize: 10,
|
|
|
|
|
// color: Color(0xFF449BF1),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -377,37 +404,65 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).save,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF359846),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
selectedDiagnosisItem ??= model.diagnosisTypeList.keys.first;
|
|
|
|
|
if(selectedDiagnosis == null ){
|
|
|
|
|
DrAppToastMsg.showErrorToast(TranslationBase.of(context).selectedDiagnosis);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(status.isEmpty){
|
|
|
|
|
DrAppToastMsg.showErrorToast(TranslationBase.of(context).selectConditionFirst);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
title: TranslationBase.of(context).save,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF359846),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
selectedDiagnosisItem ??=
|
|
|
|
|
model.diagnosisTypeList.keys.first;
|
|
|
|
|
if (selectedDiagnosis == null &&
|
|
|
|
|
filteredSearchController.text.isEmpty) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.selectedDiagnosis);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (status.isEmpty) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.selectConditionFirst);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(remarksController.text.isEmpty){
|
|
|
|
|
DrAppToastMsg.showErrorToast(TranslationBase.of(context).remarksCanNotBeEmpty);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (remarksController.text.isEmpty) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.remarksCanNotBeEmpty);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool result = await model.createDiagnosis(
|
|
|
|
|
widget.patientInfo,
|
|
|
|
|
selectedDiagnosis,
|
|
|
|
|
selectedDiagnosisItem,
|
|
|
|
|
status,
|
|
|
|
|
remarksController.text,
|
|
|
|
|
false);
|
|
|
|
|
if (result) {
|
|
|
|
|
Navigator.pop(context, result);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
if (filteredSearchController.text ==
|
|
|
|
|
widget.diagnosis.selectedDisease &&
|
|
|
|
|
status == widget.diagnosis.condition &&
|
|
|
|
|
widget.diagnosis.diagnosisType ==
|
|
|
|
|
selectedDiagnosisItem &&
|
|
|
|
|
widget.diagnosis.remarks ==
|
|
|
|
|
filteredSearchController.text) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.noChangeRecorded);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
widget.diagnosis.selectedDisease =
|
|
|
|
|
filteredSearchController.text;
|
|
|
|
|
widget.diagnosis.selectedCategoryCode =
|
|
|
|
|
selectedDiagnosis?.selectedCategoryCode ?? '';
|
|
|
|
|
widget.diagnosis.selectedIcdCode =
|
|
|
|
|
selectedDiagnosis?.selectedIcdCode ?? '';
|
|
|
|
|
widget.diagnosis.selectedChapterCode =
|
|
|
|
|
selectedDiagnosis?.selectedChapterCode ?? '';
|
|
|
|
|
widget.diagnosis.selectedSectionCode =
|
|
|
|
|
selectedDiagnosis?.selectedSectionCode ?? '';
|
|
|
|
|
widget.diagnosis.condition = status;
|
|
|
|
|
widget.diagnosis.diagnosisType =
|
|
|
|
|
selectedDiagnosisItem;
|
|
|
|
|
|
|
|
|
|
bool result =
|
|
|
|
|
await model.editDiagnosis(widget.diagnosis);
|
|
|
|
|
if (result) {
|
|
|
|
|
Navigator.pop(context, result);
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -416,7 +471,7 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|