querrying appointments with params is not working as expected http://localhost:8900/openmrs/ws/rest/v1/appointmentscheduling/appointment?visit=77009090-4015-11e4-8e9b-2939a1809c7e&v=full returns for me all the appointments instead of of only those with the specified visit @mogoodrich @adamz
These are the recognised parameters: https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/master/omod/src/main/java/org/openmrs/module/appointmentscheduling/rest/resource/openmrs1_9/AppointmentResource1_9.java#L156-L194
I would support adding “visit” as a parameter… @jecihjoy would you want to ticket and/or add this?
hello. I created this ticket https://issues.openmrs.org/projects/AM/issues/AM-194?filter=allopenissues
I have worked at it and i’m yet to create a pull request. I was hoping you could look at it and maybe change it’s status to ‘Ready for work’, kindly.
Also I don’t have writes to create tickets and add information to a ticket, I was requesting for some rights.
Did you write to helpdesk asking for JIRA access?
I did sometime back and i’m able to login, I’m only missing the rights
Did you ask helpdesk for those rights?
okay i’ll do that. Thank you
kindly help me here, how exactly do you use the visit column in the appointment table
for appointment a1:
- Is to store visit_id of the visit that was active when the appointment was being booked? or
- Is to store the visit_id of the visit that fulfilled that appointment, a1 when patient came back to clinic?
Good question @jecihjoy, we should likely document that better… it’s #2, the visit that fulfilled the appointment.
You can see a couple places where it is used, visit in the “old” UI added in the Appointment Scheduling module (we don’t use this, so I’m not too familiar with the details):
And here in the “newer” UI we add an HTML form entry tag that can be used to “check-in” a patient to an appt as part of an HTML Form:
Take care, Mark
does that mean when I create the appointment the visit column will be null but when i’ll be updating the status of the appointment to ACTIVE ( ie when a patient comes for the appointment and the visit is started) ill also be updating the visit column to the visit_id of the visit that was just started?
@jecihjoy that’s what I believe we do in our implementation, and that makes the most logical sense to me, but I don’t think the module itself enforces that you handle this in any particular way.
this is fair enough,
for ticket https://issues.openmrs.org/browse/AM-194
I added ability to query appointments via visit id
Also linked appointment types to visit types, to enable querying of booked appointments of given visit types. This will help know things like the number of expected patient visits in a certain visit type
Thanks @jecihjoy… I will review in the next day or two… if you haven’t heard from me by Thursday, feel free to ping me again…
noted Thank you
Also with regard to your comment on me creating new methods instead of changing existing ones for backward compatibility, will it entail all these
a) creating a new DAO method getAppointmentsByConstraints with VisitType as it’s additional parameter
or in the DAO layer i can reuse existing method and add my additional visit type query criteria on it
b) Creating additional getAppointmentsByConstraints method in the service layer with one additional parameter, visit type
c) creating a new AppointmentResource2_0 that overrides AppointmentResource1_9 and exposes only this method??