blob: ecd03c709c0e0db88280ec255ef6b7808afbf5ed [file] [log] [blame]
{
"id": "onboarding",
"name": "Patient Onboarding Workflow",
"start": "LetsOnboard",
"states": [
{
"name": "LetsOnboard",
"type": "event",
"onEvents": [
{
"eventRefs": [
"NewPatientEvent"
],
"actions": [
{
"functionRef": "StoreNewPatient"
},
{
"functionRef": {
"refName": "AssignDoctorToPatient",
"arguments": {
"patients": "[ . ]"
}
}
},
{
"functionRef": "SchedulePatientAppointment"
}
]
}
],
"end": true
}
],
"events": [
{
"name": "NewPatientEvent",
"type": "new.patient.events",
"source": "/hospital/entry"
}
],
"functions": [
{
"name": "StoreNewPatient",
"type": "custom",
"operation": "rest:post:/onboarding/patient"
},
{
"name": "AssignDoctorToPatient",
"type": "custom",
"operation": "rest:post:/assign-doctor/first"
},
{
"name": "SchedulePatientAppointment",
"type": "custom",
"operation": "rest:post:/onboarding/schedule/appointment"
}
]
}