|
|
|
|
@ -10,10 +10,9 @@ import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
|
|
import '../google-analytics.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Appointment {
|
|
|
|
|
|
|
|
|
|
final GALogger logger;
|
|
|
|
|
|
|
|
|
|
Appointment(this.logger);
|
|
|
|
|
|
|
|
|
|
// R015
|
|
|
|
|
@ -32,21 +31,16 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R017.1
|
|
|
|
|
book_appointment_doctor_search({@required String query}){
|
|
|
|
|
book_appointment_doctor_search({required String query}) {
|
|
|
|
|
// doctor_search_query : value
|
|
|
|
|
logger('book_appointment_doctor_search', parameters: {
|
|
|
|
|
'doctor_search_query' : query
|
|
|
|
|
});
|
|
|
|
|
logger('book_appointment_doctor_search', parameters: {'doctor_search_query': query});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R018.1
|
|
|
|
|
book_appointment_select_clinic({@required String appointment_type, clinic}){
|
|
|
|
|
book_appointment_select_clinic({required String appointment_type, clinic}) {
|
|
|
|
|
// appointment_type: regular | livecare
|
|
|
|
|
// clinic_type : $clinic_type
|
|
|
|
|
logger('book_appointment_select_clinic', parameters: {
|
|
|
|
|
'appointment_type' : appointment_type,
|
|
|
|
|
'clinic_type' : clinic
|
|
|
|
|
});
|
|
|
|
|
logger('book_appointment_select_clinic', parameters: {'appointment_type': appointment_type, 'clinic_type': clinic});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R019.1
|
|
|
|
|
@ -60,18 +54,23 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R020
|
|
|
|
|
book_appointment_chief_complaints({@required String appointment_type, ListClinicCentralized clinic, HospitalsModel hospital, ListDentalChiefComplain treatment}){
|
|
|
|
|
GAnalytics.TREATMENT_TYPE = treatment.name;
|
|
|
|
|
book_appointment_chief_complaints({
|
|
|
|
|
required String appointment_type,
|
|
|
|
|
ListClinicCentralized? clinic,
|
|
|
|
|
HospitalsModel? hospital,
|
|
|
|
|
ListDentalChiefComplain? treatment,
|
|
|
|
|
}) {
|
|
|
|
|
GAnalytics.TREATMENT_TYPE = treatment!.name;
|
|
|
|
|
logger('book_appointment_chief_complaints', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
'clinic_type' : clinic.clinicDescription,
|
|
|
|
|
'hospital_name' : hospital.name,
|
|
|
|
|
'clinic_type': clinic!.clinicDescription,
|
|
|
|
|
'hospital_name': hospital!.name,
|
|
|
|
|
'treatment_type': treatment.name,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R021
|
|
|
|
|
book_appointment_select_doctor({@required String appointment_type, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_select_doctor({required String appointment_type, required DoctorList doctor}) {
|
|
|
|
|
// appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender
|
|
|
|
|
logger('book_appointment_select_doctor', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
@ -85,7 +84,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R022
|
|
|
|
|
book_appointment_schedule({@required String appointment_type, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_schedule({required String appointment_type, required DoctorList doctor}) {
|
|
|
|
|
// appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender
|
|
|
|
|
logger('book_appointment_schedule', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
@ -99,7 +98,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R023
|
|
|
|
|
book_appointment_date_selection({@required String appointment_type, @required day, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_date_selection({required String appointment_type, required day, required DoctorList doctor}) {
|
|
|
|
|
logger('book_appointment_date_selection', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
'clinic_type': doctor.clinicName,
|
|
|
|
|
@ -113,7 +112,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R024.1
|
|
|
|
|
book_appointment_time_selection({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_time_selection({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) {
|
|
|
|
|
final day = DateUtil.getWeekDay(dateTime.weekday);
|
|
|
|
|
final hour = DateFormat('HH').format(dateTime);
|
|
|
|
|
logger('book_appointment_time_selection', parameters: {
|
|
|
|
|
@ -130,7 +129,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R024.2
|
|
|
|
|
book_appointment_review({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_review({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) {
|
|
|
|
|
final day = DateUtil.getWeekDay(dateTime.weekday);
|
|
|
|
|
final hour = DateFormat('HH').format(dateTime);
|
|
|
|
|
logger('book_appointment_review', parameters: {
|
|
|
|
|
@ -147,7 +146,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R025
|
|
|
|
|
book_appointment_click_confirm({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_click_confirm({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) {
|
|
|
|
|
final day = DateUtil.getWeekDay(dateTime.weekday);
|
|
|
|
|
final hour = DateFormat('HH').format(dateTime);
|
|
|
|
|
logger('book_appointment_click_confirm', parameters: {
|
|
|
|
|
@ -164,7 +163,7 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R026
|
|
|
|
|
book_appointment_confirmation_success({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
|
|
|
|
|
book_appointment_confirmation_success({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) {
|
|
|
|
|
final day = DateUtil.getWeekDay(dateTime.weekday);
|
|
|
|
|
final hour = DateFormat('HH').format(dateTime);
|
|
|
|
|
logger('book_appointment_confirmation_success', parameters: {
|
|
|
|
|
@ -195,21 +194,17 @@ class Appointment{
|
|
|
|
|
|
|
|
|
|
// R027
|
|
|
|
|
appointment_reminder(bool value) {
|
|
|
|
|
logger('appointment_reminder', parameters: {
|
|
|
|
|
'reminder' : value ? 'yes' : 'no'
|
|
|
|
|
});
|
|
|
|
|
logger('appointment_reminder', parameters: {'reminder': value ? 'yes' : 'no'});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R028
|
|
|
|
|
appointment_reminder_time({@required String reminde_before}){
|
|
|
|
|
logger('appointment_reminder_time', parameters: {
|
|
|
|
|
'reminder_before' : reminde_before
|
|
|
|
|
});
|
|
|
|
|
appointment_reminder_time({required String reminde_before}) {
|
|
|
|
|
logger('appointment_reminder_time', parameters: {'reminder_before': reminde_before});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R053
|
|
|
|
|
// Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document
|
|
|
|
|
pay_now_for_appointment({@required String appointment_type, @required DoctorList doctorDetail, bool payNow = true}){
|
|
|
|
|
pay_now_for_appointment({required String appointment_type, required DoctorList doctorDetail, bool payNow = true}) {
|
|
|
|
|
logger('pay_now_for_appointment', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
'clinic_type': doctorDetail.clinicName,
|
|
|
|
|
@ -220,18 +215,12 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R033
|
|
|
|
|
payment_method({@required String appointment_type, clinic, payment_method, payment_type}){
|
|
|
|
|
logger('payment_method', parameters: {
|
|
|
|
|
'appointment_type' : appointment_type,
|
|
|
|
|
'clinic_type' : clinic,
|
|
|
|
|
'payment_method' : payment_method,
|
|
|
|
|
'payment_type' : payment_type
|
|
|
|
|
});
|
|
|
|
|
payment_method({required String appointment_type, clinic, payment_method, payment_type}) {
|
|
|
|
|
logger('payment_method', parameters: {'appointment_type': appointment_type, 'clinic_type': clinic, 'payment_method': payment_method, 'payment_type': payment_type});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// R036
|
|
|
|
|
payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){
|
|
|
|
|
payment_success({required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}) {
|
|
|
|
|
logger('payment_success', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
'payment_method': payment_method,
|
|
|
|
|
@ -244,7 +233,7 @@ class Appointment{
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
payment_fail({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}){
|
|
|
|
|
payment_fail({required String appointment_type, clinic, hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}) {
|
|
|
|
|
logger('payment_fail', parameters: {
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
'payment_method': payment_method,
|
|
|
|
|
@ -257,9 +246,8 @@ class Appointment{
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document
|
|
|
|
|
appointment_detail_action({@required AppoitmentAllHistoryResultList appointment, @required String action}){
|
|
|
|
|
appointment_detail_action({required AppoitmentAllHistoryResultList appointment, required String action}) {
|
|
|
|
|
logger('appointment_detail_action', parameters: {
|
|
|
|
|
'action_type': action,
|
|
|
|
|
'flow_type': GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE,
|
|
|
|
|
@ -267,14 +255,13 @@ class Appointment{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document
|
|
|
|
|
appointment_details_confirm({@required AppoitmentAllHistoryResultList appointment}){
|
|
|
|
|
logger('appointment_details_confirm', parameters: {
|
|
|
|
|
});
|
|
|
|
|
appointment_details_confirm({required AppoitmentAllHistoryResultList appointment}) {
|
|
|
|
|
logger('appointment_details_confirm', parameters: {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// R053
|
|
|
|
|
// Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document
|
|
|
|
|
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment, appointment_type}){
|
|
|
|
|
appointment_details_cancel({required AppoitmentAllHistoryResultList appointment, appointment_type}) {
|
|
|
|
|
logger('cancel_appointment', parameters: {
|
|
|
|
|
'flow_type': GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE,
|
|
|
|
|
'appointment_type': appointment_type,
|
|
|
|
|
@ -283,5 +270,4 @@ class Appointment{
|
|
|
|
|
'doctor_name': (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|