Merge branch 'fix_loader' into 'development'

Fix loader

See merge request Cloud_Solution/doctor_app_flutter!259
merge-requests/260/merge
Mohammad Aljammal 4 years ago
commit ab91adff00

@ -13,11 +13,72 @@ PODS:
- Flutter
- device_info (0.0.1):
- Flutter
- Firebase/CoreOnly (6.33.0):
- FirebaseCore (= 6.10.3)
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- firebase_core (0.5.3):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
- firebase_core_web (0.1.0):
- Flutter
- firebase_messaging (7.0.3):
- Firebase/CoreOnly (~> 6.33.0)
- Firebase/Messaging (~> 6.33.0)
- firebase_core
- Flutter
- FirebaseCore (6.10.3):
- FirebaseCoreDiagnostics (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- FirebaseCoreDiagnostics (1.7.0):
- GoogleDataTransport (~> 7.4)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- nanopb (~> 1.30906.0)
- FirebaseInstallations (1.7.0):
- FirebaseCore (~> 6.10)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- PromisesObjC (~> 1.2)
- FirebaseInstanceID (4.8.0):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- FirebaseMessaging (4.7.1):
- FirebaseCore (~> 6.10)
- FirebaseInstanceID (~> 4.7)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Reachability (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- Protobuf (>= 3.9.2, ~> 3.9)
- Flutter (1.0.0)
- flutter_flexible_toast (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
- GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0)
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.7.2):
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.7.2)"
- GoogleUtilities/Reachability (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger
- hexcolor (0.0.1):
- Flutter
- imei_plugin (0.0.1):
@ -27,6 +88,11 @@ PODS:
- maps_launcher (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
- nanopb (1.30906.0):
- nanopb/decode (= 1.30906.0)
- nanopb/encode (= 1.30906.0)
- nanopb/decode (1.30906.0)
- nanopb/encode (1.30906.0)
- OpenTok (2.15.3)
- path_provider_linux (0.0.1):
- Flutter
@ -34,6 +100,8 @@ PODS:
- Flutter
- "permission_handler (5.0.1+1)":
- Flutter
- PromisesObjC (1.2.10)
- Protobuf (3.13.0)
- Reachability (3.2)
- shared_preferences (0.0.1):
- Flutter
@ -68,6 +136,9 @@ DEPENDENCIES:
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
@ -94,8 +165,19 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- Alamofire
- Firebase
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- GoogleDataTransport
- GoogleUtilities
- MTBBarcodeScanner
- nanopb
- OpenTok
- PromisesObjC
- Protobuf
- Reachability
- SwiftProtobuf
- Try
@ -111,6 +193,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_macos/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_core_web:
:path: ".symlinks/plugins/firebase_core_web/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
flutter_flexible_toast:
@ -161,18 +249,32 @@ SPEC CHECKSUMS:
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1
FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78

@ -620,4 +620,11 @@ const Map<String, Map<String, String>> localizedValues = {
},
'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"},
'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"},
'nameOrICD': {'en': "Name or ICD", 'ar':"الاسم او  ICD" },
'dType': {'en': "Type", 'ar':"النوع" },
'addAssessmentDetails': {'en': "Add Assessment Details", 'ar':"أضف تفاصيل التقييم" },
'progressNoteSOAP': {'en': "Progress Note", 'ar':"ملاحظة التقدم" },
'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" },
'createdBy': {'en': "Created By :", 'ar':"أضيفت : " },
'editedBy': {'en': "Edited By :", 'ar':"عدلت : " },
};

@ -29,7 +29,7 @@ class SOAPService extends LookupService {
List<GetAllergiesResModel> patientAllergiesList = [];
List<GetHistoryResModel> patientHistoryList = [];
List<GetPhysicalExamResModel> patientPhysicalExamList = [];
List<GetGetProgressNoteResModel> patientProgressNoteList = [];
List<GetPatientProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = [];
int episodeID;
@ -284,7 +284,7 @@ class SOAPService extends LookupService {
print("Success");
patientProgressNoteList.clear();
response['ProgressNoteList']['entityList'].forEach((v) {
patientProgressNoteList.add(GetGetProgressNoteResModel.fromJson(v));
patientProgressNoteList.add(GetPatientProgressNoteResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {

@ -74,7 +74,7 @@ class SOAPViewModel extends BaseViewModel {
List<GetPhysicalExamResModel> get patientPhysicalExamList =>
_SOAPService.patientPhysicalExamList;
List<GetGetProgressNoteResModel> get patientProgressNoteList =>
List<GetPatientProgressNoteResModel> get patientProgressNoteList =>
_SOAPService.patientProgressNoteList;
List<GetAssessmentResModel> get patientAssessmentList =>
@ -253,6 +253,7 @@ class SOAPViewModel extends BaseViewModel {
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
if(selectedAllergy != null)
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , ';
});

@ -1,15 +1,39 @@
class GetGetProgressNoteResModel {
class GetPatientProgressNoteResModel {
int appointmentNo;
int createdBy;
String createdByName;
String createdOn;
String dName;
String editedByName;
String editedOn;
int episodeId;
String mName;
int patientMRN;
String planNote;
GetGetProgressNoteResModel(
{this.appointmentNo, this.episodeId, this.patientMRN, this.planNote});
GetPatientProgressNoteResModel(
{this.appointmentNo,
this.createdBy,
this.createdByName,
this.createdOn,
this.dName,
this.editedByName,
this.editedOn,
this.episodeId,
this.mName,
this.patientMRN,
this.planNote});
GetGetProgressNoteResModel.fromJson(Map<String, dynamic> json) {
GetPatientProgressNoteResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
createdBy = json['createdBy'];
createdByName = json['createdByName'];
createdOn = json['createdOn'];
dName = json['dName'];
editedByName = json['editedByName'];
editedOn = json['editedOn'];
episodeId = json['episodeId'];
mName = json['mName'];
patientMRN = json['patientMRN'];
planNote = json['planNote'];
}
@ -17,7 +41,14 @@ class GetGetProgressNoteResModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['createdBy'] = this.createdBy;
data['createdByName'] = this.createdByName;
data['createdOn'] = this.createdOn;
data['dName'] = this.dName;
data['editedByName'] = this.editedByName;
data['editedOn'] = this.editedOn;
data['episodeId'] = this.episodeId;
data['mName'] = this.mName;
data['patientMRN'] = this.patientMRN;
data['planNote'] = this.planNote;
return data;

@ -70,7 +70,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
DEVICE_TOKEN = token;
var request = await sharedPref.getObj(DOCTOR_PROFILE);
authProvider.insertDeviceImei(request).then((value) {
print(value);
// print(value);
changeIsLoading(false);
});
}

@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
@ -162,87 +163,86 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
searchMedicine(context, model);
onPressed: () async{
await searchMedicine(context, model);
},
),
],
),
),
NetworkBaseView(
baseViewModel: model,
child: Column(
children: [
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
Column(
children: [
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase
.of(context)
.youCanFind +
model.pharmacyItemsList.length
.toString() +
" " +
TranslationBase
.of(context)
.youCanFind +
model.pharmacyItemsList.length
.toString() +
" " +
TranslationBase
.of(context)
.itemsInSearch,
fontWeight: FontWeight.bold,
),
],
.itemsInSearch,
fontWeight: FontWeight.bold,
),
),
Container(
height: MediaQuery
.of(context)
.size
.height * 0.35,
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount:
model.pharmacyItemsList ==
null
? 0
: model
.pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.pharmacyItemsList[index]
["ItemDescription"],
url: model
.pharmacyItemsList[index]
["ImageSRCUrl"],
],
),
),
Container(
height: MediaQuery
.of(context)
.size
.height * 0.35,
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount:
model.pharmacyItemsList ==
null
? 0
: model
.pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.pharmacyItemsList[index]
["ItemDescription"],
url: model
.pharmacyItemsList[index]
["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID: model
.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID: model
.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
),
);
},
);
},
),
),
},
);
},
),
],
)),
),
),
],
),
],
),
),
@ -252,7 +252,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
),),);
}
searchMedicine(context, MedicineViewModel model) {
searchMedicine(context, MedicineViewModel model) async {
FocusScope.of(context).unfocus();
if (myController.text.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase
@ -267,7 +267,12 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
.moreThan3Letter);
return;
}
model.getMedicineItem(myController.text);
GifLoaderDialogUtils.showMyDialog(context);
await model.getMedicineItem(myController.text);
GifLoaderDialogUtils.hideDialog(context);
}
startVoiceSearch() {

@ -317,8 +317,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
},
builder: (_, model, w) => AppScaffold(
appBarTitle: patientTypeTitle,
isLoading: _isLoading,
body: _isLoading
? DrAppCircularProgressIndeicator()
? Container()
: _isError
? DrAppEmbeddedError(error: error)
: lItems == null || lItems.length == 0

@ -650,6 +650,21 @@ class TranslationBase {
localizedValues['updateProcedure'][locale.languageCode];
String get orderProcedure =>
localizedValues['orderProcedure'][locale.languageCode];
String get nameOrICD =>
localizedValues['nameOrICD'][locale.languageCode];
String get dType =>
localizedValues['dType'][locale.languageCode];
String get addAssessmentDetails =>
localizedValues['addAssessmentDetails'][locale.languageCode];
String get progressNoteSOAP =>
localizedValues['progressNoteSOAP'][locale.languageCode];
String get addProgressNote =>
localizedValues['addProgressNote'][locale.languageCode];
String get createdBy =>
localizedValues['createdBy'][locale.languageCode];
String get editedBy =>
localizedValues['editedBy'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.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';
@ -29,6 +30,12 @@ class PatientPageHeaderWidget extends StatelessWidget {
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP);
if (model.allergiesList.length == 0) {
await model.getMasterLookup(MasterKeysService.Allergies);
}
if (model.allergySeverityList.length == 0) {
await model.getMasterLookup(MasterKeysService.AllergySeverity);
}
},
builder: (_, model, w) => Container(
@ -84,14 +91,11 @@ class PatientPageHeaderWidget extends StatelessWidget {
),
],
),
NetworkBaseView(
baseViewModel: model,
child: model.patientAllergiesList.isNotEmpty ?AppText(
TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic),
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
) : AppText(''),
),
model.patientAllergiesList.isNotEmpty ?AppText(
TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic),
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
) : AppText(''),
],
),
)

@ -30,6 +30,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex;
final Function changeLoadingState;
final List<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> myHistoryList;
final PatiantInformtion patientInfo;
@ -39,7 +40,7 @@ class UpdateSubjectivePage extends StatefulWidget {
this.changePageViewIndex,
this.myAllergiesList,
this.myHistoryList,
this.patientInfo});
this.patientInfo, this.changeLoadingState});
@override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
@ -53,6 +54,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
TextEditingController complaintsController = TextEditingController();
final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async{
widget.changeLoadingState(true);
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
@ -206,10 +208,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
await getHistory(model);
await getAllergies(model);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
baseViewModel: model,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -463,6 +468,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
helpers.showErrorToast(model.error);
}
}
widget.changeLoadingState(true);
widget.changePageViewIndex(1);

@ -1,15 +1,16 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
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/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.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/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
@ -22,6 +23,7 @@ import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'custom_validation_error.dart';
@ -29,11 +31,12 @@ class UpdateAssessmentPage extends StatefulWidget {
final Function changePageViewIndex;
List<MySelectedAssessment> mySelectedAssessmentList;
final PatiantInformtion patientInfo;
final Function changeLoadingState;
UpdateAssessmentPage({Key key,
this.changePageViewIndex,
this.mySelectedAssessmentList,
this.patientInfo});
this.patientInfo, this.changeLoadingState});
@override
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
@ -43,6 +46,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
bool isAssessmentExpand = false;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>(
onModelReady: (model) async{
@ -77,25 +81,32 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
masterKeys: MasterKeysService.DiagnosisCondition,
id: element.conditionID,
);
MySelectedAssessment temMySelectedAssessment = MySelectedAssessment(
appointmentId: element.appointmentNo,
remark: element.remarks,
selectedDiagnosisType: diagnosisType,
selectedDiagnosisCondition: diagnosisCondition,
selectedICD: selectedICD,
doctorID: element.doctorID,
doctorName: element.doctorName,
createdBy: element.createdBy,
icdCode10ID: element.icdCode10ID
);
if(diagnosisCondition !=null &&diagnosisType !=null && diagnosisCondition!=null) {
MySelectedAssessment temMySelectedAssessment = MySelectedAssessment(
appointmentId: element.appointmentNo,
remark: element.remarks,
selectedDiagnosisType: diagnosisType,
selectedDiagnosisCondition: diagnosisCondition,
selectedICD: selectedICD,
doctorID: element.doctorID,
doctorName: element.doctorName,
createdBy: element.createdBy,
createdOn: element.createdOn,
icdCode10ID: element.icdCode10ID
);
widget.mySelectedAssessmentList.add(temMySelectedAssessment);
}
widget.mySelectedAssessmentList.add(temMySelectedAssessment);
});
}
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
baseViewModel: model,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -193,13 +204,14 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day.toString(),
fontWeight: FontWeight
.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
Helpers.getMonth(assessment.createdOn !=null?DateTime.parse(assessment.createdOn).month:DateTime.now().month).toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
@ -235,7 +247,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start,
children: [
AppText(
assessment
projectViewModel.isArabic?assessment
.selectedDiagnosisCondition
.nameAr : assessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight
@ -249,13 +263,15 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).type +':',
TranslationBase.of(context).dType+':',
fontWeight: FontWeight
.bold,
fontSize: 16,
),
AppText(
assessment
projectViewModel.isArabic?assessment
.selectedDiagnosisType
.nameAr:assessment
.selectedDiagnosisType
.nameEn,
fontSize: 10,
@ -366,6 +382,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
},
),
SizedBox(
@ -432,6 +450,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
remarkController.text = widget.mySelectedAssessment.remark ?? "";
appointmentIdController.text =
widget.mySelectedAssessment.appointmentId.toString();
@ -492,7 +512,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 16,
),
AppText(
"Add Assessment Details".toUpperCase(),
TranslationBase.of(context).addAssessmentDetails.toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
@ -532,7 +552,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
}
: null,
child: widget.mySelectedAssessment.selectedICD == null ? AutoCompleteTextField<MasterKeyModel>(
decoration: textFieldSelectorDecoration("Name or ICD", widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search),
decoration: textFieldSelectorDecoration(TranslationBase.of(context).nameOrICD, widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search),
itemSubmitted: (item) => setState(() => widget.mySelectedAssessment.selectedICD = item),
key: key,
suggestions: model.listOfICD10,
@ -547,7 +567,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
): TextField(
decoration: textFieldSelectorDecoration(
widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.code :"Name or ICD",
widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search),
widget.mySelectedAssessment.selectedICD != null ? projectViewModel.isArabic?widget.mySelectedAssessment.selectedICD.nameAr:widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search),
enabled: false,
),
),
@ -589,10 +609,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
TranslationBase.of(context).condition,
widget.mySelectedAssessment
.selectedDiagnosisCondition != null
? widget.mySelectedAssessment
? projectViewModel.isArabic?widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameAr:widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn
: null,
@ -639,10 +661,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Type",
TranslationBase.of(context).dType,
widget.mySelectedAssessment
.selectedDiagnosisType != null
? widget.mySelectedAssessment
?projectViewModel.isArabic?widget.mySelectedAssessment
.selectedDiagnosisType.nameAr: widget.mySelectedAssessment
.selectedDiagnosisType.nameEn
: null,
true),
@ -699,9 +722,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
null &&
widget.mySelectedAssessment
.selectedICD != null) {
widget.addSelectedAssessment(
widget.mySelectedAssessment,
widget.isUpdate);
await submitAssessment(
isUpdate: widget.isUpdate,
model: model,
@ -758,7 +778,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
helpers
.showErrorToast(model.error);
} else {
mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code;

@ -29,10 +29,12 @@ import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex;
final Function changeLoadingState;
final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo;
UpdateObjectivePage(
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo});
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState});
@override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -87,10 +89,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.mySelectedExamination.add(tempEam);
});
}
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
baseViewModel: model,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -402,9 +407,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changeLoadingState(true);
widget.changePageViewIndex(2);
}
} else {
widget.changeLoadingState(true);
widget.changePageViewIndex(2);
// helpers.showErrorToast(TranslationBase.of(context).requiredMsg);

@ -3,9 +3,11 @@ import 'package:doctor_app_flutter/config/config.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/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
@ -21,8 +23,15 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex;
final PatiantInformtion patientInfo;
final Function changeLoadingState;
GetPatientProgressNoteResModel patientProgressNote;
UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo});
UpdatePlanPage(
{Key key,
this.changePageViewIndex,
this.patientInfo,
this.changeLoadingState,
this.patientProgressNote});
@override
_UpdatePlanPageState createState() => _UpdatePlanPageState();
@ -31,7 +40,6 @@ class UpdatePlanPage extends StatefulWidget {
class _UpdatePlanPageState extends State<UpdatePlanPage> {
bool isProgressNoteExpand = false;
List<dynamic> progressNoteList;
TextEditingController progressNoteController =
TextEditingController(text: null);
@ -63,10 +71,17 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = helpers
.parseHtmlString(model.patientProgressNoteList[0].planNote);
widget.patientProgressNote.planNote = progressNoteController.text;
widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName;
widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn;
widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn;
widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName;
}
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
// baseViewModel: model,
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
@ -85,7 +100,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
children: [
Row(
children: [
Texts('Progress Note',
Texts(TranslationBase
.of(context)
.progressNoteSOAP,
variant: isProgressNoteExpand ? "bodyText" : '',
bold: isProgressNoteExpand ? true : false,
color: Colors.black),
@ -113,22 +130,24 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
),
Column(
children: [
if(model.patientProgressNoteList.isEmpty || progressNoteController.text !='')
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: "Add Progress Note",
fontSize: 13.5,
onTapTextFields: () {
openProgressNote(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
fontWeight: FontWeight.w600,
// controller: messageController,
if(model.patientProgressNoteList.isEmpty)
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase
.of(context)
.addProgressNote,
fontSize: 13.5,
onTapTextFields: () {
openProgressNote(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
@ -159,12 +178,14 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
widget.patientProgressNote.createdOn !=null?DateTime.parse(widget.patientProgressNote.createdOn).day.toString():DateTime.now().day.toString(),
fontWeight: FontWeight
.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
Helpers.getMonth(widget.patientProgressNote.createdOn !=null?(DateTime.parse(widget.patientProgressNote.createdOn).month):DateTime.now().month).toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
@ -207,12 +228,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
MainAxisAlignment.start,
children: [
AppText(
"Created By : ",
TranslationBase.of(context).createdBy,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah on 12 De",
widget.patientProgressNote.createdByName??"",
fontSize: 10,
color: Colors.grey,
),
@ -223,12 +244,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
MainAxisAlignment.start,
children: [
AppText(
"Edited By : ",
TranslationBase.of(context).editedBy,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Rahim on 13 Dec",
widget.patientProgressNote.editedByName??"",
fontSize: 10,
color: Colors.grey,
),
@ -319,7 +340,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
height: 16,
),
AppText(
"Add Progress Note",
TranslationBase.of(context).addProgressNote,
fontWeight: FontWeight.bold,
fontSize: 16,
),
@ -329,7 +350,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Add progress note here",
hintText: TranslationBase.of(context).addProgressNote,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
@ -348,7 +369,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
title: TranslationBase.of(context).add.toUpperCase(),
onPressed: () {
setState(() {
print(progressNoteController.text);

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
@ -7,8 +7,8 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_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/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_objective_page.dart';
@ -30,14 +30,18 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 0;
List<MySelectedAllergy> myAllergiesList= List();
List<MySelectedAllergy> myAllergiesList = List();
List<MySelectedHistory> myHistoryList = List();
List<MySelectedExamination> mySelectedExamination = List();
List<MySelectedAssessment> mySelectedAssessment = List();
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel();
changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex);
}
bool _isLoading = true;
@override
void initState() {
// TODO: implement initState
@ -45,13 +49,21 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
super.initState();
}
void changeLoadingState(isLoading) {
setState(() {
_isLoading = isLoading;
});
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<DoctorReplayViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
// baseViewModel: model,
isLoading: _isLoading,
appBarTitle: TranslationBase.of(context).healthRecordInformation,
body: SingleChildScrollView(
child: Column(
@ -97,22 +109,29 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList,
patientInfo: patient,
changeLoadingState:changeLoadingState
),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
mySelectedExamination:
mySelectedExamination,
patientInfo: patient,
changeLoadingState:changeLoadingState
),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList:
mySelectedAssessment,
patientInfo: patient,
changeLoadingState:changeLoadingState
),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
patientInfo: patient,
patientProgressNote: patientProgressNote,
changeLoadingState:changeLoadingState
)
],
),

@ -34,6 +34,7 @@ class _GifLoaderContainerState extends State<GifLoaderContainer>
child: Container(
// margin: EdgeInsets.only(bottom: 40),
child: GifImage(
controller: controller1,
image: AssetImage(
"assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),

@ -27,10 +27,7 @@ class NetworkBaseView extends StatelessWidget {
return child;
break;
case ViewState.Busy:
return Padding(
padding: const EdgeInsets.all(8.0),
child: Center(child: const CircularProgressIndicator()),
);
return AppLoaderWidget();
break;
case ViewState.Error:
return Center(

Loading…
Cancel
Save