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.



204
205
206
207
208
209
# File 'lib/oddb2xml/fhir_support.rb', line 204

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.



202
203
204
# File 'lib/oddb2xml/fhir_support.rb', line 202

def id
  @id
end

#nn_suffixObject (readonly)

Returns the value of attribute nn_suffix.



202
203
204
# File 'lib/oddb2xml/fhir_support.rb', line 202

def nn_suffix
  @nn_suffix
end

#textObject (readonly)

Returns the value of attribute text.



202
203
204
# File 'lib/oddb2xml/fhir_support.rb', line 202

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type.



202
203
204
# File 'lib/oddb2xml/fhir_support.rb', line 202

def type
  @type
end

Instance Method Details

#indication?Boolean

Returns:

  • (Boolean)


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

def indication?
  @type == "indication"
end