Merge branch 'update_flutter_3.24_vida_plus_episode' of http://34.17.52.180/Haroon6138/doctor_app_flutter into update_flutter_3.24_vida_plus_episode
# Conflicts: # lib/config/localized_values.dart # lib/utils/translations_delegate_base_utils.dartupdate_flutter_3.24_vida_plus_episode_v2
commit
a95b5d331b
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.45441 1.79572C4.93855 0.271943 7.16707 0.879232 8.51335 1.89026C8.73484 2.05659 8.88684 2.17042 9 2.24729C9.11316 2.17042 9.26517 2.05659 9.48665 1.89026C10.8329 0.879232 13.0615 0.271943 15.5456 1.79572C17.2633 2.84936 18.2298 5.05026 17.8907 7.57902C17.5499 10.12 15.9052 12.9938 12.4222 15.5718C12.3931 15.5934 12.3642 15.6148 12.3355 15.636C11.126 16.5318 10.3251 17.125 9 17.125C7.67495 17.125 6.87396 16.5318 5.66447 15.636C5.63581 15.6148 5.60691 15.5934 5.57778 15.5718C2.09478 12.9938 0.450122 10.12 0.109332 7.57902C-0.229821 5.05026 0.736704 2.84936 2.45441 1.79572ZM8.86938 2.32783C8.8667 2.32904 8.86718 2.32865 8.87054 2.3273C8.87011 2.3275 8.86972 2.32768 8.86938 2.32783ZM9.12946 2.32729C9.13282 2.32864 9.1333 2.32904 9.13062 2.32783C9.13028 2.32768 9.12989 2.3275 9.12946 2.32729ZM7.76273 2.88979C6.76562 2.14099 5.09326 1.64347 3.10799 2.86123C1.89289 3.60658 1.0612 5.27264 1.34824 7.41286C1.63365 9.54088 3.0396 12.138 6.32144 14.5671C7.63991 15.543 8.12114 15.875 9 15.875C9.87886 15.875 10.3601 15.543 11.6786 14.5671C14.9604 12.138 16.3664 9.54088 16.6518 7.41286C16.9388 5.27264 16.1071 3.60658 14.892 2.86123C12.9067 1.64347 11.2344 2.14099 10.2373 2.88979L10.2198 2.90288C9.99452 3.0721 9.80098 3.21746 9.64616 3.31882C9.56569 3.3715 9.47659 3.42514 9.38411 3.46693C9.29635 3.50659 9.16153 3.55621 9 3.55621C8.83847 3.55621 8.70365 3.50659 8.61589 3.46693C8.52341 3.42514 8.43431 3.3715 8.35384 3.31882C8.19901 3.21745 8.00546 3.07209 7.78012 2.90285L7.76273 2.88979Z" fill="#459BF1"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.57578 9.79268C9.5179 9.79175 9.45097 9.79172 9.36841 9.79172C9.02323 9.79172 8.74341 9.5119 8.74341 9.16672C8.74341 8.82155 9.02323 8.54172 9.36841 8.54172L9.39711 8.54172C9.56804 8.54165 9.75287 8.54158 9.90889 8.56255C10.0917 8.58712 10.3251 8.65032 10.5216 8.84682C10.7181 9.04332 10.7813 9.27681 10.8059 9.45958C10.8269 9.61559 10.8268 9.80042 10.8267 9.97135L10.8267 14.1667C10.8267 14.5119 10.5469 14.7917 10.2017 14.7917C9.85656 14.7917 9.57674 14.5119 9.57674 14.1667V10.0001C9.57674 9.91749 9.57671 9.85056 9.57578 9.79268Z" fill="#2B353E"/>
|
||||
<path d="M9.99341 5.83337C9.53317 5.83337 9.16008 6.20647 9.16008 6.66671C9.16008 7.12695 9.53317 7.50004 9.99341 7.50004H10.0009C10.4611 7.50004 10.8342 7.12695 10.8342 6.66671C10.8342 6.20647 10.4611 5.83337 10.0009 5.83337H9.99341Z" fill="#2B353E"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.95227 1.45837H10.0476C11.8732 1.45836 13.3071 1.45835 14.4266 1.60887C15.5738 1.76311 16.484 2.08564 17.1992 2.8008C17.9143 3.51597 18.2369 4.42618 18.3911 5.57339C18.5416 6.6929 18.5416 8.12679 18.5416 9.95237V10.0477C18.5416 11.8733 18.5416 13.3072 18.3911 14.4267C18.2369 15.5739 17.9143 16.4841 17.1992 17.1993C16.484 17.9144 15.5738 18.237 14.4266 18.3912C13.3071 18.5417 11.8732 18.5417 10.0476 18.5417H9.95228C8.1267 18.5417 6.69278 18.5417 5.57327 18.3912C4.42606 18.237 3.51585 17.9144 2.80068 17.1993C2.08551 16.4841 1.76299 15.5739 1.60875 14.4267C1.45823 13.3072 1.45824 11.8733 1.45825 10.0477V9.9524C1.45824 8.12681 1.45823 6.69291 1.60875 5.57339C1.76299 4.42618 2.08551 3.51597 2.80068 2.8008C3.51585 2.08564 4.42606 1.76311 5.57327 1.60887C6.69279 1.45835 8.12669 1.45836 9.95227 1.45837ZM5.73983 2.84772C4.73123 2.98333 4.12877 3.24048 3.68456 3.68469C3.24036 4.12889 2.9832 4.73135 2.8476 5.73995C2.70958 6.76654 2.70825 8.1164 2.70825 10C2.70825 11.8837 2.70958 13.2335 2.8476 14.2601C2.9832 15.2687 3.24036 15.8712 3.68456 16.3154C4.12877 16.7596 4.73123 17.0168 5.73983 17.1524C6.76641 17.2904 8.11627 17.2917 9.99992 17.2917C11.8836 17.2917 13.2334 17.2904 14.26 17.1524C15.2686 17.0168 15.8711 16.7596 16.3153 16.3154C16.7595 15.8712 17.0166 15.2687 17.1522 14.2601C17.2903 13.2335 17.2916 11.8837 17.2916 10C17.2916 8.1164 17.2903 6.76654 17.1522 5.73995C17.0166 4.73135 16.7595 4.12889 16.3153 3.68469C15.8711 3.24048 15.2686 2.98333 14.26 2.84772C13.2334 2.7097 11.8836 2.70837 9.99992 2.70837C8.11627 2.70837 6.76641 2.7097 5.73983 2.84772Z" fill="#2B353E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,77 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/assessment/widget/enter_diagnosis.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AddDiagnosis extends StatefulWidget {
|
||||
@override
|
||||
State<AddDiagnosis> createState() => _AddDiagnosisState();
|
||||
}
|
||||
|
||||
class _AddDiagnosisState extends State<AddDiagnosis>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController? _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController = new TabController(length: 2, vsync: this);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<SOAPViewModel>(
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBar: PatientSearchHeader(
|
||||
title: TranslationBase.of(context).addDiagnosis),
|
||||
backgroundColor: Colors.white,
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 56,
|
||||
child: TabBar(
|
||||
indicatorColor: Color(0xFFD02127),
|
||||
unselectedLabelColor: Color(0xFF6D6D6D),
|
||||
labelColor: Color(0xFF2B353E),
|
||||
controller: _tabController,
|
||||
tabs: [
|
||||
Tab(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).mappedDiagnosis,
|
||||
color: Color(0xFF6D6D6D),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.56,
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).mappedDiagnosis,
|
||||
color: Color(0xFF6D6D6D),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.56,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
EnterDiagnosis(),
|
||||
EnterDiagnosis(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,254 @@
|
||||
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/model/SOAP/master_key_model.dart';
|
||||
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_assement.dart';
|
||||
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessment_call_back.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart';
|
||||
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/utils/utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../soap_update/assessment/add_assessment_details.dart';
|
||||
|
||||
import 'widget/current_diagnosis.dart';
|
||||
import 'widget/previous_diagnosis.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class UpdateAssessmentPage extends StatefulWidget {
|
||||
final Function changePageViewIndex;
|
||||
final PatiantInformtion patientInfo;
|
||||
final Function changeLoadingState;
|
||||
final int currentIndex;
|
||||
|
||||
UpdateAssessmentPage(
|
||||
{Key? key,
|
||||
required this.changePageViewIndex,
|
||||
required this.patientInfo,
|
||||
required this.changeLoadingState,
|
||||
required this.currentIndex});
|
||||
|
||||
@override
|
||||
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
|
||||
}
|
||||
|
||||
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
|
||||
with SingleTickerProviderStateMixin
|
||||
implements AssessmentCallBack {
|
||||
bool isAssessmentExpand = false;
|
||||
List<MySelectedAssessment> mySelectedAssessmentList = [];
|
||||
bool isPrescriptionOrder = false;
|
||||
TabController? _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController = new TabController(length: 2, vsync: this);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
|
||||
return BaseView<SOAPViewModel>(
|
||||
onModelReady: (model) async {
|
||||
model.setAssessmentCallBack(this);
|
||||
mySelectedAssessmentList.clear();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
await model.isPrescriptionOrderCreated(widget.patientInfo);
|
||||
await model.onUpdateAssessmentStepStart(widget.patientInfo);
|
||||
|
||||
if (model.patientAssessmentList.isNotEmpty) {
|
||||
model.patientAssessmentList.forEach((element) {
|
||||
MasterKeyModel? diagnosisType = model.getOneMasterKey(
|
||||
masterKeys: MasterKeysService.DiagnosisType,
|
||||
id: element.diagnosisTypeID,
|
||||
);
|
||||
MasterKeyModel? selectedICD = model.getOneMasterKey(
|
||||
masterKeys: MasterKeysService.ICD10,
|
||||
id: element.icdCode10ID,
|
||||
);
|
||||
MasterKeyModel? diagnosisCondition = model.getOneMasterKey(
|
||||
masterKeys: MasterKeysService.DiagnosisCondition,
|
||||
id: element.conditionID!,
|
||||
);
|
||||
if (diagnosisCondition != null &&
|
||||
diagnosisType != null &&
|
||||
diagnosisCondition != null) {
|
||||
MySelectedAssessment temMySelectedAssessment =
|
||||
SoapUtils.generateMySelectedAssessment(
|
||||
appointmentNo: element.appointmentNo,
|
||||
remark: element.remarks,
|
||||
diagnosisType: diagnosisType,
|
||||
diagnosisCondition: diagnosisCondition,
|
||||
selectedICD: selectedICD,
|
||||
doctorID: element.doctorID,
|
||||
doctorName: element.doctorName,
|
||||
createdBy: element.createdBy,
|
||||
createdOn: element.createdOn,
|
||||
icdCode10ID: element.icdCode10ID);
|
||||
|
||||
mySelectedAssessmentList.add(temMySelectedAssessment);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
widget.changeLoadingState(false);
|
||||
});
|
||||
},
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: false,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Container(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SOAPStepHeader(
|
||||
currentIndex: widget.currentIndex,
|
||||
changePageViewIndex: widget.changePageViewIndex,
|
||||
patientInfo: widget.patientInfo,
|
||||
),
|
||||
ExpandableSOAPWidget(
|
||||
headerTitle: TranslationBase.of(context).assessment,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isAssessmentExpand = !isAssessmentExpand;
|
||||
});
|
||||
},
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 56,
|
||||
child: TabBar(
|
||||
indicatorColor: Color(0xFFD02127),
|
||||
unselectedLabelColor: Color(0xFF6D6D6D),
|
||||
labelColor: Color(0xFF2B353E),
|
||||
tabs: [
|
||||
Tab(
|
||||
child: AppText(
|
||||
TranslationBase.of(context)
|
||||
.currentDiagnosis,
|
||||
color: Color(0xFF6D6D6D),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.56,
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
child: AppText(
|
||||
TranslationBase.of(context)
|
||||
.currentDiagnosis,
|
||||
color: Color(0xFF6D6D6D),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.56,
|
||||
),
|
||||
)
|
||||
],
|
||||
controller: _tabController,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 300,
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
CurrentDiagnosis(
|
||||
currentDiagnosisItems: [''],
|
||||
),
|
||||
PreviousDiagnosis(
|
||||
diagnosisItems: [''],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
]),
|
||||
isExpanded: isAssessmentExpand,
|
||||
),
|
||||
SizedBox(
|
||||
height: 130,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
openAssessmentDialog(BuildContext context,
|
||||
{MySelectedAssessment? assessment,
|
||||
bool isUpdate = false,
|
||||
required SOAPViewModel model}) {
|
||||
if (assessment == null) {
|
||||
assessment = SoapUtils.generateMySelectedAssessment(
|
||||
remark: '', appointmentNo: widget.patientInfo.appointmentNo);
|
||||
}
|
||||
showModalBottomSheet(
|
||||
backgroundColor: Colors.white,
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AddAssessmentDetails(
|
||||
mySelectedAssessment: assessment!,
|
||||
patientInfo: widget.patientInfo,
|
||||
isUpdate: isUpdate,
|
||||
mySelectedAssessmentList: mySelectedAssessmentList,
|
||||
addSelectedAssessment: (MySelectedAssessment mySelectedAssessment,
|
||||
bool isUpdate) async {
|
||||
setState(() {
|
||||
if (!isUpdate)
|
||||
mySelectedAssessmentList.add(mySelectedAssessment);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
nextFunction(model) {
|
||||
if (mySelectedAssessmentList.isEmpty) {
|
||||
Utils.showErrorToast(TranslationBase.of(context).assessmentErrorMsg);
|
||||
} else if (!checkPrimaryDiagnosis()) {
|
||||
Utils.showErrorToast(TranslationBase.of(context).onePrimaryDiagnosis);
|
||||
} else {
|
||||
widget.changeLoadingState(true);
|
||||
widget.changePageViewIndex(3);
|
||||
}
|
||||
}
|
||||
|
||||
bool checkPrimaryDiagnosis() {
|
||||
ProjectViewModel projectViewModel =
|
||||
Provider.of<ProjectViewModel>(context, listen: false);
|
||||
bool isVidaPlus = Utils.isVidaPlusProject(
|
||||
projectViewModel, widget.patientInfo.projectId!);
|
||||
List<MySelectedAssessment> type = mySelectedAssessmentList
|
||||
.where((element) =>
|
||||
(element.selectedDiagnosisType!.id == 2 && isVidaPlus == false) ||
|
||||
(element.selectedDiagnosisType!.code == '3' && isVidaPlus == true))
|
||||
.toList();
|
||||
return type.isEmpty ? false : true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/assessment/add_diagnosis.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/assessment/widget/empty_diagnosis.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CurrentDiagnosis extends StatelessWidget {
|
||||
final List<dynamic> currentDiagnosisItems;
|
||||
|
||||
const CurrentDiagnosis({super.key, required this.currentDiagnosisItems});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
AddSoapItem(
|
||||
title: TranslationBase.of(context).addNewDiagnosis,
|
||||
onAddSoapItemClicked: () {
|
||||
Navigator.push(context, FadePage(page: AddDiagnosis()));
|
||||
}),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Divider(),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
if (currentDiagnosisItems.isEmpty) ...{
|
||||
Center(
|
||||
child: EmptyDiagnosis(),
|
||||
),
|
||||
} else ...{
|
||||
Flexible(
|
||||
|
||||
child:
|
||||
ListView.separated(
|
||||
itemBuilder: (_, index) {
|
||||
return SoapDetailItem(
|
||||
title: 'lorem ipsum',
|
||||
status: 'active',
|
||||
condition: 'acute',
|
||||
remarks: 'initial',
|
||||
onSoapDetailActionClicked: (action) {},
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, index) => Divider(),
|
||||
itemCount: currentDiagnosisItems.length))
|
||||
}
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class EmptyDiagnosis extends StatelessWidget{
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisAlignment : MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset('assets/images/svgs/unavailable.svg'),
|
||||
SizedBox(height: 10,),
|
||||
AppText(
|
||||
TranslationBase.of(context).noDiagnosisFound,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
textAlign: TextAlign.center,
|
||||
color: Color(0xFFADADAD),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,293 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
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:hexcolor/hexcolor.dart';
|
||||
List<String> patientState = ["","Stable", "Not Stable", "Not Defined"];
|
||||
|
||||
class EnterDiagnosis extends StatefulWidget {
|
||||
@override
|
||||
State<EnterDiagnosis> createState() => _EnterDiagnosisState();
|
||||
}
|
||||
|
||||
class _EnterDiagnosisState extends State<EnterDiagnosis> {
|
||||
final TextEditingController filteredSearchController =
|
||||
TextEditingController();
|
||||
bool showAllDiagnosis = true;
|
||||
bool status = true;
|
||||
String selectedItem = "Stable";
|
||||
TextEditingController remarksController = TextEditingController();
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).addDiagnosis,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF2E303A),
|
||||
fontSize: 16,
|
||||
),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
AppTextFieldCustom(
|
||||
hintText: TranslationBase.of(context).selectAllergy,
|
||||
isTextFieldHasSuffix: true,
|
||||
hasBorder: true,
|
||||
controller: filteredSearchController,
|
||||
onChanged: (value) {},
|
||||
onFieldSubmitted: () {},
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
Icons.search,
|
||||
color: Color(0xff2B353E),
|
||||
size: 30,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
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'),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 12),
|
||||
child: AppText(
|
||||
TranslationBase.of(context).condition,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 11,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
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 == 1 ? HexColor("#D02127") : Colors.white,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
),
|
||||
AppText(
|
||||
TranslationBase.of(context).acute,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: SizeConfig.textMultiplier! * 1.6,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
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 == 2 ? HexColor("#D02127") : Colors.white,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
),
|
||||
AppText(
|
||||
TranslationBase.of(context).subAcute,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: SizeConfig.textMultiplier! * 1.6,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
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 == 3 ? HexColor("#D02127") : Colors.white,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
),
|
||||
AppText(
|
||||
TranslationBase.of(context).chronic,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: SizeConfig.textMultiplier! * 1.6,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
|
||||
Material(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
color: Color(0xFFEFEFEF),
|
||||
)),
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).patientCondition,
|
||||
textAlign: TextAlign.start,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 11,
|
||||
color: Color(0xFF2E303A),
|
||||
),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
dropdownColor: Colors.white,
|
||||
iconEnabledColor: Colors.black,
|
||||
icon: Icon(Icons.keyboard_arrow_down),
|
||||
isExpanded: true,
|
||||
value: selectedItem,
|
||||
iconSize: 25,
|
||||
elevation: 16,
|
||||
|
||||
onChanged: (newValue) async {
|
||||
setState(() {
|
||||
selectedItem = newValue ?? "";
|
||||
});
|
||||
},
|
||||
items: patientState.map((item) {
|
||||
return DropdownMenuItem(
|
||||
child: AppText(
|
||||
item,
|
||||
fontSize: 14,
|
||||
letterSpacing: -0.96,
|
||||
color: AppGlobal.appTextColor,
|
||||
fontWeight: FontWeight.normal,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
value: item,
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 8),
|
||||
child: AppTextFieldCustom(
|
||||
hintText: TranslationBase.of(context).remarks,
|
||||
controller: remarksController,
|
||||
minLines: 2,
|
||||
maxLines: 4,
|
||||
inputType: TextInputType.multiline,
|
||||
onChanged: (value) {},
|
||||
onClick: () {},
|
||||
onFieldSubmitted: () {},
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/images/svgs/save_as_draft.svg'),
|
||||
SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
AppText(
|
||||
TranslationBase.of(context).saveAsDraft,
|
||||
textAlign: TextAlign.start,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 10,
|
||||
color: Color(0xFF449BF1),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/assessment/widget/empty_diagnosis.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/assessment/widget/previous_diagnosis_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PreviousDiagnosis extends StatelessWidget {
|
||||
final List<dynamic> diagnosisItems;
|
||||
|
||||
const PreviousDiagnosis({super.key, required this.diagnosisItems});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (diagnosisItems.isEmpty)
|
||||
return Center(
|
||||
child: EmptyDiagnosis(),
|
||||
);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Flexible(
|
||||
child: ListView.separated(
|
||||
itemBuilder: (_, index) {
|
||||
return PreviousDiagnosisItem(
|
||||
title: 'lorem ipsum',
|
||||
status: 'active',
|
||||
condition: 'acute',
|
||||
remarks: 'initial',
|
||||
onSoapDetailActionClicked: (action) {},
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, index) => Divider(),
|
||||
itemCount: diagnosisItems.length),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
typedef OnSoapDetailActionClicked = Function(SoapDetailItemActions);
|
||||
|
||||
class PreviousDiagnosisItem extends StatelessWidget {
|
||||
final String title;
|
||||
final String condition;
|
||||
final String status;
|
||||
final String remarks;
|
||||
final OnSoapDetailActionClicked onSoapDetailActionClicked;
|
||||
|
||||
const PreviousDiagnosisItem(
|
||||
{super.key,
|
||||
required this.title,
|
||||
required this.condition,
|
||||
required this.remarks,
|
||||
required this.onSoapDetailActionClicked,
|
||||
required this.status});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
title,
|
||||
color: Color(0XFF2B353E),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
"${TranslationBase.of(context).condition}:",
|
||||
color: Color(0XFF2B353E),
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
AppText(
|
||||
condition,
|
||||
color: Color(0xffD02127),
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
],
|
||||
),
|
||||
Visibility(
|
||||
visible: remarks.isNotEmpty,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
AppText(
|
||||
remarks,
|
||||
color: Color(0XFF2B353E),
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topRight, child: Status(status: status))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () =>
|
||||
onSoapDetailActionClicked(SoapDetailItemActions.AUDIT),
|
||||
child: SoapDetailItemActionsView(
|
||||
icon: 'assets/images/svgs/audit.svg',
|
||||
fontColor: Color(0XFF2B353E),
|
||||
text: TranslationBase.of(context).audit,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
SizedBox(
|
||||
width: 187,
|
||||
child: AppButton(
|
||||
onPressed: () {
|
||||
onSoapDetailActionClicked(
|
||||
SoapDetailItemActions.CHANGE_STATUS);
|
||||
},
|
||||
title: TranslationBase.of(context).makeCurrentDiagnosis,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue