Closed ryanjohara closed 10 years ago
While working on a fix, I updated the open-mrs AgeFormatter
in openmrs/formatters.py
to look something like this:
class AgeFormatter(HTMLFormatter):
def to_html(self, values, **context):
est = values['birthdate_estimated']
return est
The est variable in this example is of type boolean. The serrano enpoint http://localhost:8000/api/data/preview/?_=1412705211778&limit=20&page=1
was returning a response that looked something like this:
"objects": [
{
"pk": 1,
"values": [
"<a href=\"/patient/MRN/\">MRN</a>",
false,
"<span class=\"muted\">Unknown</span>"
]
},
{
"pk": 2,
"values": [
"<a href=\"/patient/MRN/\">MRN</a>",
true,
"Male"
]
},
However, in cilantro/ui/tables/cell.js
the value for the false boolean in render
was an empty object.
See this comment. I don't think this is something the client should try to disambiguate. As far as the value being an object.. that may be an unrelated issue.
This line may be the cause of the issue. Move that line below line 138 and see if you get objects.
Yes that fixed it, I'll repush and create another PR.
I must not have tested this correctly. The problem still remains, unfortunately. Any other ideas, @bruth?
The breakdown appears to happen between Series
and DatumArray
in structs.js.
Fixes #705
Signed-off-by: Ryan O'Hara oharar@email.chop.edu