Appointment search on Start and End Date?

I am trying to get appointment throught startDate and endDate but the query is not working.Is this possible to filter the appointment just on startDate and endDate. I am getting appointment with this Url. /openmrs/ws/rest/v1/appointmentscheduling/appointment? startDate=2017-09-01T10:00:00.000+0500&endDate=2017-09-01T11:00:00.000+0500&v=full Thanks

According to this https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/master/omod/src/main/java/org/openmrs/module/appointmentscheduling/rest/resource/openmrs1_9/AppointmentResource1_9.java#L170-L173 the parameter names should be “fromDate” and “toDate”

And here is the test for this functionality: https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/master/omod/src/test/java/org/openmrs/module/appointmentscheduling/rest/controller/AppointmentResource1_9ControllerTest.java#L182-L196

1 Like

Thanks it worked.

Hi Daniel one more thing Does this format also apply to timeslot?

What do you mean by format?

Rest API url format. /openmrs/ws/rest/v1/appointmentscheduling/timeslot?fromDate=2017-09-05T06:00:00&toDate=2017-09-05T09:00:00&appointmentType=4d3b6396-c437-11e4-a470-82b0ea87e2d8 I was talking about this one.Due to your provided github code,I tested this one and it worked fine.I am trying to search for queue management code in your provided github code but I didn’t find it.Can you share the logic behind this screen shot.How Rest API invoke behind these button. Start Consultation,endConsultation,CheckIn,MissAppointment.I know it’s change due to status but If I find the code it will be helpful for me. Here is the screen shot.

Do these two links give you what you need?

Yes.I done with this now I am lasking about appointment status.How they get changed due to Rest API?

Basically when I clicked on Check-In a “time counter” get start and status changed to “waiting”.When I get appointment through Rest API I got the status changed to waiting.But I am unable to see the time Counter.How the timeCounter logic is implemented which property represented it.

Are you simply asking for the code which gets run when you click the Check-in button?

Yes,in simple words.

Are you looking for this? https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/091e4997645514365e4d717b093693c2c1d85bdb/omod/src/main/java/org/openmrs/module/appointmentscheduling/web/controller/AppointmentListController.java#L265-L283

Yes.Does this code support any Rest Api.?

Did you try the appointment resource?

Yes I tried but I have one confusion.Is appointment or visit are independent or they are linked with each other.

More detail of my confusion are:I created appointment for patient “A” and now I am trying to manage it for example I changed his status into waiting.Does on backend his visit will be auto start or Do I need to seprately start his visit.