Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2656

Update basic Obs form to handle download & view for obs of types BinaryDataHandler and BinaryStreamHandler



    • Task
    • Status: Closed
    • TBD
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • Low


      A BinaryDataHandler and BinaryStreamHandler have been added to core for complex obs, allowing you to attach any binary file to an obs.

      You can successful upload a binary file and attach it to a complex obs via the basic Obs form.

      However, after uploading the a file the current Obs form (obs.form) does not let you download the file... it only offers you the option to "View current complex value in a new window". Since a complex value could now conceivably be a file of any type, and most file types won't be viewable via the browser, there should be mechanism to download the file on this page.

      Ideally, the app would be smart enough to only display the "view" option if it is something (like an image) that is knows it can render within a browser.

      The solution here involves calling the complex obs servlet from within this page (this is what I do in the MDR-TB module).

      For instance, the following code would create a download link:

      <a href="${pageContext.request.contextPath}/complexObsServlet?obsId=${obs.id}&view=download&viewType=download">Download the Complex Obs</a>

      However, there probably needs to be some discussion as to how we want this to operate.

      Gliffy Diagrams


          Issue Links



                Unassigned Unassigned
                mogoodrich Mark Goodrich
                0 Vote for this issue
                5 Start watching this issue