Visit and Appointment Relationship

I am learning about appointment and visit module.I am trying to create appointment and visit through REST API.I want to ask what is the relationship between these two module.Is Appointment module is dependent on Visit or are they Independent.Please clarify this to me.I am beginner. Thanks

Did you get a chance to look at this? https://wiki.openmrs.org/display/docs/Appointment+Scheduling+Module https://wiki.openmrs.org/display/docs/Schedule+Appointment

Thanks Daniel! Yes I watched this video.But I am unclear how Visit and Appointment are related.

Did you take a look at this? https://www.gitbook.com/book/openmrs/guide/details

Yes Daniel I also read out this book but I am still confuse about appointment and visit relationship.

In your original post, you mention a relationship between two modules. Can you point me to a url for each of these modules that you are talking about?

Ok I will try to explain my query { “auditInfo”: “string”, “reason”: “string”, “appointmentType”: “string”, “timeSlot”: “string”, “patient”: “string”, “display”: “string”, “voided”: “string”, “visit”: “string”, “cancelReason”: “string”, “uuid”: “string”, “status”: “string” } This is json for creating appointment.Although visit is optional here but why do we need visit here.

Which REST url are you posting this to?

I am doing with this although Visits are optional but my confusion why do we need visit in appointment.

POST /appointmentscheduling/appointment

Here is the json required parameter { “auditInfo”: “string”, “reason”: “string”, “appointmentType”: “string”, “timeSlot”: “string”, “patient”: “string”, “display”: “string”, “voided”: “string”,

"visit": “string”, “cancelReason”: “string”, “uuid”: “string”, “status”: “string” }

When just scheduling an appointment, the visit does not apply. But when the patient actually comes to the hospital and the appointment is closed with the “COMPLETED” status, you may need to know the actual visit that completed the appointment. Does this make sense?

Yes thanks now it’s clear.