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.



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

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.



212
213
214
# File 'lib/oddb2xml/fhir_support.rb', line 212

def id
  @id
end

#nn_suffixObject (readonly)

Returns the value of attribute nn_suffix.



212
213
214
# File 'lib/oddb2xml/fhir_support.rb', line 212

def nn_suffix
  @nn_suffix
end

#textObject (readonly)

Returns the value of attribute text.



212
213
214
# File 'lib/oddb2xml/fhir_support.rb', line 212

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type.



212
213
214
# File 'lib/oddb2xml/fhir_support.rb', line 212

def type
  @type
end

Instance Method Details

#indication?Boolean

Returns:

  • (Boolean)


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

def indication?
  @type == "indication"
end