Class: BundleEntryDecorator
- Inherits:
-
FHIR::Bundle::Entry
- Object
- FHIR::Bundle::Entry
- BundleEntryDecorator
- Defined in:
- lib/au_ps_inferno/utils/bundle_entry_decorator.rb
Overview
Decorator for FHIR::Bundle::Entry
Instance Method Summary collapse
- #full_url_base ⇒ Object
-
#initialize(data) ⇒ BundleEntryDecorator
constructor
A new instance of BundleEntryDecorator.
Constructor Details
#initialize(data) ⇒ BundleEntryDecorator
Returns a new instance of BundleEntryDecorator.
5 6 7 8 9 10 11 |
# File 'lib/au_ps_inferno/utils/bundle_entry_decorator.rb', line 5 def initialize(data) if data.is_a?(Hash) super else super(data.respond_to?(:source_hash) ? data.source_hash : data.to_hash) end end |
Instance Method Details
#full_url_base ⇒ Object
13 14 15 16 17 18 |
# File 'lib/au_ps_inferno/utils/bundle_entry_decorator.rb', line 13 def full_url_base return nil if fullUrl.nil? return nil unless fullUrl.start_with?('http') || fullUrl.start_with?('https') fullUrl.split("#{resource.resourceType}/#{resource.id}").first end |