Merge branch 'pharmacy' into pharmacy-Fatima

# Conflicts:
#	android/app/build.gradle
#	android/app/src/main/AndroidManifest.xml
#	lib/config/config.dart
#	lib/config/localized_values.dart
#	lib/pages/landing/home_page.dart
#	lib/uitl/translations_delegate_base.dart
merge-requests/206/head
Fatimah Alshammari 4 years ago
commit ddf032bb47

@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -41,19 +41,28 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloud.diplomaticquarterapp"
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
debug {}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
staging {
// Specifies a sorted list of fallback build types that the
// plugin should try to use when a dependency does not include a
// "staging" build type. You may specify as many fallbacks as you
// like, and the plugin selects the first build type that's
// available in the dependency.
matchingFallbacks = ['debug', 'qa', 'release']
}
}
}
@ -63,9 +72,15 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.google.firebase:firebase-messaging:20.1.0"
implementation 'pub.devrel:easypermissions:0.4.0'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation "com.google.firebase:firebase-messaging:20.3.0"
implementation 'pub.devrel:easypermissions:0.4.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.guava:guava:27.0.1-android'
// Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Dependency on a remote binary
// implementation 'com.example.android:app-magic:12.3'
}

@ -74,8 +74,8 @@
android:name="flutterEmbedding"
android:value="2" />
<!-- <meta-data android:name="com.google.android.geo.API_KEY"-->
<!-- android:value="AIzaSyCiD4YqVqLNYbt8-htvFy4Wp8XSph9E3wM"/>-->
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"/>
</application>

@ -1,36 +1,11 @@
package com.cloud.diplomaticquarterapp
import android.content.ContentResolver
import android.content.Context
import android.media.RingtoneManager
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity : FlutterActivity() {
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
MethodChannel(flutterEngine.dartExecutor, "crossingthestreams.io/resourceResolver").setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
if ("drawableToUri" == call.method) {
val resourceId = this@MainActivity.resources.getIdentifier(call.arguments as String, "drawable", this@MainActivity.packageName)
result.success(resourceToUriString(this@MainActivity.applicationContext, resourceId))
}
if ("getAlarmUri" == call.method) {
result.success(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM).toString())
}
}
}
companion object {
private fun resourceToUriString(context: Context, resId: Int): String {
return (ContentResolver.SCHEME_ANDROID_RESOURCE
+ "://"
+ context.resources.getResourcePackageName(resId)
+ "/"
+ context.resources.getResourceTypeName(resId)
+ "/"
+ context.resources.getResourceEntryName(resId))
}
}
class MainActivity: FlutterFragmentActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -1,5 +1,6 @@
import UIKit
import Flutter
import GoogleMaps
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@ -7,6 +8,7 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("AIzaSyCiiJiHkocPbcziHt9O8rGWavDrxHRQys8")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -59,9 +59,16 @@ const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///Er Nearest
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const GET_AMBULANCE_REQUEST =
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER =
'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -141,7 +148,8 @@ const GET_PATIENT_SHARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
@ -264,13 +272,18 @@ const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST =
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_PAYMENT_INFO =
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_FREE_SLOTS =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD =
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE =
@ -312,7 +325,6 @@ const H2O_GET_USER_PROGRESS =
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
//E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES =
@ -325,18 +337,42 @@ const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
//Pharmacy wishlist
const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
//Pharmacy address
const GET_ADDRESS = "https://uat.hmgwebservices.com/epharmacy/api/Customers/272843?fields=addresses";
const GET_ADDRESS =
"https://uat.hmgwebservices.com/epharmacy/api/Customers/272843?fields=addresses";
//order + order details 'orders?customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=' + page_id + '&limit=200&customer_id='+ custmerId,
const GET_ORDER = "https://uat.hmgwebservices.com/epharmacy/api/orders?customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
const GET_ORDER_DETAILS = "https://uat.hmgwebservices.com/epharmacy/api/orders/3584";
const GET_ORDER =
"https://uat.hmgwebservices.com/epharmacy/api/orders?customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
const GET_ORDER_DETAILS =
"https://uat.hmgwebservices.com/epharmacy/api/orders/3584";
// pharmacy
const GET_PHARMACY_BANNER = "epharmacy/api/promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "epharmacy/api/topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "epharmacy/api/bestsellerproducts";
const GET_PHARMACY_PRODUCTs_BY_IDS = "epharmacy/api/productsbyids/";
const GET_CUSTOMERS_ADDRESSES = "epharmacy/api/Customers/";
const GET_WISHLIST = "epharmacy/api/shopping_cart_items/";
// Home Health Care
const HHC_GET_ALL_SERVICES =
"Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES =
"Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER =
"Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";
class AppGlobal {
static var context;
@ -361,4 +397,4 @@ class AppGlobal {
return request;
}
}
}

@ -344,7 +344,7 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Home Health Care Service",
'ar': 'الرعاية الصحية المنزلية'
},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": {
"en": "Online Payment Service",
@ -595,6 +595,19 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Service Information",
"ar": "معلومات الخدمة"
},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
"HomeHealthCare": {
"en": "Home Health Care",
"ar": " الرعاية الصحية المنزلية "
},
"HomeHealthCareText": {
"en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
"ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي)... "
},
"LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"},
"OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"},
"info-lab": {
"en":
"This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
@ -611,8 +624,8 @@ const Map<String, Map<String, String>> localizedValues = {
"lakum": {"en": "Lakum", "ar": "لكم"},
"wishlist": {"en": "Wishlist", "ar": "الرغبات"},
"reviews": {"en": "Reviews", "ar": "التقيمات"},
"myPrescriptions": {"en": "My Prescriptions", "ar": "وصفاتي"},
"medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"},
// "myPrescriptions": {"en": "My Prescriptions", "ar": "وصفاتي"},
// "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"},
"pillReminder": {"en": "Pill Reminder", "ar": "تذكير الأدويه"},
"shippingAddresses": {"en": "Shipping Addresses", "ar": "عناوين الشحن"},
"reachUs": {"en": "Reach Us", "ar": "الوصول لنا"},
@ -629,10 +642,19 @@ const Map<String, Map<String, String>> localizedValues = {
"cancelled": {"en": "Cancelled", "ar": " ملغي"},
"writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"},
"shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"},
"backMyAccount": {"en": "BACK TO MY ACCOUNT ", "ar": " الرجوع لحسابي الشخصي"},
"backMyAccount": {
"en": "BACK TO MY ACCOUNT ",
"ar": " الرجوع لحسابي الشخصي"
},
"reviewSuccessful": {"en": "Review Successful", "ar": " تقييم ناجح"},
"reviewShared": {"en": "Your review has been shared on product review section", "ar": " تمت مشاركة تقييمك في قسم تقييم المنتج"},
"reviewComment": {"en": "Your reviews help other to choose better product", "ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل"},
"reviewShared": {
"en": "Your review has been shared on product review section",
"ar": " تمت مشاركة تقييمك في قسم تقييم المنتج"
},
"reviewComment": {
"en": "Your reviews help other to choose better product",
"ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل"
},
"shippingAddress": {"en": "SHIPPING ADDRESS", "ar": " عنوان الشحن"},
"shippedMethod": {"en": "SHIP BY:", "ar": " الشحن بواسطة:"},
"orderDetail": {"en": "Order Detail", "ar": " تفاصيل الطلب"},
@ -646,7 +668,76 @@ const Map<String, Map<String, String>> localizedValues = {
"cancelOrder": {"en": "CANCEL ORDER", "ar": "الغاء الطلب "},
"confirmAddress": {"en": "CONFIRM ADDRESS ", "ar": " تأكيد العنوان "},
"confirmLocation": {"en": "CONFIRM LOCATION ", "ar": " تأكيد الموقع "},
"confirmDeleteMsg": {"en": "Are you sure! want to delete ", "ar": "هل انت متأكد تريد الحذف "},
"confirmDeleteMsg": {
"en": "Are you sure! want to delete ",
"ar": "هل انت متأكد تريد الحذف "
},
"confirmDelete": {"en": "DELETE", "ar": "حذف"},
"confirmCancellation": {"en": "Are you sure! want to cancel this order ", "ar": "هل انت متأكد تريد حذف هذا المنتج "},
"confirmCancellation": {
"en": "Are you sure! want to cancel this order ",
"ar": "هل انت متأكد تريد حذف هذا المنتج "
},
"TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"},
"Beforeusing": {
"en": "Before using the checkup, please read Terms of Service.",
"ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"
},
"accept": {
"en": "I read and accept Terms of Service and Privacy Policy",
"ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"
},
"data-safe-info": {
"en":
"Information that you provide is anonymous and not shared with anyone.",
"ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"
},
"data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"},
"informational": {
"en":
"Checkup is for informational purposes and is not a qualified medical opinion",
"ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"
},
"not-use-in-emerbency": {
"en": "Do not use in emergencies.",
"ar": "لا تستخدم في حالات الطوارئ"
},
"not-use-in-emerbency-details": {
"en": "In case of health emergency, ",
"ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"
},
"not-use-in-emerbency-details-call": {
"en": "call the nearest emergency number immediately",
"ar": " اتصل بأقرب رقم للطوارئ على الفور"
},
"check-diagnosis": {
"en": "Checkup is not a diagnosis.",
"ar": "الفحص ليس تشخيص."
},
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
// pharmacy module
"medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"},
"offersAndPromotions": {
"en": "OFFERS & SPECIAL PROMOTIONS",
"ar": "العروض والترقيات الخاصة"
},
"myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"},
"searchAndScanMedication": {
"en": "SEARCH & SCAN FOR MEDICATION",
"ar": "البحث والمسح للأدوية"
},
"shopByBrands": {"en": "Shop By Brands", "ar": "تسوق حسب الماركات"},
"recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"},
"bestSellers": {"en": "Best Sellers", "ar": "أفضل البائعين"},
"deleteAllItems": {"en": "Delete All Items", "ar": "حذف كافة العناصر"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
"select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
"i-am": {"en": "I am", "ar": "أنا"},
"years-old": {"en": "years old", "ar": "سنة"},
"drag-point": {
"en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك"
},
};

@ -16,3 +16,4 @@ const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
const IS_SEARCH_APPO = 'is-search-appo';
const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';
const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited';

@ -1,4 +1,4 @@
enum OrderService { AMBULANCE }
enum OrderService { AMBULANCE,HOME_HEALTH_CARE,Comprehensive_Medical_Checkup }
extension SelectedOrderService on OrderService {
int getIdOrderService() {
@ -6,6 +6,13 @@ extension SelectedOrderService on OrderService {
case OrderService.AMBULANCE:
return 4;
break;
case OrderService.Comprehensive_Medical_Checkup:
return 3;
break;
case OrderService.HOME_HEALTH_CARE:
return 2;
break;
}
return 4;
}
@ -15,6 +22,12 @@ extension SelectedOrderService on OrderService {
case 4:
return OrderService.AMBULANCE;
break;
case 2:
return OrderService.HOME_HEALTH_CARE;
break;
case 3:
return OrderService.Comprehensive_Medical_Checkup;
break;
}
return OrderService.AMBULANCE;

@ -0,0 +1,68 @@
class CMCGetItemsRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int checkupType;
CMCGetItemsRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.checkupType});
CMCGetItemsRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
checkupType = json['CheckupType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['CheckupType'] = this.checkupType;
return data;
}
}

@ -0,0 +1,18 @@
class CMCGetItemsResponseModel {
String itemDescription;
String itemName;
CMCGetItemsResponseModel({this.itemDescription, this.itemName});
CMCGetItemsResponseModel.fromJson(Map<String, dynamic> json) {
itemDescription = json['ItemDescription'];
itemName = json['ItemName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ItemDescription'] = this.itemDescription;
data['ItemName'] = this.itemName;
return data;
}
}

@ -0,0 +1,135 @@
class CMCInsertPresOrderRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
double latitude;
double longitude;
int createdBy;
int orderServiceID;
List<PatientERCMCInsertServicesList> patientERCMCInsertServicesList;
CMCInsertPresOrderRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.latitude,
this.longitude,
this.createdBy,
this.orderServiceID,
this.patientERCMCInsertServicesList});
CMCInsertPresOrderRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
latitude = json['Latitude'];
longitude = json['Longitude'];
createdBy = json['CreatedBy'];
orderServiceID = json['OrderServiceID'];
if (json['PatientER_CMC_InsertServicesList'] != null) {
patientERCMCInsertServicesList =
new List<PatientERCMCInsertServicesList>();
json['PatientER_CMC_InsertServicesList'].forEach((v) {
patientERCMCInsertServicesList
.add(new PatientERCMCInsertServicesList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['CreatedBy'] = this.createdBy;
data['OrderServiceID'] = this.orderServiceID;
if (this.patientERCMCInsertServicesList != null) {
data['PatientER_CMC_InsertServicesList'] =
this.patientERCMCInsertServicesList.map((v) => v.toJson()).toList();
}
return data;
}
}
class PatientERCMCInsertServicesList {
int recordID;
String serviceID;
String selectedServiceName;
String selectedServiceNameAR;
dynamic price;
dynamic vAT;
dynamic totalPrice;
PatientERCMCInsertServicesList(
{this.recordID,
this.serviceID,
this.selectedServiceName,
this.selectedServiceNameAR,
this.price,
this.vAT,
this.totalPrice});
PatientERCMCInsertServicesList.fromJson(Map<String, dynamic> json) {
recordID = json['RecordID'];
serviceID = json['ServiceID'];
selectedServiceName = json['selectedServiceName'];
selectedServiceNameAR = json['selectedServiceNameAR'];
price = json['Price'];
vAT = json['VAT'];
totalPrice = json['TotalPrice'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RecordID'] = this.recordID;
data['ServiceID'] = this.serviceID;
data['selectedServiceName'] = this.selectedServiceName;
data['selectedServiceNameAR'] = this.selectedServiceNameAR;
data['Price'] = this.price;
data['VAT'] = this.vAT;
data['TotalPrice'] = this.totalPrice;
return data;
}
}

@ -0,0 +1,72 @@
class GetCMCServicesRequestModel {
int channel;
int deviceTypeID;
int genderID;
String generalid;
String identificationNo;
String iPAdress;
bool isDentalAllowedBackend;
int languageID;
int patientID;
int patientOutSA;
int patientType;
int patientTypeID;
String sessionID;
String tokenID;
double versionID;
GetCMCServicesRequestModel(
{this.channel,
this.deviceTypeID,
this.genderID,
this.generalid,
this.identificationNo,
this.iPAdress,
this.isDentalAllowedBackend,
this.languageID,
this.patientID,
this.patientOutSA,
this.patientType,
this.patientTypeID,
this.sessionID,
this.tokenID,
this.versionID});
GetCMCServicesRequestModel.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];
deviceTypeID = json['DeviceTypeID'];
genderID = json['GenderID'];
generalid = json['generalid'];
identificationNo = json['IdentificationNo'];
iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
patientType = json['PatientType'];
patientTypeID = json['PatientTypeID'];
sessionID = json['SessionID'];
tokenID = json['TokenID'];
versionID = json['VersionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Channel'] = this.channel;
data['DeviceTypeID'] = this.deviceTypeID;
data['GenderID'] = this.genderID;
data['generalid'] = this.generalid;
data['IdentificationNo'] = this.identificationNo;
data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID;
data['SessionID'] = this.sessionID;
data['TokenID'] = this.tokenID;
data['VersionID'] = this.versionID;
return data;
}
}

@ -0,0 +1,44 @@
class GetCMCServicesResponseModel {
String description;
String descriptionN;
int iD;
bool isActive;
dynamic price;
int serviceID;
dynamic totalPrice;
dynamic vAT;
GetCMCServicesResponseModel(
{this.description,
this.descriptionN,
this.iD,
this.isActive,
this.price,
this.serviceID,
this.totalPrice,
this.vAT});
GetCMCServicesResponseModel.fromJson(Map<String, dynamic> json) {
description = json['Description'];
descriptionN = json['DescriptionN'];
iD = json['ID'];
isActive = json['IsActive'];
price = json['Price'];
serviceID = json['ServiceID'];
totalPrice = json['TotalPrice'];
vAT = json['VAT'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['ID'] = this.iD;
data['IsActive'] = this.isActive;
data['Price'] = this.price;
data['ServiceID'] = this.serviceID;
data['TotalPrice'] = this.totalPrice;
data['VAT'] = this.vAT;
return data;
}
}

@ -0,0 +1,64 @@
class HHCGetAllServicesRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
HHCGetAllServicesRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
HHCGetAllServicesRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,32 @@
class HHCGetAllServicesResponseModel {
int iD;
int serviceID;
String description;
String descriptionN;
bool isActive;
HHCGetAllServicesResponseModel(
{this.iD,
this.serviceID,
this.description,
this.descriptionN,
this.isActive});
HHCGetAllServicesResponseModel.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
serviceID = json['ServiceID'];
description = json['Description'];
descriptionN = json['DescriptionN'];
isActive = json['IsActive'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ServiceID'] = this.serviceID;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['IsActive'] = this.isActive;
return data;
}
}

@ -0,0 +1,23 @@
class PatientERHHCInsertServicesList {
int recordID;
int serviceID;
String serviceName;
PatientERHHCInsertServicesList(
{this.recordID, this.serviceID, this.serviceName});
PatientERHHCInsertServicesList.fromJson(Map<String, dynamic> json) {
recordID = json['RecordID'];
serviceID = json['ServiceID'];
serviceName = json['ServiceName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RecordID'] = this.recordID;
data['ServiceID'] = this.serviceID;
data['ServiceName'] = this.serviceName;
return data;
}
}

@ -0,0 +1,64 @@
class GetHHCAllPresOrdersRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
GetHHCAllPresOrdersRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
GetHHCAllPresOrdersRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,132 @@
class GetHHCAllPresOrdersResponseModel {
int iD;
String patientID;
bool patientOutSA;
bool isOutPatient;
int projectID;
int nearestProjectID;
double longitude;
double latitude;
String appointmentNo;
String dischargeID;
int lineItemNo;
int status;
String description;
String descriptionN;
String createdOn;
int serviceID;
int createdBy;
String editedOn;
int editedBy;
int channel;
dynamic clientRequestID;
bool returnedToQueue;
dynamic pickupDateTime;
dynamic pickupLocationName;
dynamic dropoffLocationName;
int realRRTHaveTransactions;
String nearestProjectDescription;
String nearestProjectDescriptionN;
String projectDescription;
String projectDescriptionN;
GetHHCAllPresOrdersResponseModel(
{this.iD,
this.patientID,
this.patientOutSA,
this.isOutPatient,
this.projectID,
this.nearestProjectID,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeID,
this.lineItemNo,
this.status,
this.description,
this.descriptionN,
this.createdOn,
this.serviceID,
this.createdBy,
this.editedOn,
this.editedBy,
this.channel,
this.clientRequestID,
this.returnedToQueue,
this.pickupDateTime,
this.pickupLocationName,
this.dropoffLocationName,
this.realRRTHaveTransactions,
this.nearestProjectDescription,
this.nearestProjectDescriptionN,
this.projectDescription,
this.projectDescriptionN});
GetHHCAllPresOrdersResponseModel.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
isOutPatient = json['IsOutPatient'];
projectID = json['ProjectID'];
nearestProjectID = json['NearestProjectID'];
longitude = json['Longitude'];
latitude = json['Latitude'];
appointmentNo = json['AppointmentNo'];
dischargeID = json['DischargeID'];
lineItemNo = json['LineItemNo'];
status = json['Status'];
description = json['Description'];
descriptionN = json['DescriptionN'];
createdOn = json['CreatedOn'];
serviceID = json['ServiceID'];
createdBy = json['CreatedBy'];
editedOn = json['EditedOn'];
editedBy = json['EditedBy'];
channel = json['Channel'];
clientRequestID = json['ClientRequestID'];
returnedToQueue = json['ReturnedToQueue'];
pickupDateTime = json['PickupDateTime'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
nearestProjectDescription = json['NearestProjectDescription'];
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
projectDescription = json['ProjectDescription'];
projectDescriptionN = json['ProjectDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['ProjectID'] = this.projectID;
data['NearestProjectID'] = this.nearestProjectID;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
data['AppointmentNo'] = this.appointmentNo;
data['DischargeID'] = this.dischargeID;
data['LineItemNo'] = this.lineItemNo;
data['Status'] = this.status;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['CreatedOn'] = this.createdOn;
data['ServiceID'] = this.serviceID;
data['CreatedBy'] = this.createdBy;
data['EditedOn'] = this.editedOn;
data['EditedBy'] = this.editedBy;
data['Channel'] = this.channel;
data['ClientRequestID'] = this.clientRequestID;
data['ReturnedToQueue'] = this.returnedToQueue;
data['PickupDateTime'] = this.pickupDateTime;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
data['NearestProjectDescription'] = this.nearestProjectDescription;
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
data['ProjectDescription'] = this.projectDescription;
data['ProjectDescriptionN'] = this.projectDescriptionN;
return data;
}
}

@ -0,0 +1,68 @@
class GetOrderDetailByOrderIDRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int presOrderID;
GetOrderDetailByOrderIDRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.presOrderID});
GetOrderDetailByOrderIDRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
presOrderID = json['PresOrderID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['PresOrderID'] = this.presOrderID;
return data;
}
}

@ -0,0 +1,52 @@
class GetOrderDetailByOrderIDResponseModel {
int iD;
int presOrderID;
int hHCServiceID;
int createdBy;
String createdOn;
int editedBy;
String editedOn;
bool isActive;
String description;
String descriptionN;
GetOrderDetailByOrderIDResponseModel(
{this.iD,
this.presOrderID,
this.hHCServiceID,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.isActive,
this.description,
this.descriptionN});
GetOrderDetailByOrderIDResponseModel.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
presOrderID = json['PresOrderID'];
hHCServiceID = json['HHC_ServiceID'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
isActive = json['IsActive'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PresOrderID'] = this.presOrderID;
data['HHC_ServiceID'] = this.hHCServiceID;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['IsActive'] = this.isActive;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -0,0 +1,97 @@
import 'PatientERHHCInsertServicesList.dart';
class PatientERInsertPresOrderRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
double latitude;
double longitude;
int createdBy;
int orderServiceID;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();
PatientERInsertPresOrderRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.latitude,
this.longitude,
this.createdBy,
this.orderServiceID,
this.patientERHHCInsertServicesList
});
PatientERInsertPresOrderRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
latitude = json['Latitude'];
longitude = json['Longitude'];
createdBy = json['CreatedBy'];
orderServiceID = json['OrderServiceID'];
if (json['PatientER_HHC_InsertServicesList'] != null) {
patientERHHCInsertServicesList =
new List<PatientERHHCInsertServicesList>();
json['PatientER_HHC_InsertServicesList'].forEach((v) {
patientERHHCInsertServicesList
.add(new PatientERHHCInsertServicesList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['CreatedBy'] = this.createdBy;
data['OrderServiceID'] = this.orderServiceID;
if (this.patientERHHCInsertServicesList != null) {
data['PatientER_HHC_InsertServicesList'] =
this.patientERHHCInsertServicesList.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -0,0 +1,80 @@
class UpdatePresOrderRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int presOrderID;
int presOrderStatus;
int editedBy;
String rejectionReason;
UpdatePresOrderRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.presOrderID,
this.presOrderStatus,
this.editedBy,
this.rejectionReason});
UpdatePresOrderRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
presOrderID = json['PresOrderID'];
presOrderStatus = json['PresOrderStatus'];
editedBy = json['EditedBy'];
rejectionReason = json['RejectionReason'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['PresOrderID'] = this.presOrderID;
data['PresOrderStatus'] = this.presOrderStatus;
data['EditedBy'] = this.editedBy;
data['RejectionReason'] = this.rejectionReason;
return data;
}
}

@ -36,7 +36,7 @@ class PatientER {
int projectID;
int createdBy;
int lineItemNo;
int cost;
double cost;
double vAT;
double totalPrice;
String pickupLocationLattitude;

@ -18,7 +18,7 @@ class PickUpRequestPresOrder {
int pickupSpot;
dynamic dropoffLocationId;
int transportationMethodId;
int cost;
double cost;
double vAT;
double totalPrice;
int amountCollected;

@ -0,0 +1,85 @@
class Addresses {
String id;
String firstName;
String lastName;
String email;
String company;
int countryId;
String country;
String stateProvinceId;
String city;
String address1;
String address2;
String zipPostalCode;
String phoneNumber;
String faxNumber;
String customerAttributes;
String createdOnUtc;
String province;
String latLong;
Addresses(
{this.id,
this.firstName,
this.lastName,
this.email,
this.company,
this.countryId,
this.country,
this.stateProvinceId,
this.city,
this.address1,
this.address2,
this.zipPostalCode,
this.phoneNumber,
this.faxNumber,
this.customerAttributes,
this.createdOnUtc,
this.province,
this.latLong});
Addresses.fromJson(Map<String, dynamic> json) {
id = json['id'];
firstName = json['first_name'];
lastName = json['last_name'];
email = json['email'];
company = json['company'];
countryId = json['country_id'];
country = json['country'];
stateProvinceId = json['state_province_id'];
city = json['city'];
address1 = json['address1'];
address2 = json['address2'];
zipPostalCode = json['zip_postal_code'];
phoneNumber = json['phone_number'];
faxNumber = json['fax_number'];
customerAttributes = json['customer_attributes'];
createdOnUtc = json['created_on_utc'];
province = json['province'];
latLong = json['lat_long'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['email'] = this.email;
data['company'] = this.company;
data['country_id'] = this.countryId;
data['country'] = this.country;
data['state_province_id'] = this.stateProvinceId;
data['city'] = this.city;
data['address1'] = this.address1;
data['address2'] = this.address2;
data['zip_postal_code'] = this.zipPostalCode;
data['phone_number'] = this.phoneNumber;
data['fax_number'] = this.faxNumber;
data['customer_attributes'] = this.customerAttributes;
data['created_on_utc'] = this.createdOnUtc;
data['province'] = this.province;
data['lat_long'] = this.latLong;
return data;
}
}

@ -0,0 +1,128 @@
class Customer {
String fileNumber;
String iqamaNumber;
int isOutSa;
int patientType;
String gender;
String birthDate;
String phone;
String countryCode;
String yahalaAccountno;
String billingAddress;
String shippingAddress;
String id;
String username;
String email;
String firstName;
String lastName;
String languageId;
String adminComment;
String isTaxExempt;
String hasShoppingCartItems;
String active;
String deleted;
String isSystemAccount;
String systemName;
String lastIpAddress;
String createdOnUtc;
String lastLoginDateUtc;
String lastActivityDateUtc;
String registeredInStoreId;
Customer(
{this.fileNumber,
this.iqamaNumber,
this.isOutSa,
this.patientType,
this.gender,
this.birthDate,
this.phone,
this.countryCode,
this.yahalaAccountno,
this.billingAddress,
this.shippingAddress,
this.id,
this.username,
this.email,
this.firstName,
this.lastName,
this.languageId,
this.adminComment,
this.isTaxExempt,
this.hasShoppingCartItems,
this.active,
this.deleted,
this.isSystemAccount,
this.systemName,
this.lastIpAddress,
this.createdOnUtc,
this.lastLoginDateUtc,
this.lastActivityDateUtc,
this.registeredInStoreId});
Customer.fromJson(Map<String, dynamic> json) {
fileNumber = json['file_number'];
iqamaNumber = json['iqama_number'];
isOutSa = json['is_out_sa'];
patientType = json['patient_type'];
gender = json['gender'];
birthDate = json['birth_date'];
phone = json['phone'];
countryCode = json['country_code'];
yahalaAccountno = json['yahala_accountno'];
billingAddress = json['billing_address'];
shippingAddress = json['shipping_address'];
id = json['id'];
username = json['username'];
email = json['email'];
firstName = json['first_name'];
lastName = json['last_name'];
languageId = json['language_id'];
adminComment = json['admin_comment'];
isTaxExempt = json['is_tax_exempt'];
hasShoppingCartItems = json['has_shopping_cart_items'];
active = json['active'];
deleted = json['deleted'];
isSystemAccount = json['is_system_account'];
systemName = json['system_name'];
lastIpAddress = json['last_ip_address'];
createdOnUtc = json['created_on_utc'];
lastLoginDateUtc = json['last_login_date_utc'];
lastActivityDateUtc = json['last_activity_date_utc'];
registeredInStoreId = json['registered_in_store_id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['file_number'] = this.fileNumber;
data['iqama_number'] = this.iqamaNumber;
data['is_out_sa'] = this.isOutSa;
data['patient_type'] = this.patientType;
data['gender'] = this.gender;
data['birth_date'] = this.birthDate;
data['phone'] = this.phone;
data['country_code'] = this.countryCode;
data['yahala_accountno'] = this.yahalaAccountno;
data['billing_address'] = this.billingAddress;
data['shipping_address'] = this.shippingAddress;
data['id'] = this.id;
data['username'] = this.username;
data['email'] = this.email;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['language_id'] = this.languageId;
data['admin_comment'] = this.adminComment;
data['is_tax_exempt'] = this.isTaxExempt;
data['has_shopping_cart_items'] = this.hasShoppingCartItems;
data['active'] = this.active;
data['deleted'] = this.deleted;
data['is_system_account'] = this.isSystemAccount;
data['system_name'] = this.systemName;
data['last_ip_address'] = this.lastIpAddress;
data['created_on_utc'] = this.createdOnUtc;
data['last_login_date_utc'] = this.lastLoginDateUtc;
data['last_activity_date_utc'] = this.lastActivityDateUtc;
data['registered_in_store_id'] = this.registeredInStoreId;
return data;
}
}

@ -0,0 +1,98 @@
import 'PharmacyImageObject.dart';
class Manufacturer {
String id;
String name;
String namen;
// List<LocalizedNames> localizedNames;
String description;
int manufacturerTemplateId;
String metaKeywords;
String metaDescription;
String metaTitle;
int pageSize;
String pageSizeOptions;
String priceRanges;
bool published;
bool deleted;
int displayOrder;
String createdOnUtc;
String updatedOnUtc;
PharmacyImageObject image;
Manufacturer(
{this.id,
this.name,
this.namen,
// this.localizedNames,
this.description,
this.manufacturerTemplateId,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
this.pageSize,
this.pageSizeOptions,
this.priceRanges,
this.published,
this.deleted,
this.displayOrder,
this.createdOnUtc,
this.updatedOnUtc,
this.image});
Manufacturer.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
namen = json['namen'];
// if (json['localized_names'] != null) {
// localizedNames = new List<LocalizedNames>();
// json['localized_names'].forEach((v) {
// localizedNames.add(new LocalizedNames.fromJson(v));
// });
// }
description = json['description'];
manufacturerTemplateId = json['manufacturer_template_id'];
metaKeywords = json['meta_keywords'];
metaDescription = json['meta_description'];
metaTitle = json['meta_title'];
pageSize = json['page_size'];
pageSizeOptions = json['page_size_options'];
priceRanges = json['price_ranges'];
published = json['published'];
deleted = json['deleted'];
displayOrder = json['display_order'];
createdOnUtc = json['created_on_utc'];
updatedOnUtc = json['updated_on_utc'];
image = json['image'] != null
? new PharmacyImageObject.fromJson(json['image'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['namen'] = this.namen;
// if (this.localizedNames != null) {
// data['localized_names'] =
// this.localizedNames.map((v) => v.toJson()).toList();
// }
data['description'] = this.description;
data['manufacturer_template_id'] = this.manufacturerTemplateId;
data['meta_keywords'] = this.metaKeywords;
data['meta_description'] = this.metaDescription;
data['meta_title'] = this.metaTitle;
data['page_size'] = this.pageSize;
data['page_size_options'] = this.pageSizeOptions;
data['price_ranges'] = this.priceRanges;
data['published'] = this.published;
data['deleted'] = this.deleted;
data['display_order'] = this.displayOrder;
data['created_on_utc'] = this.createdOnUtc;
data['updated_on_utc'] = this.updatedOnUtc;
if (this.image != null) {
data['image'] = this.image.toJson();
}
return data;
}
}

@ -0,0 +1,27 @@
class PharmacyImageObject {
int id;
int position;
String src;
String thumb;
String attachment;
PharmacyImageObject({this.id, this.position, this.src, this.thumb, this.attachment});
PharmacyImageObject.fromJson(Map<String, dynamic> json) {
id = json['id'];
position = json['position'];
src = json['src'];
thumb = json['thumb'];
attachment = json['attachment'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['position'] = this.position;
data['src'] = this.src;
data['thumb'] = this.thumb;
data['attachment'] = this.attachment;
return data;
}
}

@ -0,0 +1,149 @@
import 'PharmacyImageObject.dart';
import 'Reviews.dart';
class PharmacyProduct {
String id;
String name;
String namen;
String shortDescription;
String fullDescription;
String fullDescriptionn;
int approvedRatingSum;
int approvedTotalReviews;
String sku;
bool isRx;
String rxMessage;
String rxMessagen;
int stockQuantity;
String stockAvailability;
String stockAvailabilityn;
bool allowBackInStockSubscriptions;
int orderMinimumQuantity;
int orderMaximumQuantity;
double price;
double oldPrice;
String discountName;
String discountNamen;
String discountPercentage;
int displayOrder;
List<int> discountIds;
List<Reviews> reviews;
List<PharmacyImageObject> images;
PharmacyProduct(
{this.id,
this.name,
this.namen,
this.shortDescription,
this.fullDescription,
this.fullDescriptionn,
this.approvedRatingSum,
this.approvedTotalReviews,
this.sku,
this.isRx,
this.rxMessage,
this.rxMessagen,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.price,
this.oldPrice,
this.discountName,
this.discountNamen,
this.discountPercentage,
this.displayOrder,
this.discountIds,
this.reviews,
this.images});
PharmacyProduct.fromJson(Map<String, dynamic> json) {
try {
id = json['id'];
name = json['name'];
namen = json['namen'];
shortDescription = json['short_description'];
fullDescription = json['full_description'];
fullDescriptionn = json['full_descriptionn'];
approvedRatingSum = json['approved_rating_sum'];
approvedTotalReviews = json['approved_total_reviews'];
sku = json['sku'];
isRx = json['is_rx'];
rxMessage = json['rx_message'];
rxMessagen = json['rx_messagen'];
stockQuantity = json['stock_quantity'];
stockAvailability = json['stock_availability'];
stockAvailabilityn = json['stock_availabilityn'];
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity'];
price = json['price'];
oldPrice = json['old_price'];
discountName = json['discount_name'];
discountNamen = json['discount_namen'];
discountPercentage = json['discount_percentage'];
displayOrder = json['display_order'];
if (json['discount_ids'] != null) {
discountIds = new List<int>();
json['discount_ids'].forEach((v) {
discountIds.add(v);
});
}
if (json['reviews'] != null) {
reviews = new List<Reviews>();
json['reviews'].forEach((v) {
reviews.add(new Reviews.fromJson(v));
});
}
if (json['images'] != null) {
images = new List<PharmacyImageObject>();
json['images'].forEach((v) {
images.add(new PharmacyImageObject.fromJson(v));
});
}
} catch (e) {
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['namen'] = this.namen;
data['short_description'] = this.shortDescription;
data['full_description'] = this.fullDescription;
data['full_descriptionn'] = this.fullDescriptionn;
data['approved_rating_sum'] = this.approvedRatingSum;
data['approved_total_reviews'] = this.approvedTotalReviews;
data['sku'] = this.sku;
data['is_rx'] = this.isRx;
data['rx_message'] = this.rxMessage;
data['rx_messagen'] = this.rxMessagen;
data['stock_quantity'] = this.stockQuantity;
data['stock_availability'] = this.stockAvailability;
data['stock_availabilityn'] = this.stockAvailabilityn;
data['allow_back_in_stock_subscriptions'] =
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['price'] = this.price;
data['old_price'] = this.oldPrice;
data['discount_name'] = this.discountName;
data['discount_namen'] = this.discountNamen;
data['discount_percentage'] = this.discountPercentage;
data['display_order'] = this.displayOrder;
if (this.discountIds != String) {
data['discount_ids'] = this.discountIds.map((v) => v).toList();
}
if (this.reviews != String) {
data['reviews'] = this.reviews.map((v) => v.toJson()).toList();
}
if (this.images != String) {
data['images'] = this.images.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -0,0 +1,82 @@
import '../pharmacies/Customer.dart';
class Reviews {
int id;
int position;
int reviewId;
int customerId;
int productId;
int storeId;
bool isApproved;
String title;
String reviewText;
Null replyText;
int rating;
int helpfulYesTotal;
int helpfulNoTotal;
String createdOnUtc;
Customer customer;
Null product;
Reviews(
{this.id,
this.position,
this.reviewId,
this.customerId,
this.productId,
this.storeId,
this.isApproved,
this.title,
this.reviewText,
this.replyText,
this.rating,
this.helpfulYesTotal,
this.helpfulNoTotal,
this.createdOnUtc,
this.customer,
this.product});
Reviews.fromJson(Map<String, dynamic> json) {
id = json['id'];
position = json['position'];
reviewId = json['review_id'];
customerId = json['customer_id'];
productId = json['product_id'];
storeId = json['store_id'];
isApproved = json['is_approved'];
title = json['title'];
reviewText = json['review_text'];
replyText = json['reply_text'];
rating = json['rating'];
helpfulYesTotal = json['helpful_yes_total'];
helpfulNoTotal = json['helpful_no_total'];
createdOnUtc = json['created_on_utc'];
customer = json['customer'] != null
? new Customer.fromJson(json['customer'])
: null;
product = json['product'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['position'] = this.position;
data['review_id'] = this.reviewId;
data['customer_id'] = this.customerId;
data['product_id'] = this.productId;
data['store_id'] = this.storeId;
data['is_approved'] = this.isApproved;
data['title'] = this.title;
data['review_text'] = this.reviewText;
data['reply_text'] = this.replyText;
data['rating'] = this.rating;
data['helpful_yes_total'] = this.helpfulYesTotal;
data['helpful_no_total'] = this.helpfulNoTotal;
data['created_on_utc'] = this.createdOnUtc;
if (this.customer != null) {
data['customer'] = this.customer.toJson();
}
data['product'] = this.product;
return data;
}
}

@ -1,9 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_week_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class H2OService extends BaseService {

@ -0,0 +1,115 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import '../base_service.dart';
class CMCService extends BaseService {
List<GetCMCServicesResponseModel> cmcAllServicesList = List();
List<GetHHCAllPresOrdersResponseModel> cmcAllPresOrdersList = List();
List<GetOrderDetailByOrderIDResponseModel> cmcAllOrderDetail = List();
List<CMCGetItemsResponseModel> checkupItemsList = List();
bool isOrderUpdated;
Future getCMCAllServices() async {
GetCMCServicesRequestModel getCMCServicesRequestModel= new GetCMCServicesRequestModel(genderID: user.gender, identificationNo: user.patientIdentificationNo);
hasError = false;
await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES,
onSuccess: (dynamic response, int statusCode) {
cmcAllServicesList.clear();
response['PatientER_CMC_GetAllServicesList'].forEach((data) {
cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getCMCServicesRequestModel.toJson());
}
Future getCmcAllPresOrders() async {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel= GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
cmcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 3)
cmcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getHHCAllPresOrdersRequestModel.toJson());
}
Future getOrderDetailByOrderID(GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel) async {
hasError = false;
await baseAppClient.post(GET_CMC_ORDER_DETAIL_BY_ID,
onSuccess: (dynamic response, int statusCode) {
cmcAllOrderDetail.clear();
response['PatientER_CMC_GetTransactionsForOrderList'].forEach((data) {
cmcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getOrderDetailByOrderIDRequestModel.toJson());
}
Future getCheckupItems(CMCGetItemsRequestModel cMCGetItemsRequestModel) async {
hasError = false;
await baseAppClient.post(GET_CHECK_UP_ITEMS,
onSuccess: (dynamic response, int statusCode) {
checkupItemsList.clear();
response['GetCheckUpItemsList'].forEach((data) {
checkupItemsList.add(CMCGetItemsResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: cMCGetItemsRequestModel.toJson());
}
Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: updatePresOrderRequestModel.toJson());
}
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: order.toJson());
}
}

@ -0,0 +1,93 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import '../base_service.dart';
class HomeHealthCareService extends BaseService {
List<HHCGetAllServicesResponseModel> hhcAllServicesList = List();
List<GetHHCAllPresOrdersResponseModel> hhcAllPresOrdersList = List();
List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = List();
bool isOrderUpdated;
Future getHHCAllServices(
HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async {
hasError = false;
await baseAppClient.post(HHC_GET_ALL_SERVICES,
onSuccess: (dynamic response, int statusCode) {
hhcAllServicesList.clear();
response['PatientER_HHC_GetAllServicesList'].forEach((data) {
hhcAllServicesList.add(HHCGetAllServicesResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: hHCGetAllServicesRequestModel.toJson());
}
Future getHHCAllPresOrders() async {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel =
GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 2)
hhcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getHHCAllPresOrdersRequestModel.toJson());
}
Future getOrderDetailByOrderID(int presOrderID) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_ORDER_DETAIL_BY_ID,
onSuccess: (dynamic response, int statusCode) {
hhcAllOrderDetail.clear();
response['PatientER_HHC_GetTransactionsForOrderList'].forEach((data) {
hhcAllOrderDetail
.add(GetOrderDetailByOrderIDResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: updatePresOrderRequestModel.toJson());
}
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: order.toJson());
}
}

@ -77,12 +77,13 @@ class BaseAppClient {
body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID;//getSessionId(token);
body['SessionID'] = SESSION_ID; //getSessionId(token);
}
}
print("URL : $url");
print("Body : ${json.encode(body)}");
var ss = json.encode(body);
if (await Utils.checkConnection()) {
final response = await http.post(url.trim(),
@ -138,33 +139,34 @@ class BaseAppClient {
}
}
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams}) async {
String url = BASE_URL + endPoint;
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
}
get(
String endPoint, {
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
}) async {
try {
print("URL : $endPoint");
print("URL : $url");
if (await Utils.checkConnection()) {
onFailure('Please Check The Internet Connection', -1);
if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
final response = await http.get(endPoint, headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode);
}
var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode);
}
} catch (e) {
print(e);
onFailure(e.toString(), -1);
} else {
onFailure('Please Check The Internet Connection', -1);
}
}

@ -2,8 +2,10 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:flutter/cupertino.dart';
import '../base_service.dart';
class AmService extends BaseService {
@ -35,6 +37,7 @@ class AmService extends BaseService {
Future getPatientAllPresOrdersList() async {
hasError = false;
hasPendingOrder = false;
pickUpRequestPresOrder = null;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
@ -58,12 +61,11 @@ class AmService extends BaseService {
Future getOrderDetails() async {
hasError = false;
hasPendingOrder = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = pendingOrderID;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
.forEach((item) {
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
@ -71,6 +73,35 @@ class AmService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body: body);
}
Future updatePressOrder({@required int presOrderID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID;
body['EditedBy'] = 3;
body['RejectionReason'] = '';
body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertERPressOrder({@required PatientER patientER}) async {
hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patientER.toJson());
}
}

@ -0,0 +1,29 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class OrderPreviewService extends BaseService{
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
List<Addresses> addresses = List();
Future getBannerListList() async {
hasError = false;
try {
await baseAppClient.get(GET_CUSTOMERS_ADDRESSES,
onSuccess: (dynamic response, int statusCode) {
addresses.clear();
response['customers'][0]['addresses'].forEach((item) {
addresses.add(Addresses.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
}

@ -0,0 +1,97 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PharmacyModuleService extends BaseService {
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
List<PharmacyImageObject> bannerItems = List();
List<Manufacturer> manufacturerList = List();
List<PharmacyProduct> bestSellerProducts = List();
List<PharmacyProduct> lastVisitedProducts = List();
Future getBannerListList() async {
hasError = false;
try {
await baseAppClient.get(GET_PHARMACY_BANNER,
onSuccess: (dynamic response, int statusCode) {
bannerItems.clear();
response['images'].forEach((item) {
bannerItems.add(PharmacyImageObject.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
Future getTopManufacturerList() async {
Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try {
await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER,
onSuccess: (dynamic response, int statusCode) {
manufacturerList.clear();
response['manufacturer'].forEach((item) {
manufacturerList.add(Manufacturer.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams);
} catch (error) {
throw error;
}
}
Future getBestSellerProducts() async {
Map<String, String> queryParams = {
'fields':
'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews',
};
try {
await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT,
onSuccess: (dynamic response, int statusCode) {
bestSellerProducts.clear();
response['products'].forEach((item) {
bestSellerProducts.add(PharmacyProduct.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams);
} catch (error) {
throw error;
}
}
Future getLastVisitedProducts() async {
String lastVisited = "";
if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) !=
null) {
lastVisited =
await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS);
try {
await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited",
onSuccess: (dynamic response, int statusCode) {
lastVisitedProducts.clear();
response['products'].forEach((item) {
lastVisitedProducts.add(PharmacyProduct.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
}
}

@ -1,8 +1,8 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/user_progress_for_week_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts;

@ -0,0 +1,110 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart';
class CMCViewModel extends BaseViewModel {
CMCService _cMCService =
locator<CMCService>();
List<GetCMCServicesResponseModel> get cmcAllServicesList =>
_cMCService.cmcAllServicesList;
List<GetHHCAllPresOrdersResponseModel> get cmcAllPresOrders =>
_cMCService.cmcAllPresOrdersList;
List<GetOrderDetailByOrderIDResponseModel> get cmcAllOrderDetail =>
_cMCService.cmcAllOrderDetail;
List<CMCGetItemsResponseModel> get checkupItems =>
_cMCService.checkupItemsList;
bool get isOrderUpdated => _cMCService.isOrderUpdated;
Future getCMCAllServices() async {
await _cMCService
.getCMCAllServices();
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: cmcAllServicesList[0].iD);
await getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel,isFirst: true);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future getCheckupItems({CMCGetItemsRequestModel cMCGetItemsRequestModel, bool isFirst = false}) async {
if(!isFirst)
setState(ViewState.Busy);
await _cMCService.getCheckupItems(cMCGetItemsRequestModel);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.Error);
}
if(!isFirst)
setState(ViewState.Idle);
}
Future getCmcAllPresOrders() async {
setState(ViewState.Busy);
await _cMCService.getCmcAllPresOrders();
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.Error);
} else {
var pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere(
(element) => element.status == 1 || element.status == 2,
orElse: () => null);
if (pendingOrder != null) {
await getOrderDetailByOrderID(pendingOrder);
setState(ViewState.Idle);
} else {
getCMCAllServices();
}
}
}
Future updateCmcPresOrder(
UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
setState(ViewState.BusyLocal);
await _cMCService.updateCmcPresOrder(
updatePresOrderRequestModel);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getOrderDetailByOrderID(GetHHCAllPresOrdersResponseModel order) async {
GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel =
GetOrderDetailByOrderIDRequestModel(presOrderID: order.iD);
await _cMCService
.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
}
//TODO check it in uat
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
await _cMCService.insertPresPresOrder(order: order);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.ErrorLocal);
} else {
getCmcAllPresOrders();
}
}
}

@ -0,0 +1,97 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart';
class HomeHealthCareViewModel extends BaseViewModel {
HomeHealthCareService _homeHealthCareService =
locator<HomeHealthCareService>();
List<HHCGetAllServicesResponseModel> get hhcAllServicesList =>
_homeHealthCareService.hhcAllServicesList;
List<GetHHCAllPresOrdersResponseModel> get hhcAllPresOrders =>
_homeHealthCareService.hhcAllPresOrdersList;
List<GetOrderDetailByOrderIDResponseModel> get hhcAllOrderDetail =>
_homeHealthCareService.hhcAllOrderDetail;
bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated;
GetHHCAllPresOrdersResponseModel pendingOrder;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();
Future getHHCAllServices() async {
HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel =
new HHCGetAllServicesRequestModel();
//setState(ViewState.Busy);
await _homeHealthCareService
.getHHCAllServices(hHCGetAllServicesRequestModel);
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future getHHCAllPresOrders() async {
pendingOrder = null;
setState(ViewState.Busy);
await _homeHealthCareService.getHHCAllPresOrders();
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.Error);
} else {
pendingOrder = _homeHealthCareService.hhcAllPresOrdersList
.firstWhere((element) => element.status == 1 || element.status == 2,
orElse: () => null);
if (pendingOrder != null) {
await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD);
setState(ViewState.Idle);
} else {
getHHCAllServices();
}
}
}
Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
setState(ViewState.Busy);
await _homeHealthCareService.updateHHCPresOrder(
updatePresOrderRequestModel);
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService();
await _homeHealthCareService.insertPresPresOrder(order: order);
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.ErrorLocal);
} else {
getHHCAllPresOrders();
}
}
}

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
@ -7,6 +9,7 @@ import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:flutter/cupertino.dart';
import '../base_view_model.dart';
import '../../../locator.dart';
@ -28,6 +31,8 @@ class AmRequestViewModel extends BaseViewModel {
bool get hasPendingOrder =>_amService.hasPendingOrder;
PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder;
Future getAppointmentHistory() async {
setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
@ -73,10 +78,31 @@ class AmRequestViewModel extends BaseViewModel {
Future getOrderDetails() async {
setState(ViewState.Busy);
await _amService.getOrderDetails();
if (_hospitalService.hasError) {
error = _hospitalService.error;
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _amService.updatePressOrder(presOrderID: presOrderID);
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
}
Future insertERPressOrder({@required PatientER patientER}) async {
setState(ViewState.Busy);
await _amService.insertERPressOrder(patientER: patientER);
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.ErrorLocal);
} else
getAmRequestOrders();
}
}

@ -0,0 +1,8 @@
import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class OrderPreviewViewModel extends BaseViewModel {
OrderPreviewService _orderService = locator<OrderPreviewService>();
}

@ -0,0 +1,73 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart';
class PharmacyModuleViewModel extends BaseViewModel {
PharmacyModuleService _pharmacyService = locator<PharmacyModuleService>();
List<PharmacyImageObject> get bannerList => _pharmacyService.bannerItems;
List<Manufacturer> get manufacturerList => _pharmacyService.manufacturerList;
List<PharmacyProduct> get bestSellerProduct =>
_pharmacyService.bestSellerProducts;
List<PharmacyProduct> get lastVisitedProducts =>
_pharmacyService.lastVisitedProducts;
Future getPharmacyHomeData() async {
setState(ViewState.Busy);
await _pharmacyService.getBannerListList();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getTopManufacturerList();
}
}
List<String> getBannerImagesUrl() {
List<String> images = List();
images.add('assets/images/pharmacy_module/pharmacy_logo_green.png');
_pharmacyService.bannerItems.forEach((element) {
images.add(element.src);
});
return images;
}
_getTopManufacturerList() async {
await _pharmacyService.getTopManufacturerList();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getBestSellerProducts();
}
}
_getBestSellerProducts() async {
await _pharmacyService.getBestSellerProducts();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getLastVisitedProducts();
}
}
_getLastVisitedProducts() async {
await _pharmacyService.getLastVisitedProducts();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
}

@ -1,6 +1,6 @@
import 'dart:convert';
import 'package:barcode_scan/platform_wrapper.dart';
// import 'package:barcode_scan/platform_wrapper.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
@ -14,25 +14,26 @@ class QrViewModel extends BaseViewModel {
QRParkingModel qrParkingModel;
readQr() async {
var result = await BarcodeScanner.scan();
var data = json.decode(result.rawContent);
var qRParkingID = data['QRParkingID'];
setState(ViewState.BusyLocal);
await _qrService.getQRParkingByID(qRParkingID);
if (_qrService.hasError) {
error = _qrService.error;
setState(ViewState.ErrorLocal);
} else {
if (_qrService.qRParkingList.length > 0) {
qrParkingModel = _qrService.qRParkingList[0];
await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
isSavePark = true;
setState(ViewState.Idle);
} else {
error = "Invalid Qr Code";
setState(ViewState.ErrorLocal);
}
}
//TODO fix the barcode scan
// var result = await BarcodeScanner.scan();
// var data = json.decode(result.rawContent);
// var qRParkingID = data['QRParkingID'];
// setState(ViewState.BusyLocal);
// await _qrService.getQRParkingByID(qRParkingID);
// if (_qrService.hasError) {
// error = _qrService.error;
// setState(ViewState.ErrorLocal);
// } else {
// if (_qrService.qRParkingList.length > 0) {
// qrParkingModel = _qrService.qRParkingList[0];
// await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
// isSavePark = true;
// setState(ViewState.Idle);
// } else {
// error = "Invalid Qr Code";
// setState(ViewState.ErrorLocal);
// }
// }
}
getIsSaveParking() async {

@ -30,4 +30,16 @@ class DQIcons {
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData more_menu_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData offer_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData prescription_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_scan_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData share_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_add_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_2 = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_3 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_4 = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medication_icon = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save