Class: Oddb2xml::FHIR::ClinicalUseDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/oddb2xml/fhir_support.rb

Overview

ClinicalUseDefinition carries one indication. Its ‘id` ends in “.NN”, the per-indication suffix that combines with the FOPHDossierNumber (XXXXX) on the reimbursement RegulatedAuthorization to form the Indikationscode XXXXX.NN required by BAG from 2026-07-01.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ ClinicalUseDefinition

Returns a new instance of ClinicalUseDefinition.



219
220
221
222
223
224
# File 'lib/oddb2xml/fhir_support.rb', line 219

def initialize(resource)
  @id = resource["id"]
  @type = resource["type"]
  @nn_suffix = @id&.[](/\.(\d{2})\z/, 1)
  @text = resource.dig("indication", "diseaseSymptomProcedure", "concept", "text")
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



217
218
219
# File 'lib/oddb2xml/fhir_support.rb', line 217

def id
  @id
end

#nn_suffixObject (readonly)

Returns the value of attribute nn_suffix.



217
218
219
# File 'lib/oddb2xml/fhir_support.rb', line 217

def nn_suffix
  @nn_suffix
end

#textObject (readonly)

Returns the value of attribute text.



217
218
219
# File 'lib/oddb2xml/fhir_support.rb', line 217

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type.



217
218
219
# File 'lib/oddb2xml/fhir_support.rb', line 217

def type
  @type
end

Instance Method Details

#indication?Boolean

Returns:

  • (Boolean)


226
227
228
# File 'lib/oddb2xml/fhir_support.rb', line 226

def indication?
  @type == "indication"
end