Sha256: a22a65816bce61339121ab91460e85de9aec302a70745e0777e762f4c676f5c8
Contents?: true
Size: 1 KB
Versions: 35
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true module Renalware module UKRDC module Outgoing module Rendering class PrimaryLanguage < Rendering::Base pattr_initialize [:patient!] def xml return unless render_primary_language? primary_langauge_element end private # Omit 'Other' language as it is not part of the ISO set, but we have it for some reason def render_primary_language? patient.language.present? && patient.language.code != "ot" end # NB NHS_DATA_DICTIONARY_LANGUAGE_CODE is ISO 639-1 plus braille and sign def primary_langauge_element create_node("PrimaryLanguage") do |lang| lang << create_node("CodingStandard", "NHS_DATA_DICTIONARY_LANGUAGE_CODE") lang << create_node("Code", patient.language&.code) lang << create_node("Description", patient.language) end end end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems