Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing test on appointment search due to default value for dateA… #156

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Appointment extends BaseOpenmrsData implements Serializable {
* This property is useful for documenting the visit when the patient booked the appointment or when the patient called to book the appointment
* NOTE: This is *not* the date the appointment is scheduled to take place. We use startDateTime for this
*/
private Date dateAppointmentScheduled = new Date();
private Date dateAppointmentScheduled;
private Patient patient;
private AppointmentServiceDefinition service;
private AppointmentServiceType serviceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -103,6 +104,8 @@ public void mapAppointmentRequestToAppointment(AppointmentRequest appointmentReq

if (appointmentRequest.getDateAppointmentScheduled() != null) {
appointment.setDateAppointmentScheduled(appointmentRequest.getDateAppointmentScheduled());
} else {
appointment.setDateAppointmentScheduled(new Date());
}
appointment.setServiceType(appointmentServiceType);
appointment.setService(appointmentServiceDefinition);
Expand Down
Loading