Class: OpenEHR::RM::Common::ChangeControl::Version
- Inherits:
-
Object
- Object
- OpenEHR::RM::Common::ChangeControl::Version
- Defined in:
- lib/open_ehr/rm/common/change_control.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#commit_audit ⇒ Object
Returns the value of attribute commit_audit.
-
#contribution ⇒ Object
Returns the value of attribute contribution.
-
#data ⇒ Object
Returns the value of attribute data.
-
#lifecycle_state ⇒ Object
readonly
Returns the value of attribute lifecycle_state.
-
#preceding_version_uid ⇒ Object
Returns the value of attribute preceding_version_uid.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
- #canonical_form ⇒ Object
-
#initialize(args = { }) ⇒ Version
constructor
A new instance of Version.
- #is_branch? ⇒ Boolean
-
#lifcycle_state=(lifecycle_state) ⇒ Object
remove hard coding of lifecycle.
- #owner_id ⇒ Object
Constructor Details
#initialize(args = { }) ⇒ Version
Returns a new instance of Version.
50 51 52 53 54 55 56 57 58 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 50 def initialize(args = { }) self.uid = args[:uid] self.preceding_version_uid = args[:preceding_version_uid] self.data = args[:data] self.lifcycle_state = args[:lifecycle_state] self.commit_audit = args[:commit_audit] self.contribution = args[:contribution] self.signature = args[:signature] end |
Instance Attribute Details
#commit_audit ⇒ Object
Returns the value of attribute commit_audit.
46 47 48 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 46 def commit_audit @commit_audit end |
#contribution ⇒ Object
Returns the value of attribute contribution.
46 47 48 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 46 def contribution @contribution end |
#data ⇒ Object
Returns the value of attribute data.
48 49 50 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 48 def data @data end |
#lifecycle_state ⇒ Object (readonly)
Returns the value of attribute lifecycle_state.
46 47 48 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 46 def lifecycle_state @lifecycle_state end |
#preceding_version_uid ⇒ Object
Returns the value of attribute preceding_version_uid.
46 47 48 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 46 def preceding_version_uid @preceding_version_uid end |
#signature ⇒ Object
Returns the value of attribute signature.
48 49 50 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 48 def signature @signature end |
#uid ⇒ Object
Returns the value of attribute uid.
46 47 48 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 46 def uid @uid end |
Instance Method Details
#canonical_form ⇒ Object
108 109 110 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 108 def canonical_form raise NotImplementedError, 'canonical form is not determined' end |
#is_branch? ⇒ Boolean
104 105 106 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 104 def is_branch? return @uid.is_branch? end |
#lifcycle_state=(lifecycle_state) ⇒ Object
remove hard coding of lifecycle
73 74 75 76 77 78 79 80 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 73 def lifcycle_state=(lifecycle_state) if lifecycle_state.nil? || !%w[532 553 523].include?( lifecycle_state.defining_code.code_string) raise ArgumentError, 'invalid lifecycle_state' end @lifecycle_state = lifecycle_state end |
#owner_id ⇒ Object
100 101 102 |
# File 'lib/open_ehr/rm/common/change_control.rb', line 100 def owner_id return HierObjectID.new(:value => @uid.value) end |