Sha256: d313604d108a009ee6f327e1f3cae40ebfa1811581cf881594e3ccfe42fa71f9

Contents?: true

Size: 864 Bytes

Versions: 45

Compression:

Stored size: 864 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
      end
      xml.FileType "application/pdf"
      xml.FileName letter.pdf_stateless_filename
      xml.Stream Base64.encode64(Renalware::Letters::PdfRenderer.call(letter))
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
renalware-core-2.0.101 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.100 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.99 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.98 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.97 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.96 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.95 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.94 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.93 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.92 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.91 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.90 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.89 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.88 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.87 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.86 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.85 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.84 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.83 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.82 app/views/renalware/api/ukrdc/patients/_documents.xml.builder