diff --git a/lib/core/service/patient_medical_file/procedure/procedure_service.dart b/lib/core/service/patient_medical_file/procedure/procedure_service.dart index 51fdf98b..936eacd7 100644 --- a/lib/core/service/patient_medical_file/procedure/procedure_service.dart +++ b/lib/core/service/patient_medical_file/procedure/procedure_service.dart @@ -72,7 +72,7 @@ class ProcedureService extends BaseService { templateList.clear(); response['DAPP_TemplateGetList'].forEach((template) { ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template); - if (categoryID != null) { + if (categoryID != null ) { if (categoryID == templateElement.categoryID) { templateList.add(templateElement); } @@ -80,9 +80,6 @@ class ProcedureService extends BaseService { templateList.add(templateElement); } }); - // response['HIS_ProcedureTemplateList'].forEach((template) { - // _templateList.add(ProcedureTempleteModel.fromJson(template)); - // }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index 8dbbc64d..31057317 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -48,7 +48,7 @@ class PatientMedicalReportViewModel extends BaseViewModel { } Future insertMedicalReport(PatiantInformtion patient, String htmlText) async { - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _service.insertMedicalReport(patient, htmlText); if (_service.hasError) { error = _service.error!; diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart index 2e185819..3bf15fb4 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart @@ -3,14 +3,14 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; class SOAPOpenItems extends StatelessWidget { - final Function onTap; + final VoidCallback onTap; final String label; const SOAPOpenItems({Key? key, required this.onTap, required this.label}) : super(key: key); @override Widget build(BuildContext context) { return InkWell( - onTap: onTap(), + onTap: onTap, child: Container( padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8.0), margin: EdgeInsets.symmetric(vertical: 8), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart index 7205bfba..360cd518 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart @@ -8,7 +8,7 @@ import 'package:hexcolor/hexcolor.dart'; class ExpandableSOAPWidget extends StatelessWidget { final bool isExpanded; final Widget child; - final Function onTap; + final VoidCallback onTap; final headerTitle; final bool isRequired; @@ -16,7 +16,7 @@ class ExpandableSOAPWidget extends StatelessWidget { {Key? key, required this.isExpanded, required this.child, - required this.onTap, + required this.onTap, this.headerTitle, this.isRequired = true}) : super(key: key); @@ -34,12 +34,12 @@ class ExpandableSOAPWidget extends StatelessWidget { ), child: HeaderBodyExpandableNotifier( headerWidget: InkWell( - onTap: onTap(), + onTap: onTap, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ InkWell( - onTap: onTap(), + onTap: onTap, child: Row( children: [ AppText(headerTitle, variant: isExpanded ? "bodyText" : '', fontSize: 15, color: Colors.black), @@ -52,7 +52,7 @@ class ExpandableSOAPWidget extends StatelessWidget { ), ), InkWell( - onTap: onTap(), + onTap: onTap, child: Icon(isExpanded ? EvaIcons.arrowIosUpwardOutline : EvaIcons.arrowIosDownwardOutline), ) ], diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 1d9e7890..5397c622 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -41,7 +41,7 @@ class _AddMedicationState extends State { TextEditingController strengthController = TextEditingController(); TextEditingController routeController = TextEditingController(); TextEditingController frequencyController = TextEditingController(); - late GetMedicationResponseModel _selectedMedication; + GetMedicationResponseModel? _selectedMedication; GlobalKey key = new GlobalKey>(); bool isFormSubmitted = false; @@ -127,8 +127,8 @@ class _AddMedicationState extends State { ) : AppTextFieldCustom( hintText: _selectedMedication != null - ? _selectedMedication.description! + - (' (${_selectedMedication.genericName} )') + ? _selectedMedication!.description! + + (' (${_selectedMedication!.genericName} )') : TranslationBase.of(context).searchMedicineNameHere, minLines: 2, maxLines: 2, @@ -346,7 +346,7 @@ class _AddMedicationState extends State { _selectedMedicationRoute != null && _selectedMedicationFrequency != null) { widget.medicationController.text = widget.medicationController.text + - '${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n'; + '${_selectedMedication!.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n'; Navigator.of(context).pop(); } }, diff --git a/lib/screens/procedures/ProcedureType.dart b/lib/screens/procedures/ProcedureType.dart index 39b52a28..47fe2a4b 100644 --- a/lib/screens/procedures/ProcedureType.dart +++ b/lib/screens/procedures/ProcedureType.dart @@ -58,10 +58,10 @@ extension procedureType on ProcedureType { } } - String getCategoryId() { + String ? getCategoryId() { switch (this) { case ProcedureType.PROCEDURE: - return ''; + return null; case ProcedureType.LAB_RESULT: return "02"; case ProcedureType.RADIOLOGY: @@ -69,7 +69,7 @@ extension procedureType on ProcedureType { case ProcedureType.PRESCRIPTION: return "55"; default: - return ''; + return null; } } diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 135642b4..e5aa1f8c 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -47,7 +47,7 @@ class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { class _MasterKeyCheckboxSearchAllergiesWidgetState extends State { List items = []; - late MasterKeyModel _selectedAllergySeverity; + MasterKeyModel? _selectedAllergySeverity; bool isSubmitted = false; @override