<%if entry.negationInd %>Not Done: <% end %><%= entry.description %> |
<% entry.codes.each do |set, codes| %>
<% entry_key = "#{entry.id}_#{by_encounter}" %>
<% if code_map %>
<%= set %>: <% codes.each do |code| %>
<%=code.to_s%>
<% end %>
<% else %>
<%= set %>: <%= codes.join(',') %>
<% end %>
<% if code_map %>
<% codes.each do |code| %>
<% description = code_map[set][code] if (code_map && code_map[set]) %><%= description %>
<% end %>
<% end %>
<% end %>
|
<%= entry.times_to_s('present') %> |
<%= decode_hqmf_status(entry.status, entry.oid) %> |
<% entry.values.each do |value| %>
<% if value.respond_to? :scalar %>
<% units = value.try(:units) if(value.respond_to?(:units)) %>
<%= value.try(:scalar) %> <%= units %>
<% elsif value.respond_to? :codes %>
<% value.codes.each do |system, vals| %>
<%= system %>: <%= vals.join(',') %>
<% end %>
<%= (value.description ? "(#{value.description})" : '')%>
<% else %>
UNKNOWN VALUE
<% end %>
<% end %>
|
<%
(entry.attributes.keys.reject {|key| ['codes', 'time', 'description', 'mood_code', 'values', '_id', '_type', 'start_time', 'end_time', 'status_code', 'negationInd', 'oid'].include? key}).sort.each do |field|
field_value = convert_field_to_hash(field, entry.attributes[field])
%>
<% if field_value && !field_value.empty? %>
<% if field_value.is_a? Hash %>
- <%= field.titleize %>:
<% field_value.keys.sort.reverse.each do |fieldkey| %>
- <%= fieldkey %>: <%= field_value[fieldkey] %>
<% end %>
<% else %>
- <%= field.titleize %>: <%= field_value%>
<% end %>
<% end %>
<%
end
%>
|