diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index ed14ecac..fcdf86dd 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -111,7 +111,9 @@ class BaseAppClient { } } } - + if(error == null) { + error = helpers.generateContactAdminMsg(); + } onFailure(error, statusCode); } } diff --git a/lib/core/enum/master_lookup_key.dart b/lib/core/enum/master_lookup_key.dart index a4010858..8f5d76f8 100644 --- a/lib/core/enum/master_lookup_key.dart +++ b/lib/core/enum/master_lookup_key.dart @@ -9,7 +9,8 @@ enum MasterKeysService { AllergySeverity, physiotherapyGoals, DiagnosisCondition, - DiagnosisType + DiagnosisType, + ICD10 } extension SelectedMasterKeysService on MasterKeysService { @@ -48,6 +49,9 @@ extension SelectedMasterKeysService on MasterKeysService { case MasterKeysService.DiagnosisType: return 35; break; + case MasterKeysService.ICD10: + return 2500; + break; } } } diff --git a/lib/core/service/base/lookup-service.dart b/lib/core/service/base/lookup-service.dart index 61f0c31e..d677201b 100644 --- a/lib/core/service/base/lookup-service.dart +++ b/lib/core/service/base/lookup-service.dart @@ -33,6 +33,7 @@ class LookupService extends BaseService { // List listOfPhysiotherapyGoals = []; List listOfDiagnosisType = []; List listOfDiagnosisCondition = []; + List listOfICD10 = []; Future getMasterLookup(MasterKeysService masterKeys) async { hasError = false; @@ -120,6 +121,13 @@ class LookupService extends BaseService { .add(MasterKeyModel.fromJson(v)); }); break; + case MasterKeysService.ICD10: + listOfICD10.clear(); + entryList.forEach((v) { + listOfICD10 + .add(MasterKeyModel.fromJson(v)); + }); + break; } } } diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index e8cde824..e36e132c 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -34,6 +34,7 @@ class SOAPViewModel extends BaseViewModel { List get physicalExaminationList => _SOAPService.physicalExaminationList; List get listOfDiagnosisType => _SOAPService.listOfDiagnosisType; List get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition; + List get listOfICD10 => _SOAPService.listOfICD10; diff --git a/lib/widgets/patients/profile/SOAP/assessment_page.dart b/lib/widgets/patients/profile/SOAP/assessment_page.dart index 5eb3694b..9eff9ed1 100644 --- a/lib/widgets/patients/profile/SOAP/assessment_page.dart +++ b/lib/widgets/patients/profile/SOAP/assessment_page.dart @@ -382,6 +382,10 @@ class _AddAssessmentDetailsState extends State { if (model.listOfDiagnosisType.length == 0) { await model.getMasterLookup(MasterKeysService.DiagnosisType); } + // todo return it back when service is fixed. + // if (model.listOfICD10.length == 0) { + // await model.getMasterLookup(MasterKeysService.ICD10); + // } }, builder: (_, model, w) => AppScaffold( @@ -431,47 +435,43 @@ class _AddAssessmentDetailsState extends State { Container( height: screenSize.height * 0.070, child: InkWell( - onTap: model.listOfDiagnosisCondition != - null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.listOfDiagnosisCondition, - selectedValue: widget.mySelectedAssessment - .selectedDiagnosisCondition, - okText: TranslationBase - .of(context) - .ok, - okFunction: ( - MasterKeyModel selectedValue) { - setState(() { - widget.mySelectedAssessment - .selectedDiagnosisCondition = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - "Condition", + onTap: model.listOfDiagnosisType != null + ? () { + MasterKeyDailog dialog = MasterKeyDailog( + list: model.listOfDiagnosisType, + selectedValue: widget + .mySelectedAssessment + .selectedICD, + okText: TranslationBase.of(context).ok, + okFunction: + (MasterKeyModel selectedValue) { + setState(() { widget.mySelectedAssessment - .selectedDiagnosisCondition != null - ? widget.mySelectedAssessment - .selectedDiagnosisCondition - .nameEn - : null, - true), - enabled: false, - ), - ), + .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, diff --git a/lib/widgets/patients/profile/SOAP/steps_widget.dart b/lib/widgets/patients/profile/SOAP/steps_widget.dart index b0b091c1..d5cb7ddc 100644 --- a/lib/widgets/patients/profile/SOAP/steps_widget.dart +++ b/lib/widgets/patients/profile/SOAP/steps_widget.dart @@ -224,12 +224,15 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 3 ? 5 : 10, ), - AppText( - "PLAN", - fontWeight: FontWeight.bold, - textAlign: TextAlign.center, - fontSize: 14, - ), + Container( + margin: EdgeInsets.only(left: index == 3? 15:0), + child: AppText( + "PLAN", + fontWeight: FontWeight.bold, + textAlign: TextAlign.center, + fontSize: 14, + ), + ), ], ), ), @@ -445,11 +448,14 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 3 ? 5 : 10, ), - AppText( - "PLAN", - fontWeight: FontWeight.bold, - fontSize: 14, - ), + Container( + margin: EdgeInsets.only(right:index == 3? 15:0), + child: AppText( + "PLAN", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ), ], ), ),