Class: CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance
- Inherits:
-
Object
- Object
- CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance
- Defined in:
- lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb
Overview
Information about the upstream system that owns this patient data.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #external_id ⇒ String readonly
- #system_name ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance
Deserialize a JSON object to an instance of ExternalProvenance.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(external_id:, system_name:, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ExternalProvenance to a JSON object.
Constructor Details
#initialize(external_id:, system_name:, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance
29 30 31 32 33 34 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 29 def initialize(external_id:, system_name:, additional_properties: nil) @external_id = external_id @system_name = system_name @additional_properties = additional_properties @_field_set = { "external_id": external_id, "system_name": system_name } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 18 def additional_properties @additional_properties end |
#external_id ⇒ String (readonly)
14 15 16 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 14 def external_id @external_id end |
#system_name ⇒ String (readonly)
16 17 18 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 16 def system_name @system_name end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance
Deserialize a JSON object to an instance of ExternalProvenance
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) external_id = struct["external_id"] system_name = struct["system_name"] new( external_id: external_id, system_name: system_name, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
64 65 66 67 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 64 def self.validate_raw(obj:) obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.") obj.system_name.is_a?(String) != false || raise("Passed value for field obj.system_name is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ExternalProvenance to a JSON object
54 55 56 |
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb', line 54 def to_json(*_args) @_field_set&.to_json end |