package com.agilex.healthcare.schedulingmanager.datalayer.appointment;

import com.agilex.healthcare.mobilehealthplatform.domain.filter.datefilter.DateFilter;
import com.agilex.healthcare.schedulingmanager.domain.SMAppointmentRequest;
import com.agilex.healthcare.schedulingmanager.domain.SMAppointmentRequestMessage;
import com.agilex.healthcare.schedulingmanager.domain.SMAppointmentRequestMessages;
import com.agilex.healthcare.schedulingmanager.domain.SMAppointmentRequests;

import java.util.HashMap;

public interface AppointmentRequestDataLayer {

	SMAppointmentRequests fetchAppointmentRequestsByPatient(String patientId, DateFilter filter);
	SMAppointmentRequests fetchAppointmentRequests(AppointmentRequestFilter filter);

    SMAppointmentRequests fetchAppointmentRequests(AppointmentRequestFilter filter, boolean freshStart, HashMap<String, Boolean> sortFields, String filterString, int  firstRecord, int  lastRecord);

	SMAppointmentRequest fetchAppointmentRequest(String patientId, String appointmentRequestId);

	SMAppointmentRequest saveAppointmentRequest(SMAppointmentRequest SMAppointmentRequest);

	void deleteAppointmentRequest(SMAppointmentRequest SMAppointmentRequest);

    SMAppointmentRequestMessages fetchAppointmentRequestMessages(String patientId, String appointRequestId);

    SMAppointmentRequestMessage saveAppointmentRequestMessage(String patientId, SMAppointmentRequestMessage SMAppointmentRequestMessage, boolean isProvider);
    
    SMAppointmentRequest updateMessageFlag(String patientId, String appointmentRequestId, boolean isProvider);
        
    SMAppointmentRequest markAppointmentRequestIsSeenByProvider(String patientId, String appointmentRequestId);
}
