Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

(feat) : Add ability to create appointment from the form#772

Merged
Murithijoshua merged 2 commits intomainfrom
feat/enhancementOnAppointments
Sep 19, 2024
Merged

(feat) : Add ability to create appointment from the form#772
Murithijoshua merged 2 commits intomainfrom
feat/enhancementOnAppointments

Conversation

@donaldkibet
Copy link
Contributor

@donaldkibet donaldkibet commented Sep 18, 2024

Description

We recently updated the appointment system to use the community appointment form. However, users have been experiencing issues capturing appointments correctly. The previous method of using the workspace launcher button wasn't the most effective. To address this, we've integrated the appointment feature directly into the form. For a detailed schema of these changes, please refer to this PR.

This PR updates the HIV Green Card form to use the new, streamlined appointment capture method.

Testing team: Please review and test this feature.
cc: @ckote @mmatheka @palladiumkenya/qa

Testing Instructions

  1. Check out this branch and build it using the appropriate config (e.g., run sh dev-build.sh for the dev environment) to generate the necessary assets.
  2. Install the updated HIV Green Card form.
  3. Access the form from the clinical forms workspace on a patient chart and test the new appointment capture functionality.

Screenshot

Kapture 2024-09-18 at 14 57 31

Kapture.2024-09-18.at.14.57.31.mp4

Sample JSON

{
  "name": "Appointment Test Form",
  "processor": "EncounterFormProcessor",
  "description": "This form is used to capture appointment information",
  "pages": [
    {
      "label": "Appointments",
      "sections": [
        {
          "label": "Appointments",
          "isExpanded": "true",
          "questions": [
            {
              "type": "appointment",
              "questionInfo": "Location of the facility where the appointment was scheduled",
              "label": "Location",
              "id": "appointmentLocation",
              "required": "true",
              "questionOptions": {
                "rendering": "remote-select",
                "appointmentKey": "location",
                "dataSource": "location"
              }
            },
            {
              "label": "Date appointment issued",
              "id": "dateAppointmentIssued",
              "questionOptions": {
                "rendering": "date",
                "appointmentKey": "dateAppointmentScheduled"
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Service",
              "id": "service",
              "questionOptions": {
                "rendering": "remote-select",
                "appointmentKey": "service",
                "dataSource": "services"
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Appointment type",
              "id": "appointmentType",
              "questionOptions": {
                "placeholder": "Select appointment status",
                "rendering": "select",
                "appointmentKey": "appointmentKind",
                "answers": [
                  {
                    "label": "Scheduled",
                    "concept": "Scheduled"
                  }
                ]
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Appointment date & time",
              "id": "appointmentDatetime",
              "datePickerFormat": "both",
              "questionOptions": {
                "placeholder": "Enter appointment date & time",
                "rendering": "date",
                "appointmentKey": "startDateTime",
                "answers": []
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Duration",
              "id": "appointmentDuration",
              "questionOptions": {
                "placeholder": "Enter appointment duration",
                "rendering": "number",
                "appointmentKey": "duration"
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Appointment status",
              "id": "appointmentStatus",
              "questionOptions": {
                "placeholder": "Select appointment status",
                "rendering": "select",
                "appointmentKey": "status",
                "answers": [
                  {
                    "label": "Scheduled",
                    "concept": "Scheduled"
                  }
                ]
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Provider",
              "id": "provider",
              "questionOptions": {
                "rendering": "remote-select",
                "appointmentKey": "providers",
                "dataSource": "provider"
              },
              "type": "appointment",
              "validators": []
            },
            {
              "label": "Notes",
              "id": "appointmentNote",
              "questionOptions": {
                "placeholder": "Enter appointment notes",
                "rendering": "textarea",
                "appointmentKey": "comments",
                "rows": 5
              },
              "type": "appointment",
              "validators": []
            }
          ]
        }
      ]
    }
  ],
  "version": "2.0",
  "encounterType": "465a92f2-baf8-42e9-9612-53064be868e8",
  "uuid": "37bd955b-4db3-4dcb-9a46-4d83a9b23974"
}

@Murithijoshua Murithijoshua merged commit 63fddd1 into main Sep 19, 2024
@Murithijoshua Murithijoshua deleted the feat/enhancementOnAppointments branch September 19, 2024 05:48
enyaencha referenced this pull request in enyaencha/openmrs-config-kenyaemr Jan 28, 2026
Co-authored-by: Joshua Murithi <brodiamyzalius@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants