Sha256: 4a66c3527f6e30e5f70e5f4fc377a6e6b3b36ba974fc6b605237c1b17d369d28

Contents?: true

Size: 944 Bytes

Versions: 15

Compression:

Stored size: 944 Bytes

Contents

# frozen_string_literal: true

xml = builder

xml.Medications do
  patient.prescriptions.each do |prescription|
    xml.Medication do
      xml.PrescriptionNumber
      xml.FromTime prescription.prescribed_on.to_datetime
      if prescription.terminated_or_marked_for_termination?
        xml.ToTime prescription.terminated_on&.to_datetime
      end
      xml.OrderedBy
      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.notes
      # xml.DoseUoM
      # xml.Indication
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
renalware-core-2.0.53 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.52 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.51 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.50 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.48 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.47 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.46 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.45 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.44 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.43 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.42 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.41 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.40 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.39 app/views/renalware/api/ukrdc/patients/_medications.xml.builder
renalware-core-2.0.38 app/views/renalware/api/ukrdc/patients/_medications.xml.builder