You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App/lib/analytics/flows/appointments.dart

222 lines
7.8 KiB
Dart

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../google-analytics.dart';
class Appointment{
final GALogger logger;
Appointment(this.logger);
// R015
book_appointment(){
logger('book_appointment');
}
// R016.1, R017.2
book_appointment_by_clinic(){
logger('book_appointment_by_clinic');
}
// R016.2, R018.2
book_appointment_by_doctor(){
logger('book_appointment_by_doctor');
}
// R017.1
book_appointment_doctor_search({@required String query}){
// doctor_search_query : value
logger('book_appointment_doctor_search', parameters: {
'doctor_search_query' : query
});
}
// R018.1
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
});
}
// R019.1
book_appointment_livecare_accept(){
logger('book_appointment_livecare_accept');
}
// R019.2
book_appointment_livecare_decline(){
logger('book_appointment_livecare_decline');
}
// R020
book_appointment_chief_complaints({@required String appointment_type, clinic, hospital, treatment}){
logger('book_appointment_chief_complaints', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : clinic,
'hospital_name' : hospital,
'treatment_type' : treatment,
});
}
// R021
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,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
});
}
// R022
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,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
});
}
// R023
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,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day
});
}
// R024.1
book_appointment_time_selection({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_time_selection', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R024.2
book_appointment_review({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_review', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R025
book_appointment_click_confirm({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_click_confirm', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R026
book_appointment_confirmation_success({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_confirmation_success', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R027
appointment_reminder(bool value){
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
});
}
// 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}){
logger('pay_now_for_appointment', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctorDetail.clinicName,
'hospital_name' : doctorDetail.projectName,
'doctor_name' : doctorDetail.name,
'payment_type' : '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}){
logger('appointment_detail_action', parameters: {
});
}
// 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: {
});
}
// R053
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){
logger('appointment_details_cancel', parameters: {
});
}
}