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.58 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.57 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.56 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.55 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.54 app/views/renalware/api/ukrdc/patients/_documents.xml.builder