Class: CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase
- Inherits:
-
Object
- Object
- CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase
- Defined in:
- lib/candidhealth/service_facility/types/encounter_service_facility_base.rb
Overview
Encounter Service facility is typically the location a medical service was
rendered, such as a provider office or hospital.
For telehealth, service facility can represent the provider's location when the
service was delivered (e.g., home),
or the location where an in-person visit would have taken place, whichever is
easier to identify.
If the provider is in-network, service facility may be defined in payer
contracts.
Box 32 on the CMS-1500 claim form.
Note that for an in-network claim to be successfully adjudicated, the service
facility address listed on claims
must match what was provided to the payer during the credentialing process.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#address ⇒ CandidApiClient::Commons::Types::StreetAddressLongZip
readonly
Zip_plus_four_code is required for service facility address.
-
#npi ⇒ String
readonly
An NPI specific to the service facility if applicable, i.e.
- #organization_name ⇒ String readonly
-
#secondary_identification ⇒ String
readonly
An additional identifier for the service facility other than the facility’s NPI.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase
Deserialize a JSON object to an instance of EncounterServiceFacilityBase.
-
.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(organization_name:, address:, npi: OMIT, secondary_identification: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of EncounterServiceFacilityBase to a JSON object.
Constructor Details
#initialize(organization_name:, address:, npi: OMIT, secondary_identification: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 59 def initialize(organization_name:, address:, npi: OMIT, secondary_identification: OMIT, additional_properties: nil) @organization_name = organization_name @npi = npi if npi != OMIT @address = address @secondary_identification = secondary_identification if secondary_identification != OMIT @additional_properties = additional_properties @_field_set = { "organization_name": organization_name, "npi": npi, "address": address, "secondary_identification": secondary_identification }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
39 40 41 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 39 def additional_properties @additional_properties end |
#address ⇒ CandidApiClient::Commons::Types::StreetAddressLongZip (readonly)
Returns zip_plus_four_code is required for service facility address. When the zip_plus_four_code is not available use “9998” as per CMS documentation.
31 32 33 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 31 def address @address end |
#npi ⇒ String (readonly)
Returns An NPI specific to the service facility if applicable, i.e. if it has one and is not under the billing provider’s NPI. Box 32 section (a) of the CMS-1500 claim form.
28 29 30 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 28 def npi @npi end |
#organization_name ⇒ String (readonly)
24 25 26 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 24 def organization_name @organization_name end |
#secondary_identification ⇒ String (readonly)
Returns An additional identifier for the service facility other than the facility’s NPI. Some payers may require this field. Potential examples: state license number, provider commercial number, or location number. Box 32 section (b) of the CMS-1500 claim form.
37 38 39 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 37 def secondary_identification @secondary_identification end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase
Deserialize a JSON object to an instance of EncounterServiceFacilityBase
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 80 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) organization_name = struct["organization_name"] npi = struct["npi"] if parsed_json["address"].nil? address = nil else address = parsed_json["address"].to_json address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address) end secondary_identification = struct["secondary_identification"] new( organization_name: organization_name, npi: npi, address: address, secondary_identification: secondary_identification, 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.
114 115 116 117 118 119 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 114 def self.validate_raw(obj:) obj.organization_name.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.") obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.") CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address) obj.secondary_identification&.is_a?(String) != false || raise("Passed value for field obj.secondary_identification is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of EncounterServiceFacilityBase to a JSON object
104 105 106 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_base.rb', line 104 def to_json(*_args) @_field_set&.to_json end |