When you click a measurement within a lab (e.g. HDL, LDL, etc), the result window that appears doesn't show values that were manually entered by users through the measurements section, it only shows result that came from labs. This differs from the display when you click measurements in the measurements section where it shows the both types. Screenshots attached.
The result window should show all results, regardless of whether or not they came from a lab or were manually entered by a user.
The display only shows results from labs; results that were manually entered are not shown.
Steps to Reproduce:
(1) Upload the attached lab and assign it to a patient chart. The lab contains one HDL result.
(2) Go to Admin-->Customize oscarMeasurements and configure OSCAR to allow users to enter HDL results in the Measurements section of the Encounter Screen.
(3) In the chart from (1), manually and an HDL measurement through the measurements section.
(4) Click HDL in the measurements section ... note that two results are displayed, the one from the lab and the one that was manually entered.
(5) Open the lab uploaded in (1). Click "HDL CHOLESTEROL" ... note that only one result is displayed, the result entered in (3) is not displayed.
12_1 Deb 436 (fresh install) + Ubuntu 12 LTS (fresh install)
– The reason manually entered values are not displaying is because the query relies on the measurement having an entry in the measurementsExt table. Values entered through the measurements section do not have an entry in the measurementsExt table. An example query is shown below:
SELECT DISTINCT e2.val AS lab_no FROM measurements m JOIN measurementsExt e1 ON m.id=e1.measurement_id AND e1.keyval='identifier' JOIN measurementsExt e2 ON m.id=e2.measurement_id AND e2.keyval='lab_no' WHERE e1.val='2165' AND m.demographicNo='1'