@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import ' package:diplomaticquarterapp/models/Request.dart ' ;
import ' package:diplomaticquarterapp/models/anicllary-orders/ancillary_orders_proc_list.dart ' ;
import ' package:diplomaticquarterapp/models/apple_pay_request.dart ' ;
import ' package:diplomaticquarterapp/pages/final_products_page.dart ' ;
import ' package:diplomaticquarterapp/services/authentication/auth_provider.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_shared_preferences.dart ' ;
import ' package:diplomaticquarterapp/uitl/date_uitl.dart ' ;
@ -34,7 +35,7 @@ class DoctorsListService extends BaseService {
String tokenID ;
List < LaserBodyPart > selectedBodyPartList = [ ] ;
Future < Map > getDoctorsList ( int clinicID , int projectID , bool isNearest , BuildContext context , { doctorId , doctorName , isContinueDentalPlan = false } ) async {
Future < Map > getDoctorsList ( int clinicID , int projectID , bool isNearest , int languageID , BuildContext context , { doctorId , doctorName , isContinueDentalPlan = false } ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -74,6 +75,7 @@ class DoctorsListService extends BaseService {
" Longitude " : long ! = null ? long . toString ( ) : 0 ,
" isDentalAllowedBackend " : clinicID = = 17 ? true : isContinueDentalPlan ,
" IsGetNearAppointment " : isNearest ,
" LanguageID " : languageID ,
if ( isNearest ) " SelectedDate " : DateUtil . convertDateToString ( DateTime . now ( ) ) ,
" License " : true
} ;
@ -88,7 +90,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getDoctorsListByName ( String docName , BuildContext context ) async {
Future < Map > getDoctorsListByName ( String docName , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
double lat ;
@ -126,6 +128,7 @@ class DoctorsListService extends BaseService {
" IsGetNearAppointment " : false ,
" Latitude " : lat = = null ? 0.0 : lat ,
" Longitude " : long = = null ? 0.0 : long ,
" LanguageID " : languageID ,
" License " : true
} ;
@ -139,7 +142,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getDoctorsProfile ( int docID , int clinicID , int projectID , context ) async {
Future < Map > getDoctorsProfile ( int docID , int clinicID , int projectID , int languageID , context ) async {
Map < String , dynamic > request ;
Request req = appGlobal . getPublicRequest ( ) ;
@ -158,7 +161,8 @@ class DoctorsListService extends BaseService {
" License " : true ,
" IsRegistered " : true ,
" ProjectID " : projectID ,
" isDentalAllowedBackend " : false
" isDentalAllowedBackend " : false ,
" LanguageID " : languageID ,
} ;
dynamic localRes ;
@ -171,7 +175,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getDoctorsRating ( int docID , context ) async {
Future < Map > getDoctorsRating ( int docID , int languageID , context ) async {
Map < String , dynamic > request ;
Request req = appGlobal . getPublicRequest ( ) ;
@ -188,6 +192,7 @@ class DoctorsListService extends BaseService {
" PatientID " : 0 ,
" License " : true ,
" IsRegistered " : true ,
" LanguageID " : languageID ,
" isDentalAllowedBackend " : false
} ;
@ -221,7 +226,7 @@ class DoctorsListService extends BaseService {
return Future . value ( images ) ;
}
Future < Map > getDoctorsRatingDetails ( int docID , context ) async {
Future < Map > getDoctorsRatingDetails ( int docID , int languageID , context ) async {
Map < String , dynamic > request ;
Request req = appGlobal . getPublicRequest ( ) ;
@ -238,6 +243,7 @@ class DoctorsListService extends BaseService {
" PatientID " : 0 ,
" License " : true ,
" IsRegistered " : true ,
" LanguageID " : languageID ,
" isDentalAllowedBackend " : false
} ;
@ -270,6 +276,7 @@ class DoctorsListService extends BaseService {
" PatientOutSA " : authProvider . isLogin ? authUser . outSA : 0 ,
" SessionID " : null ,
" isDentalAllowedBackend " : false ,
" LanguageID " : 1 ,
" DeviceTypeID " : 1
} ;
@ -313,6 +320,7 @@ class DoctorsListService extends BaseService {
" PatientOutSA " : authUser . outSA ,
" SessionID " : null ,
" isDentalAllowedBackend " : false ,
" LanguageID " : 1 ,
" DeviceTypeID " : 1
} ;
@ -326,7 +334,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > insertAppointment ( int docID , int clinicID , int projectID , String selectedTime , String selectedDate , int initialSlotDuration , BuildContext context ,
Future < Map > insertAppointment ( int docID , int clinicID , int projectID , String selectedTime , String selectedDate , int initialSlotDuration , int languageID , BuildContext context ,
[ String procedureID , num testTypeEnum , num testProcedureEnum , ProjectViewModel projectViewModel ] ) async {
Map < String , dynamic > request ;
@ -389,7 +397,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > insertLiveCareScheduleAppointment ( int docID , int clinicID , int projectID , int serviceID , String selectedTime , String selectedDate , BuildContext context ) async {
Future < Map > insertLiveCareScheduleAppointment ( int docID , int clinicID , int projectID , int serviceID , String selectedTime , String selectedDate , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -440,7 +448,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getPatientShare ( String appoID , int clinicID , int projectID , BuildContext context ) async {
Future < Map > getPatientShare ( String appoID , int clinicID , int projectID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -465,6 +473,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -478,14 +487,14 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > setOnlineCheckInForAppointment ( String appoID , int projectID , BuildContext context ) async {
Future < Map > setOnlineCheckInForAppointment ( String appoID , int projectID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
var data = AuthenticatedUser . fromJson ( await this . sharedPref . getObject ( USER_PROFILE ) ) ;
authUser = data ;
}
request = { " ProjectID " : projectID , " AppointmentNo " : appoID };
request = { " ProjectID " : projectID , " AppointmentNo " : appoID , " LanguageID " : languageID };
dynamic localRes ;
@ -497,7 +506,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getLiveCareAppointmentPatientShare ( String appoID , int clinicID , int projectID , BuildContext context ) async {
Future < Map > getLiveCareAppointmentPatientShare ( String appoID , int clinicID , int projectID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -523,6 +532,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -558,7 +568,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getOBGyneDoctorsList ( int projectID , String setupID , BuildContext context ) async {
Future < Map > getOBGyneDoctorsList ( int projectID , String setupID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -575,6 +585,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -601,7 +612,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getPatientAppointmentHistory ( bool isActiveAppointment , BuildContext context , { bool isForCOC = false } ) async {
Future < Map > getPatientAppointmentHistory ( bool isActiveAppointment , int languageID , BuildContext context , { bool isForCOC = false , isForUpcomming = false , IsForArrived = false } ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -623,7 +634,10 @@ class DoctorsListService extends BaseService {
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" IsComingFromCOC " : isForCOC ,
" PatientType " : authUser . patientType
" PatientType " : authUser . patientType ,
" LanguageID " : languageID ,
" isForUpcomming " : isForUpcomming ,
" IsForArrived " : IsForArrived
} ;
dynamic localRes ;
@ -690,6 +704,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
@ -703,7 +718,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > insertVIDARequest ( int appoNo , int clinicID , int projectID , int serviceID , int docID , String appoDate , String clientRequestID , BuildContext context ) async {
Future < Map > insertVIDARequest ( int appoNo , int clinicID , int projectID , int serviceID , int docID , String appoDate , String clientRequestID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
@ -744,6 +759,7 @@ class DoctorsListService extends BaseService {
" PatientTypeID " : authUser . patientType ,
" PatientType " : authUser . patientType ,
" VoipToken " : await sharedPref . getString ( ONESIGNAL_APNS_TOKEN ) ,
" LanguageID " : languageID ,
" IsVoip " : Platform . isIOS ? true : false
} ;
@ -789,6 +805,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
@ -827,6 +844,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
@ -902,6 +920,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
dynamic localRes ;
@ -948,6 +967,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
dynamic localRes ;
@ -991,6 +1011,7 @@ class DoctorsListService extends BaseService {
" PatientType " : authUser . patientType ,
" DeviceToken " : await sharedPref . getString ( PUSH_TOKEN ) ,
" VoipToken " : await sharedPref . getString ( ONESIGNAL_APNS_TOKEN ) ,
" LanguageID " : 1 ,
" IsVoip " : Platform . isIOS ? true : false
} ;
@ -1027,6 +1048,7 @@ class DoctorsListService extends BaseService {
} ) ;
request = {
" LanguageID " : 1 ,
" RequestAncillaryOrderInvoice " : [
{ " MemberID " : 102 , " ProjectID " : projectID , " AppointmentNo " : appointmentID , " OrderNo " : orderNo , " AncillaryOrderInvoiceProcList " : selectedProcListAPI }
] ,
@ -1159,7 +1181,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getPatientRadOrders ( String appoNo , BuildContext context ) async {
Future < Map > getPatientRadOrders ( String appoNo , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
var data = AuthenticatedUser . fromJson ( await this . sharedPref . getObject ( USER_PROFILE ) ) ;
@ -1179,6 +1201,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -1191,7 +1214,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getPatientLabOrdersByAppoNo ( dynamic appoNo , dynamic projID , dynamic clinicID , BuildContext context ) async {
Future < Map > getPatientLabOrdersByAppoNo ( dynamic appoNo , dynamic projID , dynamic clinicID , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
var data = AuthenticatedUser . fromJson ( await this . sharedPref . getObject ( USER_PROFILE ) ) ;
@ -1213,6 +1236,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -1225,7 +1249,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getPatientPrescriptionReports ( AppoitmentAllHistoryResultList appo , BuildContext context ) async {
Future < Map > getPatientPrescriptionReports ( AppoitmentAllHistoryResultList appo , int languageID , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
var data = AuthenticatedUser . fromJson ( await this . sharedPref . getObject ( USER_PROFILE ) ) ;
@ -1249,6 +1273,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : languageID ,
" PatientType " : authUser . patientType
} ;
@ -1261,7 +1286,7 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > sendPrescriptionEmail ( String appoDate , String setupId , dynamic prescriptionReportEnhList , BuildContext context ) async {
Future < Map > sendPrescriptionEmail ( String appoDate , String setupId , int languageID , dynamic prescriptionReportEnhList , BuildContext context ) async {
Map < String , dynamic > request ;
if ( await this . sharedPref . getObject ( USER_PROFILE ) ! = null ) {
var data = AuthenticatedUser . fromJson ( await this . sharedPref . getObject ( USER_PROFILE ) ) ;
@ -1288,6 +1313,7 @@ class DoctorsListService extends BaseService {
" DeviceTypeID " : req . DeviceTypeID ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : authUser . patientType ,
" PatientType " : authUser . patientType
} ;
@ -1331,6 +1357,7 @@ class DoctorsListService extends BaseService {
" isDentalAllowedBackend " : false ,
" PatientID " : authUser . patientID ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" PatientType " : authUser . patientType
} ;
dynamic localRes ;
@ -1369,7 +1396,7 @@ class DoctorsListService extends BaseService {
" PaymentMethod " : paymentMethodName ,
" VersionID " : req . VersionID ,
" Channel " : req . Channel ,
" LanguageID " : 1 ,
" IPAdress " : req . IPAdress ,
" generalid " : req . generalid ,
" PatientOutSA " : authUser . outSA ,
@ -1405,6 +1432,7 @@ class DoctorsListService extends BaseService {
" generalid " : req . generalid ,
" PatientOutSA " : authUser . outSA ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" ERAdvanceAmount " : {
" ProjectId " : projectID ,
" PatientId " : authUser . patientID ,
@ -1445,6 +1473,7 @@ class DoctorsListService extends BaseService {
" generalid " : req . generalid ,
" PatientOutSA " : authUser . outSA ,
" PatientTypeID " : authUser . patientType ,
" LanguageID " : 1 ,
" EROnlineCheckinPaymentDetails " : {
" CheckinDate " : DateUtil . convertDateToString ( DateTime . now ( ) ) ,
" ExpectedArrivalTime " : DateUtil . convertDateToString ( DateTime . now ( ) ) ,
@ -1522,6 +1551,7 @@ class DoctorsListService extends BaseService {
request = {
" ProjectID " : projectID ,
" LanguageID " : 1 ,
} ;
dynamic localRes ;
await baseAppClient . post ( HAS_DENTAL_PLAN , onSuccess: ( response , statusCode ) async {
@ -1583,12 +1613,13 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getLaserBodyPartsList ( int laserCategoryID , int projectID ) async {
Future < Map > getLaserBodyPartsList ( int laserCategoryID , int projectID , int languageID ) async {
Map < String , dynamic > request ;
request = {
" LaserCategoryID " : laserCategoryID ,
" ProjectID " : projectID ,
" LanguageID " : languageID ,
} ;
dynamic localRes ;
await baseAppClient . post ( LASER_BODY_PARTS , onSuccess: ( response , statusCode ) async {
@ -1599,11 +1630,12 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > insertCovidQuestionnaire ( List qa , int projectID , int testTypeEnum , int testProcedureEnum) async {
Future < Map > insertCovidQuestionnaire ( List qa , int projectID , int testTypeEnum , int languageID, int testProcedureEnum) async {
Map < String , dynamic > request ;
request = {
" ProjectID " : projectID ,
" LanguageID " : languageID ,
" IsForTravel " : qa [ 0 ] [ ' ans ' ] . toString ( ) ,
" IsComingOutSA " : qa [ 1 ] [ ' ans ' ] . toString ( ) ,
" IsFeverCurrently " : qa [ 2 ] [ ' ans ' ] . toString ( ) ,
@ -1646,11 +1678,12 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > updateObGyneAppointment ( int episodeID , int appointmentNo , int orderNo , String procedureId , int lineItemNo , int uniqueRowID ) async {
Future < Map > updateObGyneAppointment ( int episodeID , int appointmentNo , int orderNo , String procedureId , int lineItemNo , int uniqueRowID , int languageID ) async {
Map < String , dynamic > request ;
request = {
" EpisodeID " : episodeID ,
" LanguageID " : languageID ,
" AppointmentNo " : appointmentNo ,
" OrderNo " : orderNo ,
" ProcedureId " : procedureId ,
@ -1669,10 +1702,10 @@ class DoctorsListService extends BaseService {
return Future . value ( localRes ) ;
}
Future < Map > getRRTProcedures ( int projectID ) async {
Future < Map > getRRTProcedures ( int projectID , int languageID ) async {
Map < String , dynamic > request ;
request = { " ProjectID " : projectID };
request = { " ProjectID " : projectID , " LanguageID " : languageID };
dynamic localRes ;
await baseAppClient . post ( GET_RRT_PROCEDURE_LIST , onSuccess: ( response , statusCode ) async {
@ -1690,6 +1723,7 @@ class DoctorsListService extends BaseService {
" ClientRequestID " : clientRequestID ,
" Status " : status ,
" FortID " : tamaraOrderID , / / Tamara order ID
" LanguageID " : 1 ,
" Installments_Number " : selectedInstallments
} ;
@ -1705,7 +1739,7 @@ class DoctorsListService extends BaseService {
Future < Map > markAppointmentForTamara ( int projectID , String appoNo ) async {
Map < String , dynamic > request ;
request = { " ProjectID " : projectID , " AppointmentNo " : appoNo };
request = { " ProjectID " : projectID , " AppointmentNo " : appoNo , " LanguageID " : 1 };
dynamic localRes ;
await baseAppClient . post ( MARK_APPOINTMENT_TAMARA_STATUS , onSuccess: ( response , statusCode ) async {
localRes = response ;
@ -1718,7 +1752,7 @@ class DoctorsListService extends BaseService {
Future < Map > autoGenerateInvoiceTamara ( int projectID , String appoNo , String mobileNo ) async {
Map < String , dynamic > request ;
request = { " ProjectID " : projectID , " AppointmentNo " : appoNo , " MobileNo " : mobileNo , " UserID " : 102 };
request = { " ProjectID " : projectID , " AppointmentNo " : appoNo , " MobileNo " : mobileNo , " UserID " : 102 , " LanguageID " : 1 };
dynamic localRes ;
await baseAppClient . post ( AUTO_GENERATE_INVOICE_TAMARA , onSuccess: ( response , statusCode ) async {
localRes = response ;
@ -1731,7 +1765,7 @@ class DoctorsListService extends BaseService {
Future < Map > checkPatientNphiesEligibility ( int projectID ) async {
Map < String , dynamic > request ;
request = { " ProjectID " : projectID };
request = { " ProjectID " : projectID , " LanguageID " : 1 };
dynamic localRes ;
await baseAppClient . post ( CHECK_PATIENT_NPHIES_ELIGIBILITY , onSuccess: ( response , statusCode ) async {
localRes = response ;
@ -1744,7 +1778,7 @@ class DoctorsListService extends BaseService {
Future < Map > convertPatientToCash ( int projectID ) async {
Map < String , dynamic > request ;
request = { " ProjectID " : projectID };
request = { " ProjectID " : projectID , " LanguageID " : 1 };
dynamic localRes ;
await baseAppClient . post ( CONVERT_PATIENT_TO_CASH , onSuccess: ( response , statusCode ) async {
localRes = response ;
@ -1788,6 +1822,7 @@ class DoctorsListService extends BaseService {
" PatientOutSA " : authProvider . isLogin ? authUser . outSA : 0 ,
" SessionID " : null ,
" isDentalAllowedBackend " : false ,
" LanguageID " : 1 ,
" DeviceTypeID " : 1
} ;