Class: CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider_credentialing_span_id:, rendering_provider:, contracting_provider:, payer:, regions:, credentialing_status:, source:, is_enabled:, start_date: OMIT, end_date: OMIT, submitted_date: OMIT, payer_loaded_date: OMIT, medallion_payer_enrollment_id: OMIT, additional_properties: nil) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Parameters:

  • provider_credentialing_span_id (String)
  • rendering_provider (CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2)

    The rendering provider covered by the credentialing span.

  • contracting_provider (CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2)

    The practice location at which the rendering provider is covered by the credentialing span.

  • payer (CandidApiClient::Payers::V3::Types::Payer)

    The payer doing the credentialing.

  • start_date (Date) (defaults to: OMIT)

    Start date of the credentialing span.

  • end_date (Date) (defaults to: OMIT)

    End date of the credentialing span.

  • regions (CandidApiClient::Commons::Types::Regions)

    The states covered by the credentialing span. A span may be national and cover all states.

  • submitted_date (Date) (defaults to: OMIT)

    Date that the credential paperwork was submitted.

  • credentialing_status (CandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus)

    Status of the credentialing span.

  • payer_loaded_date (Date) (defaults to: OMIT)

    Date that the payer loaded the credentialing span into their system.

  • source (String)

    Source of the credentialing span.

  • medallion_payer_enrollment_id (String) (defaults to: OMIT)

    Provider ID for the related medallion payer enrollment.

  • is_enabled (Boolean)

    Is the credentialing span enabled?

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 69

def initialize(provider_credentialing_span_id:, rendering_provider:, contracting_provider:, payer:, regions:, credentialing_status:, source:, is_enabled:,
               start_date: OMIT, end_date: OMIT, submitted_date: OMIT, payer_loaded_date: OMIT, medallion_payer_enrollment_id: OMIT, additional_properties: nil)
  @provider_credentialing_span_id = provider_credentialing_span_id
  @rendering_provider = rendering_provider
  @contracting_provider = contracting_provider
  @payer = payer
  @start_date = start_date if start_date != OMIT
  @end_date = end_date if end_date != OMIT
  @regions = regions
  @submitted_date =  if  != OMIT
  @credentialing_status = credentialing_status
  @payer_loaded_date = payer_loaded_date if payer_loaded_date != OMIT
  @source = source
  @medallion_payer_enrollment_id = medallion_payer_enrollment_id if medallion_payer_enrollment_id != OMIT
  @is_enabled = is_enabled
  @additional_properties = additional_properties
  @_field_set = {
    "provider_credentialing_span_id": provider_credentialing_span_id,
    "rendering_provider": rendering_provider,
    "contracting_provider": contracting_provider,
    "payer": payer,
    "start_date": start_date,
    "end_date": end_date,
    "regions": regions,
    "submitted_date": ,
    "credentialing_status": credentialing_status,
    "payer_loaded_date": payer_loaded_date,
    "source": source,
    "medallion_payer_enrollment_id": medallion_payer_enrollment_id,
    "is_enabled": is_enabled
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



45
46
47
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 45

def additional_properties
  @additional_properties
end

#contracting_providerCandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2 (readonly)

Returns The practice location at which the rendering provider is covered by the credentialing span.

Returns:



22
23
24
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 22

def contracting_provider
  @contracting_provider
end

#credentialing_statusCandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus (readonly)

Returns Status of the credentialing span.

Returns:



35
36
37
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 35

def credentialing_status
  @credentialing_status
end

#end_dateDate (readonly)

Returns End date of the credentialing span.

Returns:

  • (Date)

    End date of the credentialing span.



28
29
30
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 28

def end_date
  @end_date
end

#is_enabledBoolean (readonly)

Returns Is the credentialing span enabled?.

Returns:

  • (Boolean)

    Is the credentialing span enabled?



43
44
45
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 43

def is_enabled
  @is_enabled
end

#medallion_payer_enrollment_idString (readonly)

Returns Provider ID for the related medallion payer enrollment.

Returns:

  • (String)

    Provider ID for the related medallion payer enrollment.



41
42
43
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 41

def medallion_payer_enrollment_id
  @medallion_payer_enrollment_id
end

#payerCandidApiClient::Payers::V3::Types::Payer (readonly)

Returns The payer doing the credentialing.

Returns:



24
25
26
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 24

def payer
  @payer
end

#payer_loaded_dateDate (readonly)

Returns Date that the payer loaded the credentialing span into their system.

Returns:

  • (Date)

    Date that the payer loaded the credentialing span into their system.



37
38
39
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 37

def payer_loaded_date
  @payer_loaded_date
end

#provider_credentialing_span_idString (readonly)

Returns:

  • (String)


17
18
19
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 17

def provider_credentialing_span_id
  @provider_credentialing_span_id
end

#regionsCandidApiClient::Commons::Types::Regions (readonly)

Returns The states covered by the credentialing span. A span may be national and cover all states.

Returns:



31
32
33
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 31

def regions
  @regions
end

#rendering_providerCandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2 (readonly)

Returns The rendering provider covered by the credentialing span.

Returns:



19
20
21
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 19

def rendering_provider
  @rendering_provider
end

#sourceString (readonly)

Returns Source of the credentialing span.

Returns:

  • (String)

    Source of the credentialing span.



39
40
41
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 39

def source
  @source
end

#start_dateDate (readonly)

Returns Start date of the credentialing span.

Returns:

  • (Date)

    Start date of the credentialing span.



26
27
28
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 26

def start_date
  @start_date
end

#submitted_dateDate (readonly)

Returns Date that the credential paperwork was submitted.

Returns:

  • (Date)

    Date that the credential paperwork was submitted.



33
34
35
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 33

def 
  @submitted_date
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Deserialize a JSON object to an instance of ProviderCredentialingSpan

Parameters:

  • json_object (String)

Returns:



108
109
110
111
112
113
114
115
116
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
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 108

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  provider_credentialing_span_id = struct["provider_credentialing_span_id"]
  if parsed_json["rendering_provider"].nil?
    rendering_provider = nil
  else
    rendering_provider = parsed_json["rendering_provider"].to_json
    rendering_provider = CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: rendering_provider)
  end
  if parsed_json["contracting_provider"].nil?
    contracting_provider = nil
  else
    contracting_provider = parsed_json["contracting_provider"].to_json
    contracting_provider = CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: contracting_provider)
  end
  if parsed_json["payer"].nil?
    payer = nil
  else
    payer = parsed_json["payer"].to_json
    payer = CandidApiClient::Payers::V3::Types::Payer.from_json(json_object: payer)
  end
  start_date = (Date.parse(parsed_json["start_date"]) unless parsed_json["start_date"].nil?)
  end_date = (Date.parse(parsed_json["end_date"]) unless parsed_json["end_date"].nil?)
  if parsed_json["regions"].nil?
    regions = nil
  else
    regions = parsed_json["regions"].to_json
    regions = CandidApiClient::Commons::Types::Regions.from_json(json_object: regions)
  end
   = (Date.parse(parsed_json["submitted_date"]) unless parsed_json["submitted_date"].nil?)
  credentialing_status = struct["credentialing_status"]
  payer_loaded_date = unless parsed_json["payer_loaded_date"].nil?
                        Date.parse(parsed_json["payer_loaded_date"])
                      end
  source = struct["source"]
  medallion_payer_enrollment_id = struct["medallion_payer_enrollment_id"]
  is_enabled = struct["is_enabled"]
  new(
    provider_credentialing_span_id: provider_credentialing_span_id,
    rendering_provider: rendering_provider,
    contracting_provider: contracting_provider,
    payer: payer,
    start_date: start_date,
    end_date: end_date,
    regions: regions,
    submitted_date: ,
    credentialing_status: credentialing_status,
    payer_loaded_date: payer_loaded_date,
    source: source,
    medallion_payer_enrollment_id: medallion_payer_enrollment_id,
    is_enabled: is_enabled,
    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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 177

def self.validate_raw(obj:)
  obj.provider_credentialing_span_id.is_a?(String) != false || raise("Passed value for field obj.provider_credentialing_span_id is not the expected type, validation failed.")
  CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.validate_raw(obj: obj.rendering_provider)
  CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.validate_raw(obj: obj.contracting_provider)
  CandidApiClient::Payers::V3::Types::Payer.validate_raw(obj: obj.payer)
  obj.start_date&.is_a?(Date) != false || raise("Passed value for field obj.start_date is not the expected type, validation failed.")
  obj.end_date&.is_a?(Date) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
  CandidApiClient::Commons::Types::Regions.validate_raw(obj: obj.regions)
  obj.&.is_a?(Date) != false || raise("Passed value for field obj.submitted_date is not the expected type, validation failed.")
  obj.credentialing_status.is_a?(CandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus) != false || raise("Passed value for field obj.credentialing_status is not the expected type, validation failed.")
  obj.payer_loaded_date&.is_a?(Date) != false || raise("Passed value for field obj.payer_loaded_date is not the expected type, validation failed.")
  obj.source.is_a?(String) != false || raise("Passed value for field obj.source is not the expected type, validation failed.")
  obj.medallion_payer_enrollment_id&.is_a?(String) != false || raise("Passed value for field obj.medallion_payer_enrollment_id is not the expected type, validation failed.")
  obj.is_enabled.is_a?(Boolean) != false || raise("Passed value for field obj.is_enabled is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ProviderCredentialingSpan to a JSON object

Returns:

  • (String)


167
168
169
# File 'lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb', line 167

def to_json(*_args)
  @_field_set&.to_json
end