templates/_medication.gc32.erb in health-data-standards-0.8.1 vs templates/_medication.gc32.erb in health-data-standards-1.0.0

- old
+ new

@@ -1,37 +1,49 @@ <medication> <id><%= medication.id%></id> - <status>completed</status> - <freeTextSig><%= medication.free_text_sig%></freeTextSig> + <%== code_display medication, "preferred_code_sets" => ["RxNorm", "CVX"] %> + <freeText><%= medication.free_text%></freeText> + <%== gc32_effective_time(medication)%> + <% if medication.administration_timing %> + <administrationTiming institutionSpecified="<%= medication.administration_timing[:insitution_specified] %>"> + <%== quantity_display medication.administration_timing["period"], :period %> + </administrationTiming> + <% end %> + <% if medication.route %> <%== code_display medication, "tag_name" => "route", "attribute" => "route", "preferred_code_sets" => ["NCI Thesaurus"] %> + <% end %> + <% if medication.site %> + <%== code_display medication, "tag_name" => "site", "attribute" => "site", "preferred_code_sets" => ["SNOMED-CT"] %> + <% end %> <%== quantity_display medication.dose, :dose %> <% if medication.dose_indicator %> <doseIndication><%medication.dose_indicator%></doseIndication> <% end %> - - <%== code_display medication, "tag_name" => "site", "attribute" => "site", "preferred_code_sets" => ["SNOMED-CT"] %> <% if medication.dose_restriction %> <doseRestriction> <numerator><%= medication.dose_restriction["numerator"]%></numerator> <denominator><%= medication.dose_restriction["denominator"]%></denominator> </doseRestriction> <% end %> - <% if medication.administration_timing %> - <administrationTiming institutionSpecified="<%= medication.administration_timing[:insitution_specified] %>"> - <start><%= Time.at(medication.start_time) %></start> - <end><%= Time.at(medication.end_time)%></end> - <%== quantity_display medication.administration_timing["period"], :period %> - </administrationTiming> - <% end %> + <% if medication.product_form %> <%== code_display medication, "tag_name" => "productForm", "attribute" => "product_form", "preferred_code_sets" => ["NCI Thesaurus"] %> + <% end %> <% if medication.delivery_method %> <%== code_display medication, "tag_name" => "deliveryMethod", "attribute" => "delivery_method", "preferred_code_sets" => medication.delivery_method.keys %> <% end %> + <% if medication.type_of_medication%> <%== code_display medication, "tag_name" => "type", "attribute" => "type_of_medication", "preferred_code_sets" => ["SNOMED-CT"] %> + <% end %> + <% if medication.status_of_medication%> <%== code_display medication, "tag_name" => "statusOfMedication", "attribute" => "status_of_medication", "preferred_code_sets" => ["SNOMED-CT"] %> + <% end %> + <%if medication.indication%> <%== code_display medication, "tag_name" => "indication", "attribute" => "indication", "preferred_code_sets" => ["SNOMED-CT"] %> + <% end %> + <% if medication.vehicle %> <%== code_display medication, "tag_name" => "vehicle", "attribute" => "vehicle", "preferred_code_sets" => ["SNOMED-CT"] %> + <% end%> <% if medication.dose_indicator %> <doseIndicator><%= medication.dose_indicator %></doseIndicator> <% end %> @@ -44,17 +56,17 @@ <% end %> <% medication.fulfillment_history.each do |fh| %> <fulfillmentHistory <%if (fh.fill_status) %> fillStatus="<%=fh.fill_status%>" <% end %> <% if fh.fill_number %> fillNumber="<%=fh.fill_number%>" <% end %>> <prescriptionNumber><%=fh.prescription_number%></prescriptionNumber> - <dispenseDate><%= Time.at(fh.dispense_date)%></dispenseDate> + <dispenseDate><%= Time.at(fh.dispense_date).utc%></dispenseDate> <%== quantity_display fh.quantity_dispensed, :quantityDispensed %> </fulfillmentHistory> <% end %> <% medication.order_information.each do |oi| %> <orderInformation <% if oi.order_number %><%= "orderNumber=\"#{oi.order_number}\"" %> <% end %> <% if oi.fills %> <%= "fills=\"#{oi.fills}\"" %> <% end %>> <%== quantity_display oi.quantity_ordered, "quantityOrdered" %> - <orderDateTime><%= Time.at(oi.order_date_time)%></orderDateTime> - <expirationDateTime><%= Time.at(oi.order_expiration_date_time)%></expirationDateTime> + <orderDateTime><%= Time.at(oi.order_date_time).utc%></orderDateTime> + <expirationDateTime><%= Time.at(oi.order_expiration_date_time).utc%></expirationDateTime> </orderInformation> <% end %> </medication> \ No newline at end of file