Sha256: 5ae8f2cbeccf3d39f6f4a46b36525ba1f725ec3042dec7366bb6ef94ba179932

Contents?: true

Size: 858 Bytes

Versions: 40

Compression:

Stored size: 858 Bytes

Contents

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

40 entries across 40 versions & 1 rubygems

Version Path
renalware-core-2.0.37 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.36 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.35 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.34 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.33 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.32 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.31 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.30 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.28 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.27 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.26 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.25 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.24 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.23 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.22 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.21 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.20 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.18 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.17 app/views/renalware/api/ukrdc/patients/_documents.xml.builder
renalware-core-2.0.16 app/views/renalware/api/ukrdc/patients/_documents.xml.builder