Refactor Kafka code to make it easier to explore objects to Kafka: view mixin, centralized serialization methods, consistent use of view hooks
There is a great deal of inconsistency in the way that the Kafka export is used within Orthanc. The various Sonador endpoints have a great degree of code duplication when it comes to serialization of Kafka data, how data is exported, and patterns used to integrate Kafka into Orthanc components. Develpoment tasks: - [x] Create a set of serialization methods which can be used to generate Kafka data representation. _Methods should generally be implemented within `kafka.resources` and pass the Sonador manager and UIDs of the object (and associated parent UIDs) rather than model instances to allow them to be broadly re-used._ **Implemented:** refer to oak-tree/medical-imaging/orthanc-sonador!42. - [x] Refactor base management and REST views to provide a "hook" to export data after a model has been persisted to the database. **Implemented:** refer to oak-tree/medical-imaging/orthanc-sonador!42. - [x] Refactor Kafka interface to a `KafkaMixin` which defines properties and attributes so that it is easier to add Kafka export functionality to new objects within Orthanc. **Implemented:** refer to oak-tree/medical-imaging/orthanc-sonador!42. #### Project Tracking OP#48
issue