Its been a while since i made an update, have not been seated anyway.
Have engaged stakeholders the likes of @jesplana @dennis @ibacher @achachiez @mksd @samuel34 @mozzy @burke @anjisvj and can’t forget my mentor @heshan and @jayasanka …among others to validate the work in progress. Thanks all
Just a summary of the work I have been doing or discussing ;
The AMPATH FORMS
We are gonna encapsulate our widget into an “Ampath Forms” control, this control will eventually be available for use within forms. This means people will directly consume this within forms and it will persist attachments as complex obs.
More community thoughts here;
The OHRI FORMS
At the moment we don’t support custom-components yet on the React version.
However, there are work arounds forexample two reslotions were reached to in a discussion;
- Native Incorporation or
Imagine having "annotation tools" native to the workspace.
Involved natively incorporating support for the widget within the form engine itself. This would mean integrating the drawing widget as a core feature of the OHRI form engine, allowing seamless usage and tight integration with other form-related functionalities.
Explored the option of utilizing an extension to integrate the drawing widget with the existing form engine. In this case, the drawing widget would be developed as a separate extension module that can be added to the form engine as an optional feature.
Sharing State between Workspace Items and Tools:
strategies for sharing state were discussed, including the use of observables.
I suppose the order basket is a workspace tool.
Its all about sharing state with between items on the workspace and some natively existing workspace tools.
File Picker Development:
The file picker component, which plays a crucial role in the functionality of the drawing widget, was identified as a work in progress. The need for further development and enhancement of the file picker component to meet the specific requirements of the project was acknowledged. The file picker serves as a user interface element that enables users to select and manipulate files, such as images, if added can be used for annotation within the drawing widget.
if the filepicker/rendering file type is to be improved, then this ca be the process workflow btn file picker and the drawing widget;
User Interaction : The user initiates the process by interacting with the file picker component. This can be done by clicking on a button or a specific area within the form interface that triggers the file picker functionality.
File Selection: The file picker component provides a user interface for selecting a file from the local file system or other available sources. The user can navigate through directories, choose a file, and confirm the selection.
File Metadata and Data Transfer: Once the user selects a file, the file picker component retrieves the metadata associated with the selected file, such as file name, file type, and file size. The file picker component then transfers the file data to the drawing widget for further processing and display.
Drawing Widget Integration: The drawing widget receives the file data from the file picker component. It processes the file data and renders the image within its interface. The user can now interact with the drawing widget to annotate or edit the displayed image.
Annotating and Editing: The user utilizes the drawing widget’s editing tools and functionality to annotate the image. This can include drawing shapes, adding text, highlighting areas, or applying various editing effects. The user’s annotations and edits are reflected in real-time within the drawing widget.
Saving or Submitting: After the user completes the desired annotations and edits, they can choose to save or submit the annotated image. The drawing widget captures the annotated image along with any associated metadata or additional data required for form submission.
Data Handling: The drawing widget processes the annotated image and prepares it for further handling within the form engine. This may involve compressing the image, converting it to a suitable format, or applying any necessary transformations or adjustments.
Integration with Form Engine: The annotated image, along with any other form data, is integrated with the form engine. It becomes part of the complex observation or data entry within the form, allowing for comprehensive patient charting or data recording.
Does this scale or does it make sense??
With this, all engines can invoke this widget with information about the image, edit it and save it back.
Where does the openmrs form come in because the functionality to annotate image should not be tied to the form engine but the end goal here is to have the ability to annotate diagrams in forms.
@dkibet @ibacher @samuel34 @dennis @mksd any thoughts here??