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

Commit 63fddd1

Browse files
(feat) : Add ability to create appointment from the form (#772)
Co-authored-by: Joshua Murithi <brodiamyzalius@gmail.com>
1 parent a887c64 commit 63fddd1

15 files changed

+285
-180
lines changed

configuration/ampathforms/HIV_Green_Card.json

Lines changed: 110 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5022,14 +5022,119 @@
50225022
}
50235023
},
50245024
{
5025-
"label": "Return Visit Date:",
5026-
"id": "appointmentWorkspaceLauncher",
5025+
"type": "appointment",
5026+
"questionInfo": "Location of the facility where the appointment was scheduled",
5027+
"label": "Location",
5028+
"id": "appointmentLocation",
5029+
"required": "true",
50275030
"questionOptions": {
5028-
"rendering": "workspace-launcher",
5029-
"buttonLabel": "Add appointments",
5030-
"workspaceName": "appointments-form-workspace"
5031+
"rendering": "remote-select",
5032+
"appointmentKey": "location",
5033+
"dataSource": "location"
50315034
}
50325035
},
5036+
{
5037+
"label": "Date appointment issued",
5038+
"id": "dateAppointmentIssued",
5039+
"questionOptions": {
5040+
"rendering": "date",
5041+
"appointmentKey": "dateAppointmentScheduled"
5042+
},
5043+
"type": "appointment",
5044+
"validators": []
5045+
},
5046+
{
5047+
"label": "Service",
5048+
"id": "service",
5049+
"questionOptions": {
5050+
"rendering": "remote-select",
5051+
"appointmentKey": "service",
5052+
"dataSource": "services"
5053+
},
5054+
"type": "appointment",
5055+
"validators": []
5056+
},
5057+
{
5058+
"label": "Appointment type",
5059+
"id": "appointmentType",
5060+
"questionOptions": {
5061+
"placeholder": "Select appointment status",
5062+
"rendering": "select",
5063+
"appointmentKey": "appointmentKind",
5064+
"answers": [
5065+
{
5066+
"label": "Scheduled",
5067+
"concept": "Scheduled"
5068+
}
5069+
]
5070+
},
5071+
"type": "appointment",
5072+
"validators": []
5073+
},
5074+
{
5075+
"label": "Appointment date & time",
5076+
"id": "appointmentDatetime",
5077+
"datePickerFormat": "both",
5078+
"questionOptions": {
5079+
"placeholder": "Enter appointment date & time",
5080+
"rendering": "date",
5081+
"appointmentKey": "startDateTime",
5082+
"answers": []
5083+
},
5084+
"type": "appointment",
5085+
"validators": []
5086+
},
5087+
{
5088+
"label": "Duration",
5089+
"id": "appointmentDuration",
5090+
"questionOptions": {
5091+
"placeholder": "Enter appointment duration",
5092+
"rendering": "number",
5093+
"appointmentKey": "duration"
5094+
},
5095+
"type": "appointment",
5096+
"validators": []
5097+
},
5098+
{
5099+
"label": "Appointment status",
5100+
"id": "appointmentStatus",
5101+
"questionOptions": {
5102+
"placeholder": "Select appointment status",
5103+
"rendering": "select",
5104+
"appointmentKey": "status",
5105+
"answers": [
5106+
{
5107+
"label": "Scheduled",
5108+
"concept": "Scheduled"
5109+
}
5110+
]
5111+
},
5112+
"type": "appointment",
5113+
"validators": []
5114+
},
5115+
{
5116+
"label": "Provider",
5117+
"id": "provider",
5118+
"questionOptions": {
5119+
"rendering": "remote-select",
5120+
"appointmentKey": "providers",
5121+
"dataSource": "provider"
5122+
},
5123+
"type": "appointment",
5124+
"validators": []
5125+
},
5126+
{
5127+
"label": "Notes",
5128+
"id": "appointmentNote",
5129+
"questionOptions": {
5130+
"placeholder": "Enter appointment notes",
5131+
"rendering": "textarea",
5132+
"appointmentKey": "comments",
5133+
"rows": 5
5134+
},
5135+
"type": "appointment",
5136+
"validators": []
5137+
},
50335138
{
50345139
"label": "Return visit Reason:",
50355140
"type": "obs",

dist-form-entry/22751.de8fd4f3ef0fb4d8.js

Lines changed: 0 additions & 129 deletions
This file was deleted.

dist-form-entry/22751.de8fd4f3ef0fb4d8.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-form-entry/4647.39357f0e0a4d3737.js.map renamed to dist-form-entry/4647.5082dc52c7de1b5d.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-form-entry/53210.3a743d101ac4b383.js

Lines changed: 129 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-form-entry/53210.3a743d101ac4b383.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-form-entry/main.40a70715c61385fe.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist-form-entry/main.40a70715c61385fe.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist-form-entry/main.bbba269fdb984ee8.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)