O3: Embedding “Appointment Widget” in Forms

Hi all once again,

Extending discussion from: O3: Embedding “Conditions Widget” in Forms:

EthiOHRIs main focus is on creating a follow-up for patients and we are using OHRI forms (form-engine) for that. one of our requirements is to make the next appointment date from our follow-up form without opening a new window, this function is not implemented for now OHRI forms.

@samuel34 suggested me to create an Appointment Widget the same as Conditions Widget

Details about the widget O3 already has support for capturing appointments. This widget(actually a simple static form ) is readily available as an Extension .

However, this one has patient search, Save and Discard buttons that we don’t really need. we need just the form (openmrs-esm-patient-management/appointments-form.component.tsx at main · openmrs/openmrs-esm-patient-management · GitHub). so the idea is to refactor this to a widget that can be smoothly embedded in an existing form. below is my plan but am very happy for any suggestions and help especially from the appointments development team:

  • Create an independent widget (from forms controls) so that it can independently create an appointment.
  • Use this widget inside the appointment form to respect code reusability and not mess around.

cc: @samuel34 @bistenes, @jdick, @mksd, @dkibet, @mayanja, @eudson, @grace, @dagimm