Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

OpenMRS Trunk

Incorrect Link to Encounter Form When Searching for Observations

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Could Could
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: OpenMRS 1.4.0
  • Component/s: None
  • Description:
    Hide

    Steps to reproduce:
    1.) Admin -> Manage Observations
    2.) Find Observation "by Encounter" and then Search
    3.) In the Search Results, click on the Form will result in page not found.

    Error 404
    The page "/openmrs/admin/observations/encounter.form" cannot be found. Check the link and try again.

    Show
    Steps to reproduce: 1.) Admin -> Manage Observations 2.) Find Observation "by Encounter" and then Search 3.) In the Search Results, click on the Form will result in page not found. Error 404 The page "/openmrs/admin/observations/encounter.form" cannot be found. Check the link and try again.
  1. %231042-fix-obsSearchResults.patch
    (1 kB)
    Burke Mamlin
    2008-09-22 18:25:21 EDT

Activity

Hide
Ben Wolfe added a comment - 2008-09-18 20:56:46 EDT

Where was Obs.patient referenced?

Instead of ../encounters, the better way to reference the url would be with "<openmrs:contextPath />/encounters/encounter.form" or "${pageContext.request.contextPath}/encounters/encounter.form". (Or you can even use the javascript global variable: openmrsContextPath

Show
Ben Wolfe added a comment - 2008-09-18 20:56:46 EDT Where was Obs.patient referenced? Instead of ../encounters, the better way to reference the url would be with "<openmrs:contextPath />/encounters/encounter.form" or "${pageContext.request.contextPath}/encounters/encounter.form". (Or you can even use the javascript global variable: openmrsContextPath
Hide
Saptarshi Purkayastha added a comment - 2008-09-18 21:24:27 EDT

Obs.patient is at line 73: http://svn.openmrs.org/openmrs/trunk/web/WEB-INF/view/portlets/findObservation.jsp

Why would it be a better way to reference the url by adding extra processing, when we can be sure of the path of the url? Can the Observations and Encounters be in different context paths?? Some explanation on how those would be better will be useful.

Show
Saptarshi Purkayastha added a comment - 2008-09-18 21:24:27 EDT Obs.patient is at line 73: http://svn.openmrs.org/openmrs/trunk/web/WEB-INF/view/portlets/findObservation.jsp Why would it be a better way to reference the url by adding extra processing, when we can be sure of the path of the url? Can the Observations and Encounters be in different context paths?? Some explanation on how those would be better will be useful.
Hide
Ben Wolfe added a comment - 2008-09-19 19:56:27 EDT

I think we can technically be sure of the url. I just feel that its a better habit to have the absolute url than a relative one.

That spring code should be Obs.person in the jsp page. The column was renamed from patient to person last year some time and apparently this page wasn't updated!

Show
Ben Wolfe added a comment - 2008-09-19 19:56:27 EDT I think we can technically be sure of the url. I just feel that its a better habit to have the absolute url than a relative one. That spring code should be Obs.person in the jsp page. The column was renamed from patient to person last year some time and apparently this page wasn't updated!
Hide
Saptarshi Purkayastha added a comment - 2008-09-22 18:25:21 EDT

The patch with the correct form link in Observation search and the corrected the spring code

Show
Saptarshi Purkayastha added a comment - 2008-09-22 18:25:21 EDT The patch with the correct form link in Observation search and the corrected the spring code
Hide
Saptarshi Purkayastha added a comment - 2008-09-22 18:35:56 EDT

Added Changeset 5544 to fix the issue. To make Ben happy , changed the patch to use global js var - openmrsContextPath. Finds the form link correctly and also fixed the spring message for the person header

Show
Saptarshi Purkayastha added a comment - 2008-09-22 18:35:56 EDT Added Changeset 5544 to fix the issue. To make Ben happy , changed the patch to use global js var - openmrsContextPath. Finds the form link correctly and also fixed the spring message for the person header
Hide
Ben Wolfe added a comment - 2008-09-22 19:56:57 EDT

FYI: Square braces around the revision number will link to the changeset in trac: rev:5544

FYI Unable to render embedded object: File ( For future reference, one last round of patches/approval on trac will be needed. <img class="emoticon" src="/images/icons/emoticons/smile.gif" height="20" width="20" align="absmiddle" alt="" border="0"/> Looks like this one worked out, but larger patches won't be this easy) not found.

Show
Ben Wolfe added a comment - 2008-09-22 19:56:57 EDT FYI: Square braces around the revision number will link to the changeset in trac: rev:5544 FYI Unable to render embedded object: File ( For future reference, one last round of patches/approval on trac will be needed. <img class="emoticon" src="/images/icons/emoticons/smile.gif" height="20" width="20" align="absmiddle" alt="" border="0"/> Looks like this one worked out, but larger patches won't be this easy) not found.
Hide
Ben Wolfe added a comment - 2008-12-18 20:24:59 EST

Backported to 1.3.x in rev:6084 by bmckown

Show
Ben Wolfe added a comment - 2008-12-18 20:24:59 EST Backported to 1.3.x in rev:6084 by bmckown

People

Dates

  • Created:
    2008-09-18 15:48:42 EDT
    Updated:
    2010-07-08 16:20:59 EDT
    Resolved:
    2010-07-01 22:42:30 EDT