merge-requests/267/head
Sultan Khan 5 years ago
commit d55ce4c1ec

@ -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,15 @@ 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':"عدلت : " },
'currentMedications': {'en': "Current Medications", 'ar':"الأدوية الحالية" },
'noItem': {'en': "No items exists in this list", 'ar':"لا توجد عناصر في هذه القائمة" },
'postUcafSuccessMsg': {'en': "UCAF request send successfully", 'ar':"تم ارسال طلب UCAF بنجاح" },
'vitalSignDetailEmpty': {'en': "There is no data for this vital sign", '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) {

@ -41,8 +41,8 @@ class UcafService extends LookupService {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
// body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
@ -101,4 +101,19 @@ class UcafService extends LookupService {
}, body: body);
}
Future postUCAF(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
await baseAppClient.post (POST_UCAF,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -78,7 +78,7 @@ class ProcedureService extends BaseService {
patientMRN: 0,
pageIndex: 1,
clinicId: 0,
pageSize: 100,
pageSize: 300,
);
hasError = false;
_categoriesList.clear();

@ -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 && element.isChecked)
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , ';
});

@ -115,4 +115,15 @@ class UcafViewModel extends BaseViewModel {
return null;
}
}
Future postUCAF(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _ucafService.postUCAF(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle); // but with empty list
}
}
}

@ -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;

@ -111,7 +111,7 @@ class PatiantInformtion {
projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"]?? json["clinicID"],
doctorId: json["DoctorID"]?? json["doctorID"],
patientId: json["PatientID"]?? json["patientID"],
patientId: json["PatientID"]?? json["patientID"]??json['patientMRN'] ?? json['PatientMRN'],
doctorName: json["DoctorName"]?? json["doctorName"],
doctorNameN: json["DoctorNameN"]?? json["doctorNameN"],
firstName: json["FirstName"]?? json["firstName"],

@ -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);
});
}

@ -3,6 +3,7 @@ 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/doctor/doctor_reply_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -22,7 +23,8 @@ class DoctorReplyScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).replay2,
body: Container(
body: model
.listDoctorWorkingHoursTable.isEmpty ? DrAppEmbeddedError(error: TranslationBase.of(context).noItem):Container(
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
child: ListView(
children: [

@ -632,17 +632,21 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
fontWeight:
FontWeight.w700,
),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[0]
// .timeLineEvents[0]
// .consulations[0]
// .lstProcedure[index]
// .orderDate
// .trim(),
// ),
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[0]
.timelines[0]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[
index]
.orderDate
.trim(),
),
),
],
),
Row(

@ -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() {

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.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/models/patient/patient_model.dart';
@ -15,7 +14,6 @@ import 'package:provider/provider.dart';
import '../../config/config.dart';
import '../../config/size_config.dart';
import '../../lookups/patient_lookup.dart';
import '../../models/doctor/doctor_profile_model.dart';
import '../../widgets/patients/dynamic_elements.dart';
import '../../widgets/shared/app_buttons_widget.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
@ -44,6 +42,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
String itemText2 = '';
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false;
bool onlyArrived = false;
var _patientSearchFormValues = PatientModel(
FirstName: "0",
@ -87,7 +86,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
});
}
} catch (err) {
error = err;
error = err.toString();
}
}
@ -244,13 +243,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
TranslationBase.of(context).firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null
value == null || value == ''
? _patientSearchFormValues.setFirstName =
"0"
: _patientSearchFormValues.setFirstName =
value;
if (value.toString().trim().isEmpty) {
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setFirstName = "0";
}
},
@ -274,14 +274,17 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
TranslationBase.of(context).middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null
value == null || value == ''
? _patientSearchFormValues.setMiddleName =
"0"
: _patientSearchFormValues.setMiddleName =
value;
if (value.toString().trim().isEmpty) {
if (value != null && value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setMiddleName =
"0";
"0";
}
},
// validator: (value) {
@ -303,12 +306,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
labelText: TranslationBase.of(context).lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null
value == null || value == ''
? _patientSearchFormValues.setLastName =
"0"
: _patientSearchFormValues.setLastName =
value;
if (value.toString().trim().isEmpty) {
if (value != null && value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setLastName = "0";
}
},
@ -331,13 +337,16 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
value == null
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value.toString().trim().isEmpty) {
if (value != null && value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
@ -361,12 +370,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
value == null
value == null || value==''
? _patientSearchFormValues.setPatientID =
0
: _patientSearchFormValues.setPatientID =
int.parse(value);
if (value.toString().trim().isEmpty) {
if (value != null && value
.trim()
.toString()
.isEmpty) {
_patientSearchFormValues.setPatientID = 0;
}
}),
@ -491,10 +503,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
height: 25,
width: 25,
child: Checkbox(
value: true,
value: onlyArrived,
checkColor: HexColor("#2A930A"),
activeColor: Colors.white,
onChanged: (bool newValue) {}),
onChanged: (bool newValue) {
setState(() {
onlyArrived = newValue;
});
}),
),
SizedBox(
width: 12,

@ -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
@ -480,6 +481,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
backGroundcolor:
Colors.white,
),
SizedBox(
height:
5,
),
],
),
Row(
@ -501,13 +506,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
AppText(
item.patientId.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),SizedBox(
),
SizedBox(
width: 10,
),
],
@ -516,15 +521,20 @@ class _PatientsScreenState extends State<PatientsScreen> {
height:
2.5,
),
AppText(
TranslationBase.of(context).nationality +" : "+(
item.nationalityName??item.nationality),
fontSize:
1.8 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
Container(
child:
AppText(
TranslationBase.of(context).nationality + " : " + (item.nationalityName ?? item.nationality),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
margin:
EdgeInsets.only(right: projectsProvider.isArabic ? 0 : 10, left: projectsProvider.isArabic ? 10 : 0),
),
SizedBox(
width:
10,
),
SizedBox(
height:
@ -589,16 +599,32 @@ class _PatientsScreenState extends State<PatientsScreen> {
Wrap(
children: [
AppText(
TranslationBase.of(context).age2,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
TranslationBase
.of(
context)
.age2,
fontSize: 1.8 *
SizeConfig
.textMultiplier,
fontWeight: FontWeight
.bold,
backGroundcolor: Colors
.white,
),
AppText(
item.age.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
item
.age
.toString(),
fontSize: 1.8 *
SizeConfig
.textMultiplier,
fontWeight: FontWeight
.w300,
backGroundcolor: Colors
.white,
),
SizedBox(
width: 10,
),
],
),
@ -606,6 +632,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
height:
2.5,
),
Wrap(
children: [
AppText(

@ -1,11 +1,13 @@
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/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.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/dr_app_toast_msg.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/patients/profile/PatientHeaderWidgetNoAvatar.dart';
@ -82,7 +84,17 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
backgroundColor: HexColor("#B8382B"),
textColor: Colors.white,
fontSize: SizeConfig.textMultiplier * 2.0,
handler: () {},
handler: () async {
await model.postUCAF(patient);
if(model.state == ViewState.Idle){
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).postUcafSuccessMsg);
Navigator.of(context).popUntil((route){
return route.settings.name == PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
Container(

@ -40,137 +40,146 @@ class MyReferralDetailScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
body: model.patientArrivalList != null ? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ProfileWelcomeWidget(
AppText(
authProvider.selectedClinicName != null
? authProvider.selectedClinicName
: authProvider.doctorProfile.clinicDescription,
fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white,
textAlign: TextAlign.center,
),
height: 100,
),
SizedBox(
height: 16,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: AppText(
TranslationBase.of(context).myReferralPatient,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
PatientReferralItemWidget(
patientName: pendingReferral.patientName,
referralStatus: null,
isReferredTo: false,
isSameBranch:
pendingReferral.isReferralDoctorSameBranch,
referralDoctorName:
pendingReferral.referredByDoctorInfo,
clinicDescription: null,
remark: pendingReferral.remarksFromSource,
),
SizedBox(
child: GridView.count(
childAspectRatio: 1.8,
crossAxisSpacing: 8,
mainAxisSpacing: 10,
controller:
new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
crossAxisCount: 2,
body: model.patientArrivalList != null
? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientProfileButton(
key: key,
// patient: patient,
// route: RADIOLOGY,
nameLine1:
TranslationBase.of(context).previewHealth,
nameLine2:
TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'),
PatientProfileButton(
key: key,
// patient: patient,
// route: LAB_ORDERS,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route: VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
icon: 'heartbeat.png'),
ProfileWelcomeWidget(
AppText(
authProvider.selectedClinicName != null
? authProvider.selectedClinicName
: authProvider
.doctorProfile.clinicDescription,
fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white,
textAlign: TextAlign.center,
),
height: 100,
),
SizedBox(
height: 16,
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: AppText(
TranslationBase.of(context).myReferralPatient,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
PatientReferralItemWidget(
patientName: pendingReferral.patientName,
referralStatus: null,
isReferredTo: false,
isSameBranch:
pendingReferral.isReferralDoctorSameBranch,
referralDoctorName:
pendingReferral.referredByDoctorInfo,
clinicDescription: null,
remark: pendingReferral.remarksFromSource,
),
SizedBox(
child: GridView.count(
childAspectRatio: 1.8,
crossAxisSpacing: 8,
mainAxisSpacing: 10,
controller: new ScrollController(
keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
crossAxisCount: 2,
children: [
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context)
.previewHealth,
nameLine2: TranslationBase.of(context)
.summaryReport,
icon: 'radiology-1.png'),
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route: LAB_ORDERS,
nameLine1:
TranslationBase.of(context).lab,
nameLine2:
TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route:
VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/,
nameLine1:
TranslationBase.of(context).vital,
nameLine2:
TranslationBase.of(context).signs,
icon: 'heartbeat.png'),
],
),
),
],
),
),
],
),
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
children: [
Expanded(
child: BorderedButton(
TranslationBase.of(context).accept,
backgroundColor: Color(0xFF4BA821),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, true);
},
),
),
SizedBox(
height: 8,
),
Expanded(
child: BorderedButton(
TranslationBase.of(context).reject,
backgroundColor: Color(0xFFB9382C),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, false);
},
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
children: [
Expanded(
child: BorderedButton(
TranslationBase.of(context).accept,
backgroundColor: Color(0xFF4BA821),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, true);
},
),
),
SizedBox(
height: 8,
),
Expanded(
child: BorderedButton(
TranslationBase.of(context).reject,
backgroundColor: Color(0xFFB9382C),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, false);
},
),
),
],
),
),
],
)
: Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
),
),
],
) : Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
),
),
);
}

@ -2,8 +2,10 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
@ -29,8 +31,8 @@ class VitalSingChartAndDetials extends StatelessWidget {
@override
Widget build(BuildContext context) {
generateData();
return Column(
generateData();
return timeSeriesData.length != 0 ? Column(
children: <Widget>[
AppExpandableNotifier(
// isExpand: true,
@ -43,6 +45,12 @@ class VitalSingChartAndDetials extends StatelessWidget {
),
),
],
) : Container(
width: double.infinity,
height: MediaQuery.of(context).size.height,
child: Center(
child: AppText(TranslationBase.of(context).vitalSignDetailEmpty),
),
);
}
@ -50,14 +58,14 @@ class VitalSingChartAndDetials extends StatelessWidget {
if (vitalList.length > 0) {
vitalList.reversed.toList().forEach(
(element) {
DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn);
if( element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add(
TimeSeriesSales2(
new DateTime(elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey].toDouble(),
),
);
DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn);
if(element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add(
TimeSeriesSales2(
new DateTime(elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey].toDouble(),
),
);
},
);
}

@ -48,6 +48,7 @@ postProcedure(
String instruction,
PrescriptionViewModel model,
DateTime doseTime,
String doseUnit,
PatiantInformtion patient}) async {
PostPrescriptionReqModel postProcedureReqModel =
new PostPrescriptionReqModel();
@ -60,9 +61,9 @@ postProcedure(
sss.add(PrescriptionRequestModel(
covered: true,
dose: 1,
dose: int.parse(dose),
itemId: drugId.isEmpty ? 1 : int.parse(drugId),
doseUnitId: 1,
doseUnitId: int.parse(doseUnit),
route: route.isEmpty ? 1 : int.parse(route),
frequency: frequency.isEmpty ? 1 : int.parse(frequency),
remarks: instruction,
@ -116,6 +117,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic duration;
dynamic doseTime;
dynamic indication;
dynamic units;
List<dynamic> strengthList;
List<dynamic> routeList;
@ -123,6 +125,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
List<dynamic> durationList;
List<dynamic> doseTimeList;
List<dynamic> indicationList;
List<dynamic> unitsList;
String routeInatial = 'By Mouth';
//PatiantInformtion patient;
@ -137,12 +140,22 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
durationList = List();
doseTimeList = List();
indicationList = List();
unitsList = List();
dynamic unit1 = {"id": 1, "name": "MG"};
dynamic unit2 = {"id": 2, "name": "MCG"};
dynamic unit3 = {"id": 3, "name": "GM"};
dynamic regularOrder = {"id": 1, "name": "regular Order"};
dynamic urgentOrder = {"id": 2, "name": "urgent Order"};
dynamic strength1 = {"id": 1, "name": "1"};
dynamic strength2 = {"id": 2, "name": "2"};
dynamic strength3 = {"id": 3, "name": "3"};
dynamic strength4 = {"id": 4, "name": "4"};
dynamic strength5 = {"id": 5, "name": "5"};
dynamic strength6 = {"id": 6, "name": "6"};
dynamic strength7 = {"id": 7, "name": "7"};
dynamic strength8 = {"id": 8, "name": "8"};
dynamic strength9 = {"id": 9, "name": "9"};
dynamic route1 = {"id": 7, "name": "By Mouth"};
dynamic route2 = {"id": 10, "name": "Inhale by Mouth"};
dynamic route3 = {"id": 15, "name": "for INJECTION"};
@ -171,6 +184,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic duration9 = {"id": 9, "name": "For 9 Days"};
dynamic duration10 = {"id": 10, "name": "For 10 Days"};
dynamic duration11 = {"id": 14, "name": "For 14 Days"};
dynamic duration12 = {"id": 21, "name": "For 21 Days"};
dynamic duration13 = {"id": 30, "name": "For 30 Days"};
dynamic duration14 = {"id": 45, "name": "For 45 Days"};
dynamic duration15 = {"id": 60, "name": "For 60 Days"};
dynamic duration16 = {"id": 90, "name": "For 90 Days"};
dynamic doseTime1 = {"id": 1, "name": "Before Meals"};
dynamic doseTime2 = {"id": 2, "name": "After Meals"};
dynamic doseTime3 = {"id": 3, "name": "With Meals"};
@ -197,6 +215,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic indication9 = {"id": 554, "name": "Purpuric Dermatitis"};
dynamic indication10 = {"id": 555, "name": "Systemic Lupus Erythematosus"};
unitsList.add(unit1);
unitsList.add(unit2);
unitsList.add(unit3);
indicationList.add(indication1);
indicationList.add(indication2);
indicationList.add(indication3);
@ -240,6 +261,12 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
strengthList.add(strength1);
strengthList.add(strength2);
strengthList.add(strength3);
strengthList.add(strength4);
strengthList.add(strength5);
strengthList.add(strength6);
strengthList.add(strength7);
strengthList.add(strength8);
strengthList.add(strength9);
durationList.add(duration1);
durationList.add(duration2);
durationList.add(duration3);
@ -251,6 +278,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
durationList.add(duration9);
durationList.add(duration10);
durationList.add(duration11);
durationList.add(duration12);
durationList.add(duration13);
durationList.add(duration14);
durationList.add(duration15);
durationList.add(duration16);
referToList.add(regularOrder);
referToList.add(urgentOrder);
}
@ -417,41 +449,103 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
SizedBox(height: spaceBetweenTextFileds),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: strengthList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: strengthList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
strength = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).strength,
strength != null
? strength['name']
width: double.infinity,
child: Row(
children: [
Container(
width:
MediaQuery.of(context).size.width *
0.5,
child: InkWell(
onTap: strengthList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: strengthList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
strength =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
true),
enabled: false,
),
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
.strength,
strength != null
? strength['name']
: null,
true),
enabled: false,
),
),
),
SizedBox(
width: 10.0,
),
Container(
width:
MediaQuery.of(context).size.width *
0.40,
child: InkWell(
onTap: unitsList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: unitsList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
units = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration:
textFieldSelectorDecoration(
'UNIT Type',
units != null
? units['name']
: null,
true),
enabled: false,
),
),
),
],
),
),
SizedBox(height: spaceBetweenTextFileds),
@ -763,11 +857,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
selectDate(BuildContext context, PrescriptionViewModel model) async {
DateTime selectedDate;
selectedDate = DateTime.now().add(Duration(hours: 15));
selectedDate = DateTime.now();
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: DateTime.now().add(Duration(hours: 15)),
firstDate: DateTime.now(),
lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar,
);
@ -828,6 +922,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
title: TranslationBase.of(context).addMedication,
onPressed: () {
postProcedure(
dose: strength['id'].toString(),
doseUnit: units['id'].toString(),
patient: widget.patient,
doseTimeIn: doseTime['id'].toString(),
model: widget.model,

@ -18,6 +18,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/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -28,10 +29,86 @@ class NewPrescriptionScreen extends StatefulWidget {
}
class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
PersistentBottomSheetController _controller;
final _scaffoldKey = GlobalKey<ScaffoldState>();
int testNum = 0;
PatiantInformtion patient;
dynamic route;
dynamic doseTime;
dynamic frequencyUpdate;
List<dynamic> doseTimeList;
List<dynamic> routeList;
List<dynamic> frequencyList;
@override
void initState() {
super.initState();
routeList = List();
doseTimeList = List();
frequencyList = List();
dynamic frequency1 = {"id": 1, "name": "2 Times a day"};
dynamic frequency2 = {"id": 2, "name": "3 Times a day"};
dynamic frequency3 = {"id": 3, "name": "4 Times a day"};
dynamic frequency4 = {"id": 8, "name": "As Needed"};
dynamic frequency5 = {"id": 9, "name": "Bed Time"};
dynamic frequency6 = {"id": 11, "name": "Every Other Day"};
dynamic frequency7 = {"id": 29, "name": "Every Eight Hours"};
dynamic frequency8 = {"id": 34, "name": "As Directed"};
dynamic doseTime1 = {"id": 1, "name": "Before Meals"};
dynamic doseTime2 = {"id": 2, "name": "After Meals"};
dynamic doseTime3 = {"id": 3, "name": "With Meals"};
dynamic doseTime4 = {"id": 4, "name": "In The Morning"};
dynamic doseTime5 = {"id": 5, "name": "In the Evening"};
dynamic doseTime6 = {"id": 6, "name": "After Supper"};
dynamic doseTime7 = {"id": 7, "name": "With Supper"};
dynamic doseTime8 = {"id": 8, "name": "Before Breakfast"};
dynamic doseTime9 = {"id": 9, "name": "In the Afternoon"};
dynamic doseTime10 = {"id": 10, "name": "While wake"};
dynamic doseTime11 = {"id": 12, "name": "Any Time"};
dynamic doseTime12 = {"id": 21, "name": "Bed Time"};
dynamic route1 = {"id": 7, "name": "By Mouth"};
dynamic route2 = {"id": 10, "name": "Inhale by Mouth"};
dynamic route3 = {"id": 15, "name": "for INJECTION"};
dynamic route4 = {"id": 17, "name": "Drops"};
dynamic route5 = {"id": 18, "name": "Rub On"};
dynamic route6 = {"id": 20, "name": "Spary"};
dynamic route7 = {"id": 27, "name": "In Both EYES"};
dynamic route8 = {"id": 28, "name": "In Both Ears"};
dynamic route9 = {"id": 32, "name": "Intramuscular"};
frequencyList.add(frequency1);
frequencyList.add(frequency2);
frequencyList.add(frequency3);
frequencyList.add(frequency4);
frequencyList.add(frequency5);
frequencyList.add(frequency6);
frequencyList.add(frequency7);
frequencyList.add(frequency8);
doseTimeList.add(doseTime1);
doseTimeList.add(doseTime2);
doseTimeList.add(doseTime3);
doseTimeList.add(doseTime4);
doseTimeList.add(doseTime5);
doseTimeList.add(doseTime6);
doseTimeList.add(doseTime7);
doseTimeList.add(doseTime8);
doseTimeList.add(doseTime9);
doseTimeList.add(doseTime10);
doseTimeList.add(doseTime11);
doseTimeList.add(doseTime12);
routeList.add(route1);
routeList.add(route2);
routeList.add(route3);
routeList.add(route4);
routeList.add(route5);
routeList.add(route6);
routeList.add(route7);
routeList.add(route8);
routeList.add(route9);
}
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -459,6 +536,15 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
.edit),
onTap: () {
updatePrescriptionForm(
doseUnit:
model.prescriptionList[0].entityList[index].doseDailyUnitID
.toString(),
doseStreangth:
model.prescriptionList[0].entityList[index].doseDailyQuantity
.toString(),
duration:
model.prescriptionList[0].entityList[index].doseDurationDays
.toString(),
startDate:
model.prescriptionList[0].entityList[index].startDate
.toString(),
@ -469,9 +555,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
index]
.doseTimingID
.toString(),
frequency:
model.prescriptionList[0].entityList[index].frequencyID
.toString(),
frequency: model
.prescriptionList[
0]
.entityList[
index]
.frequencyID
.toString(),
rouat: model
.prescriptionList[
0]
@ -482,22 +572,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
patient:
patient,
drugId: model
.prescriptionList[
0]
.entityList[
index]
.medicineCode,
drugName: model
.prescriptionList[
0]
.entityList[
index]
.doseDetail,
remarks: model
.prescriptionList[0]
.entityList[index]
.remarks,
.medicineCode,
drugName: model.prescriptionList[0].entityList[index].doseDetail,
remarks: model.prescriptionList[0].entityList[index].remarks,
model: model,
enteredRemarks: model.prescriptionList[0].entityList[index].remarks,
context: context);
//model.postPrescription();
},
@ -603,6 +684,10 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
String rouat,
String frequency,
String dose,
String duration,
String doseStreangth,
String doseUnit,
String enteredRemarks,
String startDate}) {
TextEditingController remarksController = TextEditingController();
TextEditingController doseController = TextEditingController();
@ -611,122 +696,213 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: MediaQuery.of(context).size.height * 0.73,
child: Form(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
drugName.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 30.0,
),
Column(
children: [
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'route',
controller: routeController,
keyboardType: TextInputType.number,
builder: (BuildContext context) {
return StatefulBuilder(builder: (BuildContext context,
StateSetter setState /*You can rename this!*/) {
return Container(
height: MediaQuery.of(context).size.height * 0.73,
child: Form(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
drugName.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 30.0,
),
Column(
children: [
Container(
height:
MediaQuery.of(context).size.height * 0.070,
child: InkWell(
onTap: routeList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: routeList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
route = selectedValue;
});
if (route == null) {
helpers
.showErrorToast('plase fill');
}
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).route,
route != null ? route['name'] : null,
true),
enabled: false,
),
),
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Dose Time',
controller: doseController,
keyboardType: TextInputType.number,
SizedBox(
height: 12.0,
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Frequency',
controller: frequencyController,
keyboardType: TextInputType.number,
Container(
height:
MediaQuery.of(context).size.height * 0.070,
child: InkWell(
onTap: doseTimeList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: doseTimeList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
doseTime = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).doseTime,
doseTime != null
? doseTime['name']
: null,
true),
enabled: false,
),
),
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: remarks,
controller: remarksController,
maxLines: 7,
minLines: 4,
SizedBox(
height: 12.0,
),
),
SizedBox(
height: 12.0,
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.12,
),
Container(
margin:
EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'update prescription'.toUpperCase(),
onPressed: () {
updatePrescription(
startDate: startDate,
doseId: dose,
frequencyId: frequency,
routeId: rouat,
patient: patient,
model: model,
drugId: drugId,
remarks: remarksController.text,
route: routeController.text,
frequency: frequencyController.text,
dose: doseController.text);
Navigator.pop(context);
},
Container(
height:
MediaQuery.of(context).size.height * 0.070,
child: InkWell(
onTap: frequencyList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: frequencyList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
frequencyUpdate = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).frequency,
frequencyUpdate != null
? frequencyUpdate['name']
: null,
true),
enabled: false,
),
],
),
),
),
],
),
],
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: remarks,
controller: remarksController,
maxLines: 7,
minLines: 4,
),
),
SizedBox(
height: 12.0,
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.12,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'update prescription'.toUpperCase(),
onPressed: () {
updatePrescription(
doseUnit: doseUnit,
doseStreangth: doseStreangth,
duration: duration,
startDate: startDate,
doseId: dose,
frequencyId: frequency,
routeId: rouat,
patient: patient,
model: model,
drugId: drugId,
remarks: remarksController.text,
route: route['id'].toString(),
frequency:
frequencyUpdate['id'].toString(),
dose: doseTime['id'].toString(),
enteredRemarks: enteredRemarks);
Navigator.pop(context);
},
),
],
),
),
],
),
],
),
),
),
));
));
});
});
}
@ -741,6 +917,10 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
String route,
String routeId,
String startDate,
String doseUnit,
String doseStreangth,
String duration,
String enteredRemarks,
PatiantInformtion patient}) async {
//PrescriptionViewModel model = PrescriptionViewModel();
PostPrescriptionReqModel updatePrescriptionReqModel =
@ -754,18 +934,19 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
sss.add(PrescriptionRequestModel(
covered: true,
dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1,
dose: int.parse(
doseStreangth), //frequency.isNotEmpty ? int.parse(dose) : 1,
itemId: drugId,
doseUnitId: 2,
doseUnitId: int.parse(doseUnit),
route: route.isNotEmpty ? int.parse(route) : int.parse(routeId),
frequency: frequency.isNotEmpty
? int.parse(frequency)
: int.parse(frequencyId),
remarks: remarks.isEmpty ? '' : remarks,
remarks: remarks.isEmpty ? enteredRemarks : remarks,
approvalRequired: true,
icdcode10Id: "test2",
doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId),
duration: 2,
duration: int.parse(duration),
doseStartDate: startDate));
updatePrescriptionReqModel.prescriptionRequestModel = sss;
//postProcedureReqModel.procedures = controlsProcedure;
@ -779,4 +960,36 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
DrAppToastMsg.showSuccesToast('Medication has been updated');
}
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.arrow_drop_down,
color: Colors.black,
)
: null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
}

@ -646,8 +646,7 @@ postProcedure(
postProcedureReqModel.patientMRN = patient.patientMRN;
controls.add(
Controls(
code: remarks.isEmpty ? 'ssss' : remarks, controlValue: 'sssssssss'),
Controls(code: remarks.isEmpty ? '' : remarks, controlValue: 'test'),
);
entityList.forEach((element) {

@ -60,7 +60,7 @@ class DateUtils {
var difference = now.difference(firstDate);
int minutesInDays = difference.inMinutes;
int hoursInDays = minutesInDays ~/ 60;
int hoursInDays = minutesInDays ~/ 60; // ~/ : truncating division to make the result int
int minutes = minutesInDays % 60;
int days = hoursInDays ~/ 24;
int hours = hoursInDays % 24;

@ -25,6 +25,7 @@ class TranslationBase {
String get lanArabic => localizedValues['lanArabic'][locale.languageCode];
String get theDoctor => localizedValues['theDoctor'][locale.languageCode];
String get reply => localizedValues['reply'][locale.languageCode];
String get time => localizedValues['time'][locale.languageCode];
@ -45,223 +46,380 @@ class TranslationBase {
localizedValues['errorNoSchedule'][locale.languageCode];
String get verify => localizedValues['verify'][locale.languageCode];
String get referralDoctor =>
localizedValues['referralDoctor'][locale.languageCode];
String get referringClinic =>
localizedValues['referringClinic'][locale.languageCode];
String get frequency => localizedValues['frequency'][locale.languageCode];
String get priority => localizedValues['priority'][locale.languageCode];
String get maxResponseTime =>
localizedValues['maxResponseTime'][locale.languageCode];
String get clinicDetailsandRemarks =>
localizedValues['clinicDetailsandRemarks'][locale.languageCode];
String get answerSuggestions =>
localizedValues['answerSuggestions'][locale.languageCode];
String get outPatients => localizedValues['outPatients'][locale.languageCode];
String get searchPatient =>
localizedValues['searchPatient'][locale.languageCode];
String get searchAbout => localizedValues['searchAbout'][locale.languageCode];
String get patient => localizedValues['patient'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode];
String get todayStatistics =>
localizedValues['todayStatistics'][locale.languageCode];
String get familyMedicine =>
localizedValues['familyMedicine'][locale.languageCode];
String get arrived => localizedValues['arrived'][locale.languageCode];
String get er => localizedValues['er'][locale.languageCode];
String get walkIn => localizedValues['walkIn'][locale.languageCode];
String get notArrived => localizedValues['notArrived'][locale.languageCode];
String get radiology => localizedValues['radiology'][locale.languageCode];
String get service => localizedValues['service'][locale.languageCode];
String get referral => localizedValues['referral'][locale.languageCode];
String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get operations => localizedValues['operations'][locale.languageCode];
String get patientServices =>
localizedValues['patientServices'][locale.languageCode];
String get searchMedicine =>
localizedValues['searchMedicine'][locale.languageCode];
String get myReferralPatient =>
localizedValues['myReferralPatient'][locale.languageCode];
String get referPatient =>
localizedValues['referPatient'][locale.languageCode];
String get myReferral => localizedValues['myReferral'][locale.languageCode];
String get myReferredPatient =>
localizedValues['myReferredPatient'][locale.languageCode];
String get firstName => localizedValues['firstName'][locale.languageCode];
String get middleName => localizedValues['middleName'][locale.languageCode];
String get lastName => localizedValues['lastName'][locale.languageCode];
String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode];
String get patientID => localizedValues['patientID'][locale.languageCode];
String get patientFile => localizedValues['patientFile'][locale.languageCode];
String get search => localizedValues['search'][locale.languageCode];
String get onlyArrivedPatient =>
localizedValues['onlyArrivedPatient'][locale.languageCode];
String get searchMedicineNameHere =>
localizedValues['searchMedicineNameHere'][locale.languageCode];
String get youCanFind => localizedValues['youCanFind'][locale.languageCode];
String get itemsInSearch =>
localizedValues['itemsInSearch'][locale.languageCode];
String get qr => localizedValues['qr'][locale.languageCode];
String get reader => localizedValues['reader'][locale.languageCode];
String get startScanning =>
localizedValues['startScanning'][locale.languageCode];
String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode];
String get scanQr => localizedValues['scanQr'][locale.languageCode];
String get profile => localizedValues['profile'][locale.languageCode];
String get gender => localizedValues['gender'][locale.languageCode];
String get clinic => localizedValues['clinic'][locale.languageCode];
String get clinicSelect =>
localizedValues['clinicSelect'][locale.languageCode];
String get doctorSelect =>
localizedValues['doctorSelect'][locale.languageCode];
String get hospital => localizedValues['hospital'][locale.languageCode];
String get speciality => localizedValues['speciality'][locale.languageCode];
String get errorMessage =>
localizedValues['errorMessage'][locale.languageCode];
String get patientProfile =>
localizedValues['patientProfile'][locale.languageCode];
String get vitalSign => localizedValues['vitalSign'][locale.languageCode];
String get vital => localizedValues['vital'][locale.languageCode];
String get signs => localizedValues['signs'][locale.languageCode];
String get labOrder => localizedValues['labOrder'][locale.languageCode];
String get lab => localizedValues['lab'][locale.languageCode];
String get result => localizedValues['result'][locale.languageCode];
String get medicines => localizedValues['medicines'][locale.languageCode];
String get prescription =>
localizedValues['prescription'][locale.languageCode];
String get insuranceApprovals =>
localizedValues['insuranceApprovals'][locale.languageCode];
String get insurance => localizedValues['insurance'][locale.languageCode];
String get approvals => localizedValues['approvals'][locale.languageCode];
String get bodyMeasurements =>
localizedValues['bodyMeasurements'][locale.languageCode];
String get temperature => localizedValues['temperature'][locale.languageCode];
String get pulse => localizedValues['pulse'][locale.languageCode];
String get respiration => localizedValues['respiration'][locale.languageCode];
String get bloodPressure =>
localizedValues['bloodPressure'][locale.languageCode];
String get oxygenation => localizedValues['oxygenation'][locale.languageCode];
String get painScale => localizedValues['painScale'][locale.languageCode];
String get errorNoVitalSign =>
localizedValues['errorNoVitalSign'][locale.languageCode];
String get labOrders => localizedValues['labOrders'][locale.languageCode];
String get errorNoLabOrders =>
localizedValues['errorNoLabOrders'][locale.languageCode];
String get answerThePatient =>
localizedValues['answerThePatient'][locale.languageCode];
String get pleaseEnterAnswer =>
localizedValues['pleaseEnterAnswer'][locale.languageCode];
String get replay => localizedValues['replay'][locale.languageCode];
String get progressNote =>
localizedValues['progressNote'][locale.languageCode];
String get progress => localizedValues['progress'][locale.languageCode];
String get note => localizedValues['note'][locale.languageCode];
String get searchNote => localizedValues['searchNote'][locale.languageCode];
String get errorNoProgressNote =>
localizedValues['errorNoProgressNote'][locale.languageCode];
String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode];
String get generalResult =>
localizedValues['generalResult'][locale.languageCode];
String get description => localizedValues['description'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode];
String get enterId => localizedValues['enterId'][locale.languageCode];
String get pleaseEnterYourID =>
localizedValues['pleaseEnterYourID'][locale.languageCode];
String get enterPassword =>
localizedValues['enterPassword'][locale.languageCode];
String get pleaseEnterPassword =>
localizedValues['pleaseEnterPassword'][locale.languageCode];
String get selectYourProject =>
localizedValues['selectYourProject'][locale.languageCode];
String get pleaseEnterYourProject =>
localizedValues['pleaseEnterYourProject'][locale.languageCode];
String get login => localizedValues['login'][locale.languageCode];
String get drSulaimanAlHabib =>
localizedValues['drSulaimanAlHabib'][locale.languageCode];
String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode];
String get welcomeBackTo =>
localizedValues['welcomeBackTo'][locale.languageCode];
String get home => localizedValues['home'][locale.languageCode];
String get services => localizedValues['services'][locale.languageCode];
String get sms => localizedValues['sms'][locale.languageCode];
String get fingerprint => localizedValues['fingerprint'][locale.languageCode];
String get faceId => localizedValues['faceId'][locale.languageCode];
String get whatsApp => localizedValues['whatsApp'][locale.languageCode];
String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode];
String get pleaseChoose =>
localizedValues['pleaseChoose'][locale.languageCode];
String get choose => localizedValues['choose'][locale.languageCode];
String get verification =>
localizedValues['verification'][locale.languageCode];
String get firstStep => localizedValues['firstStep'][locale.languageCode];
String get yourAccount =>
localizedValues['yourAccount!'][locale.languageCode];
String get verify1 => localizedValues['verify1'][locale.languageCode];
String get youWillReceiveA =>
localizedValues['youWillReceiveA'][locale.languageCode];
String get loginCode => localizedValues['loginCode'][locale.languageCode];
String get smsBy => localizedValues['smsBy'][locale.languageCode];
String get pleaseEnterTheCode =>
localizedValues['pleaseEnterTheCode'][locale.languageCode];
String get youDontHaveAnyPatient =>
localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode];
String get youDoNotHaveAnyItem =>
localizedValues['youDoNotHaveAnyItem'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode];
String get nationality => localizedValues['nationality'][locale.languageCode];
String get today => localizedValues['today'][locale.languageCode];
String get tomorrow => localizedValues['tomorrow'][locale.languageCode];
String get all => localizedValues['all'][locale.languageCode];
String get nextWeek => localizedValues['nextWeek'][locale.languageCode];
String get yesterday => localizedValues['yesterday'][locale.languageCode];
String get errorNoInsuranceApprovals =>
localizedValues['errorNoInsuranceApprovals'][locale.languageCode];
String get searchInsuranceApprovals =>
localizedValues['searchInsuranceApprovals'][locale.languageCode];
String get status => localizedValues['status'][locale.languageCode];
String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
String get producerName =>
localizedValues['producerName'][locale.languageCode];
String get receiptOn => localizedValues['receiptOn'][locale.languageCode];
String get approvalNo => localizedValues['approvalNo'][locale.languageCode];
String get doctor => localizedValues['doctor'][locale.languageCode];
String get ext => localizedValues['ext'][locale.languageCode];
String get veryUrgent => localizedValues['veryUrgent'][locale.languageCode];
String get urgent => localizedValues['urgent'][locale.languageCode];
String get routine => localizedValues['routine'][locale.languageCode];
String get send => localizedValues['send'][locale.languageCode];
String get referralFrequency =>
localizedValues['referralFrequency'][locale.languageCode];
String get selectReferralFrequency =>
localizedValues['selectReferralFrequency'][locale.languageCode];
String get clinicalDetailsAndRemarks =>
localizedValues['clinicalDetailsAndRemarks'][locale.languageCode];
String get remarks => localizedValues['remarks'][locale.languageCode];
String get pleaseFill => localizedValues['pleaseFill'][locale.languageCode];
String get replay2 => localizedValues['replay2'][locale.languageCode];
String get outPatient => localizedValues['outPatient'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode];
String get pharmaciesList =>
localizedValues['pharmaciesList'][locale.languageCode];
String get price => localizedValues['price'][locale.languageCode];
String get youCanFindItIn =>
localizedValues['youCanFindItIn'][locale.languageCode];
String get radiologyReport =>
localizedValues['radiologyReport'][locale.languageCode];
String get orders => localizedValues['orders'][locale.languageCode];
String get list => localizedValues['list'][locale.languageCode];
String get searchOrders =>
localizedValues['searchOrders'][locale.languageCode];
String get prescriptionDetails =>
localizedValues['prescriptionDetails'][locale.languageCode];
String get prescriptionInfo =>
localizedValues['prescriptionInfo'][locale.languageCode];
String get errorNoOrders =>
localizedValues['errorNoOrders'][locale.languageCode];
String get livecare => localizedValues['livecare'][locale.languageCode];
String get beingBad => localizedValues['beingBad'][locale.languageCode];
String get beingGreat => localizedValues['beingGreat'][locale.languageCode];
String get cancel => localizedValues['cancel'][locale.languageCode];
@ -300,58 +458,94 @@ class TranslationBase {
localizedValues['searchPatientImageCaptionBody'][locale.languageCode];
String get welcome => localizedValues['welcome'][locale.languageCode];
String get typeMedicineName =>
localizedValues['typeMedicineName'][locale.languageCode];
String get moreThan3Letter =>
localizedValues['moreThan3Letter'][locale.languageCode];
String get gender2 => localizedValues['gender2'][locale.languageCode];
String get age2 => localizedValues['age2'][locale.languageCode];
String get sickleave => localizedValues['sick-leaves'][locale.languageCode];
String get patientSick =>
localizedValues['patient-sick'][locale.languageCode];
String get leave => localizedValues['leave'][locale.languageCode];
String get submit => localizedValues['submit'][locale.languageCode];
String get doctorName => localizedValues['doc-name'][locale.languageCode];
String get clinicName => localizedValues['clinicname'][locale.languageCode];
String get sickLeaveDate =>
localizedValues['sick-leave-date'][locale.languageCode];
String get sickLeaveDays =>
localizedValues['sick-leave-days'][locale.languageCode];
String get admissionDetail =>
localizedValues['admissionDetail'][locale.languageCode];
String get dateTime => localizedValues['dateTime'][locale.languageCode];
String get date => localizedValues['date'][locale.languageCode];
String get admissionNo => localizedValues['admissionNo'][locale.languageCode];
String get losNo => localizedValues['losNo'][locale.languageCode];
String get area => localizedValues['area'][locale.languageCode];
String get room => localizedValues['room'][locale.languageCode];
String get bed => localizedValues['bed'][locale.languageCode];
String get previousSickLeaveIssue =>
localizedValues['prevoius-sickleave-issed'][locale.languageCode];
String get noSickLeaveApplied =>
localizedValues['no-sickleve-applied'][locale.languageCode];
String get applyNow => localizedValues['applynow'][locale.languageCode];
String get addSickLeave =>
localizedValues['add-sickleave'][locale.languageCode];
String get add => localizedValues['add'][locale.languageCode];
String get approved => localizedValues['approved'][locale.languageCode];
String get extended => localizedValues['extended'][locale.languageCode];
String get pending => localizedValues['pending'][locale.languageCode];
String get leaveStartDate =>
localizedValues['leave-start-date'][locale.languageCode];
String get daysSickleave =>
localizedValues['days-sick-leave'][locale.languageCode];
String get extend => localizedValues['extend'][locale.languageCode];
String get extendSickLeave =>
localizedValues['extend-sickleave'][locale.languageCode];
String get targetPatient =>
localizedValues['patient-target'][locale.languageCode];
String get noPrescription =>
localizedValues['no-priscription-listed'][locale.languageCode];
String get next => localizedValues['next'][locale.languageCode];
String get emptyMessage =>
localizedValues['empty-message'][locale.languageCode];
String get healthRecordInformation =>
localizedValues['healthRecordInformation'][locale.languageCode];
@ -359,202 +553,325 @@ class TranslationBase {
localizedValues['chiefComplaintLength'][locale.languageCode];
String get referTo => localizedValues['referTo'][locale.languageCode];
String get referredFrom =>
localizedValues['referredFrom'][locale.languageCode];
String get branch => localizedValues['branch'][locale.languageCode];
String get chooseAppointment =>
localizedValues['chooseAppointment'][locale.languageCode];
String get appointmentNo =>
localizedValues['appointmentNo'][locale.languageCode];
String get refer => localizedValues['refer'][locale.languageCode];
String get rejected => localizedValues['rejected'][locale.languageCode];
String get sameBranch => localizedValues['sameBranch'][locale.languageCode];
String get otherBranch => localizedValues['otherBranch'][locale.languageCode];
String get dr => localizedValues['dr'][locale.languageCode];
String get previewHealth =>
localizedValues['previewHealth'][locale.languageCode];
String get summaryReport =>
localizedValues['summaryReport'][locale.languageCode];
String get accept => localizedValues['accept'][locale.languageCode];
String get reject => localizedValues['reject'][locale.languageCode];
String get noAppointmentsErrorMsg =>
localizedValues['noAppointmentsErrorMsg'][locale.languageCode];
String get referralPatient =>
localizedValues['referralPatient'][locale.languageCode];
String get noPrescriptionListed =>
localizedValues['noPrescriptionListed'][locale.languageCode];
String get addNow => localizedValues['addNow'][locale.languageCode];
String get orderType => localizedValues['orderType'][locale.languageCode];
String get strength => localizedValues['strength'][locale.languageCode];
String get doseTime => localizedValues['doseTime'][locale.languageCode];
String get indication => localizedValues['indication'][locale.languageCode];
String get duration => localizedValues['duration'][locale.languageCode];
String get instruction => localizedValues['instruction'][locale.languageCode];
String get rescheduleLeaves =>
localizedValues['reschedule-leave'][locale.languageCode];
String get addMedication =>
localizedValues['addMedication'][locale.languageCode];
String get route => localizedValues['route'][locale.languageCode];
String get noReScheduleLeave =>
localizedValues['no-reschedule-leave'][locale.languageCode];
String get weight => localizedValues['weight'][locale.languageCode];
String get kg => localizedValues['kg'][locale.languageCode];
String get height => localizedValues['height'][locale.languageCode];
String get cm => localizedValues['cm'][locale.languageCode];
String get idealBodyWeight =>
localizedValues['idealBodyWeight'][locale.languageCode];
String get waistSize => localizedValues['waistSize'][locale.languageCode];
String get inch => localizedValues['inch'][locale.languageCode];
String get headCircum => localizedValues['headCircum'][locale.languageCode];
String get leanBodyWeight =>
localizedValues['leanBodyWeight'][locale.languageCode];
String get bodyMassIndex =>
localizedValues['bodyMassIndex'][locale.languageCode];
String get method => localizedValues['method'][locale.languageCode];
String get pulseBeats => localizedValues['pulseBeats'][locale.languageCode];
String get rhythm => localizedValues['rhythm'][locale.languageCode];
String get respBeats => localizedValues['respBeats'][locale.languageCode];
String get patternOfRespiration =>
localizedValues['patternOfRespiration'][locale.languageCode];
String get bloodPressureDiastoleAndSystole =>
localizedValues['bloodPressureDiastoleAndSystole'][locale.languageCode];
String get cuffLocation =>
localizedValues['cuffLocation'][locale.languageCode];
String get cuffSize => localizedValues['cuffSize'][locale.languageCode];
String get patientPosition =>
localizedValues['patientPosition'][locale.languageCode];
String get fio2 => localizedValues['fio2'][locale.languageCode];
String get sao2 => localizedValues['sao2'][locale.languageCode];
String get painManagement =>
localizedValues['painManagement'][locale.languageCode];
String get holiday => localizedValues['holiday'][locale.languageCode];
String get to => localizedValues['to'][locale.languageCode];
String get coveringDoctor =>
localizedValues['coveringDoctor'][locale.languageCode];
String get requestLeave =>
localizedValues['requestLeave'][locale.languageCode];
String get pleaseEnterDate =>
localizedValues['pleaseEnterDate'][locale.languageCode];
String get pleaseEnterNoOfDays =>
localizedValues['pleaseEnterNoOfDays'][locale.languageCode];
String get pleaseEnterRemarks =>
localizedValues['pleaseEnterRemarks'][locale.languageCode];
String get update => localizedValues['update'][locale.languageCode];
String get admission => localizedValues['admission'][locale.languageCode];
String get request => localizedValues['request'][locale.languageCode];
String get admissionRequest =>
localizedValues['admissionRequest'][locale.languageCode];
String get patientDetails =>
localizedValues['patientDetails'][locale.languageCode];
String get specialityAndDoctorDetail =>
localizedValues['specialityAndDoctorDetail'][locale.languageCode];
String get referringDate =>
localizedValues['referringDate'][locale.languageCode];
String get referringDoctor =>
localizedValues['referringDoctor'][locale.languageCode];
String get otherInformation =>
localizedValues['otherInformation'][locale.languageCode];
String get expectedDays =>
localizedValues['expectedDays'][locale.languageCode];
String get expectedAdmissionDate =>
localizedValues['expectedAdmissionDate'][locale.languageCode];
String get emergencyAdmission =>
localizedValues['emergencyAdmission'][locale.languageCode];
String get patientPregnant =>
localizedValues['patientPregnant'][locale.languageCode];
String get treatmentLine =>
localizedValues['treatmentLine'][locale.languageCode];
String get ward => localizedValues['ward'][locale.languageCode];
String get preAnesthesiaReferred =>
localizedValues['preAnesthesiaReferred'][locale.languageCode];
String get admissionType =>
localizedValues['admissionType'][locale.languageCode];
String get diagnosis => localizedValues['diagnosis'][locale.languageCode];
String get allergies => localizedValues['allergies'][locale.languageCode];
String get preOperativeOrders =>
localizedValues['preOperativeOrders'][locale.languageCode];
String get elementForImprovement =>
localizedValues['elementForImprovement'][locale.languageCode];
String get dischargeDate =>
localizedValues['dischargeDate'][locale.languageCode];
String get dietType => localizedValues['dietType'][locale.languageCode];
String get dietTypeRemarks =>
localizedValues['dietTypeRemarks'][locale.languageCode];
String get save => localizedValues['save'][locale.languageCode];
String get postPlansEstimatedCost =>
localizedValues['postPlansEstimatedCost'][locale.languageCode];
String get ucaf => localizedValues['ucaf'][locale.languageCode];
String get emergencyCase =>
localizedValues['emergencyCase'][locale.languageCode];
String get durationOfIllness =>
localizedValues['durationOfIllness'][locale.languageCode];
String get chiefComplaintsAndSymptoms =>
localizedValues['chiefComplaintsAndSymptoms'][locale.languageCode];
String get patientFeelsPainInHisBackAndCough =>
localizedValues['patientFeelsPainInHisBackAndCough'][locale.languageCode];
String get additionalTextComplaints =>
localizedValues['additionalTextComplaints'][locale.languageCode];
String get otherConditions =>
localizedValues['otherConditions'][locale.languageCode];
String get other => localizedValues['other'][locale.languageCode];
String get how => localizedValues['how'][locale.languageCode];
String get when => localizedValues['when'][locale.languageCode];
String get where => localizedValues['where'][locale.languageCode];
String get specifyPossibleLineManagement =>
localizedValues['specifyPossibleLineManagement'][locale.languageCode];
String get significantSigns =>
localizedValues['significantSigns'][locale.languageCode];
String get backAbdomen => localizedValues['backAbdomen'][locale.languageCode];
String get reasons => localizedValues['reasons'][locale.languageCode];
String get createNew => localizedValues['createNew'][locale.languageCode];
String get episode => localizedValues['episode'][locale.languageCode];
String get medications => localizedValues['medications'][locale.languageCode];
String get procedures => localizedValues['procedures'][locale.languageCode];
String get chiefComplaints =>
localizedValues['chiefComplaints'][locale.languageCode];
String get histories => localizedValues['histories'][locale.languageCode];
String get allergiesSoap =>
localizedValues['allergiesSoap'][locale.languageCode];
String get addChiefComplaints =>
localizedValues['addChiefComplaints'][locale.languageCode];
String get historyOfPresentIllness =>
localizedValues['historyOfPresentIllness'][locale.languageCode];
String get requiredMsg => localizedValues['requiredMsg'][locale.languageCode];
String get addHistory => localizedValues['addHistory'][locale.languageCode];
String get searchHistory =>
localizedValues['searchHistory'][locale.languageCode];
String get addSelectedHistories =>
localizedValues['addSelectedHistories'][locale.languageCode];
String get addAllergies =>
localizedValues['addAllergies'][locale.languageCode];
String get itemExist => localizedValues['itemExist'][locale.languageCode];
String get selectAllergy =>
localizedValues['selectAllergy'][locale.languageCode];
String get selectSeverity =>
localizedValues['selectSeverity'][locale.languageCode];
String get leaveCreated =>
localizedValues['leaveCreated'][locale.languageCode];
String get vitalSignEmptyMsg =>
localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg =>
localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg =>
localizedValues['referralSuccessMsg'][locale.languageCode];
String get diagnoseType =>
localizedValues['diagnoseType'][locale.languageCode];
String get condition => localizedValues['condition'][locale.languageCode];
String get id => localizedValues['id'][locale.languageCode];
String get quantity => localizedValues['quantity'][locale.languageCode];
String get codeNo => localizedValues['codeNo'][locale.languageCode];
String get covered => localizedValues['covered'][locale.languageCode];
String get approvalRequired =>
localizedValues['approvalRequired'][locale.languageCode];
String get uncoveredByDoctor =>
localizedValues['uncoveredByDoctor'][locale.languageCode];
String get chiefComplaintEmptyMsg =>
localizedValues['chiefComplaintEmptyMsg'][locale.languageCode];
@ -594,62 +911,120 @@ class TranslationBase {
String get verifyFingerprint2 =>
localizedValues['verify-fingerprint'][locale.languageCode];
String get verificationMessage =>
localizedValues['verification_message'][locale.languageCode];
String get validationMessage =>
localizedValues['validation_message'][locale.languageCode];
String get addAssessment =>
localizedValues['addAssessment'][locale.languageCode];
String get assessment => localizedValues['assessment'][locale.languageCode];
String get physicalSystemExamination =>
localizedValues['physicalSystemExamination'][locale.languageCode];
String get searchExamination =>
localizedValues['searchExamination'][locale.languageCode];
String get addExamination =>
localizedValues['addExamination'][locale.languageCode];
String get doc => localizedValues['doc'][locale.languageCode];
String get allergicTO=> localizedValues['allergicTO'][locale.languageCode];
String get normal=> localizedValues['normal'][locale.languageCode];
String get abnormal=> localizedValues['abnormal'][locale.languageCode];
String get allergicTO => localizedValues['allergicTO'][locale.languageCode];
String get normal => localizedValues['normal'][locale.languageCode];
String get abnormal => localizedValues['abnormal'][locale.languageCode];
String get patientNoDetailErrMsg =>
localizedValues['patientNoDetailErrMsg'][locale.languageCode];
String get systolicLng =>
localizedValues['systolic-lng'][locale.languageCode];
String get diastolicLng =>
localizedValues['diastolic-lng'][locale.languageCode];
String get mass => localizedValues['mass'][locale.languageCode];
String get tempC => localizedValues['temp-c'][locale.languageCode];
String get bpm => localizedValues['bpm'][locale.languageCode];
String get respirationSigns =>
localizedValues['respiration-signs'][locale.languageCode];
String get sysDias => localizedValues['sys-dias'][locale.languageCode];
String get body => localizedValues['body'][locale.languageCode];
String get respirationRate =>
localizedValues['respirationRate'][locale.languageCode];
String get heart => localizedValues['heart'][locale.languageCode];
String get medicalReport =>
localizedValues['medicalReport'][locale.languageCode];
String get visitDate => localizedValues['visitDate'][locale.languageCode];
String get test => localizedValues['test'][locale.languageCode];
String get addMoreProcedure =>
localizedValues['addMoreProcedure'][locale.languageCode];
String get regular => localizedValues['regular'][locale.languageCode];
String get searchProcedures =>
localizedValues['searchProcedures'][locale.languageCode];
String get procedureCategorise =>
localizedValues['procedureCategorise'][locale.languageCode];
String get selectProcedures =>
localizedValues['selectProcedures'][locale.languageCode];
String get addSelectedProcedures =>
localizedValues['addSelectedProcedures'][locale.languageCode];
String get updateProcedure =>
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];
String get currentMedications =>
localizedValues['currentMedications'][locale.languageCode];
String get noItem =>
localizedValues['noItem'][locale.languageCode];
String get postUcafSuccessMsg =>
localizedValues['postUcafSuccessMsg'][locale.languageCode];
String get vitalSignDetailEmpty =>
localizedValues['vitalSignDetailEmpty'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -48,7 +48,7 @@ class PatientHeaderWidgetNoAvatar extends StatelessWidget {
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${patient.companyName}",
"${patient.companyName != null ? patient.companyName : ""}",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),

@ -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(''),
],
),
)

@ -18,6 +18,24 @@ import './profile_medical_info_widget.dart';
class PatientProfileWidget extends StatelessWidget {
PatiantInformtion patient;
String getPatientAge(dynamic birthday){
// https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now();
int years = now.year - birthDate .year;
int months = now.month - birthDate.month;
int days = now.day - birthDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$years Yr $months Mnth $days Day";
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -115,7 +133,7 @@ class PatientProfileWidget extends StatelessWidget {
height: 4,
),
AppText(
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${patient.age}",
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${getPatientAge(patient.dateofBirth)/*patient.age*/}",
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),

@ -70,7 +70,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'),
if (int.parse(patientType) == 7)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -106,7 +106,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'),
if (selectedPatientType == 7|| int.parse(patientType) == 6)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -128,7 +128,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'lab.png'),
if (selectedPatientType == 7|| int.parse(patientType) == 6)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -152,7 +152,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'),
if (selectedPatientType == 7|| int.parse(patientType) == 6)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,

@ -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();
@ -51,8 +52,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
bool isAllergiesExpand = false;
TextEditingController illnessController = TextEditingController();
TextEditingController complaintsController = TextEditingController();
TextEditingController medicationController = TextEditingController();
final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async{
getHistory(SOAPViewModel model) async {
widget.changeLoadingState(true);
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
@ -202,14 +207,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
complaintsController.text = helpers.parseHtmlString(
model.patientChiefComplaintList[0].chiefComplaint);
illnessController.text = model.patientChiefComplaintList[0].hopi;
medicationController.text = model.patientChiefComplaintList[0].currentMedication;
}
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(
@ -297,8 +306,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
controller: illnessController,
validator: (value) {
if (value == null || value == "")
return TranslationBase
.of(context)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
@ -307,8 +315,34 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox(
height: 20,
),
// TODO return it back when we need it.
// AddMedication(),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context)
.currentMedications,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: medicationController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
SizedBox(
height: 10,
),
]),
),
isExpand: isChiefExpand,
@ -463,6 +497,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
helpers.showErrorToast(model.error);
}
}
widget.changeLoadingState(true);
widget.changePageViewIndex(1);
@ -557,7 +592,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text,
currentMedication: " currentMedication ",
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,

@ -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,
),
@ -202,33 +223,35 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
SizedBox(
height: 8,
),
if(widget.patientProgressNote.createdByName !=null)
Row(
mainAxisAlignment:
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,
),
],
),
if(widget.patientProgressNote.editedByName !=null)
Row(
mainAxisAlignment:
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 +342,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
height: 16,
),
AppText(
"Add Progress Note",
TranslationBase.of(context).addProgressNote,
fontWeight: FontWeight.bold,
fontSize: 16,
),
@ -329,7 +352,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 +371,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