import 'dart:io';

import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';

const MAX_SMALL_SCREEN = 660;

const BASE_URL = 'https://hmgwebservices.com/Services';

const GET_PROJECT = '/Lists.svc/REST/GetProject';

///Doctor
const GET_MY_DOCTOR = '/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = '/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING = '/Doctors.svc/REST/dr_GetAvgDoctorRating';

///Prescriptions
const PRESCRIPTIONS = '/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
    '/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = '/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
    '/Patients.svc/REST/GetPrescriptionReport_enh';

///Lab Order
const GET_Patient_LAB_ORDERS = '/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
    '/Patients.svc/REST/GetPatientLabSpecialResults';

///
const GET_PATIENT_ORDERS = '/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_ORDERS_DETAILS =
    '/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = '/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = '/Notifications.svc/REST/SendRadReportEmail';

///Feedback
const SEND_FEEDBACK = '/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = '/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory = '/Doctors.svc/REST/PateintHasAppoimentHistory';

///VITAL SIGN
const GET_PATIENT_VITAL_SIGN = '/Doctors.svc/REST/Doctor_GetPatientVitalSign';



///Reports
const REPORTS = '/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = '/Doctors.svc/REST/InsertRequestForMedicalReport';


//const BASE_URL = 'https://hmgwebservices.com/';  // Production Environment
//const BASE_URL = 'https://hmgwebservices.com/Services';  // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/Services';  // UAT Environment

//URL to get clinic list
const GET_CLINICS_LIST_URL = "/lists.svc/REST/GetClinicCentralized";

//URL to get doctors list
const GET_DOCTORS_LIST_URL = "/Doctors.svc/REST/SearchDoctorsByTime";

//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "/Doctors.svc/REST/GetDoctorFreeSlots";

//URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT =
    "/Doctors.svc/REST/InsertSpecificAppointment";

//URL to get patient share
const GET_PATIENT_SHARE =
    "/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";

//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY =
    "/Doctors.svc/REST/PateintHasAppoimentHistory";

//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
    "/Doctors.svc/REST/AppoimentHistoryForCurfew";

//URL to confirm appointment
const CONFIRM_APPOINTMENT = "/MobileNotifications.svc/REST/ConfirmAppointment";

//URL to cancel appointment
const CANCEL_APPOINTMENT = "/Doctors.svc/REST/CancelAppointment";

//URL get appointment QR
const GENERATE_QR_APPOINTMENT = "/Doctors.svc/REST/GenerateQRAppointmentNo";

//URL send email appointment QR
const EMAIL_QR_APPOINTMENT = "/Notifications.svc/REST/sendEmailForOnLineCheckin";

//URL check payment status
const CHECK_PAYMENT_STATUS = "/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";

//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "/Doctors.svc/REST/CreateAdvancePayment";

const ADD_ADVANCE_NUMBER_REQUEST = '/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';

const IS_ALLOW_ASK_DOCTOR = '/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = '/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_CALL_REQUEST = '/Doctors.svc/REST/InsertCallInfo';

const GET_LIVECARE_CLINICS = '/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_CLINIC_TIMING = '/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';

const GET_ER_APPOINTMENT_FEES = '/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = '/ER_VirtualCall.svc/REST/GetRestTime';

const ADD_NEW_CALL_FOR_PATIENT_ER = '/DoctorApplication.svc/REST/NewCallForPatientER';

const GET_LIVECARE_HISTORY = '/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const CANCEL_LIVECARE_REQUEST = '/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL = '/Notifications.svc/REST/SendInvoiceForLiveCare';


//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.5;
const SETUP_ID = '91877';
const LANGUAGE = 1;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;

var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = "/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
    "/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const GET_PAtIENTS_INSURANCE_APPROVALS = "/Patients.svc/REST/GetApprovalStatus";

class AppGlobal {
  static var context;

  AppSharedPreferences sharedPref = AppSharedPreferences();

  Request getPublicRequest() {
    Request request = new Request();
    request.VersionID = 5.5; //3.6;
    request.Channel = 3;
    request.IPAdress = "10.20.10.20";
    request.generalid = 'Cs2020@2016\$2958';
    request.VersionID = VERSION_ID; //5.3; //3.6;
    request.Channel = CHANNEL; //3;
    request.IPAdress = IP_ADDRESS; //"10.20.10.20";
    request.generalid = GENERAL_ID; //'Cs2020@2016\$2958';
    request.PatientOutSA = 0;
    request.SessionID = "wEVNbagIkaNhGECWZjHaA";
    request.TokenID = "@dm!n";
    request.isDentalAllowedBackend = false;
    request.DeviceTypeID = Platform.isIOS ? 1 : 2;

    return request;
  }
}
