Class: ChangeHealthcare::Eligibility::SwaggerClient::Encounter
- Inherits:
-
Object
- Object
- ChangeHealthcare::Eligibility::SwaggerClient::Encounter
- Defined in:
- lib/change_healthcare/eligibility/swagger_client/models/encounter.rb
Overview
Loop: 2110, Notes: Eligibility or Benefit Information
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#beginning_date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period.
-
#date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period.
-
#date_range ⇒ Object
Returns the value of attribute date_range.
-
#diagnosis_code_pointer ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ05, Notes: Composite Diagnosis Code Pointer.
-
#end_date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period.
-
#industry_code ⇒ Object
Loop: 2110, Segment: III, Element: III02, Notes: III01=ZZ Industry Code, Allowed Values are: ‘01’ Pharmacy,‘03’ School,‘04’ Homeless Shelter,‘05’ Indian Health Service Free-standing Facility,‘06’ Indian Health Service Provider-based Facility,‘07’ Tribal 638 Free-standing Facility,‘08’ Tribal 638 Provider-based Facility,‘11’ Office,‘12’ Home,‘13’ Assisted Living Facility,‘14’ Group Home,‘15’ Mobile Unit,‘20’ Urgent Care Facility,‘21’ Inpatient Hospital,‘22’ Outpatient Hospital,‘23’ Emergency Room - Hospital,‘24’ Ambulatory Surgical Center,‘25’ Birthing Center,‘26’ Military Treatment Facility,‘31’ Skilled Nursing Facility,‘32’ Nursing Facility,‘33’ Custodial Care Facility,‘34’ Hospice,‘41’ Ambulance - Land,‘42’ Ambulance - Air or Water,‘49’ Independent Clinic,‘50’ Federally Qualified Health Center,‘51’ Inpatient Psychiatric Facility,‘52’ Psychiatric Facility - Partial Hospitalization,‘53’ Community Mental Health Center,‘54’ Intermediate Care Facility/Mentally Retarded,‘55’ Residential Substance Abuse Treatment Facility,‘56’ Psychiatric Residential Treatment Center,‘57’ Non-residential Substance Abuse Treatment Facility,‘60’ Mass Immunization Center,‘61’Comprehensive Inpatient Rehabilitation Facility,‘62’ Comprehensive Outpatient Rehabilitation Facility,‘65’ End-Stage Renal Disease Treatment Facility,‘71’ Public Health Clinic,‘72’ Rural Health Clinic,‘81’ Independent Laboratory,‘99’ Other Place of Service.
-
#medical_procedures ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-1-3, Notes: Composite Medical Procedure Identifier.
-
#prior_authorization_or_referral_number ⇒ Object
Loop: 2110, Segment: REF, Element: REF02, Notes: Prior Authorization or Referral Number.
-
#procedure_code ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-2, Notes: Composite Medical Procedure Identifier - Procedure Code.
-
#procedure_modifiers ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-3, Notes: Composite Medical Procedure Identifier - Procedure Modifier.
-
#product_or_service_id_qualifier ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-1, Notes: Composite Medical Procedure Identifier - Product or Service ID Qualifier, Allowed Values are: ‘AD’ American Dental Association Codes, ‘CJ’ Current Procedural Terminology (CPT) Codes,‘HC’ Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes,‘ID’ International Classification of Diseases, 9th Revision, Clinical Modification (ICD-9-CM) - Procedure, ‘IV’ Home Infusion EDI Coalition (HIEC) Product/Service Code, ‘N4’ National Drug Code in 5-4-2 Format, ‘ZZ’ Mutually Defined.
-
#reference_identification_qualifier ⇒ Object
Loop: 2110, Segment: REF, Element: REF01, Notes: Prior Authorization or Referral Number, Allowed Values are: ‘9F’ Referral Number, ‘G1’ Prior Authorization Number.
-
#service_type_codes ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ01, Notes: Service Type Codes.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Encounter
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Encounter
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 117 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.transform_keys(&:to_sym) self.beginning_date_of_service = attributes[:beginningDateOfService] if attributes.key?(:beginningDateOfService) self.date_of_service = attributes[:dateOfService] if attributes.key?(:dateOfService) self.date_range = attributes[:dateRange] if attributes.key?(:dateRange) if attributes.key?(:diagnosisCodePointer) if (value = attributes[:diagnosisCodePointer]).is_a?(Array) self.diagnosis_code_pointer = value end end self.end_date_of_service = attributes[:endDateOfService] if attributes.key?(:endDateOfService) self.industry_code = attributes[:industryCode] if attributes.key?(:industryCode) if attributes.key?(:medicalProcedures) if (value = attributes[:medicalProcedures]).is_a?(Array) self.medical_procedures = value end end self. = attributes[:priorAuthorizationOrReferralNumber] if attributes.key?(:priorAuthorizationOrReferralNumber) self.procedure_code = attributes[:procedureCode] if attributes.key?(:procedureCode) if attributes.key?(:procedureModifiers) if (value = attributes[:procedureModifiers]).is_a?(Array) self.procedure_modifiers = value end end self.product_or_service_id_qualifier = attributes[:productOrServiceIDQualifier] if attributes.key?(:productOrServiceIDQualifier) self.reference_identification_qualifier = attributes[:referenceIdentificationQualifier] if attributes.key?(:referenceIdentificationQualifier) if attributes.key?(:serviceTypeCodes) if (value = attributes[:serviceTypeCodes]).is_a?(Array) self.service_type_codes = value end end end |
Instance Attribute Details
#beginning_date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period
19 20 21 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 19 def beginning_date_of_service @beginning_date_of_service end |
#date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period
22 23 24 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 22 def date_of_service @date_of_service end |
#date_range ⇒ Object
Returns the value of attribute date_range.
24 25 26 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 24 def date_range @date_range end |
#diagnosis_code_pointer ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ05, Notes: Composite Diagnosis Code Pointer
27 28 29 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 27 def diagnosis_code_pointer @diagnosis_code_pointer end |
#end_date_of_service ⇒ Object
Loop: 2100, Segment: DTP, Element: DTP02, Notes: Date Time Period
30 31 32 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 30 def end_date_of_service @end_date_of_service end |
#industry_code ⇒ Object
Loop: 2110, Segment: III, Element: III02, Notes: III01=ZZ Industry Code, Allowed Values are: ‘01’ Pharmacy,‘03’ School,‘04’ Homeless Shelter,‘05’ Indian Health Service Free-standing Facility,‘06’ Indian Health Service Provider-based Facility,‘07’ Tribal 638 Free-standing Facility,‘08’ Tribal 638 Provider-based Facility,‘11’ Office,‘12’ Home,‘13’ Assisted Living Facility,‘14’ Group Home,‘15’ Mobile Unit,‘20’ Urgent Care Facility,‘21’ Inpatient Hospital,‘22’ Outpatient Hospital,‘23’ Emergency Room - Hospital,‘24’ Ambulatory Surgical Center,‘25’ Birthing Center,‘26’ Military Treatment Facility,‘31’ Skilled Nursing Facility,‘32’ Nursing Facility,‘33’ Custodial Care Facility,‘34’ Hospice,‘41’ Ambulance - Land,‘42’ Ambulance - Air or Water,‘49’ Independent Clinic,‘50’ Federally Qualified Health Center,‘51’ Inpatient Psychiatric Facility,‘52’ Psychiatric Facility - Partial Hospitalization,‘53’ Community Mental Health Center,‘54’ Intermediate Care Facility/Mentally Retarded,‘55’ Residential Substance Abuse Treatment Facility,‘56’ Psychiatric Residential Treatment Center,‘57’ Non-residential Substance Abuse Treatment Facility,‘60’ Mass Immunization Center,‘61’Comprehensive Inpatient Rehabilitation Facility,‘62’ Comprehensive Outpatient Rehabilitation Facility,‘65’ End-Stage Renal Disease Treatment Facility,‘71’ Public Health Clinic,‘72’ Rural Health Clinic,‘81’ Independent Laboratory,‘99’ Other Place of Service
33 34 35 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 33 def industry_code @industry_code end |
#medical_procedures ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-1-3, Notes: Composite Medical Procedure Identifier
36 37 38 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 36 def medical_procedures @medical_procedures end |
#prior_authorization_or_referral_number ⇒ Object
Loop: 2110, Segment: REF, Element: REF02, Notes: Prior Authorization or Referral Number
39 40 41 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 39 def @prior_authorization_or_referral_number end |
#procedure_code ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-2, Notes: Composite Medical Procedure Identifier - Procedure Code
42 43 44 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 42 def procedure_code @procedure_code end |
#procedure_modifiers ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-3, Notes: Composite Medical Procedure Identifier - Procedure Modifier
45 46 47 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 45 def procedure_modifiers @procedure_modifiers end |
#product_or_service_id_qualifier ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ02-1, Notes: Composite Medical Procedure Identifier - Product or Service ID Qualifier, Allowed Values are: ‘AD’ American Dental Association Codes, ‘CJ’ Current Procedural Terminology (CPT) Codes,‘HC’ Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes,‘ID’ International Classification of Diseases, 9th Revision, Clinical Modification (ICD-9-CM) - Procedure, ‘IV’ Home Infusion EDI Coalition (HIEC) Product/Service Code, ‘N4’ National Drug Code in 5-4-2 Format, ‘ZZ’ Mutually Defined
48 49 50 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 48 def product_or_service_id_qualifier @product_or_service_id_qualifier end |
#reference_identification_qualifier ⇒ Object
Loop: 2110, Segment: REF, Element: REF01, Notes: Prior Authorization or Referral Number, Allowed Values are: ‘9F’ Referral Number, ‘G1’ Prior Authorization Number
51 52 53 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 51 def reference_identification_qualifier @reference_identification_qualifier end |
#service_type_codes ⇒ Object
Loop: 2110, Segment: EQ, Element: EQ01, Notes: Service Type Codes
54 55 56 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 54 def service_type_codes @service_type_codes end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 78 def self.attribute_map { 'beginning_date_of_service': :beginningDateOfService, 'date_of_service': :dateOfService, 'date_range': :dateRange, 'diagnosis_code_pointer': :diagnosisCodePointer, 'end_date_of_service': :endDateOfService, 'industry_code': :industryCode, 'medical_procedures': :medicalProcedures, 'prior_authorization_or_referral_number': :priorAuthorizationOrReferralNumber, 'procedure_code': :procedureCode, 'procedure_modifiers': :procedureModifiers, 'product_or_service_id_qualifier': :productOrServiceIDQualifier, 'reference_identification_qualifier': :referenceIdentificationQualifier, 'service_type_codes': :serviceTypeCodes } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 97 def self.swagger_types { 'beginning_date_of_service': :String, 'date_of_service': :String, 'date_range': :BOOLEAN, 'diagnosis_code_pointer': :'Array<String>', 'end_date_of_service': :String, 'industry_code': :String, 'medical_procedures': :'Array<MedicalProcedure>', 'prior_authorization_or_referral_number': :String, 'procedure_code': :String, 'procedure_modifiers': :'Array<String>', 'product_or_service_id_qualifier': :String, 'reference_identification_qualifier': :String, 'service_type_codes': :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 220 def ==(o) return true if equal?(o) self.class == o.class && beginning_date_of_service == o.beginning_date_of_service && date_of_service == o.date_of_service && date_range == o.date_range && diagnosis_code_pointer == o.diagnosis_code_pointer && end_date_of_service == o.end_date_of_service && industry_code == o.industry_code && medical_procedures == o.medical_procedures && == o. && procedure_code == o.procedure_code && procedure_modifiers == o.procedure_modifiers && product_or_service_id_qualifier == o.product_or_service_id_qualifier && reference_identification_qualifier == o.reference_identification_qualifier && service_type_codes == o.service_type_codes end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 276 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) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 343 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) ⇒ Object
Builds the object from hash
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 254 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 { |v| _deserialize(Regexp.last_match(1), v) }) end elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
241 242 243 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 241 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
247 248 249 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 247 def hash [beginning_date_of_service, date_of_service, date_range, diagnosis_code_pointer, end_date_of_service, industry_code, medical_procedures, , procedure_code, procedure_modifiers, product_or_service_id_qualifier, reference_identification_qualifier, service_type_codes].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
168 169 170 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 168 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
322 323 324 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 322 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
328 329 330 331 332 333 334 335 336 337 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 328 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 ⇒ String
Returns the string representation of the object
316 317 318 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 316 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/encounter.rb', line 174 def valid? industry_code_validator = EnumAttributeValidator.new('String', %w[01 03 04 05 06 07 08 11 12 13 14 15 20 21 22 23 24 25 26 31 32 33 34 41 42 49 50 51 52 53 54 55 56 57 60 61 62 65 71 72 81 99]) return false unless industry_code_validator.valid?(@industry_code) product_or_service_id_qualifier_validator = EnumAttributeValidator.new('String', %w[AD CJ HC ID IV N4 ZZ]) return false unless product_or_service_id_qualifier_validator.valid?(@product_or_service_id_qualifier) reference_identification_qualifier_validator = EnumAttributeValidator.new('String', %w[9F G1]) return false unless reference_identification_qualifier_validator.valid?(@reference_identification_qualifier) true end |