class ChangeHealthcare::ProfessionalClaims::SwaggerClient::ServiceLine

Attributes

additional_notes[RW]
ambulance_certification[RW]
ambulance_drop_off_location[RW]
ambulance_patient_count[RW]
ambulance_pick_up_location[RW]
ambulance_transport_information[RW]
assigned_number[RW]
condition_indicator_durable_medical_equipment[RW]
contract_information[RW]
drug_identification[RW]
durable_medical_equipment_certificate_of_medical_necessity[RW]
durable_medical_equipment_certification[RW]
durable_medical_equipment_service[RW]
file_information[RW]
form_identification[RW]
goal_rehab_or_discharge_plans[RW]
hospice_employee_indicator[RW]
line_adjudication_information[RW]
line_pricing_repricing_information[RW]
obstetric_anesthesia_additional_units[RW]
ordering_provider[RW]
postage_tax_amount[RW]
professional_service[RW]
provider_control_number[RW]
purchased_service_information[RW]
purchased_service_provider[RW]
referring_provider[RW]
rendering_provider[RW]
sales_tax_amount[RW]
service_date[RW]
service_date_end[RW]
service_facility_location[RW]
service_line_date_information[RW]
service_line_reference_information[RW]
service_line_supplemental_information[RW]
supervising_provider[RW]
test_results[RW]
third_party_organization_notes[RW]

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 23
def self.attribute_map
  {
    additional_notes: :additionalNotes,
    ambulance_certification: :ambulanceCertification,
    ambulance_drop_off_location: :ambulanceDropOffLocation,
    ambulance_patient_count: :ambulancePatientCount,
    ambulance_pick_up_location: :ambulancePickUpLocation,
    ambulance_transport_information: :ambulanceTransportInformation,
    assigned_number: :assignedNumber,
    condition_indicator_durable_medical_equipment: :conditionIndicatorDurableMedicalEquipment,
    contract_information: :contractInformation,
    drug_identification: :drugIdentification,
    durable_medical_equipment_certificate_of_medical_necessity: :durableMedicalEquipmentCertificateOfMedicalNecessity,
    durable_medical_equipment_certification: :durableMedicalEquipmentCertification,
    durable_medical_equipment_service: :durableMedicalEquipmentService,
    file_information: :fileInformation,
    form_identification: :formIdentification,
    goal_rehab_or_discharge_plans: :goalRehabOrDischargePlans,
    hospice_employee_indicator: :hospiceEmployeeIndicator,
    line_adjudication_information: :lineAdjudicationInformation,
    line_pricing_repricing_information: :linePricingRepricingInformation,
    obstetric_anesthesia_additional_units: :obstetricAnesthesiaAdditionalUnits,
    ordering_provider: :orderingProvider,
    postage_tax_amount: :postageTaxAmount,
    professional_service: :professionalService,
    provider_control_number: :providerControlNumber,
    purchased_service_information: :purchasedServiceInformation,
    purchased_service_provider: :purchasedServiceProvider,
    referring_provider: :referringProvider,
    rendering_provider: :renderingProvider,
    sales_tax_amount: :salesTaxAmount,
    service_date: :serviceDate,
    service_date_end: :serviceDateEnd,
    service_facility_location: :serviceFacilityLocation,
    service_line_date_information: :serviceLineDateInformation,
    service_line_reference_information: :serviceLineReferenceInformation,
    service_line_supplemental_information: :serviceLineSupplementalInformation,
    supervising_provider: :supervisingProvider,
    test_results: :testResults,
    third_party_organization_notes: :thirdPartyOrganizationNotes
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 112
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.transform_keys(&:to_sym)

  self.additional_notes = attributes[:additionalNotes] if attributes.key?(:additionalNotes)

  if attributes.key?(:ambulanceCertification) && (value = attributes[:ambulanceCertification]).is_a?(Array)
    self.ambulance_certification = value
  end

  self.ambulance_drop_off_location = attributes[:ambulanceDropOffLocation] if attributes.key?(:ambulanceDropOffLocation)

  self.ambulance_patient_count = attributes[:ambulancePatientCount] if attributes.key?(:ambulancePatientCount)

  self.ambulance_pick_up_location = attributes[:ambulancePickUpLocation] if attributes.key?(:ambulancePickUpLocation)

  self.ambulance_transport_information = attributes[:ambulanceTransportInformation] if attributes.key?(:ambulanceTransportInformation)

  self.assigned_number = attributes[:assignedNumber] if attributes.key?(:assignedNumber)

  self.condition_indicator_durable_medical_equipment = attributes[:conditionIndicatorDurableMedicalEquipment] if attributes.key?(:conditionIndicatorDurableMedicalEquipment)

  self.contract_information = attributes[:contractInformation] if attributes.key?(:contractInformation)

  self.drug_identification = attributes[:drugIdentification] if attributes.key?(:drugIdentification)

  self.durable_medical_equipment_certificate_of_medical_necessity = attributes[:durableMedicalEquipmentCertificateOfMedicalNecessity] if attributes.key?(:durableMedicalEquipmentCertificateOfMedicalNecessity)

  self.durable_medical_equipment_certification = attributes[:durableMedicalEquipmentCertification] if attributes.key?(:durableMedicalEquipmentCertification)

  self.durable_medical_equipment_service = attributes[:durableMedicalEquipmentService] if attributes.key?(:durableMedicalEquipmentService)

  if attributes.key?(:fileInformation) && (value = attributes[:fileInformation]).is_a?(Array)
    self.file_information = value
  end

  if attributes.key?(:formIdentification) && (value = attributes[:formIdentification]).is_a?(Array)
    self.form_identification = value
  end

  self.goal_rehab_or_discharge_plans = attributes[:goalRehabOrDischargePlans] if attributes.key?(:goalRehabOrDischargePlans)

  self.hospice_employee_indicator = attributes[:hospiceEmployeeIndicator] if attributes.key?(:hospiceEmployeeIndicator)

  if attributes.key?(:lineAdjudicationInformation) && (value = attributes[:lineAdjudicationInformation]).is_a?(Array)
    self.line_adjudication_information = value
  end

  self.line_pricing_repricing_information = attributes[:linePricingRepricingInformation] if attributes.key?(:linePricingRepricingInformation)

  self.obstetric_anesthesia_additional_units = attributes[:obstetricAnesthesiaAdditionalUnits] if attributes.key?(:obstetricAnesthesiaAdditionalUnits)

  self.ordering_provider = attributes[:orderingProvider] if attributes.key?(:orderingProvider)

  self.postage_tax_amount = attributes[:postageTaxAmount] if attributes.key?(:postageTaxAmount)

  self.professional_service = attributes[:professionalService] if attributes.key?(:professionalService)

  self.provider_control_number = attributes[:providerControlNumber] if attributes.key?(:providerControlNumber)

  self.purchased_service_information = attributes[:purchasedServiceInformation] if attributes.key?(:purchasedServiceInformation)

  self.purchased_service_provider = attributes[:purchasedServiceProvider] if attributes.key?(:purchasedServiceProvider)

  self.referring_provider = attributes[:referringProvider] if attributes.key?(:referringProvider)

  self.rendering_provider = attributes[:renderingProvider] if attributes.key?(:renderingProvider)

  self.sales_tax_amount = attributes[:salesTaxAmount] if attributes.key?(:salesTaxAmount)

  self.service_date = attributes[:serviceDate] if attributes.key?(:serviceDate)

  self.service_date_end = attributes[:serviceDateEnd] if attributes.key?(:serviceDateEnd)

  self.service_facility_location = attributes[:serviceFacilityLocation] if attributes.key?(:serviceFacilityLocation)

  self.service_line_date_information = attributes[:serviceLineDateInformation] if attributes.key?(:serviceLineDateInformation)

  self.service_line_reference_information = attributes[:serviceLineReferenceInformation] if attributes.key?(:serviceLineReferenceInformation)

  if attributes.key?(:serviceLineSupplementalInformation) && (value = attributes[:serviceLineSupplementalInformation]).is_a?(Array)
    self.service_line_supplemental_information = value
  end

  self.supervising_provider = attributes[:supervisingProvider] if attributes.key?(:supervisingProvider)

  if attributes.key?(:testResults) && (value = attributes[:testResults]).is_a?(Array)
    self.test_results = value
  end

  self.third_party_organization_notes = attributes[:thirdPartyOrganizationNotes] if attributes.key?(:thirdPartyOrganizationNotes)
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 67
def self.swagger_types
  {
    additional_notes: :String,
    ambulance_certification: :'Array<AmbulanceCertification>',
    ambulance_drop_off_location: :Address,
    ambulance_patient_count: :Integer,
    ambulance_pick_up_location: :Address,
    ambulance_transport_information: :AmbulanceTransportInformation,
    assigned_number: :String,
    condition_indicator_durable_medical_equipment: :ConditionIndicatorDurableMedicalEquipment,
    contract_information: :ContractInformation,
    drug_identification: :DrugIdentification,
    durable_medical_equipment_certificate_of_medical_necessity: :DurableMedicalEquipmentCertificateOfMedicalNecessity,
    durable_medical_equipment_certification: :DurableMedicalEquipmentCertification,
    durable_medical_equipment_service: :DurableMedicalEquipmentService,
    file_information: :'Array<String>',
    form_identification: :'Array<FormIdentification>',
    goal_rehab_or_discharge_plans: :String,
    hospice_employee_indicator: :BOOLEAN,
    line_adjudication_information: :'Array<LineAdjudicationInformation>',
    line_pricing_repricing_information: :ClaimPricingRepricingInformation,
    obstetric_anesthesia_additional_units: :Integer,
    ordering_provider: :ServiceLineProvider,
    postage_tax_amount: :String,
    professional_service: :ProfessionalService,
    provider_control_number: :String,
    purchased_service_information: :PurchasedServiceInformation,
    purchased_service_provider: :ServiceLineProvider,
    referring_provider: :ServiceLineProvider,
    rendering_provider: :ServiceLineProvider,
    sales_tax_amount: :String,
    service_date: :String,
    service_date_end: :String,
    service_facility_location: :ServiceFacilityLocation,
    service_line_date_information: :ServiceLineDateInformation,
    service_line_reference_information: :ServiceLineReferenceInformation,
    service_line_supplemental_information: :'Array<ReportInformation>',
    supervising_provider: :ServiceLineProvider,
    test_results: :'Array<Measurements>',
    third_party_organization_notes: :String
  }
end

Public Instance Methods

==(other) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 221
def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    additional_notes == other.additional_notes &&
    ambulance_certification == other.ambulance_certification &&
    ambulance_drop_off_location == other.ambulance_drop_off_location &&
    ambulance_patient_count == other.ambulance_patient_count &&
    ambulance_pick_up_location == other.ambulance_pick_up_location &&
    ambulance_transport_information == other.ambulance_transport_information &&
    assigned_number == other.assigned_number &&
    condition_indicator_durable_medical_equipment == other.condition_indicator_durable_medical_equipment &&
    contract_information == other.contract_information &&
    drug_identification == other.drug_identification &&
    durable_medical_equipment_certificate_of_medical_necessity == other.durable_medical_equipment_certificate_of_medical_necessity &&
    durable_medical_equipment_certification == other.durable_medical_equipment_certification &&
    durable_medical_equipment_service == other.durable_medical_equipment_service &&
    file_information == other.file_information &&
    form_identification == other.form_identification &&
    goal_rehab_or_discharge_plans == other.goal_rehab_or_discharge_plans &&
    hospice_employee_indicator == other.hospice_employee_indicator &&
    line_adjudication_information == other.line_adjudication_information &&
    line_pricing_repricing_information == other.line_pricing_repricing_information &&
    obstetric_anesthesia_additional_units == other.obstetric_anesthesia_additional_units &&
    ordering_provider == other.ordering_provider &&
    postage_tax_amount == other.postage_tax_amount &&
    professional_service == other.professional_service &&
    provider_control_number == other.provider_control_number &&
    purchased_service_information == other.purchased_service_information &&
    purchased_service_provider == other.purchased_service_provider &&
    referring_provider == other.referring_provider &&
    rendering_provider == other.rendering_provider &&
    sales_tax_amount == other.sales_tax_amount &&
    service_date == other.service_date &&
    service_date_end == other.service_date_end &&
    service_facility_location == other.service_facility_location &&
    service_line_date_information == other.service_line_date_information &&
    service_line_reference_information == other.service_line_reference_information &&
    service_line_supplemental_information == other.service_line_supplemental_information &&
    supervising_provider == other.supervising_provider &&
    test_results == other.test_results &&
    third_party_organization_notes == other.third_party_organization_notes
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 305
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = SwaggerClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 372
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 281
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
                          _deserialize(Regexp.last_match(1), v)
                        end)
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end
eql?(other) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 267
def eql?(other)
  self == other
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 273
def hash
  [additional_notes, ambulance_certification, ambulance_drop_off_location, ambulance_patient_count,
   ambulance_pick_up_location, ambulance_transport_information, assigned_number, condition_indicator_durable_medical_equipment, contract_information, drug_identification, durable_medical_equipment_certificate_of_medical_necessity, durable_medical_equipment_certification, durable_medical_equipment_service, file_information, form_identification, goal_rehab_or_discharge_plans, hospice_employee_indicator, line_adjudication_information, line_pricing_repricing_information, obstetric_anesthesia_additional_units, ordering_provider, postage_tax_amount, professional_service, provider_control_number, purchased_service_information, purchased_service_provider, referring_provider, rendering_provider, sales_tax_amount, service_date, service_date_end, service_facility_location, service_line_date_information, service_line_reference_information, service_line_supplemental_information, supervising_provider, test_results, third_party_organization_notes].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 209
def list_invalid_properties
  []
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 351
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 357
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    next if value.nil?

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 345
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb, line 215
def valid?
  true
end