candidhealth 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +74 -0
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  6. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  7. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  8. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  9. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  10. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  11. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  12. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  13. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  14. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  15. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  16. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  17. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  18. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  20. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  21. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  22. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  23. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  26. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  27. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  28. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  29. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  32. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  33. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  52. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  53. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  54. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  55. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  56. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  57. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  60. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  61. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  62. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  63. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  64. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  65. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  66. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  67. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  68. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  69. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  70. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  71. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  72. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  73. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  74. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  77. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  78. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  79. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  80. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  81. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  82. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  83. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  84. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  85. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  86. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  87. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  88. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  89. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  90. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  91. data/lib/candidhealth/individual/types/patient.rb +6 -6
  92. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  93. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  94. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  95. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  96. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  97. data/lib/candidhealth/patient_ar/client.rb +30 -0
  98. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  99. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  100. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  101. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  102. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  103. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  104. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  105. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  106. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  107. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  108. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  109. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  110. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  111. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  112. data/lib/candidhealth/payers/client.rb +7 -0
  113. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  114. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  115. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  116. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  117. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  118. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  119. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  120. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  121. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +204 -6
  122. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  123. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  124. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +33 -5
  125. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +33 -5
  126. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  127. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -4
  128. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  129. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +17 -0
  130. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  131. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  132. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  133. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  134. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  135. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  136. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  137. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  138. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  139. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  140. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  141. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  142. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  143. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  144. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  145. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  146. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  147. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  148. data/lib/candidhealth.rb +21 -7
  149. data/lib/requests.rb +2 -2
  150. data/lib/types_export.rb +116 -13
  151. metadata +109 -2
@@ -0,0 +1,271 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../commons/types/procedure_modifier"
4
+ require_relative "../../../commons/types/service_line_units"
5
+ require_relative "drug_identification"
6
+ require_relative "../../../commons/types/facility_type_code"
7
+ require "date"
8
+ require_relative "../../../encounter_providers/v_2/types/ordering_provider"
9
+ require_relative "test_result"
10
+ require "ostruct"
11
+ require "json"
12
+
13
+ module CandidApiClient
14
+ module ServiceLines
15
+ module V2
16
+ module Types
17
+ class UniversalServiceLineCreate
18
+ # @return [Array<Integer>] Indices (zero-indexed) of all the diagnoses this service line references
19
+ attr_reader :diagnosis_pointers
20
+ # @return [String] A 4 digit code that specifies facility department or type of service arrangement
21
+ # for institutional service line items (837i). This code is not required for
22
+ # professional claim billing (837p).
23
+ attr_reader :revenue_code
24
+ # @return [String]
25
+ attr_reader :procedure_code
26
+ # @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
27
+ attr_reader :modifiers
28
+ # @return [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
29
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
30
+ # will not be populated.
31
+ attr_reader :has_epsdt_indicator
32
+ # @return [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
33
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
34
+ # will not be populated.
35
+ attr_reader :has_family_planning_indicator
36
+ # @return [String] String representation of a Decimal that can be parsed by most libraries.
37
+ # For professional claims, a ServiceLine quantity cannot contain more than one
38
+ # digit of precision
39
+ # (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine
40
+ # quantity cannot contain
41
+ # more than three decimal digits of precision.
42
+ attr_reader :quantity
43
+ # @return [CandidApiClient::Commons::Types::ServiceLineUnits]
44
+ attr_reader :units
45
+ # @return [Integer] The total amount charged for this service line, factoring in quantity. If
46
+ # procedure_code is updated and this is not, the system will attempt to set it
47
+ # based on chargemasters entries and the service line’s quantity. For example, if
48
+ # a single unit has an entry of 100 cents and 2 units were rendered, the
49
+ # charge_amount_cents will be set to 200, if there is no chargemaster entry, it
50
+ # will default to the amount set in this field.
51
+ attr_reader :charge_amount_cents
52
+ # @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
53
+ attr_reader :drug_identification
54
+ # @return [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. This enum is not used or required for institutional
55
+ # claims. If your organization does not intend to submit claims with a different
56
+ # place of service at the service line level, this field should not be populated.
57
+ # 02 for telemedicine, 11 for in-person. Full list
58
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
59
+ attr_reader :place_of_service_code
60
+ # @return [String] A free-form description to clarify the related data elements and their content.
61
+ # Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form.
62
+ attr_reader :description
63
+ # @return [Date]
64
+ attr_reader :date_of_service
65
+ # @return [Date]
66
+ attr_reader :end_date_of_service
67
+ # @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
68
+ # than the rendering provider for this service line.
69
+ # If not required by this implementation guide, do not send.
70
+ attr_reader :ordering_provider
71
+ # @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Contains a list of test results. Test result types may map to MEA-02 on the
72
+ # 837-P (ex: Hemoglobin, Hematocrit).
73
+ # This is unused by 837-i and ignored for institutional service lines.
74
+ # No more than 5 MEA-02 test results may be submitted per service line.
75
+ attr_reader :test_results
76
+ # @return [String] Maps to NTE02 loop 2400 on the EDI 837.
77
+ attr_reader :note
78
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
79
+ attr_reader :additional_properties
80
+ # @return [Object]
81
+ attr_reader :_field_set
82
+ protected :_field_set
83
+
84
+ OMIT = Object.new
85
+
86
+ # @param diagnosis_pointers [Array<Integer>] Indices (zero-indexed) of all the diagnoses this service line references
87
+ # @param revenue_code [String] A 4 digit code that specifies facility department or type of service arrangement
88
+ # for institutional service line items (837i). This code is not required for
89
+ # professional claim billing (837p).
90
+ # @param procedure_code [String]
91
+ # @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
92
+ # @param has_epsdt_indicator [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
93
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
94
+ # will not be populated.
95
+ # @param has_family_planning_indicator [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
96
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
97
+ # will not be populated.
98
+ # @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
99
+ # For professional claims, a ServiceLine quantity cannot contain more than one
100
+ # digit of precision
101
+ # (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine
102
+ # quantity cannot contain
103
+ # more than three decimal digits of precision.
104
+ # @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
105
+ # @param charge_amount_cents [Integer] The total amount charged for this service line, factoring in quantity. If
106
+ # procedure_code is updated and this is not, the system will attempt to set it
107
+ # based on chargemasters entries and the service line’s quantity. For example, if
108
+ # a single unit has an entry of 100 cents and 2 units were rendered, the
109
+ # charge_amount_cents will be set to 200, if there is no chargemaster entry, it
110
+ # will default to the amount set in this field.
111
+ # @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
112
+ # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. This enum is not used or required for institutional
113
+ # claims. If your organization does not intend to submit claims with a different
114
+ # place of service at the service line level, this field should not be populated.
115
+ # 02 for telemedicine, 11 for in-person. Full list
116
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
117
+ # @param description [String] A free-form description to clarify the related data elements and their content.
118
+ # Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form.
119
+ # @param date_of_service [Date]
120
+ # @param end_date_of_service [Date]
121
+ # @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
122
+ # than the rendering provider for this service line.
123
+ # If not required by this implementation guide, do not send.
124
+ # @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Contains a list of test results. Test result types may map to MEA-02 on the
125
+ # 837-P (ex: Hemoglobin, Hematocrit).
126
+ # This is unused by 837-i and ignored for institutional service lines.
127
+ # No more than 5 MEA-02 test results may be submitted per service line.
128
+ # @param note [String] Maps to NTE02 loop 2400 on the EDI 837.
129
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
130
+ # @return [CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate]
131
+ def initialize(quantity:, units:, diagnosis_pointers: OMIT, revenue_code: OMIT, procedure_code: OMIT, modifiers: OMIT,
132
+ has_epsdt_indicator: OMIT, has_family_planning_indicator: OMIT, charge_amount_cents: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, test_results: OMIT, note: OMIT, additional_properties: nil)
133
+ @diagnosis_pointers = diagnosis_pointers if diagnosis_pointers != OMIT
134
+ @revenue_code = revenue_code if revenue_code != OMIT
135
+ @procedure_code = procedure_code if procedure_code != OMIT
136
+ @modifiers = modifiers if modifiers != OMIT
137
+ @has_epsdt_indicator = has_epsdt_indicator if has_epsdt_indicator != OMIT
138
+ @has_family_planning_indicator = has_family_planning_indicator if has_family_planning_indicator != OMIT
139
+ @quantity = quantity
140
+ @units = units
141
+ @charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
142
+ @drug_identification = drug_identification if drug_identification != OMIT
143
+ @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
144
+ @description = description if description != OMIT
145
+ @date_of_service = date_of_service if date_of_service != OMIT
146
+ @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
147
+ @ordering_provider = ordering_provider if ordering_provider != OMIT
148
+ @test_results = test_results if test_results != OMIT
149
+ @note = note if note != OMIT
150
+ @additional_properties = additional_properties
151
+ @_field_set = {
152
+ "diagnosis_pointers": diagnosis_pointers,
153
+ "revenue_code": revenue_code,
154
+ "procedure_code": procedure_code,
155
+ "modifiers": modifiers,
156
+ "has_epsdt_indicator": has_epsdt_indicator,
157
+ "has_family_planning_indicator": has_family_planning_indicator,
158
+ "quantity": quantity,
159
+ "units": units,
160
+ "charge_amount_cents": charge_amount_cents,
161
+ "drug_identification": drug_identification,
162
+ "place_of_service_code": place_of_service_code,
163
+ "description": description,
164
+ "date_of_service": date_of_service,
165
+ "end_date_of_service": end_date_of_service,
166
+ "ordering_provider": ordering_provider,
167
+ "test_results": test_results,
168
+ "note": note
169
+ }.reject do |_k, v|
170
+ v == OMIT
171
+ end
172
+ end
173
+
174
+ # Deserialize a JSON object to an instance of UniversalServiceLineCreate
175
+ #
176
+ # @param json_object [String]
177
+ # @return [CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate]
178
+ def self.from_json(json_object:)
179
+ struct = JSON.parse(json_object, object_class: OpenStruct)
180
+ parsed_json = JSON.parse(json_object)
181
+ diagnosis_pointers = struct["diagnosis_pointers"]
182
+ revenue_code = struct["revenue_code"]
183
+ procedure_code = struct["procedure_code"]
184
+ modifiers = struct["modifiers"]
185
+ has_epsdt_indicator = struct["has_epsdt_indicator"]
186
+ has_family_planning_indicator = struct["has_family_planning_indicator"]
187
+ quantity = struct["quantity"]
188
+ units = struct["units"]
189
+ charge_amount_cents = struct["charge_amount_cents"]
190
+ if parsed_json["drug_identification"].nil?
191
+ drug_identification = nil
192
+ else
193
+ drug_identification = parsed_json["drug_identification"].to_json
194
+ drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentification.from_json(json_object: drug_identification)
195
+ end
196
+ place_of_service_code = struct["place_of_service_code"]
197
+ description = struct["description"]
198
+ date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
199
+ end_date_of_service = unless parsed_json["end_date_of_service"].nil?
200
+ Date.parse(parsed_json["end_date_of_service"])
201
+ end
202
+ if parsed_json["ordering_provider"].nil?
203
+ ordering_provider = nil
204
+ else
205
+ ordering_provider = parsed_json["ordering_provider"].to_json
206
+ ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.from_json(json_object: ordering_provider)
207
+ end
208
+ test_results = parsed_json["test_results"]&.map do |item|
209
+ item = item.to_json
210
+ CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: item)
211
+ end
212
+ note = struct["note"]
213
+ new(
214
+ diagnosis_pointers: diagnosis_pointers,
215
+ revenue_code: revenue_code,
216
+ procedure_code: procedure_code,
217
+ modifiers: modifiers,
218
+ has_epsdt_indicator: has_epsdt_indicator,
219
+ has_family_planning_indicator: has_family_planning_indicator,
220
+ quantity: quantity,
221
+ units: units,
222
+ charge_amount_cents: charge_amount_cents,
223
+ drug_identification: drug_identification,
224
+ place_of_service_code: place_of_service_code,
225
+ description: description,
226
+ date_of_service: date_of_service,
227
+ end_date_of_service: end_date_of_service,
228
+ ordering_provider: ordering_provider,
229
+ test_results: test_results,
230
+ note: note,
231
+ additional_properties: struct
232
+ )
233
+ end
234
+
235
+ # Serialize an instance of UniversalServiceLineCreate to a JSON object
236
+ #
237
+ # @return [String]
238
+ def to_json(*_args)
239
+ @_field_set&.to_json
240
+ end
241
+
242
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
243
+ # hash and check each fields type against the current object's property
244
+ # definitions.
245
+ #
246
+ # @param obj [Object]
247
+ # @return [Void]
248
+ def self.validate_raw(obj:)
249
+ obj.diagnosis_pointers&.is_a?(Array) != false || raise("Passed value for field obj.diagnosis_pointers is not the expected type, validation failed.")
250
+ obj.revenue_code&.is_a?(String) != false || raise("Passed value for field obj.revenue_code is not the expected type, validation failed.")
251
+ obj.procedure_code&.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
252
+ obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
253
+ obj.has_epsdt_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_epsdt_indicator is not the expected type, validation failed.")
254
+ obj.has_family_planning_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_family_planning_indicator is not the expected type, validation failed.")
255
+ obj.quantity.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
256
+ obj.units.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
257
+ obj.charge_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
258
+ obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentification.validate_raw(obj: obj.drug_identification)
259
+ obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
260
+ obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
261
+ obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
262
+ obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
263
+ obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.validate_raw(obj: obj.ordering_provider)
264
+ obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
265
+ obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
266
+ end
267
+ end
268
+ end
269
+ end
270
+ end
271
+ end
@@ -0,0 +1,317 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../commons/types/procedure_modifier"
4
+ require_relative "service_line_denial_reason"
5
+ require_relative "../../../commons/types/facility_type_code"
6
+ require_relative "../../../commons/types/service_line_units"
7
+ require "date"
8
+ require_relative "drug_identification"
9
+ require_relative "../../../encounter_providers/v_2/types/ordering_provider"
10
+ require_relative "test_result"
11
+ require "ostruct"
12
+ require "json"
13
+
14
+ module CandidApiClient
15
+ module ServiceLines
16
+ module V2
17
+ module Types
18
+ class UniversalServiceLineCreateStandalone
19
+ # @return [String]
20
+ attr_reader :diagnosis_id_zero
21
+ # @return [String]
22
+ attr_reader :diagnosis_id_one
23
+ # @return [String]
24
+ attr_reader :diagnosis_id_two
25
+ # @return [String]
26
+ attr_reader :diagnosis_id_three
27
+ # @return [String] A 4 digit code that specifies facility department or type of service arrangement
28
+ # for institutional service line items (837i). This code is not required for
29
+ # professional claim billing (837p).
30
+ attr_reader :revenue_code
31
+ # @return [String]
32
+ attr_reader :procedure_code
33
+ # @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
34
+ attr_reader :modifiers
35
+ # @return [Integer] The total amount charged for this service line, factoring in quantity. The
36
+ # system will attempt to set it based on the chargemaster configuration and the
37
+ # service line’s quantity. For example, if a single unit has an entry of 100 cents
38
+ # and 2 units were rendered, the charge_amount_cents will be set to 200. If there
39
+ # is no chargemaster entry, the system will default to the amount set via this
40
+ # field.
41
+ attr_reader :charge_amount_cents
42
+ # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
43
+ attr_reader :denial_reason
44
+ # @return [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your
45
+ # organization does not intend to submit claims with a different place of service
46
+ # at the service line level, this field should not be populated. 02 for
47
+ # telemedicine, 11 for in-person. Full list
48
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
49
+ attr_reader :place_of_service_code
50
+ # @return [String] String representation of a Decimal that can be parsed by most libraries.
51
+ # For professional claims, a ServiceLine quantity cannot contain more than one
52
+ # digit of precision
53
+ # (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine
54
+ # quantity cannot contain
55
+ # more than three decimal digits of precision.
56
+ attr_reader :quantity
57
+ # @return [CandidApiClient::Commons::Types::ServiceLineUnits]
58
+ attr_reader :units
59
+ # @return [String]
60
+ attr_reader :claim_id
61
+ # @return [String] A free-form description to clarify the related data elements and their content.
62
+ # Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form.
63
+ attr_reader :description
64
+ # @return [Date]
65
+ attr_reader :date_of_service
66
+ # @return [Date]
67
+ attr_reader :end_date_of_service
68
+ # @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
69
+ attr_reader :drug_identification
70
+ # @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
71
+ # than the rendering provider for this service line.
72
+ # If not required by this implementation guide, do not send.
73
+ attr_reader :ordering_provider
74
+ # @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Contains a list of test results. Test result types may map to MEA-02 on the
75
+ # 837-P (ex: Hemoglobin, Hematocrit).
76
+ # This is unused by 837-i and ignored for institutional service lines.
77
+ # No more than 5 MEA-02 test results may be submitted per service line.
78
+ attr_reader :test_results
79
+ # @return [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
80
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
81
+ # will not be populated.
82
+ attr_reader :has_epsdt_indicator
83
+ # @return [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
84
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
85
+ # will not be populated.
86
+ attr_reader :has_family_planning_indicator
87
+ # @return [String] Maps to NTE02 loop 2400 on the EDI 837.
88
+ attr_reader :note
89
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
90
+ attr_reader :additional_properties
91
+ # @return [Object]
92
+ attr_reader :_field_set
93
+ protected :_field_set
94
+
95
+ OMIT = Object.new
96
+
97
+ # @param diagnosis_id_zero [String]
98
+ # @param diagnosis_id_one [String]
99
+ # @param diagnosis_id_two [String]
100
+ # @param diagnosis_id_three [String]
101
+ # @param revenue_code [String] A 4 digit code that specifies facility department or type of service arrangement
102
+ # for institutional service line items (837i). This code is not required for
103
+ # professional claim billing (837p).
104
+ # @param procedure_code [String]
105
+ # @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
106
+ # @param charge_amount_cents [Integer] The total amount charged for this service line, factoring in quantity. The
107
+ # system will attempt to set it based on the chargemaster configuration and the
108
+ # service line’s quantity. For example, if a single unit has an entry of 100 cents
109
+ # and 2 units were rendered, the charge_amount_cents will be set to 200. If there
110
+ # is no chargemaster entry, the system will default to the amount set via this
111
+ # field.
112
+ # @param denial_reason [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
113
+ # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your
114
+ # organization does not intend to submit claims with a different place of service
115
+ # at the service line level, this field should not be populated. 02 for
116
+ # telemedicine, 11 for in-person. Full list
117
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
118
+ # @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
119
+ # For professional claims, a ServiceLine quantity cannot contain more than one
120
+ # digit of precision
121
+ # (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine
122
+ # quantity cannot contain
123
+ # more than three decimal digits of precision.
124
+ # @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
125
+ # @param claim_id [String]
126
+ # @param description [String] A free-form description to clarify the related data elements and their content.
127
+ # Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form.
128
+ # @param date_of_service [Date]
129
+ # @param end_date_of_service [Date]
130
+ # @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
131
+ # @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
132
+ # than the rendering provider for this service line.
133
+ # If not required by this implementation guide, do not send.
134
+ # @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Contains a list of test results. Test result types may map to MEA-02 on the
135
+ # 837-P (ex: Hemoglobin, Hematocrit).
136
+ # This is unused by 837-i and ignored for institutional service lines.
137
+ # No more than 5 MEA-02 test results may be submitted per service line.
138
+ # @param has_epsdt_indicator [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
139
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
140
+ # will not be populated.
141
+ # @param has_family_planning_indicator [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
142
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
143
+ # will not be populated.
144
+ # @param note [String] Maps to NTE02 loop 2400 on the EDI 837.
145
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
146
+ # @return [CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreateStandalone]
147
+ def initialize(quantity:, units:, claim_id:, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT,
148
+ diagnosis_id_three: OMIT, revenue_code: OMIT, procedure_code: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, drug_identification: OMIT, ordering_provider: OMIT, test_results: OMIT, has_epsdt_indicator: OMIT, has_family_planning_indicator: OMIT, note: OMIT, additional_properties: nil)
149
+ @diagnosis_id_zero = diagnosis_id_zero if diagnosis_id_zero != OMIT
150
+ @diagnosis_id_one = diagnosis_id_one if diagnosis_id_one != OMIT
151
+ @diagnosis_id_two = diagnosis_id_two if diagnosis_id_two != OMIT
152
+ @diagnosis_id_three = diagnosis_id_three if diagnosis_id_three != OMIT
153
+ @revenue_code = revenue_code if revenue_code != OMIT
154
+ @procedure_code = procedure_code if procedure_code != OMIT
155
+ @modifiers = modifiers if modifiers != OMIT
156
+ @charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
157
+ @denial_reason = denial_reason if denial_reason != OMIT
158
+ @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
159
+ @quantity = quantity
160
+ @units = units
161
+ @claim_id = claim_id
162
+ @description = description if description != OMIT
163
+ @date_of_service = date_of_service if date_of_service != OMIT
164
+ @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
165
+ @drug_identification = drug_identification if drug_identification != OMIT
166
+ @ordering_provider = ordering_provider if ordering_provider != OMIT
167
+ @test_results = test_results if test_results != OMIT
168
+ @has_epsdt_indicator = has_epsdt_indicator if has_epsdt_indicator != OMIT
169
+ @has_family_planning_indicator = has_family_planning_indicator if has_family_planning_indicator != OMIT
170
+ @note = note if note != OMIT
171
+ @additional_properties = additional_properties
172
+ @_field_set = {
173
+ "diagnosis_id_zero": diagnosis_id_zero,
174
+ "diagnosis_id_one": diagnosis_id_one,
175
+ "diagnosis_id_two": diagnosis_id_two,
176
+ "diagnosis_id_three": diagnosis_id_three,
177
+ "revenue_code": revenue_code,
178
+ "procedure_code": procedure_code,
179
+ "modifiers": modifiers,
180
+ "charge_amount_cents": charge_amount_cents,
181
+ "denial_reason": denial_reason,
182
+ "place_of_service_code": place_of_service_code,
183
+ "quantity": quantity,
184
+ "units": units,
185
+ "claim_id": claim_id,
186
+ "description": description,
187
+ "date_of_service": date_of_service,
188
+ "end_date_of_service": end_date_of_service,
189
+ "drug_identification": drug_identification,
190
+ "ordering_provider": ordering_provider,
191
+ "test_results": test_results,
192
+ "has_epsdt_indicator": has_epsdt_indicator,
193
+ "has_family_planning_indicator": has_family_planning_indicator,
194
+ "note": note
195
+ }.reject do |_k, v|
196
+ v == OMIT
197
+ end
198
+ end
199
+
200
+ # Deserialize a JSON object to an instance of UniversalServiceLineCreateStandalone
201
+ #
202
+ # @param json_object [String]
203
+ # @return [CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreateStandalone]
204
+ def self.from_json(json_object:)
205
+ struct = JSON.parse(json_object, object_class: OpenStruct)
206
+ parsed_json = JSON.parse(json_object)
207
+ diagnosis_id_zero = struct["diagnosis_id_zero"]
208
+ diagnosis_id_one = struct["diagnosis_id_one"]
209
+ diagnosis_id_two = struct["diagnosis_id_two"]
210
+ diagnosis_id_three = struct["diagnosis_id_three"]
211
+ revenue_code = struct["revenue_code"]
212
+ procedure_code = struct["procedure_code"]
213
+ modifiers = struct["modifiers"]
214
+ charge_amount_cents = struct["charge_amount_cents"]
215
+ if parsed_json["denial_reason"].nil?
216
+ denial_reason = nil
217
+ else
218
+ denial_reason = parsed_json["denial_reason"].to_json
219
+ denial_reason = CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.from_json(json_object: denial_reason)
220
+ end
221
+ place_of_service_code = struct["place_of_service_code"]
222
+ quantity = struct["quantity"]
223
+ units = struct["units"]
224
+ claim_id = struct["claim_id"]
225
+ description = struct["description"]
226
+ date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
227
+ end_date_of_service = unless parsed_json["end_date_of_service"].nil?
228
+ Date.parse(parsed_json["end_date_of_service"])
229
+ end
230
+ if parsed_json["drug_identification"].nil?
231
+ drug_identification = nil
232
+ else
233
+ drug_identification = parsed_json["drug_identification"].to_json
234
+ drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentification.from_json(json_object: drug_identification)
235
+ end
236
+ if parsed_json["ordering_provider"].nil?
237
+ ordering_provider = nil
238
+ else
239
+ ordering_provider = parsed_json["ordering_provider"].to_json
240
+ ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.from_json(json_object: ordering_provider)
241
+ end
242
+ test_results = parsed_json["test_results"]&.map do |item|
243
+ item = item.to_json
244
+ CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: item)
245
+ end
246
+ has_epsdt_indicator = struct["has_epsdt_indicator"]
247
+ has_family_planning_indicator = struct["has_family_planning_indicator"]
248
+ note = struct["note"]
249
+ new(
250
+ diagnosis_id_zero: diagnosis_id_zero,
251
+ diagnosis_id_one: diagnosis_id_one,
252
+ diagnosis_id_two: diagnosis_id_two,
253
+ diagnosis_id_three: diagnosis_id_three,
254
+ revenue_code: revenue_code,
255
+ procedure_code: procedure_code,
256
+ modifiers: modifiers,
257
+ charge_amount_cents: charge_amount_cents,
258
+ denial_reason: denial_reason,
259
+ place_of_service_code: place_of_service_code,
260
+ quantity: quantity,
261
+ units: units,
262
+ claim_id: claim_id,
263
+ description: description,
264
+ date_of_service: date_of_service,
265
+ end_date_of_service: end_date_of_service,
266
+ drug_identification: drug_identification,
267
+ ordering_provider: ordering_provider,
268
+ test_results: test_results,
269
+ has_epsdt_indicator: has_epsdt_indicator,
270
+ has_family_planning_indicator: has_family_planning_indicator,
271
+ note: note,
272
+ additional_properties: struct
273
+ )
274
+ end
275
+
276
+ # Serialize an instance of UniversalServiceLineCreateStandalone to a JSON object
277
+ #
278
+ # @return [String]
279
+ def to_json(*_args)
280
+ @_field_set&.to_json
281
+ end
282
+
283
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
284
+ # hash and check each fields type against the current object's property
285
+ # definitions.
286
+ #
287
+ # @param obj [Object]
288
+ # @return [Void]
289
+ def self.validate_raw(obj:)
290
+ obj.diagnosis_id_zero&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_zero is not the expected type, validation failed.")
291
+ obj.diagnosis_id_one&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_one is not the expected type, validation failed.")
292
+ obj.diagnosis_id_two&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_two is not the expected type, validation failed.")
293
+ obj.diagnosis_id_three&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_three is not the expected type, validation failed.")
294
+ obj.revenue_code&.is_a?(String) != false || raise("Passed value for field obj.revenue_code is not the expected type, validation failed.")
295
+ obj.procedure_code&.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
296
+ obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
297
+ obj.charge_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
298
+ obj.denial_reason.nil? || CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.validate_raw(obj: obj.denial_reason)
299
+ obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
300
+ obj.quantity.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
301
+ obj.units.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
302
+ obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
303
+ obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
304
+ obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
305
+ obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
306
+ obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentification.validate_raw(obj: obj.drug_identification)
307
+ obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.validate_raw(obj: obj.ordering_provider)
308
+ obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
309
+ obj.has_epsdt_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_epsdt_indicator is not the expected type, validation failed.")
310
+ obj.has_family_planning_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_family_planning_indicator is not the expected type, validation failed.")
311
+ obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
312
+ end
313
+ end
314
+ end
315
+ end
316
+ end
317
+ end