Merge branch 'development' into 'master'

hot fixes

See merge request Cloud_Solution/doctor_app_flutter!624
merge-requests/632/merge
Mohammad Aljammal 5 years ago
commit 361596a973

@ -38,7 +38,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.doctor_app_flutter"
applicationId "com.hmg.hmgDr"
minSdkVersion 18
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()

@ -1,41 +1,34 @@
{
"project_info": {
"project_number": "1097451043303",
"project_id": "doctor-app-35ddc",
"storage_bucket": "doctor-app-35ddc.appspot.com"
"project_number": "157373154094",
"project_id": "hmg-doctor-app-1553688619744",
"storage_bucket": "hmg-doctor-app-1553688619744.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1097451043303:android:f82ecce9562ecaad866542",
"mobilesdk_app_id": "1:157373154094:android:daeea3a4e1f4462a1bf0bf",
"android_client_info": {
"package_name": "com.example.doctor_app_flutter"
"package_name": "com.hmg.hmgDr"
}
},
"oauth_client": [
{
"client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com",
"client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyChu44P8Dp8jtRqnoDR2mdjqKgSKQq-FPY"
"current_key": "AIzaSyDX8RPwu00MyrpqC-T2zXtrUQvTQGRv1mM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com",
"client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.hmg.doctorApp"
}
}
]
}

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.doctor_app_flutter">
package="com.hmg.hmgDr">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.doctor_app_flutter">
package="com.hmg.hmgDr">
<!--
io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
@ -15,7 +15,7 @@
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="Doctors app">
android:label="HMG Doctor">
<activity android:name=".ui.VideoCallActivity"></activity>
<activity
android:name=".MainActivity"

@ -22,7 +22,7 @@ import android.widget.Toast;
import com.example.doctor_app_flutter.Model.GetSessionStatusModel;
import com.example.doctor_app_flutter.Model.SessionStatusModel;
import com.example.doctor_app_flutter.R;
import com.hmg.hmgDr.R;
import com.opentok.android.Session;
import com.opentok.android.Stream;
import com.opentok.android.Publisher;

@ -1,4 +1,4 @@
package com.example.doctor_app_flutter
package com.hmg.hmgDr
import android.app.Activity
import android.content.Intent

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.doctor_app_flutter">
package="com.hmg.hmgDr">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

@ -1,33 +1,33 @@
{
"project_info": {
"project_number": "1008895414777",
"project_id": "doctorapp-9f172",
"storage_bucket": "doctorapp-9f172.appspot.com"
"project_number": "157373154094",
"project_id": "hmg-doctor-app-1553688619744",
"storage_bucket": "hmg-doctor-app-1553688619744.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1008895414777:android:d00fe21d6955c21b1f6d28",
"mobilesdk_app_id": "1:157373154094:android:daeea3a4e1f4462a1bf0bf",
"android_client_info": {
"package_name": "com.example.doctor_app_flutter"
"package_name": "com.hmg.hmgDr"
}
},
"oauth_client": [
{
"client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com",
"client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCNncEIj8ehVUSxV89rx0x1NaWp8t1YVkw"
"current_key": "AIzaSyDX8RPwu00MyrpqC-T2zXtrUQvTQGRv1mM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com",
"client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com",
"client_type": 3
}
]

@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
</dict>
</plist>

@ -375,7 +375,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -383,12 +383,14 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp;
MARKETING_VERSION = 1.3.1;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -508,7 +510,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -516,12 +518,14 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp;
MARKETING_VERSION = 1.3.1;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -537,7 +541,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -545,12 +549,14 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp;
MARKETING_VERSION = 1.3.1;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>HMG Doctor</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -15,22 +17,35 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppleMusicUsageDescription</key>
<string>${PRODUCT_NAME} requires access to use voice command</string>
<key>NSCalendarsUsageDescription</key>
<string>This app requires calendar access to set reminders for Virtual &amp; Normal Appointments.</string>
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
<string>App requires access to camera incase you are interested to attach images to your Qr Code.</string>
<key>NSContactsUsageDescription</key>
<string>This app requires contacts access to show incoming virtual consultation request.</string>
<key>NSFaceIDUsageDescription</key>
<string>We are using it for authentication</string>
<key>NSAppleMusicUsageDescription</key>
<string>${PRODUCT_NAME} requires access to use voice command</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This App requires access to your location to show the nearest hospitals from your location.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to enable virtual consultation between patient &amp; doctor</string>
<key>NSMotionUsageDescription</key>
<string>This app requires motion detection access to function properly.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need to upload image</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -50,15 +65,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSCameraUsageDescription</key>
<string>App requires access to camera incase you are interested to attach images to your Qr Code.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need to upload image</string>
<key>NSMicrophoneUsageDescription</key>
<string>${PRODUCT_NAME} always Microphone use</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
</dict>
</plist>

@ -71,7 +71,7 @@ class BaseAppClient {
(body['ProjectID'] == 2 || body['ProjectID'] == 3)) {
body['PatientOutSA'] = true;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
print("URL : $url");
print("Body : ${json.encode(body)}");
var asd = json.encode(body);
@ -147,7 +147,7 @@ class BaseAppClient {
: SETUP_ID;
}
body['VersionID'] = 8.3;
body['VersionID'] = 5.8;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;

@ -336,7 +336,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 5.9;
const VERSION_ID = 5.8;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -384,10 +384,7 @@ const Map<String, Map<String, String>> localizedValues = {
'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'},
'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'},
'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'},
'yourBodyMassIndex': {
'en': "Body Mass Index is",
'ar': 'مؤشر كتلة الجسم هو'
},
'yourBodyMassIndex': {'en': "Body Mass Index is", 'ar': 'مؤشر كتلة الجسم هو'},
'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'},
'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'},
'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'},
@ -447,7 +444,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Is Sick Leave Required",
'ar': 'هل الإجازة المرضية مطلوبة'
},
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'حمل المريض'},
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'المريض حامل'},
'treatmentLine': {
'en': "Main line of treatment",
'ar': 'الخط الرئيسي للعلاج'
@ -870,4 +867,83 @@ const Map<String, Map<String, String>> localizedValues = {
},
"showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"},
"viewProfile": {"en": "View Profile", "ar": "إعرض الملف"},
"pleaseEnterProcedure": {
"en": "Please Enter Procedure",
"ar": "الرجاء إدخال الإجراء "
},
"fillTheMandatoryProcedureDetails": {
"en": "Fill The Mandatory Procedure Details",
"ar": "املأ تفاصيل الإجراء الإلزامي"
},
"atLeastThreeCharacters": {
"en": "At least three Characters",
"ar": "ثلاثة أحرف على الأقل "
},
"searchProcedureHere": {
"en": "Search Procedure here...",
"ar": "إجراء البحث هنا ... "
},
"noInsuranceApprovalFound": {
"en": "No Insurance Approval Found",
"ar": "لم يتم العثور على موافقة التأمين"
},
"procedure": {"en": "Procedure", "ar": "عملية"},
"stopDate": {"en": "Stop Date", "ar": "تاريخ التوقف"},
"processed": {"en": "processed", "ar": "معالجتها"},
"direction": {"en": "Direction", "ar": "إشراف"},
"refill": {"en": "Refill", "ar": "اعادة تعبئه"},
"medicationHasBeenAdded": {
"en": "Medication has been added",
"ar": "تمت إضافة الدواء"
},
"newPrescriptionOrder": {
"en": "New Prescription Order",
"ar": "طلب وصفة طبية جديد "
},
"pleaseFillAllFields": {
"en": "Please Fill All Fields",
"ar": "لو سمحت أملأ كل الحقول"
},
"narcoticMedicineCanOnlyBePrescribedFromVida": {
"en": "Narcotic medicine can only be prescribed from VIDA",
"ar": "لا يمكن وصف الأدوية المخدرة إلا من VIDA "
},
"only5DigitsAllowedForStrength": {
"en": "Only 5 Digits allowed for strength",
"ar": "يسمح فقط بـ 5 أرقام للقوة"
},
"unit": {"en": "Unit", "ar": "وحدة"},
"boxQuantity": {"en": "Box Quantity", "ar": "كمية الصندوق "},
"orderTestOr": {"en": "Order Test or", "ar": "اطلب اختبار أو"},
"applyForRadiologyOrder": {
"en": "Apply for Radiology Order",
"ar": "التقدم بطلب للحصول على طلب الأشعة "
},
"applyForNewLabOrder": {
"en": "Apply for New Lab Order",
"ar": "تقدم بطلب جديد للمختبر الأشعة"
},
"addLabOrder": {"en": "Add Lab Order", "ar": "إضافة طلب معمل"},
"addRadiologyOrder": {"en": "Add Radiology Order", "ar": "إضافة اشغة"},
"newRadiologyOrder": {"en": "New Radiology Order", "ar": "طلب الأشعة الجديد"},
"orderDate": {"en": "Order Date", "ar": "تاريخ الطلب"},
"examType": {"en": "Exam Type", "ar": "نوع الفحص"},
"health": {"en": "Health", "ar": "التقرير"},
"summary": {"en": "Summary", "ar": "الصحي"},
"applyForNewPrescriptionsOrder": {
"en": "Apply for New Prescriptions Order",
"ar": "التقدم بطلب للحصول على وصفات طبية جديدة "
},
"noPrescriptionsFound": {
"en": "No Prescriptions Found",
"ar": "لم يتم العثور على وصفات طبية"
},
"noMedicalFileFound": {
"en": "No Medical File Found",
"ar": "لم يتم العثور على ملف طبي"
},
"insurance22": {"en": "Insurance", "ar": "موافقات"},
"approvals22": {"en": "Approvals", "ar": "التامين"},
"severe": {"en": "Severe", "ar": "الشدة"},
"graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"},
};

@ -1,2 +1,6 @@
enum FilterType { Clinic, Hospital }
enum OutPatientFilterType { Previous, Today, NextWeek }

@ -163,7 +163,7 @@ class AdmissionRequestService extends LookupService {
hasError = false;
Map<String, dynamic> body = Map();
body['patientMRN'] = patientMrn;
body['PatientMRN'] = patientMrn;
await baseAppClient.post(
GET_DIET_TYPES,

@ -29,7 +29,7 @@ class PatientReferralService extends LookupService {
"LanguageID": 1,
"stamp": "2020-02-26T13:51:44.111Z",
"IPAdress": "11.11.11.11",
"VersionID": 1.2,
"VersionID": 5.8,
"Channel": 9,
"TokenID": "",
"SessionID": "i1UJwCTSqt",

@ -2,14 +2,9 @@ import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patientInPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@ -21,6 +16,9 @@ class PatientSearchViewModel extends BaseViewModel{
List<PatiantInformtion> filterData = [];
DateTime selectedFromDate;
DateTime selectedToDate;
searchData(String str) {
var strExist = str.length > 0 ? true : false;
if (strExist) {
@ -51,7 +49,8 @@ class PatientSearchViewModel extends BaseViewModel{
} else {
setState(ViewState.Busy);
}
await getDoctorProfile(isGetProfile: true);
patientSearchRequestModel.doctorID = doctorProfile.doctorID;
await _outPatientService.getOutPatient(
patientSearchRequestModel);
if (_outPatientService.hasError) {
@ -61,7 +60,6 @@ class PatientSearchViewModel extends BaseViewModel{
} else {
setState(ViewState.Error);
}
setState(ViewState.Error);
} else {
filterData = _outPatientService.patientList;
setState(ViewState.Idle);
@ -88,15 +86,20 @@ class PatientSearchViewModel extends BaseViewModel{
bool isSearchWithKeyInfo })async {
String dateTo;
String dateFrom;
if (item == 'Tomorrow') {
if (item == 'Previous') {
selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month-1,
DateTime.now().day);
selectedToDate = DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day-1);
dateTo = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
selectedToDate,
'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
selectedFromDate,
'yyyy-MM-dd');
} else if (item == 'Next Week') {
@ -127,13 +130,7 @@ class PatientSearchViewModel extends BaseViewModel{
currentModel.doctorID = patientSearchRequestModel.doctorID;
currentModel.from = dateFrom;
currentModel.to = dateTo;
if(isSearchWithKeyInfo) {
await getPatientFileInformation(currentModel);
} else {
await getOutPatient(currentModel, isLocalBusy: true);
}
await getOutPatient(currentModel, isLocalBusy: true);
filterData = _outPatientService.patientList;
}

@ -22,7 +22,17 @@ class BaseViewModel extends ChangeNotifier {
notifyListeners();
}
Future<DoctorProfileModel> getDoctorProfile() async {
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile)
{
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
if (doctorProfile != null) {
return doctorProfile;
}
}
}
if (doctorProfile == null) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
@ -35,5 +45,5 @@ class BaseViewModel extends ChangeNotifier {
} else {
return doctorProfile;
}
}
}
}

@ -13,7 +13,7 @@ class HospitalViewModel with ChangeNotifier {
"LanguageID": 1,
"stamp": "2020-02-26T13:51:44.111Z",
"IPAdress": "11.11.11.11",
"VersionID": 1.2,
"VersionID": 5.8,
"Channel": 9,
"TokenID": "",
"SessionID": "i1UJwCTSqt",

@ -23,7 +23,7 @@ class VitalSignsViewModel extends BaseViewModel {
String hartRat = "0";
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
String oxygenation = "0 - 0";
String oxygenation = "0";
String painScore = "-";
String painLocation = "-";
String painCharacter = "-";
@ -93,11 +93,11 @@ class VitalSignsViewModel extends BaseViewModel {
bloodPressure == 'null') {
bloodPressure = element.bloodPressure.toString();
}
if (oxygenation == "0 - 0" ||
if (oxygenation == "0" ||
oxygenation == null ||
oxygenation == 'null') {
oxygenation =
"${element.sAO2.toString()} - ${element.fIO2.toString()}";
"${element.sAO2.toString()}";/* - ${element.fIO2.toString()}*/
}
if (painScore == null || painScore == "-") {
painScore = element.painScore.toString() != 'null'

@ -29,7 +29,7 @@ class ProfileReqModel {
this.languageID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11',
this.versionID=1.2,
this.versionID=5.5,
this.channel=9,
this.sessionID='E2bsEeYEJo',
this.tokenID,

@ -40,7 +40,7 @@ class ClinicByProjectIdRequest {
this.languageID = 2,
this.stamp = "2020-06-03T11:18:19.979Z",
this.iPAdress = "11.11.11.11",
this.versionID = 1.2,
this.versionID = 5.5,
this.channel = 9,
this.tokenID,
this.sessionID = "JBXRsDl37L",

@ -37,7 +37,7 @@ class STPReferralFrequencyRequest {
{this.languageID = 2,
this.stamp = "2020-06-03T11:18:19.986Z",
this.iPAdress = "11.11.11.11",
this.versionID = 1.2,
this.versionID = 5.8,
this.channel = 9,
this.tokenID,
this.sessionID = "JBXRsDl37L",

@ -45,7 +45,7 @@ class InsuranceAprovalsRequest {
this.languageID = 2,
this.stamp = '2020-04-23T21:01:21.492Z',
this.ipAdress = '11.11.11.11',
this.versionID = 1.2,
this.versionID = 5.8,
this.tokenID ,
this.sessionID = 'e29zoooEJ4',
this.isLoginForDoctorApp = true,

@ -28,7 +28,7 @@ class LabOrdersReqModel {
this.tokenID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11',
this.versionID=1.2,
this.versionID=5.5,
this.channel=9,
this.sessionID='E2bsEeYEJo',
this.isLoginForDoctorApp =true,

@ -49,7 +49,7 @@ class OrdersRequest {
this.sessionID = "LlBk8lUEJY",
this.isLoginForDoctorApp = true,
this.patientTypeID = 1,
this.versionID = 1.2,
this.versionID = 5.5,
this.patientOutSA = false});
OrdersRequest.fromJson(Map<String, dynamic> json) {

@ -27,7 +27,7 @@ class PrescriptionReqModel {
this.languageID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress = '11.11.11.11',
this.versionID = 1.2,
this.versionID = 5.5,
this.channel = 9,
this.sessionID = 'E2bsEeYEJo',
this.tokenID,

@ -49,7 +49,7 @@ class ProgressNoteRequest {
this.sessionID = "LlBk8lUEJY",
this.isLoginForDoctorApp = true,
this.patientTypeID = 1,
this.versionID = 1.2,
this.versionID = 5.5,
this.patientOutSA = false});
ProgressNoteRequest.fromJson(Map<String, dynamic> json) {

@ -25,7 +25,7 @@ class RadiologyReqModel {
this.languageID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress = '11.11.11.11',
this.versionID = 1.2,
this.versionID = 5.5,
this.channel = 9,
this.sessionID = 'E2bsEeYEJo',
this.tokenID,

@ -84,7 +84,7 @@ class ReferToDoctorRequest {
this.languageID = 2,
this.stamp = "2020-06-03T11:26:42.358Z",
this.iPAdress = "11.11.11.11",
this.versionID = 1.2,
this.versionID = 5.5,
this.channel = 9,
@required this.tokenID,
this.sessionID = "JBXRsDl37L",

@ -31,7 +31,7 @@ class VitalSignReqModel {
this.tokenID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11',
this.versionID=1.2,
this.versionID=5.8,
this.channel=9,
this.sessionID='E2bsEeYEJo',
this.isLoginForDoctorApp=true,

@ -26,7 +26,7 @@ class PharmaciesListRequestModel {
this.languageID = 2,
this.stamp = '2020-04-23T21:01:21.492Z',
this.ipAdress = '11.11.11.11',
this.versionID = 5.3,
this.versionID = 5.5,
this.tokenID,
this.sessionID = 'e29zoooEJ4',
this.isLoginForDoctorApp = true,

@ -10,7 +10,7 @@ class PharmaciesItemsRequestModel {
String pHRItemName;
int pageIndex = 0;
int pageSize = 20;
double versionID = 5.3;
double versionID = 5.5;
int channel = 3;
int languageID = 2;
String iPAdress = "10.20.10.20";
@ -24,7 +24,7 @@ class PharmaciesItemsRequestModel {
{this.pHRItemName,
this.pageIndex = 0,
this.pageSize = 20,
this.versionID = 5.3,
this.versionID = 5.8,
this.channel = 3,
this.languageID = 2,
this.iPAdress = "10.20.10.20",

@ -18,7 +18,7 @@ import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart';
import './screens/patients/patients_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart';
import 'screens/patients/profile/profile_screen/patient_profile_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import 'landing_page.dart';
import 'screens/patients/profile/admission-request/admission-request-first-screen.dart';

@ -45,7 +45,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
VersionID: 5.5,
Channel: 9,
TokenID: "@dm!n",
SessionID: "5G0yXn0Jnq",

@ -31,7 +31,7 @@ class _PatientArrivalScreen extends State<PatientArrivalScreen>
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
VersionID: 5.8,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",

@ -18,6 +18,7 @@ import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'
import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/PatientsInPatientScreen.dart';
import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
@ -555,14 +556,9 @@ class _HomeScreenState extends State<HomeScreen> {
context,
MaterialPageRoute(
builder: (context) =>
PatientsScreenNew(
isSearch: false,
isInpatient: false,
OutPatientsScreen(
patientSearchRequestModel:
PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID),
selectedPatientType:
PatientType.OutPatient,
isSearchWithKeyInfo: false,
PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID)
),
));
},

@ -378,7 +378,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Condition: ',
TranslationBase.of(
context)
.condition +
": ",
fontSize: 12.5,
),
Expanded(
@ -435,7 +438,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Type: ',
TranslationBase.of(
context)
.type +
": ",
fontSize: 15.5,
),
Expanded(
@ -617,7 +623,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Column(
children: [
AppText(
'Order Date: ',
TranslationBase.of(
context)
.orderDate +
": ",
),
AppText(
DateUtils.getDateFormatted(
@ -807,9 +816,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [
Row(
children: [
AppText(
'Exam Type: ',
),
AppText(TranslationBase.of(
context)
.examType +
": "),
AppText(
model
.medicalFileList[
@ -854,9 +864,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
),
Row(
children: [
AppText(
'Abnormal: ',
),
AppText(TranslationBase.of(
context)
.abnormal +
": "),
AppText(
model
.medicalFileList[

@ -31,7 +31,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", arrivalType,isInpatient:isInpatient ,),
patient,
patientType.toString() ?? "0",
arrivalType,
isInpatient: isInpatient,
),
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView(
@ -51,7 +55,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Health',
TranslationBase.of(context).health,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -61,7 +65,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Summary',
TranslationBase.of(context).summary,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -193,7 +197,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Medical File Found'),
child: AppText(TranslationBase.of(context)
.noMedicalFileFound),
)
],
),

@ -45,7 +45,11 @@ class _InsuranceApprovalScreenNewState
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", patientType,isInpatient: isInpatient,),
patient,
patientType.toString() ?? "0",
patientType,
isInpatient: isInpatient,
),
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals,
@ -67,7 +71,7 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
'Insurance',
TranslationBase.of(context).insurance22,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -77,7 +81,7 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
'Approvals',
TranslationBase.of(context).approvals22,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -141,7 +145,8 @@ class _InsuranceApprovalScreenNewState
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Insurance Approval Found'),
child: AppText(TranslationBase.of(context)
.noInsuranceApprovalFound),
),
SizedBox(
height: 150.0,
@ -168,7 +173,8 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
'Insurance',
TranslationBase.of(context)
.insurance22,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -178,7 +184,8 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
'Approvals',
TranslationBase.of(context)
.approvals22,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -238,7 +245,8 @@ class _InsuranceApprovalScreenNewState
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Insurance Approval Found'),
child: AppText(TranslationBase.of(context)
.noInsuranceApprovalFound),
)
],
),

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_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/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -67,7 +68,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Insurance',
TranslationBase.of(context).insurance22,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -77,7 +78,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Approvals',
TranslationBase.of(context).approvals22,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -121,7 +122,9 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
.approvalStatusDescption !=
null
? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" ==
"Approved"
"Approved" ||
"${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" ==
"تمت الموافقة"
? Color(0xff359846)
: Color(0xffD02127)
: Color(0xffD02127),
@ -192,7 +195,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Clinic: ',
TranslationBase.of(
context)
.clinic +
": ",
color: Colors.grey[500],
fontSize: 14,
),
@ -210,7 +216,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: <Widget>[
AppText(
'Approval No: ',
TranslationBase.of(
context)
.approvalNo +
": ",
color: Colors.grey[500],
fontSize: 14,
),
@ -244,7 +253,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: <Widget>[
AppText(
'Company Name :',
TranslationBase.of(
context)
.companyName +
": ",
color: Colors.grey[500],
),
AppText('Sample')
@ -253,7 +265,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Receipt on: ',
TranslationBase.of(
context)
.receiptOn +
": ",
color: Colors.grey[500],
),
Expanded(
@ -269,7 +284,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Exp on: ',
TranslationBase.of(
context)
.expiryDate +
": ",
color: Colors.grey[500],
),
AppText(
@ -300,19 +318,22 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
children: [
Expanded(
child: AppText(
'Procedure',
TranslationBase.of(context)
.procedure,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: AppText(
'Status',
TranslationBase.of(context)
.status,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: AppText(
'Usage Status',
TranslationBase.of(context)
.usageStatus,
fontWeight: FontWeight.w700,
),
)
@ -424,7 +445,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Insurance',
TranslationBase.of(context).insurance22,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -434,7 +455,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Approvals',
TranslationBase.of(context).approvals22,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -548,7 +569,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Clinic: ',
TranslationBase.of(
context)
.clinic +
": ",
color: Colors.grey[500],
fontSize: 14,
),
@ -566,7 +590,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: <Widget>[
AppText(
'Approval No: ',
TranslationBase.of(
context)
.approvalNo +
": ",
color: Colors.grey[500],
fontSize: 14,
),
@ -583,7 +610,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: <Widget>[
AppText(
'Unused Count:',
TranslationBase.of(
context)
.unusedCount +
": ",
color: Colors.grey[500],
fontSize: 14,
),
@ -600,7 +630,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: <Widget>[
AppText(
'Company Name :',
TranslationBase.of(
context)
.companyName +
": ",
color: Colors.grey[500],
),
AppText('Sample')
@ -609,7 +642,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Receipt on: ',
TranslationBase.of(
context)
.receiptOn +
": ",
color: Colors.grey[500],
),
Expanded(
@ -625,16 +661,23 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row(
children: [
AppText(
'Exp on: ',
TranslationBase.of(
context)
.expiryDate +
": ",
color: Colors.grey[500],
),
if(model.insuranceApproval[indexInsurance].expiryDate!=null)
AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black,
fontWeight:
FontWeight.w600,
),
if (model
.insuranceApproval[
indexInsurance]
.expiryDate !=
null)
AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black,
fontWeight:
FontWeight.w600,
),
],
),
],
@ -657,19 +700,22 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
children: [
Expanded(
child: AppText(
'Procedure',
TranslationBase.of(context)
.procedure,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: AppText(
'Status',
TranslationBase.of(context)
.status,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: AppText(
'Usage Status',
TranslationBase.of(context)
.usageStatus,
fontWeight: FontWeight.w700,
),
)

@ -0,0 +1,335 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/date-utils.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/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class FilterDatePage extends StatefulWidget {
final OutPatientFilterType outPatientFilterType;
final PatientSearchViewModel patientSearchViewModel;
const FilterDatePage(
{Key key, this.outPatientFilterType, this.patientSearchViewModel})
: super(key: key);
@override
_FilterDatePageState createState() => _FilterDatePageState();
}
class _FilterDatePageState extends State<FilterDatePage> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
var screenSize;
return AppScaffold(
isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery
.of(context)
.size
.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: (OutPatientFilterType.Previous ==
widget.outPatientFilterType)
? " Filter Previous Out Patient"
: "Filter Nextweek Out Patient",
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Container(
color: Colors.white,
child: InkWell(
onTap: () =>
selectDate(
context, firstDate: getFirstDate(
widget.outPatientFilterType),
lastDate: getLastDate(
widget.outPatientFilterType)),
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase
.of(
context)
.fromDate,
widget.patientSearchViewModel.selectedFromDate != null
? "${DateUtils
.convertStringToDateFormat(
widget.patientSearchViewModel.selectedFromDate.toString(),
"yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(height: 10,),
Container(
color: Colors.white,
child: InkWell(
onTap: () =>
selectDate(
context, isFromDate: false,
firstDate: getFirstDate(
widget.outPatientFilterType),
lastDate: getLastDate(
widget.outPatientFilterType)),
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase
.of(
context)
.toDate,
widget.patientSearchViewModel.selectedToDate != null
? "${DateUtils
.convertStringToDateFormat(
widget.patientSearchViewModel.selectedToDate.toString(),
"yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title:
TranslationBase
.of(context)
.search,
padding: 10,
color: Color(0xFF359846),
onPressed: () async {
if (widget.patientSearchViewModel.selectedFromDate ==
null ||
widget.patientSearchViewModel.selectedToDate ==
null) {
Helpers.showErrorToast(
"Please Select All The date Fields ");
} else {
Duration difference = widget
.patientSearchViewModel.selectedToDate
.difference(
widget.patientSearchViewModel.selectedFromDate);
if (difference.inDays > 90) {
Helpers.showErrorToast(
"The difference between from date and end date must be less than 3 months");
} else {
String dateTo = DateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedToDate,
'yyyy-MM-dd');
String dateFrom = DateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedFromDate,
'yyyy-MM-dd');
PatientSearchRequestModel currentModel =
PatientSearchRequestModel();
currentModel.to = dateTo;
currentModel.from = dateFrom;
GifLoaderDialogUtils.showMyDialog(context);
await widget.patientSearchViewModel
.getOutPatient(currentModel, isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
if (widget.patientSearchViewModel.state ==
ViewState.ErrorLocal) {
Helpers.showErrorToast(
widget.patientSearchViewModel.error);
} else {
Navigator.of(context).pop();
}
}
}
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
)
);
}
selectDate(BuildContext context,
{bool isFromDate = true, DateTime firstDate, lastDate}) async {
Helpers.hideKeyboard(context);
DateTime selectedDate = isFromDate
? this.widget.patientSearchViewModel.selectedFromDate ?? firstDate
: this.widget.patientSearchViewModel.selectedToDate ?? lastDate;
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: firstDate,
lastDate: lastDate,
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null) {
if (isFromDate) {
setState(() {
this.widget.patientSearchViewModel.selectedFromDate = picked;
var date = picked.add(Duration(days: 30));
if(date.isBefore(lastDate)){
this.widget.patientSearchViewModel.selectedToDate = date;
}else
this.widget.patientSearchViewModel.selectedToDate = lastDate;
});
} else {
setState(() {
this.widget.patientSearchViewModel.selectedToDate = picked;
});
}
}
}
getFirstDate(OutPatientFilterType outPatientFilterType) {
if (outPatientFilterType == OutPatientFilterType.Previous) {
return DateTime(
DateTime
.now()
.year -20, DateTime
.now()
.month, DateTime
.now()
.day);
} else {
return DateTime(
DateTime
.now()
.year, DateTime
.now()
.month, DateTime
.now()
.day + 1);
}
}
getLastDate(OutPatientFilterType outPatientFilterType) {
if (outPatientFilterType == OutPatientFilterType.Previous) {
return DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day-1);
} else {
return DateTime(
DateTime
.now()
.year, DateTime
.now()
.month, DateTime
.now()
.day + 7);
}
}
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(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
labelText: selectedText != null ? '$hintText\n$selectedText' : null,
labelStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
);
}
}

@ -0,0 +1,282 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'filter_date_page.dart';
// ignore: must_be_immutable
class OutPatientsScreen extends StatefulWidget {
final patientSearchForm;
final selectedType;
final isAppbar;
final arrivalType;
final isView;
final PatientType selectedPatientType;
final PatientSearchRequestModel patientSearchRequestModel;
final bool isSearchWithKeyInfo;
final bool isSearch;
final bool isInpatient;
final bool isSearchAndOut;
final String searchKey;
OutPatientsScreen(
{this.patientSearchForm,
this.selectedType,
this.isAppbar = true,
this.arrivalType,
this.isView,
this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false, this.searchKey, this.isSearchAndOut=false});
@override
_OutPatientsScreenState createState() => _OutPatientsScreenState();
}
class _OutPatientsScreenState extends State<OutPatientsScreen> {
int clinicId;
AuthViewModel authProvider;
List<String> _times = []; //['All', 'Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 1;
String patientType;
String patientTypeTitle;
var selectedFilter = 1;
String arrivalType;
ProjectViewModel projectsProvider;
var isView;
final _controller = TextEditingController();
PatientModel patient;
OutPatientFilterType outPatientFilterType = OutPatientFilterType.Today;
@override
Widget build(BuildContext context) {
authProvider = Provider.of(context);
_times = [
TranslationBase
.of(context)
.previous,
TranslationBase
.of(context)
.today,
TranslationBase
.of(context)
.nextWeek,
];
final screenSize = MediaQuery
.of(context)
.size;
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
await model.getOutPatient(widget.patientSearchRequestModel);
},
builder: (_, model, w) => AppScaffold(
appBarTitle: "Search Patient",
isShowAppBar: true,
appBar: HeaderInSearch(
title: "My Out patient",
),
baseViewModel: model,
body: Column(
children: [
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils
.containerBorderDecoration(
Color(0Xffffffff),
Color(0xFFCCCCCC),
borderRadius: 4,
borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _times.map((item) {
bool _isActive = _times[_activeLocation] == item
? true
: false;
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _times.indexOf(item);
outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==0?OutPatientFilterType.Today:OutPatientFilterType.NextWeek;
_controller.text="";
});
model.searchData("");
FocusScope.of(context).requestFocus(new FocusNode());
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
),
);
}).toList(),
),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white
,
prefix: IconButton(
icon: Icon(
_activeLocation !=0
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black,
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
onPressed: _activeLocation !=0 ? null : () {
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) =>
FilterDatePage(outPatientFilterType: outPatientFilterType,patientSearchViewModel: model,)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
])),
SizedBox(
height: 10.0,
),
Expanded(
child: Container(
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
),
)
: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) {
if(_activeLocation !=0 || (model.filterData[index].patientStatusType !=null && model.filterData[index].patientStatusType==43))
return
Padding(
padding: EdgeInsets.all(8.0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isFromSearch:widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",
"isSearchAndOut": false,
});
},
// isFromSearch: widget.isSearch,
),
);
else
return SizedBox();
})),
),
],
)
),
);
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
@ -12,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
@ -107,8 +109,14 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
inputType:TextInputType.number,
hasBorder: true,
controller: patientFileInfoController,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS))
],
onChanged: (_){},
validationError: (isFormSubmitted && (
patientFileInfoController
.text.isEmpty &&

@ -62,7 +62,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
VersionID: 5.8,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",

@ -97,7 +97,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
VersionID: 5.5,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",

@ -44,6 +44,7 @@ class _AdmissionRequestThirdScreenState
String clinicError;
String doctorError;
String sickLeaveCommentError;
String dietTypeError;
String medicalHistoryError;
String surgicalHistoryError;
@ -78,8 +79,6 @@ class _AdmissionRequestThirdScreenState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientProfileHeaderNewDesign(
// patient, patientType, arrivalType),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
@ -87,15 +86,15 @@ class _AdmissionRequestThirdScreenState
children: [
AppText(
"${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
TranslationBase.of(context).request,
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
@ -109,7 +108,7 @@ class _AdmissionRequestThirdScreenState
AppText(
TranslationBase.of(context)
.specialityAndDoctorDetail,
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),
@ -278,6 +277,7 @@ class _AdmissionRequestThirdScreenState
height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).dietType,
isTextFieldHasSuffix: true,
validationError: dietTypeError,
dropDownText: _selectedDietType != null
? _selectedDietType['nameEn']
: null,
@ -426,6 +426,11 @@ class _AdmissionRequestThirdScreenState
}else {
sickLeaveCommentError = null;
}
if(_selectedDietType == null){
dietTypeError = TranslationBase.of(context).fieldRequired;
}else {
dietTypeError = null;
}
if(_postMedicalHistoryController.text == ""){
medicalHistoryError = TranslationBase.of(context).fieldRequired;
}else {

@ -76,15 +76,15 @@ class _AdmissionRequestThirdScreenState
children: [
AppText(
"${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
TranslationBase.of(context).request,
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
@ -96,7 +96,7 @@ class _AdmissionRequestThirdScreenState
children: [
AppText(
TranslationBase.of(context).diagnosisDetail,
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),

@ -91,8 +91,6 @@ class _AdmissionRequestSecondScreenState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientProfileHeaderNewDesign(
// patient, patientType, arrivalType),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
@ -100,15 +98,15 @@ class _AdmissionRequestSecondScreenState
children: [
AppText(
"${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
TranslationBase.of(context).request,
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
@ -122,7 +120,7 @@ class _AdmissionRequestSecondScreenState
AppText(
TranslationBase.of(context)
.postPlansEstimatedCost,
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),
@ -170,7 +168,7 @@ class _AdmissionRequestSecondScreenState
),
AppText(
TranslationBase.of(context).otherInformation,
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -45,7 +46,7 @@ class LabResultChartAndDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_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/screens/patients/profile/lab_result/laboratory_result_page.dart';
@ -12,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LabsHomePage extends StatefulWidget {
@override
@ -37,6 +39,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient, isInpatient: false),
builder: (context, ProcedureViewModel model, widget) => AppScaffold(
@ -44,7 +47,11 @@ class _LabsHomePageState extends State<LabsHomePage> {
backgroundColor: Colors.grey[100],
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType,isInpatient: isInpatient,),
patient,
patient.patientType.toString() ?? '0',
patientType,
isInpatient: isInpatient,
),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
@ -63,13 +70,13 @@ class _LabsHomePageState extends State<LabsHomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Lab',
TranslationBase.of(context).lab,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
@ -84,13 +91,13 @@ class _LabsHomePageState extends State<LabsHomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Lab',
TranslationBase.of(context).lab,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
@ -110,7 +117,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
)),
);
},
label: 'Apply for New Lab Order',
label: TranslationBase.of(context).applyForNewLabOrder,
),
...List.generate(
model.patientLabOrdersList.length,
@ -131,32 +138,37 @@ class _LabsHomePageState extends State<LabsHomePage> {
width: 20,
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: model.patientLabOrdersList[index].isLiveCareAppointment
color: model.patientLabOrdersList[index]
.isLiveCareAppointment
? Colors.red[900]
: !model.patientLabOrdersList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
: !model.patientLabOrdersList[index]
.isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
topLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
bottomLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0),
bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0)
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
model.patientLabOrdersList[index]
.isLiveCareAppointment
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
.liveCare
.toUpperCase()
: !model.patientLabOrdersList[index]
.isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
@ -168,19 +180,26 @@ class _LabsHomePageState extends State<LabsHomePage> {
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patientLabOrders:
model.patientLabOrdersList[index],
patient: patient,
arrivalType: arrivalType,
patientType: patientType,
),
),
),
doctorName: model.patientLabOrdersList[index].doctorName,
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: model.patientLabOrdersList[index].clinicDescription,
appointmentDate: model.patientLabOrdersList[index].orderDate,
doctorName:
model.patientLabOrdersList[index].doctorName,
invoiceNO:
' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model
.patientLabOrdersList[index].doctorImageURL,
branch:
model.patientLabOrdersList[index].projectName,
clinic: model
.patientLabOrdersList[index].clinicDescription,
appointmentDate:
model.patientLabOrdersList[index].orderDate,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),

File diff suppressed because it is too large Load Diff

@ -0,0 +1,321 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.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/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_other.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_search.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
class PatientProfileScreen extends StatefulWidget {
@override
_PatientProfileScreenState createState() => _PatientProfileScreenState();
}
class _PatientProfileScreenState extends State<PatientProfileScreen>
with SingleTickerProviderStateMixin {
PatiantInformtion patient;
bool isFromSearch = false;
bool isInpatient = false;
bool isDischargedPatient = false;
bool isSearchAndOut = false;
String patientType;
String arrivalType;
String from;
String to;
TabController _tabController;
int index = 0;
int _activeTab = 0;
@override
void initState() {
_tabController = TabController(length: 2, vsync: this);
super.initState();
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
from = routeArgs['from'];
to = routeArgs['to'];
if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch'];
}
if (routeArgs.containsKey("isInpatient")) {
isInpatient = routeArgs['isInpatient'];
}
if (routeArgs.containsKey("isDischargedPatient")) {
isDischargedPatient = routeArgs['isDischargedPatient'];
}
if (routeArgs.containsKey("isSearchAndOut")) {
isSearchAndOut = routeArgs['isSearchAndOut'];
}
if (isInpatient)
_activeTab = 0;
else
_activeTab = 1;
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientViewModel>(
builder: (_, patientViewModel, w) => AppScaffold(
baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
body: Column(
children: [
Stack(
children: [
Column(
children: [
PatientProfileHeaderNewDesignAppBar(
patient,
arrivalType ?? '0',
patientType,
isInpatient: isInpatient,
height: (patient.patientStatusType != null &&
patient.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
: 0,
isDischargedPatient:isDischargedPatient
),
Container(
height: !isSearchAndOut
? isDischargedPatient
? MediaQuery.of(context).size.height * 0.64
: MediaQuery.of(context).size.height * 0.65
: MediaQuery.of(context).size.height * 0.69,
child: ListView(
children: [
Container(
child: isSearchAndOut
? ProfileGridForSearch(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInpatient: isInpatient,
from: from,
to: to,
)
: isInpatient
? ProfileGridForInPatient(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInpatient: isInpatient,
from: from,
to: to,
isDischargedPatient:
isDischargedPatient,
isFromSearch: isFromSearch,
)
: ProfileGridForOther(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInpatient: isInpatient,
from: from,
to: to,
),
),
],
),
),
],
),
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => Positioned(
top: 180,
left: 20,
right: 20,
child: Row(
children: [
Expanded(child: Container()),
if (patient.episodeNo == 0)
AppButton(
title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/create-episod.png",
color: Colors.white,
height: 30,
),
onPressed: () async {
if (patient.patientStatusType ==
43) {
PostEpisodeReqModel
postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
patient.appointmentNo,
patientMRN:
patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(
context);
await model.postEpisode(
postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(
context);
patient.episodeNo =
model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {
'patient': patient
});
}
},
),
if (patient.episodeNo != 0)
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color:
patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
),
onPressed: () {
if (patient.patientStatusType ==
43) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {
'patient': patient
});
}
}),
],
),
)),
],
),
],
),
));
}
Widget tabsBar(BuildContext context, Size screenSize) {
List<String> _tabs = [
"Inpatient Info".toUpperCase(),
"Outpatient Info".toUpperCase(),
];
return Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _tabs.map((item) {
bool _isActive = _tabs[_activeTab] == item ? true : false;
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeTab = _tabs.indexOf(item);
});
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
),
);
}).toList(),
),
);
}
}
class AvatarWidget extends StatelessWidget {
final Widget avatarIcon;
AvatarWidget(this.avatarIcon);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC),
),
child: avatarIcon,
);
}
}

@ -0,0 +1,275 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
// ignore: must_be_immutable
class ProfileGridForInPatient extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final double height;
final bool isInpatient;
final bool isDischargedPatient;
final bool isFromSearch;
String from;
String to;
ProfileGridForInPatient(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient, this.from,this.to, this.isDischargedPatient, this.isFromSearch})
: super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 15.0,
horizontal: 15),
child: GridView.count(
shrinkWrap: true,
physics:
NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1:
TranslationBase
.of(
context)
.vital,
nameLine2:
TranslationBase
.of(
context)
.signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1:
TranslationBase
.of(
context)
.lab,
nameLine2:
TranslationBase
.of(
context)
.result,
icon:
'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1:
TranslationBase
.of(
context)
.radiology,
nameLine2:
TranslationBase
.of(
context)
.result,
icon:
'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
isInPatient: isInpatient,
patientType: patientType,
arrivalType: arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
isSelectInpatient: true,
nameLine1:
TranslationBase
.of(
context)
.patient,
nameLine2:
TranslationBase
.of(
context)
.prescription,
icon:
'patient/order_prescription.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isInPatient: isInpatient,
isDischargedPatient:
isDischargedPatient,
nameLine1:
TranslationBase
.of(
context)
.progress,
nameLine2:
TranslationBase
.of(
context)
.note,
icon:
'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
isInPatient: isInpatient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient:
isDischargedPatient,
nameLine1:
"Order",
//"Text",
nameLine2:
"Sheet",
//TranslationBase.of(context).orders,
icon:
'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
isInPatient: isInpatient,
nameLine1:
TranslationBase
.of(
context)
.orders,
nameLine2:
TranslationBase
.of(
context)
.procedures,
icon:
'patient/Order_Procedures.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
isInPatient: isInpatient,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: MEDICAL_FILE,
nameLine1:
"Medical",
//Health
isInPatient: isInpatient,
nameLine2:
"Report",
//Report
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route:
REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
isDisable:
isDischargedPatient ||
isFromSearch,
nameLine1:
TranslationBase
.of(
context)
.referral,
nameLine2:
TranslationBase
.of(
context)
.patient,
icon:
'patient/refer_patient.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route:
PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1:
TranslationBase
.of(
context)
.insurance,
nameLine2:
TranslationBase
.of(
context)
.approvals,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon:
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1:
TranslationBase
.of(
context)
.patientSick,
nameLine2:
TranslationBase
.of(
context)
.leave,
icon:
'patient/patient_sick_leave.png'),
],
),
);
}
}

@ -0,0 +1,309 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
// ignore: must_be_immutable
class ProfileGridForOther extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final double height;
final bool isInpatient;
String from;
String to;
ProfileGridForOther(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient, this.from,this.to})
: super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets
.symmetric(
vertical: 15.0,
horizontal: 15),
child: GridView.count(
shrinkWrap: true,
physics:
NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
from: from,
to: to,
nameLine1:
TranslationBase.of(
context)
.vital,
nameLine2:
TranslationBase.of(
context)
.signs,
route:
VITAL_SIGN_DETAILS,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: LAB_RESULT,
nameLine1:
TranslationBase.of(
context)
.lab,
nameLine2:
TranslationBase.of(
context)
.result,
icon:
'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
isInPatient:
isInpatient,
route:
RADIOLOGY_PATIENT,
nameLine1:
TranslationBase.of(
context)
.radiology,
nameLine2:
TranslationBase.of(
context)
.service,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
nameLine1:
TranslationBase.of(
context)
.orders,
nameLine2:
TranslationBase.of(
context)
.prescription,
icon:
'patient/order_prescription.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: PATIENT_ECG,
nameLine1:
TranslationBase.of(
context)
.patient,
nameLine2: "ECG",
icon:
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PROCEDURE,
nameLine1:
TranslationBase.of(
context)
.orders,
nameLine2:
TranslationBase.of(
context)
.procedures,
icon:
'patient/Order_Procedures.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1:
TranslationBase.of(
context)
.insurance,
nameLine2:
TranslationBase.of(
context)
.service,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: ADD_SICKLEAVE,
nameLine1:
TranslationBase.of(
context)
.patientSick,
nameLine2:
TranslationBase.of(
context)
.leave,
icon:
'patient/patient_sick_leave.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_UCAF_REQUEST,
isDisable:
patient.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.patient,
nameLine2:
TranslationBase.of(
context)
.ucaf,
icon:
'patient/ucaf.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
REFER_PATIENT_TO_DOCTOR,
isDisable: patient
.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.referral,
nameLine2:
TranslationBase.of(
context)
.patient,
icon:
'patient/refer_patient.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_ADMISSION_REQUEST,
isDisable:
patient.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.admission,
nameLine2:
TranslationBase.of(
context)
.request,
icon:
'patient/admission_req.png'),
],
),
),
],
);
}
}

@ -0,0 +1,164 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
class ProfileGridForSearch extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final double height;
final bool isInpatient;
String from;
String to;
ProfileGridForSearch(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient, this.from,this.to})
: super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
],
),
),
],
);
}
}

@ -39,6 +39,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient,
patientType: patientType, isInPatient: false),
@ -47,7 +48,11 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
backgroundColor: Colors.grey[100],
// appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType,isInpatient: isInpatient,),
patient,
patient.patientType.toString() ?? '0',
arrivalType,
isInpatient: isInpatient,
),
baseViewModel: model,
body: FractionallySizedBox(
widthFactor: 1.0,
@ -65,13 +70,13 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Radiology',
TranslationBase.of(context).radiology,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
@ -86,13 +91,13 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Radiology',
TranslationBase.of(context).radiology,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
@ -112,7 +117,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
)),
);
},
label: 'Apply for Radiology Order',
label: TranslationBase.of(context).applyForRadiologyOrder,
),
...List.generate(
model.radiologyList.length,
@ -134,32 +139,36 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: model.radiologyList[index].isLiveCareAppodynamicment
color: model.radiologyList[index]
.isLiveCareAppodynamicment
? Colors.red[900]
: !model.radiologyList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
topLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
bottomLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0),
bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0)
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.radiologyList[index].isLiveCareAppodynamicment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !model.radiologyList[index].isInOutPatient
model.radiologyList[index]
.isLiveCareAppodynamicment
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
.liveCare
.toUpperCase()
: !model.radiologyList[index]
.isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
@ -167,19 +176,26 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
Expanded(
child: DoctorCard(
isNoMargin: true,
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate: model.radiologyList[index].orderDate??
model.radiologyList[index].reportDate,
doctorName:
model.radiologyList[index].doctorName,
profileUrl:
model.radiologyList[index].doctorImageURL,
invoiceNO:
'${model.radiologyList[index].invoiceNo}',
branch:
'${model.radiologyList[index].projectName}',
clinic: model
.radiologyList[index].clinicDescription,
appointmentDate:
model.radiologyList[index].orderDate ??
model.radiologyList[index].reportDate,
onTap: () {
Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: model.radiologyList[index],
finalRadiology:
model.radiologyList[index],
patient: patient,
),
),

@ -1,9 +1,11 @@
import 'dart:ui';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -14,13 +16,22 @@ class PatientReferralScreen extends StatefulWidget {
_PatientReferralScreen createState() => _PatientReferralScreen();
}
class _PatientReferralScreen extends State<PatientReferralScreen>
with SingleTickerProviderStateMixin {
class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTickerProviderStateMixin {
TabController _tabController;
int index=0;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
_tabController.addListener(_handleTabSelection);
}
_handleTabSelection() {
setState(() {
index = _tabController.index;
});
}
@override
@ -29,7 +40,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
_tabController.dispose();
}
@override
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -39,12 +50,10 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
extendBodyBehindAppBar: true,
// backgroundColor: Colors.white,
appBar: PreferredSize(
preferredSize: Size.fromHeight(60.0),
preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
child: Center(
child: Container(
height: 60.0,
// margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 1, // 0.92,
height: MediaQuery.of(context).size.height * 0.070,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -54,30 +63,71 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
isScrollable: false,
controller: _tabController,
indicatorColor: Colors.red[800],
indicatorWeight: 5.0,
indicatorColor: Colors.transparent,
indicatorWeight: 1.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
width: MediaQuery.of(context).size.width * 0.50,
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Center(
child:
AppText(TranslationBase.of(context).referral),
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
index == 0
? Color(0xFFD02127 )
: Color(0xFFEAEAEA),
index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).myReferredPatient,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 0 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
width: MediaQuery.of(context).size.width * 0.50,
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).myReferredPatient),
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
index == 1
? Color(0xFFD02127 )
: Color(0xFFEAEAEA),
index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
TranslationBase.of(context).referral,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 1 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
),
],
),
),
@ -91,8 +141,8 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
MyReferralInPatientScreen(),
ReferredPatientScreen(),
MyReferralInPatientScreen(),
// MyReferredPatient(),
],
),

@ -102,36 +102,56 @@ class _AddExaminationPageState extends State<AddExaminationPage> {
setState(() {
widget.mySelectedExamination
.add(selectedExamination);
});
},
});
},
),
],
),
),
],
),
),
),
],
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title:
"${TranslationBase.of(context).addExamination}",
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addSelectedExamination();
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
),
),
Container(
padding: EdgeInsets.all(16),
color: Colors.white,
child: AppButton(
title:"${TranslationBase.of(context).addExamination}",
color: HexColor("#359846"),
fontColor: Colors.white,
vPadding: 12,
radius: 12,
fontWeight: FontWeight.w600,
fontSize: SizeConfig.textMultiplier * 2.5,
onPressed: () {
widget.addSelectedExamination();
},
),
)
],
),
),
);
));
}
isServiceSelected(MasterKeyModel masterKey) {

@ -40,7 +40,7 @@ class UpdateChiefComplaints extends StatelessWidget {
maxLines: 25,
minLines: 7,
hasBorder: true,
validationError:complaintsController.text.isEmpty && complaintsControllerError !=''?complaintsControllerError:null ,
validationError:complaintsControllerError !=''?complaintsControllerError:null ,
),
SizedBox(
@ -55,7 +55,7 @@ class UpdateChiefComplaints extends StatelessWidget {
maxLines: 25,
minLines: 7,
hasBorder: true,
validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
validationError:illnessControllerError !=''?illnessControllerError:null ,
),
SizedBox(
height: 10,
@ -74,7 +74,7 @@ class UpdateChiefComplaints extends StatelessWidget {
maxLines: 25,
minLines: 7,
hasBorder: true,
validationError:medicationController.text.isEmpty && medicationControllerError !=''?medicationControllerError:null ,
validationError:medicationControllerError !=''?medicationControllerError:null ,
),
SizedBox(

@ -57,15 +57,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
children: [
AppText(
"${patient.firstName ?? patient.patientDetails.firstName}'s",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
TranslationBase.of(context).vitalSign,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
@ -90,7 +90,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
children: [
AppText(
"${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}",
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
@ -544,8 +544,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
.oxygenation,
imagePath:
"${assetBasePath}oxg.png",
lastVal: mode.oxygenation,
unit: "%",
lastVal: "${mode.oxygenation}%",
unit: "",
),
),
InkWell(
@ -576,198 +576,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
imagePath:
"${assetBasePath}painScale.png",
lastVal: mode.painScore,
unit: "",
unit: TranslationBase.of(context).severe,
),
),
],
),
/*RoundedContainer(
width: MediaQuery.of(context).size.width / 2,
margin: EdgeInsets.symmetric(
horizontal: 0.0, vertical: 16),
child: Container(
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(top: 8),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painScore}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"Location",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painLocation}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"Character",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painCharacter}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"Duration",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painDuration}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).painManagement,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.isPainDone}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).frequency,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painFrequency}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
],
),
),
),
Container(
child: Image.asset(
"${assetBasePath}painScale.png",
width: 40,
height: 40,
))
],
),
),
Container(
child: Column(
children: [
Align(
alignment:
Alignment.topRight,
child: Icon(
EvaIcons.eye,
),
),
Align(
alignment:
Alignment.topLeft,
child: Container(
margin: EdgeInsets.only(
left: 5, right: 5),
child: AppText(
"${TranslationBase.of(context).painScale}",
fontFamily: 'Poppins',
fontSize: SizeConfig
.textMultiplier *
1.3,
fontWeight:
FontWeight.bold,
),
),
),
],
),
),
],
),
),
),*/
],
),
),

@ -52,6 +52,7 @@ class VitalSignItem extends StatelessWidget {
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
margin: 0,
),
Expanded(
@ -62,7 +63,7 @@ class VitalSignItem extends StatelessWidget {
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.2,
fontWeight: FontWeight.w700,
color: Color(0xFFB8382C),
color: Color(0xFFD02127),
margin: 0,
),
],
@ -98,7 +99,7 @@ class VitalSignItem extends StatelessWidget {
margin: EdgeInsets.only(left: 5, right: 5),
child: AppText(
"$des",
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.bold,
),

@ -58,7 +58,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,

@ -63,7 +63,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.3,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_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/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -25,6 +26,7 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_fiel
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
addPrescriptionForm(context, PrescriptionViewModel model,
PatiantInformtion patient, prescription) {
@ -188,6 +190,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Widget build(BuildContext context) {
ListSelectDialog drugDialog;
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
// final routeArgs = ModalRoute.of(context).settings.arguments as Map;
// patient = routeArgs['patient'];
@ -258,7 +261,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
MainAxisAlignment.spaceBetween,
children: [
AppText(
'New Prescription Order',
TranslationBase.of(context)
.newPrescriptionOrder,
fontWeight: FontWeight.w700,
fontSize: 20,
),
@ -284,7 +288,6 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Column(
//mainAxisAlignment: MainAxisAlignment.end,
children: [
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
@ -407,7 +410,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row(
children: [
AppText(
'Order Type',
TranslationBase.of(context)
.orderType,
fontWeight: FontWeight.w600,
),
Radio(
@ -460,7 +464,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
if (strengthChar >= 5) {
DrAppToastMsg
.showErrorToast(
"Only 5 Digits allowed for strength");
TranslationBase.of(
context)
.only5DigitsAllowedForStrength,
);
}
},
onSubmit: (_) {
@ -554,7 +561,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: TextField(
decoration:
textFieldSelectorDecoration(
'UNIT',
TranslationBase.of(
context)
.unit,
units != null
? units[
'description']
@ -1066,9 +1075,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: TextField(
decoration:
textFieldSelectorDecoration(
"Box Quantity",
TranslationBase.of(
context)
.boxQuantity,
box != null
? "Box Quantity: " +
? TranslationBase.of(
context)
.boxQuantity +
": " +
model
.boxQuintity
.toString()
@ -1124,14 +1138,18 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
selectedDate == null ||
units == null) {
DrAppToastMsg.showErrorToast(
"Please Fill All Fields");
TranslationBase.of(
context)
.pleaseFillAllFields);
return;
}
if (_selectedMedication
.isNarcotic ==
true) {
DrAppToastMsg.showErrorToast(
"Narcotic medicine can only be prescribed from VIDA");
TranslationBase.of(
context)
.narcoticMedicineCanOnlyBePrescribedFromVida);
Navigator.pop(context);
return;
}

@ -271,7 +271,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Direction',
TranslationBase.of(context).direction,
color: Colors.grey,
),
Expanded(
@ -286,7 +286,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Route',
TranslationBase.of(context).route,
color: Colors.grey,
),
AppText(" " +
@ -301,7 +301,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Refill',
TranslationBase.of(context).refill,
color: Colors.grey,
),
Expanded(
@ -316,7 +316,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Start Date ',
TranslationBase.of(context).startDate,
color: Colors.grey,
),
Expanded(
@ -332,7 +332,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Stop Date',
TranslationBase.of(context).stopDate,
color: Colors.grey,
),
Expanded(
@ -377,7 +377,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Status',
TranslationBase.of(context).status,
color: Colors.grey,
),
AppText(" " +
@ -392,7 +392,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Row(
children: [
AppText(
'Processed',
TranslationBase.of(context).processed,
color: Colors.grey,
),
AppText(" " +

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.da
import 'package:doctor_app_flutter/screens/prescription/prescription_item_in_patient_page.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.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/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -28,16 +29,19 @@ class PrescriptionsPage extends StatelessWidget {
bool isSelectInpatient = routeArgs['isSelectInpatient'];
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>(
onModelReady: (model) =>
isSelectInpatient
? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
onModelReady: (model) => isSelectInpatient
? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType ?? '0', arrivalType,isInpatient: isInpatient,),
patient,
patientType ?? '0',
arrivalType,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
@ -55,13 +59,13 @@ class PrescriptionsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Order',
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Prescriptions',
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
@ -76,13 +80,13 @@ class PrescriptionsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Order',
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Prescriptions',
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
@ -96,7 +100,8 @@ class PrescriptionsPage extends StatelessWidget {
addPrescriptionForm(context, model, patient,
model.prescriptionList);
},
label: 'Apply for New Prescriptions Order',
label: TranslationBase.of(context)
.applyForNewPrescriptionsOrder,
),
...List.generate(
model.prescriptionsList.length,
@ -140,7 +145,8 @@ class PrescriptionsPage extends StatelessWidget {
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Prescriptions Found'),
child: AppText(TranslationBase.of(context)
.noPrescriptionsFound),
)
],
),
@ -209,8 +215,8 @@ class PrescriptionsPage extends StatelessWidget {
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
'No Prescriptions Found In Patentiss'),
child: AppText(TranslationBase.of(context)
.noPrescriptionsFound),
)
],
),

@ -165,7 +165,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
'Please Enter Procedure',
TranslationBase.of(context)
.pleaseEnterProcedure,
fontWeight: FontWeight.w700,
fontSize: 20,
),
@ -187,7 +188,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
Container(
width: MediaQuery.of(context).size.width * 0.85,
child: AppTextFieldCustom(
hintText: 'Search Procedure here...',
hintText: TranslationBase.of(context)
.searchProcedureHere,
isTextFieldHasSuffix: false,
maxLines: 1,
@ -199,11 +201,15 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
// categoryName: procedureName.text);
// },
onClick: () {
if(procedureName.text.isNotEmpty && procedureName.text.length>=3)
model.getProcedureCategory(
categoryName: procedureName.text);
if (procedureName.text.isNotEmpty &&
procedureName.text.length >= 3)
model.getProcedureCategory(
categoryName: procedureName.text);
else
DrAppToastMsg.showErrorToast('At least three Characters');
DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.atLeastThreeCharacters,
);
},
),
),
@ -212,11 +218,15 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
),
InkWell(
onTap: () {
if(procedureName.text.isNotEmpty && procedureName.text.length>=3)
if (procedureName.text.isNotEmpty &&
procedureName.text.length >= 3)
model.getProcedureCategory(
categoryName: procedureName.text);
else
DrAppToastMsg.showErrorToast('At least three Characters');
DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.atLeastThreeCharacters,
);
},
child: Icon(
Icons.search,
@ -419,7 +429,9 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
TranslationBase.of(context)
.fillTheMandatoryProcedureDetails,
);
return;
}

@ -9,6 +9,7 @@ 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/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
@ -160,7 +161,7 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
Row(
children: [
AppText(
'New Lab Order',
TranslationBase.of(context).applyForNewLabOrder,
fontWeight: FontWeight.w700,
fontSize: 20,
),
@ -218,7 +219,8 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: "Add Lab Order", //TranslationBase.of(context)
title: TranslationBase.of(context)
.addLabOrder, //TranslationBase.of(context)
fontWeight: FontWeight.w700,
//.addSelectedProcedures,
color: Color(0xff359846),
@ -227,7 +229,9 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
TranslationBase.of(context)
.fillTheMandatoryProcedureDetails,
);
return;
}

@ -9,6 +9,7 @@ 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/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
@ -161,7 +162,7 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
'New Radiology Order',
TranslationBase.of(context).newRadiologyOrder,
fontWeight: FontWeight.w700,
fontSize: 20,
),
@ -216,15 +217,15 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'Add Radiology Order',
title: TranslationBase.of(context).addRadiologyOrder,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () {
//print(entityList.toString());
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
DrAppToastMsg.showErrorToast(TranslationBase.of(context)
.fillTheMandatoryProcedureDetails);
return;
}

@ -8,11 +8,11 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/procedures/add-procedure-form.dart';
import 'package:doctor_app_flutter/screens/procedures/update-procedure.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/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'ProcedureCard.dart';
class ProcedureScreen extends StatelessWidget {
@ -32,15 +32,21 @@ class ProcedureScreen extends StatelessWidget {
String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) =>
model.getProcedure(mrn: patient.patientId, patientType: patientType,),
onModelReady: (model) => model.getProcedure(
mrn: patient.patientId,
patientType: patientType,
),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100],
baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType,isInpatient: isInpatient,),
patient,
arrivalType ?? '0',
patientType,
isInpatient: isInpatient,
),
body: SingleChildScrollView(
child: Container(
child: Column(
@ -57,13 +63,13 @@ class ProcedureScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Order Test or',
TranslationBase.of(context).orderTestOr,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Procedure',
TranslationBase.of(context).procedure,
bold: true,
fontSize: 22,
),
@ -78,13 +84,13 @@ class ProcedureScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Order Test or',
TranslationBase.of(context).orderTestOr,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Procedure',
TranslationBase.of(context).procedure,
bold: true,
fontSize: 22,
),
@ -135,7 +141,7 @@ class ProcedureScreen extends StatelessWidget {
height: 10,
),
AppText(
'Add More Procedure',
TranslationBase.of(context).addMoreProcedure,
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
@ -183,8 +189,9 @@ class ProcedureScreen extends StatelessWidget {
doctorName: doctorNameP,
),
),
if (model.state == ViewState.ErrorLocal || (model.procedureList.isNotEmpty && model.procedureList[0].entityList.isEmpty))
if (model.state == ViewState.ErrorLocal ||
(model.procedureList.isNotEmpty &&
model.procedureList[0].entityList.isEmpty))
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@ -195,7 +202,9 @@ class ProcedureScreen extends StatelessWidget {
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(22.0),
child: AppText(model.procedureList.isEmpty ? model.error: 'No Procedure Found '),
child: AppText(model.procedureList.isEmpty
? model.error
: 'No Procedure Found '),
)
],
),

@ -100,9 +100,11 @@ class TranslationBase {
String get referral => localizedValues['referral'][locale.languageCode];
String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode];
String get inPatientLabel =>
localizedValues['inPatientLabel'][locale.languageCode];
String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode];
String get inPatientAll =>
localizedValues['inPatientAll'][locale.languageCode];
String get operations => localizedValues['operations'][locale.languageCode];
@ -1176,7 +1178,8 @@ class TranslationBase {
localizedValues['SpecialResult'][locale.languageCode];
String get noDataAvailable =>
localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode];
String get showMoreBtn =>
localizedValues['show-more-btn'][locale.languageCode];
String get showDetail => localizedValues['showDetail'][locale.languageCode];
String get viewProfile => localizedValues['viewProfile'][locale.languageCode];
@ -1247,6 +1250,59 @@ class TranslationBase {
String get acknowledged =>
localizedValues['acknowledged'][locale.languageCode];
String get didntCatch => localizedValues["didntCatch"][locale.languageCode];
String get pleaseEnterProcedure =>
localizedValues["pleaseEnterProcedure"][locale.languageCode];
String get fillTheMandatoryProcedureDetails =>
localizedValues["fillTheMandatoryProcedureDetails"][locale.languageCode];
String get atLeastThreeCharacters =>
localizedValues["atLeastThreeCharacters"][locale.languageCode];
String get searchProcedureHere =>
localizedValues["searchProcedureHere"][locale.languageCode];
String get noInsuranceApprovalFound =>
localizedValues["noInsuranceApprovalFound"][locale.languageCode];
String get procedure => localizedValues["procedure"][locale.languageCode];
String get stopDate => localizedValues["stopDate"][locale.languageCode];
String get processed => localizedValues["processed"][locale.languageCode];
String get direction => localizedValues["direction"][locale.languageCode];
String get refill => localizedValues["refill"][locale.languageCode];
String get medicationHasBeenAdded =>
localizedValues["medicationHasBeenAdded"][locale.languageCode];
String get newPrescriptionOrder =>
localizedValues["newPrescriptionOrder"][locale.languageCode];
String get pleaseFillAllFields =>
localizedValues["pleaseFillAllFields"][locale.languageCode];
String get narcoticMedicineCanOnlyBePrescribedFromVida =>
localizedValues["narcoticMedicineCanOnlyBePrescribedFromVida"]
[locale.languageCode];
String get only5DigitsAllowedForStrength =>
localizedValues["only5DigitsAllowedForStrength"][locale.languageCode];
String get unit => localizedValues["unit"][locale.languageCode];
String get boxQuantity => localizedValues["boxQuantity"][locale.languageCode];
String get orderTestOr => localizedValues["orderTestOr"][locale.languageCode];
String get applyForRadiologyOrder =>
localizedValues["applyForRadiologyOrder"][locale.languageCode];
String get applyForNewLabOrder =>
localizedValues["applyForNewLabOrder"][locale.languageCode];
String get addLabOrder => localizedValues["addLabOrder"][locale.languageCode];
String get addRadiologyOrder =>
localizedValues["addRadiologyOrder"][locale.languageCode];
String get newRadiologyOrder =>
localizedValues["newRadiologyOrder"][locale.languageCode];
String get orderDate => localizedValues["orderDate"][locale.languageCode];
String get examType => localizedValues["examType"][locale.languageCode];
String get health => localizedValues["health"][locale.languageCode];
String get summary => localizedValues["summary"][locale.languageCode];
String get applyForNewPrescriptionsOrder =>
localizedValues["applyForNewPrescriptionsOrder"][locale.languageCode];
String get noPrescriptionsFound =>
localizedValues["noPrescriptionsFound"][locale.languageCode];
String get noMedicalFileFound =>
localizedValues["noMedicalFileFound"][locale.languageCode];
String get insurance22 => localizedValues["insurance22"][locale.languageCode];
String get approvals22 => localizedValues["approvals22"][locale.languageCode];
String get severe => localizedValues["severe"][locale.languageCode];
String get graphDetails =>
localizedValues["graphDetails"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -398,39 +398,5 @@ class PatientCard extends StatelessWidget {
]));
}
convertDateFormat2(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
isToday(date) {
DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date);
return DateFormat("yyyy-MM-dd").format(tempDate) ==
DateFormat("yyyy-MM-dd").format(DateTime.now());
}
myBoxDecoration() {
return BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.green,
width: 5,
),
),
borderRadius: BorderRadius.circular(10));
}
}

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientProfileButton extends StatelessWidget {
final String nameLine1;
@ -42,6 +44,8 @@ class PatientProfileButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
return new Container(
margin: new EdgeInsets.symmetric(horizontal: 4.0),
padding: EdgeInsets.fromLTRB(10, 10, 10, 5),
@ -63,11 +67,11 @@ class PatientProfileButton extends StatelessWidget {
url + icon,
width: 50,
height: 50,
))
),)
],
)),
Container(
alignment: Alignment.topLeft,
alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft,
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.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/screens/patients/profile/patient_profile_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

@ -18,9 +18,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final String arrivalType;
final double height;
final bool isInpatient;
final bool isDischargedPatient;
PatientProfileHeaderNewDesignAppBar(
this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient=false});
this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient=false, this.isDischargedPatient=false});
@override
Widget build(BuildContext context) {
@ -302,10 +303,16 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
"${TranslationBase.of(context).numOfDays}: ",
fontSize: 15,
),
if(isDischargedPatient)
AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
"${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15,
fontWeight: FontWeight.w700),
fontWeight: FontWeight.w700)
else
AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15,
fontWeight: FontWeight.w700),
],
),
],

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart';
@ -30,7 +31,7 @@ class AppExpandableNotifier extends StatelessWidget {
header: Padding(
padding: EdgeInsets.all(10),
child: Text(
"See Graph Details",
"${TranslationBase.of(context).graphDetails}",
style: TextStyle(fontWeight: FontWeight.bold),
)),
collapsed: Text(''),

@ -48,71 +48,74 @@ class AppButton extends StatefulWidget {
class _AppButtonState extends State<AppButton> {
@override
Widget build(BuildContext context) {
return IgnorePointer(
ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton(
fillColor: widget.disabled
? Colors.grey : widget.color != null ? widget.color : HexColor("#B8382C"),
splashColor: widget.color,
child: Padding(
padding: (widget.hPadding > 0 || widget.vPadding > 0)
? EdgeInsets.symmetric(
vertical: widget.vPadding, horizontal: widget.hPadding)
: EdgeInsets.only(
top: widget.padding,
bottom: widget.padding,
//right: SizeConfig.widthMultiplier * widget.padding,
//left: SizeConfig.widthMultiplier * widget.padding
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (widget.icon != null)
Container(width: 25, height: 25, child: widget.icon),
if (widget.iconData != null)
Icon(
widget.iconData,
color: Colors.white,
),
if (widget.icon != null || widget.iconData != null)
SizedBox(
width: 5.0,
),
widget.loading
? Padding(
padding: EdgeInsets.all(2.6),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[300],
return Container(
// height: 60,//MediaQuery.of(context).size.height * 0.075,
child: IgnorePointer(
ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton(
fillColor: widget.disabled
? Colors.grey : widget.color != null ? widget.color : HexColor("#B8382C"),
splashColor: widget.color,
child: Padding(
padding: (widget.hPadding > 0 || widget.vPadding > 0)
? EdgeInsets.symmetric(
vertical: widget.vPadding, horizontal: widget.hPadding)
: EdgeInsets.only(
top: widget.padding,
bottom: widget.padding,
//right: SizeConfig.widthMultiplier * widget.padding,
//left: SizeConfig.widthMultiplier * widget.padding
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (widget.icon != null)
Container(width: 25, height: 25, child: widget.icon),
if (widget.iconData != null)
Icon(
widget.iconData,
color: Colors.white,
),
if (widget.icon != null || widget.iconData != null)
SizedBox(
width: 5.0,
),
widget.loading
? Padding(
padding: EdgeInsets.all(2.6),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[300],
),
),
),
)
: Container(
child: AppText(
widget.title,
color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize,
fontWeight: widget.fontWeight,
),
),
)
: Container(
child: AppText(
widget.title,
color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize,
fontWeight: widget.fontWeight,
),
),
],
],
),
),
onPressed: widget.disabled ? (){} : widget.onPressed,
shape: RoundedRectangleBorder(
side: BorderSide(
color:
widget.hasBorder ? widget.borderColor : widget.disabled
? Colors.grey : widget.color ?? Color(0xFFB8382C),
width: 0.8,
),
borderRadius: BorderRadius.all(Radius.circular(widget.radius))),
),
onPressed: widget.disabled ? (){} : widget.onPressed,
shape: RoundedRectangleBorder(
side: BorderSide(
color:
widget.hasBorder ? widget.borderColor : widget.disabled
? Colors.grey : widget.color ?? Color(0xFFB8382C),
width: 0.8,
),
borderRadius: BorderRadius.all(Radius.circular(widget.radius))),
),
);
}

@ -4,20 +4,61 @@ import 'app_buttons_widget.dart';
class ButtonBottomSheet extends StatelessWidget {
final double height;
final String buttonTitle;
final Function onPressed;
final GestureTapCallback onPressed;
final String title;
final IconData iconData;
final Widget icon;
final Color color;
final double fontSize;
final double padding;
final Color fontColor;
final bool loading;
final bool disabled;
final FontWeight fontWeight;
final bool hasBorder;
final Color borderColor;
final double radius;
final double vPadding;
final double hPadding;
ButtonBottomSheet({@required this.height, @required this.buttonTitle, @required this.onPressed});
ButtonBottomSheet({@required this.onPressed,
this.title,
this.iconData,
this.icon,
this.color,
this.fontSize = 2,
this.padding = 13,
this.loading = false,
this.disabled = false,
this.fontColor = Colors.white,
this.fontWeight = FontWeight.normal,
this.vPadding = 0,
this.hPadding = 0,
this.radius = 8.0,
this.hasBorder = false,
this.borderColor,});
@override
Widget build(BuildContext context) {
return Container(
height: height ?? null,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: AppButton(
title: buttonTitle,
title: title,
onPressed: onPressed,
fontWeight: fontWeight,
color: color,
fontSize: fontSize,
padding: padding,
disabled: disabled,
radius: radius,
hasBorder: hasBorder,
fontColor: fontColor,
icon: icon,
iconData: iconData,
hPadding: hPadding,
vPadding: vPadding,
borderColor: borderColor,
loading: loading,
),
);
}

@ -59,7 +59,8 @@ class DoctorCardInsurance extends StatelessWidget {
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: approvalStatus == "Approved"
color: approvalStatus == "Approved" ||
approvalStatus == "تمت الموافقة"
? Color(0xff359846)
: Color(0xffD02127),
),
@ -79,7 +80,8 @@ class DoctorCardInsurance extends StatelessWidget {
children: [
AppText(
"$approvalStatus",
color: approvalStatus == "Approved"
color: approvalStatus == "Approved" ||
approvalStatus == "تمت الموافقة"
? Color(0xff359846)
: Color(0xffD02127),
),

@ -12,22 +12,24 @@ class ErrorMessage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Center(
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30),
child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)),
return SingleChildScrollView(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Center(
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30),
child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)),
),
),
),
)
)
],
],
),
),
);
}

@ -62,119 +62,91 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
child: Expanded(
child: Column(
children: [
Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.70,
child: Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
AppTextFieldCustom(
height:
MediaQuery.of(context).size.height * 0.070,
hintText:
TranslationBase.of(context).selectAllergy,
isTextFieldHasSuffix: true,
hasBorder: false,
// controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
)),
),
DividerWithSpacesAround(),
SizedBox(
height: 10,
),
Expanded(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Container(
height:
MediaQuery.of(context).size.height * 0.60,
child: ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) {
bool isSelected = widget
.isServiceSelected(items[index]);
MySelectedAllergy mySelectedAllergy;
if (isSelected) {
mySelectedAllergy =
widget.getServiceSelectedAllergy(
items[index]);
}
TextEditingController remarkController =
TextEditingController(
text: isSelected
? mySelectedAllergy.remark
: null);
TextEditingController severityController =
TextEditingController(
text: isSelected
? mySelectedAllergy
.selectedAllergySeverity !=
null
? projectViewModel
.isArabic
? mySelectedAllergy
.selectedAllergySeverity
.nameAr
: mySelectedAllergy
.selectedAllergySeverity
.nameEn
: null
: null);
return HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Checkbox(
value: widget
.isServiceSelected(
items[index]),
activeColor:
Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(
items[index])) {
widget.removeAllergy(
items[index]);
} else {
MySelectedAllergy
mySelectedAllergy =
new MySelectedAllergy(
selectedAllergy:
items[
index],
selectedAllergySeverity:
_selectedAllergySeverity,
remark: null,
isChecked:
true,
isExpanded:
true);
widget.addAllergy(
mySelectedAllergy);
}
});
}),
InkWell(
onTap: () {
child: Column(
children: [
Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.70,
child: Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
AppTextFieldCustom(
// height:
// MediaQuery.of(context).size.height * 0.070,
hintText:
TranslationBase.of(context).selectAllergy,
isTextFieldHasSuffix: true,
hasBorder: false,
// controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
)),
),
DividerWithSpacesAround(),
SizedBox(
height: 10,
),
Expanded(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Container(
height:
MediaQuery.of(context).size.height * 0.60,
child: ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) {
bool isSelected = widget
.isServiceSelected(items[index]);
MySelectedAllergy mySelectedAllergy;
if (isSelected) {
mySelectedAllergy =
widget.getServiceSelectedAllergy(
items[index]);
}
TextEditingController remarkController =
TextEditingController(
text: isSelected
? mySelectedAllergy.remark
: null);
TextEditingController severityController =
TextEditingController(
text: isSelected
? mySelectedAllergy
.selectedAllergySeverity !=
null
? projectViewModel
.isArabic
? mySelectedAllergy
.selectedAllergySeverity
.nameAr
: mySelectedAllergy
.selectedAllergySeverity
.nameEn
: null
: null);
return HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Checkbox(
value: widget
.isServiceSelected(
items[index]),
activeColor:
Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(
@ -182,9 +154,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
widget.removeAllergy(
items[index]);
} else {
// TODO add Allergy
MySelectedAllergy mySelectedAllergy =
MySelectedAllergy
mySelectedAllergy =
new MySelectedAllergy(
selectedAllergy:
items[
@ -192,208 +163,234 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
selectedAllergySeverity:
_selectedAllergySeverity,
remark: null,
isChecked: true,
isChecked:
true,
isExpanded:
true);
widget.addAllergy(
mySelectedAllergy);
}
});
},
child: Padding(
padding: const EdgeInsets
.symmetric(
horizontal: 10,
vertical: 0),
child: Container(
child: AppText(
projectViewModel
.isArabic
? items[index]
.nameAr !=
""
? items[index]
.nameAr
: items[index]
.nameEn
: items[index]
.nameEn,
color:
Color(0xFF575757),
fontSize: 16,
fontWeight:
FontWeight.w600,
),
width:
MediaQuery.of(context)
.size
.width *
0.55,
),
),
),
],
),
InkWell(
}),
InkWell(
onTap: () {
if (mySelectedAllergy !=
null) {
setState(() {
mySelectedAllergy
.isExpanded =
mySelectedAllergy
.isExpanded
? false
: true;
});
}
setState(() {
if (widget
.isServiceSelected(
items[index])) {
widget.removeAllergy(
items[index]);
} else {
MySelectedAllergy mySelectedAllergy =
new MySelectedAllergy(
selectedAllergy:
items[
index],
selectedAllergySeverity:
_selectedAllergySeverity,
remark: null,
isChecked: true,
isExpanded:
true);
widget.addAllergy(
mySelectedAllergy);
}
});
},
child: Icon((mySelectedAllergy !=
null
? mySelectedAllergy
.isExpanded
: false)
? EvaIcons
.arrowIosUpwardOutline
: EvaIcons
.arrowIosDownwardOutline))
],
),
bodyWidget: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Center(
child: Column(
children: [
AppTextFieldCustom(
onClick: widget.model
.allergySeverityList !=
null
? () {
MasterKeyDailog
dialog =
MasterKeyDailog(
list: widget.model
.allergySeverityList,
okText:
TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
mySelectedAllergy
.selectedAllergySeverity =
selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
context: context,
builder:
(BuildContext
context) {
return dialog;
},
);
}
: null,
isTextFieldHasSuffix: true,
hintText:
TranslationBase.of(
context)
.selectSeverity,
enabled: false,
maxLines: 2,
minLines: 2,
controller:
severityController,
),
SizedBox(
height: 5,
),
if (isSubmitted &&
mySelectedAllergy !=
null &&
mySelectedAllergy
.selectedAllergySeverity ==
null)
Row(
children: [
CustomValidationError(),
],
mainAxisAlignment:
MainAxisAlignment
.start,
child: Padding(
padding: const EdgeInsets
.symmetric(
horizontal: 10,
vertical: 0),
child: Container(
child: AppText(
projectViewModel
.isArabic
? items[index]
.nameAr !=
""
? items[index]
.nameAr
: items[index]
.nameEn
: items[index]
.nameEn,
color:
Color(0xFF575757),
fontSize: 16,
fontWeight:
FontWeight.w600,
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0,
right: 0,
top: 15),
child: NewTextFields(
hintText:
TranslationBase.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight:
FontWeight.w600,
maxLines: 25,
minLines: 3,
initialValue: isSelected
? mySelectedAllergy
.remark
: '',
// controller: remarkControlle
onChanged: (value) {
if (isSelected) {
mySelectedAllergy
.remark = value;
}
},
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
width:
MediaQuery.of(context)
.size
.width *
0.55,
),
],
),
),
],
),
InkWell(
onTap: () {
if (mySelectedAllergy !=
null) {
setState(() {
mySelectedAllergy
.isExpanded =
mySelectedAllergy
.isExpanded
? false
: true;
});
}
},
child: Icon((mySelectedAllergy !=
null
? mySelectedAllergy
.isExpanded
: false)
? EvaIcons
.arrowIosUpwardOutline
: EvaIcons
.arrowIosDownwardOutline))
],
),
bodyWidget: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Center(
child: Column(
children: [
AppTextFieldCustom(
onClick: widget.model
.allergySeverityList !=
null
? () {
MasterKeyDailog
dialog =
MasterKeyDailog(
list: widget.model
.allergySeverityList,
okText:
TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
mySelectedAllergy
.selectedAllergySeverity =
selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
context: context,
builder:
(BuildContext
context) {
return dialog;
},
);
}
: null,
isTextFieldHasSuffix: true,
hintText:
TranslationBase.of(
context)
.selectSeverity,
enabled: false,
maxLines: 2,
minLines: 2,
controller:
severityController,
),
SizedBox(
height: 5,
),
if (isSubmitted &&
mySelectedAllergy !=
null &&
mySelectedAllergy
.selectedAllergySeverity ==
null)
Row(
children: [
CustomValidationError(),
],
mainAxisAlignment:
MainAxisAlignment
.start,
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0,
right: 0,
top: 15),
child: NewTextFields(
hintText:
TranslationBase.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight:
FontWeight.w600,
maxLines: 25,
minLines: 3,
initialValue: isSelected
? mySelectedAllergy
.remark
: '',
// controller: remarkControlle
onChanged: (value) {
if (isSelected) {
mySelectedAllergy
.remark = value;
}
},
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
],
),
),
),
isExpand: mySelectedAllergy != null
? mySelectedAllergy.isExpanded
: false,
);
},
),
),
isExpand: mySelectedAllergy != null
? mySelectedAllergy.isExpanded
: false,
);
},
),
),
),
],
))),
),
),
SizedBox(
height: 10,
),
],
))),
),
],
),
),
SizedBox(
height: 10,
),
],
),
);
}

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import '../app_texts_widget.dart';
@ -50,10 +52,12 @@ class AppTextFieldCustom extends StatefulWidget {
class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
children: [
Container(
height: widget.height != 0 ? widget.height + 8 : null,
height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 : null,
decoration: widget.hasBorder
? TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff),
@ -72,7 +76,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
child: Container(
padding: widget.dropDownText == null
? EdgeInsets.symmetric(vertical: 0)
: EdgeInsets.symmetric(vertical: 8),
: EdgeInsets.symmetric(vertical: 0), // 8.0
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
@ -82,40 +86,45 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
widget.dropDownText != null)
AppText(
widget.hintText,
fontFamily: 'Poppins',
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700,
),
widget.dropDownText == null
? TextField(
textAlign: TextAlign.left,
decoration:
TextFieldsUtils.textFieldSelectorDecoration(
widget.hintText, null, true),
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.7,
fontFamily: 'Poppins',
color: Colors.grey.shade800,
),
controller: widget.controller,
keyboardType: widget.inputType,
enabled: widget.enabled,
minLines: widget.minLines,
maxLines: widget.maxLines,
inputFormatters: widget.inputFormatters != null
? widget.inputFormatters
: [],
onChanged: (value) {
if (widget.onChanged != null) {
widget.onChanged(value);
? Container(
height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 : null,
child: TextField(
textAlign: projectViewModel.isArabic
? TextAlign.right
: TextAlign.left,
decoration:
TextFieldsUtils.textFieldSelectorDecoration(
widget.hintText, null, true),
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.7,
fontFamily: 'Poppins',
color: Color(0xFF575757),
),
controller: widget.controller,
keyboardType: widget.inputType,
enabled: widget.enabled,
minLines: widget.minLines,
maxLines: widget.maxLines,
inputFormatters: widget.inputFormatters != null
? widget.inputFormatters
: [],
onChanged: (value) {
setState(() {});
}
},
)
if (widget.onChanged != null) {
widget.onChanged(value);
}
},
),
)
: AppText(
widget.dropDownText,
fontFamily: 'Poppins',
color: Colors.grey.shade800,
color: Color(0xFF575757),
fontSize: SizeConfig.textMultiplier * 1.7,
),
],

@ -48,6 +48,7 @@ class AppTextFormField extends FormField<String> {
},
textInputAction: textInputAction,
onFieldSubmitted: onFieldSubmitted,
decoration: InputDecoration(
hintText: hintText,
suffixIcon: prefix,

@ -11,7 +11,7 @@ description: A new Flutter project.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
version: 1.2.2+2
environment:
sdk: ">=2.8.0 <3.0.0"

Loading…
Cancel
Save