Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 19, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants