Delete Enrolment (v0.0.1)
Command with the intent to delete the participant's enrolment
Overview
The Delete Enrolment
command represents intent to remove a participant from a specific pathway.
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Delete Enrolment Command Schema", "description": "Schema for the DeleteEnrolment command that represents the intent to remove a participant's enrolment from a screening program", "type": "object", "required": [ "enrolmentId", "participantId", "programId", "reason", "deletedBy", "deletedAt" ], "properties": { "enrolmentId": { "type": "string", "description": "Unique identifier for the enrolment to be deleted" }, "participantId": { "type": "string", "description": "Unique identifier for the participant" }, "programId": { "type": "string", "description": "Unique identifier for the screening program" }, "reason": { "type": "string", "enum": [ "DECEASED", "MOVED_ABROAD", "OPTED_OUT", "TRANSFERRED", "INELIGIBLE", "ADMINISTRATIVE", "OTHER" ], "description": "Reason for deleting the enrolment" }, "deletedBy": { "type": "string", "description": "Identifier of the person deleting the enrolment" }, "deletedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the enrolment is being deleted" }, "reasonDetails": { "type": "string", "description": "Detailed explanation of the deletion reason" }, "activeEpisodes": { "type": "array", "items": { "type": "object", "required": ["episodeId", "status"], "properties": { "episodeId": { "type": "string", "description": "Identifier of the active episode" }, "status": { "type": "string", "enum": ["IN_PROGRESS", "SCHEDULED", "PENDING"], "description": "Current status of the episode" } } }, "description": "List of active episodes that need to be handled" }, "futureAppointments": { "type": "array", "items": { "type": "object", "required": ["appointmentId", "date"], "properties": { "appointmentId": { "type": "string", "description": "Identifier of the future appointment" }, "date": { "type": "string", "format": "date-time", "description": "Date of the future appointment" } } }, "description": "List of future appointments that need to be cancelled" }, "dataRetention": { "type": "object", "properties": { "retentionPeriod": { "type": "integer", "description": "Number of days to retain the data" }, "anonymizeData": { "type": "boolean", "description": "Whether to anonymize the data before deletion" } }, "description": "Data retention preferences" }, "notifications": { "type": "object", "properties": { "notifyParticipant": { "type": "boolean", "description": "Whether to notify the participant" }, "notifyGP": { "type": "boolean", "description": "Whether to notify the participant's GP" }, "notificationMethod": { "type": "string", "enum": ["EMAIL", "SMS", "POST", "NONE"], "description": "Preferred notification method" } }, "description": "Notification preferences for the deletion" }, "auditTrail": { "type": "array", "items": { "type": "object", "required": ["timestamp", "action", "actor"], "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp of the action" }, "action": { "type": "string", "description": "Description of the action taken" }, "actor": { "type": "string", "description": "Identifier of who performed the action" } } }, "description": "Audit trail of actions related to the deletion" }, "notes": { "type": "string", "description": "Additional notes about the enrolment deletion" } }}