Sha256: 7ee9bb078022d982df935821a17e793f91866ad30d9c15e23fe3780cb26c7f35
Contents?: true
Size: 1.44 KB
Versions: 30
Compression:
Stored size: 1.44 KB
Contents
# frozen_string_literal: true xml = builder xml.Medications do patient.prescriptions_with_numeric_dose_amount.each do |prescription| xml.Medication do xml.FromTime prescription.prescribed_on.to_datetime if prescription.terminated_or_marked_for_termination? xml.ToTime prescription.terminated_on&.to_datetime end xml.EnteringOrganization do xml.CodingStandard "ODS" xml.Code Renalware.config.ukrdc_site_code end xml.Route do xml.CodingStandard "RR22" xml.Code prescription.medication_route&.rr_code # xml.Description prescription.medication_route&.name end xml.DrugProduct do xml.Generic prescription.drug # xml.Id do # xml.CodingStandard "DM+D" # xml.Code "dm + d code for the drug - coming soon" # xml.Description prescription.drug # end end xml.Frequency prescription.frequency xml.Comments [prescription.dose_amount, prescription.dose_unit&.text, prescription.frequency].compact.join(" ") xml.DoseQuantity prescription.dose_amount&.strip if prescription.dose_unit.present? xml.DoseUoM do prescription.dose_unit xml.CodingStandard "LOCAL" xml.Code prescription.dose_unit&.text xml.Description prescription.dose_unit end end xml.ExternalId prescription.id end end end
Version data entries
30 entries across 30 versions & 1 rubygems