Sha256: ca9a93a34c124d94fd466e1819b41be12cd092c9d121c8b287a898981ab2a82f

Contents?: true

Size: 889 Bytes

Versions: 13

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

xml = builder

xml.Documents do
  patient.letters.each do |letter|
    xml.Document do
      xml.DocumentTime letter.issued_on.to_time.iso8601
      xml.Clinician do
        xml.CodingStandard "LOCAL"
        xml.Code letter.author.username
        xml.Description letter.author.to_s
      end
      xml.DocumentName letter.title
      xml.Status do
        xml.Code "ACTIVE"
      end
      xml.EnteredBy do
        xml.CodingStandard "LOCAL"
        xml.Code letter.updated_by&.username
        xml.Description letter.updated_by
      end
      xml.EnteredAt do
        xml.CodingStandard "ODS"
        xml.Code letter.hospital_unit_code
        xml.Description ""
      end
      xml.FileType "application/pdf"
      xml.FileName "tbc"
      xml.Stream Base64.encode64(Renalware::Letters::PdfRenderer.call(letter))
      xml.DocumentURL
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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