Hi everyone
,
In the 2023 GSoC archive, there is an incomplete but interesting task, which is “Draw on Body Diagram.” From past discussions, this looks like a highly requested and important feature for O3 that could make a real impact for the community and meaningfully improve clinicians’ workflows.
Quick summary of the feature
OpenMRS has previously (O2) supported uploading and visualising patient conditions through diagrams, which helps doctors explain conditions to their patients more clearly, but O3 is missing this essential functionality. This feature aims to improve the diagramming feature by allowing users to upload any diagram as an image, annotate specific areas with shapes, save and retrieve annotated diagrams, and download them as images with the annotations included.
Core requirements,
- Upload any diagram as an image to the module
- Annotate areas of the diagram with shapes (circles, squares, single points, etc.)
- Save annotated diagrams for future reference
- Retrieve diagrams from a list of already saved ones
Additional requirements,
- Draw freehand shapes and annotate them with descriptive text
- Download diagrams as images with the annotations, for easy sharing and printing
My current understanding and proposed approach
I’m planning to add a new input type, something like “Annotated Diagram” that can be used to build questions in the React form builder engine. When filling out a form, the user would see this field and be able to either upload a new image or select a previously saved template diagram (provided by the annotation feature), annotate it, and submit. Once submitted, the attached diagrams would appear in the Attachments section.
I’ve put together a quick diagram of how I’m envisioning this (below). Before moving forward with development,
I’d love to get your clarification, improvements, and direction on the requirements to make an implementation plan with the following things:
Implementation plan guide
- A good requirement analysis
- A good explanation on how to handle different image types
- Good data structure design to store diagram meta data
- Plans on,
- How to handle the diagram upload and store
- How to handle the editing of the diagram on the frontend
- How to render those diagrams properly with the edits
- Set of wireframes for the UIs
- The list of API endpoints that is needed to support those UIs
