All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmrs.module.ipd.api.service.SlotService Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package org.openmrs.module.ipd.api.service;

import org.openmrs.Concept;
import org.openmrs.Order;
import org.openmrs.Visit;
import org.openmrs.module.ipd.api.model.Reference;
import org.openmrs.module.ipd.api.model.Slot;
import org.openmrs.api.APIException;
import org.openmrs.api.OpenmrsService;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Service
public interface SlotService extends OpenmrsService {

//	@Authorized({ PrivilegeConstants.EDIT_IPD_SLOTS })
	Slot getSlot(Integer slotId) throws APIException;

	//	@Authorized({ PrivilegeConstants.EDIT_IPD_SLOTS })
	Slot getSlotByUUID(String uuid) throws APIException;

//	@Authorized({ PrivilegeConstants.EDIT_IPD_SLOTS })
	Slot saveSlot(Slot slot) throws APIException;

	List getSlotsBySubjectReferenceIdAndForDateAndServiceType(Reference subject, LocalDate forDate, Concept serviceType);

	List getSlotsBySubjectReferenceIdAndServiceType(Reference subject, Concept serviceType);

	List getSlotsBySubjectReferenceIdAndServiceTypeAndOrderUuids(Reference subject, Concept serviceType, List orderUuids);

	void voidSlot(Slot slot,String voidReason);

	List getSlotsByPatientAndVisitAndServiceType(Reference subject, Visit visit, Concept serviceType);

	List getSlotsBySubjectReferenceIdAndForTheGivenTimeFrame(Reference reference, LocalDateTime localStartDate, LocalDateTime localEndDate, Visit visit);

	List getSlotsBySubjectReferenceIncludingAdministeredTimeFrame(Reference subject, LocalDateTime localStartDate, LocalDateTime localEndDate, Visit visit);

	List getSlotsForPatientListByTime(List patientUuidList, LocalDateTime localStartDate, LocalDateTime localEndDate);

	List getImmediatePreviousSlotsForPatientListByTime(List patientUuidList, LocalDateTime localStartDate);

	List getSlotDurationForPatientsByOrder(List orders, List serviceTypes);


    List getLastSlotForAnOrder(LocalDateTime currentDay);

	List getScheduledSlots(List orders);

	void markSlotsAsMissed(List markSlotStatusAsMissed, Map slotsForADay);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy