candidhealth 0.24.5 → 0.24.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5ff8c4c0d313269cb5562b1d858aeb1edd111a93674fea096bffbaff0709dfe
4
- data.tar.gz: b73699ae13470f85b07c5eba00ff61f9b0f698baee49522f40897ac8e8ab2755
3
+ metadata.gz: 66cacbf9ad5b8a9b03edfdb6f3cc1cd700c1ce334ab18c6d2d995110ea926673
4
+ data.tar.gz: 47c042b7f6ecd15abd96eb6ebb491a00017ab7fa4656f7302f81bdca3e88b7c8
5
5
  SHA512:
6
- metadata.gz: eaf9394896b6a1cebd6c7be9ede2f5258ae496e1a4ffae0fca323b96026d61be88b11fb2001e70ba0546f5e720e581576deb05b2c835deb90dcc265f9fad222e
7
- data.tar.gz: 6b835c8885844a4efadbcb514ae5fedae7857e9309d0cf63b7b0220d7a7d35f364c291d90a25783281a2d5694966a61df7db4ccd0733821dcbf694e235551265
6
+ metadata.gz: c6d5a5060d9f7fee6b88180a63c2629a0591bb29500d7e2380f7f23234b04d59cf29e192f15f329283a9f175f68448247b568dc5ec21fb531a5687f4182411b9
7
+ data.tar.gz: dfc69be27297ba2d031f5787861e62c05899ce66b01847407dd8cba6a54948288b39e99f909486d053951230952f06ffdd6ca637c02218c3dfc6fbfbb0e10a4f
@@ -0,0 +1,129 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "human_name"
4
+ require_relative "external_provider_type"
5
+ require_relative "contact_point"
6
+ require_relative "address"
7
+ require_relative "period"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module CandidApiClient
12
+ module PreEncounter
13
+ module Common
14
+ module Types
15
+ class ExternalProvider
16
+ # @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
17
+ attr_reader :name
18
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
19
+ attr_reader :type
20
+ # @return [String]
21
+ attr_reader :npi
22
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
23
+ attr_reader :telecoms
24
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
25
+ attr_reader :addresses
26
+ # @return [CandidApiClient::PreEncounter::Common::Types::Period]
27
+ attr_reader :period
28
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
29
+ attr_reader :additional_properties
30
+ # @return [Object]
31
+ attr_reader :_field_set
32
+ protected :_field_set
33
+
34
+ OMIT = Object.new
35
+
36
+ # @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
37
+ # @param type [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
38
+ # @param npi [String]
39
+ # @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
40
+ # @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
41
+ # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
42
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
43
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
44
+ def initialize(name:, telecoms:, addresses:, type: OMIT, npi: OMIT, period: OMIT, additional_properties: nil)
45
+ @name = name
46
+ @type = type if type != OMIT
47
+ @npi = npi if npi != OMIT
48
+ @telecoms = telecoms
49
+ @addresses = addresses
50
+ @period = period if period != OMIT
51
+ @additional_properties = additional_properties
52
+ @_field_set = {
53
+ "name": name,
54
+ "type": type,
55
+ "npi": npi,
56
+ "telecoms": telecoms,
57
+ "addresses": addresses,
58
+ "period": period
59
+ }.reject do |_k, v|
60
+ v == OMIT
61
+ end
62
+ end
63
+
64
+ # Deserialize a JSON object to an instance of ExternalProvider
65
+ #
66
+ # @param json_object [String]
67
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
68
+ def self.from_json(json_object:)
69
+ struct = JSON.parse(json_object, object_class: OpenStruct)
70
+ parsed_json = JSON.parse(json_object)
71
+ if parsed_json["name"].nil?
72
+ name = nil
73
+ else
74
+ name = parsed_json["name"].to_json
75
+ name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
76
+ end
77
+ type = struct["type"]
78
+ npi = struct["npi"]
79
+ telecoms = parsed_json["telecoms"]&.map do |item|
80
+ item = item.to_json
81
+ CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
82
+ end
83
+ addresses = parsed_json["addresses"]&.map do |item|
84
+ item = item.to_json
85
+ CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
86
+ end
87
+ if parsed_json["period"].nil?
88
+ period = nil
89
+ else
90
+ period = parsed_json["period"].to_json
91
+ period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
92
+ end
93
+ new(
94
+ name: name,
95
+ type: type,
96
+ npi: npi,
97
+ telecoms: telecoms,
98
+ addresses: addresses,
99
+ period: period,
100
+ additional_properties: struct
101
+ )
102
+ end
103
+
104
+ # Serialize an instance of ExternalProvider to a JSON object
105
+ #
106
+ # @return [String]
107
+ def to_json(*_args)
108
+ @_field_set&.to_json
109
+ end
110
+
111
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
112
+ # hash and check each fields type against the current object's property
113
+ # definitions.
114
+ #
115
+ # @param obj [Object]
116
+ # @return [Void]
117
+ def self.validate_raw(obj:)
118
+ CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
119
+ obj.type&.is_a?(CandidApiClient::PreEncounter::Common::Types::ExternalProviderType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
120
+ obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
121
+ obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
122
+ obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
123
+ obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Common
6
+ module Types
7
+ class ExternalProviderType
8
+ PRIMARY = "PRIMARY"
9
+ REFERRING = "REFERRING"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -38,7 +38,7 @@ module CandidApiClient
38
38
  # * :start (Date)
39
39
  # * :end_ (Date)
40
40
  # * :date_of_birth (Date)
41
- # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
41
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
42
42
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
43
43
  # * :patient (String)
44
44
  # * :insurance_plan (Hash)
@@ -47,7 +47,8 @@ module CandidApiClient
47
47
  # * :payer_name (String)
48
48
  # * :group_number (String)
49
49
  # * :name (String)
50
- # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
50
+ # * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
51
+ # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
51
52
  # * :period (Hash)
52
53
  # * :start (Date)
53
54
  # * :end_ (Date)
@@ -57,7 +58,7 @@ module CandidApiClient
57
58
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
58
59
  # @example
59
60
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
60
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), gender: MAN }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", type: PPO, period: { }, insurance_card_image_locator: "string" }, verified: true })
61
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true })
61
62
  def create(request:, request_options: nil)
62
63
  response = @request_client.conn.post do |req|
63
64
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -90,7 +91,7 @@ module CandidApiClient
90
91
  # * :start (Date)
91
92
  # * :end_ (Date)
92
93
  # * :date_of_birth (Date)
93
- # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
94
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
94
95
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
95
96
  # * :patient (String)
96
97
  # * :insurance_plan (Hash)
@@ -99,7 +100,8 @@ module CandidApiClient
99
100
  # * :payer_name (String)
100
101
  # * :group_number (String)
101
102
  # * :name (String)
102
- # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
103
+ # * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
104
+ # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
103
105
  # * :period (Hash)
104
106
  # * :start (Date)
105
107
  # * :end_ (Date)
@@ -112,7 +114,7 @@ module CandidApiClient
112
114
  # api.pre_encounter.coverages.v_1.update(
113
115
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
114
116
  # version: "string",
115
- # request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), gender: MAN }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", type: PPO, period: { }, insurance_card_image_locator: "string" }, verified: true }
117
+ # request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true }
116
118
  # )
117
119
  def update(id:, version:, request:, request_options: nil)
118
120
  response = @request_client.conn.put do |req|
@@ -266,7 +268,7 @@ module CandidApiClient
266
268
  # * :start (Date)
267
269
  # * :end_ (Date)
268
270
  # * :date_of_birth (Date)
269
- # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
271
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
270
272
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
271
273
  # * :patient (String)
272
274
  # * :insurance_plan (Hash)
@@ -275,7 +277,8 @@ module CandidApiClient
275
277
  # * :payer_name (String)
276
278
  # * :group_number (String)
277
279
  # * :name (String)
278
- # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
280
+ # * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
281
+ # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
279
282
  # * :period (Hash)
280
283
  # * :start (Date)
281
284
  # * :end_ (Date)
@@ -285,7 +288,7 @@ module CandidApiClient
285
288
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
286
289
  # @example
287
290
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
288
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), gender: MAN }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", type: PPO, period: { }, insurance_card_image_locator: "string" }, verified: true })
291
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true })
289
292
  def create(request:, request_options: nil)
290
293
  Async do
291
294
  response = @request_client.conn.post do |req|
@@ -320,7 +323,7 @@ module CandidApiClient
320
323
  # * :start (Date)
321
324
  # * :end_ (Date)
322
325
  # * :date_of_birth (Date)
323
- # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
326
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
324
327
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
325
328
  # * :patient (String)
326
329
  # * :insurance_plan (Hash)
@@ -329,7 +332,8 @@ module CandidApiClient
329
332
  # * :payer_name (String)
330
333
  # * :group_number (String)
331
334
  # * :name (String)
332
- # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
335
+ # * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
336
+ # * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
333
337
  # * :period (Hash)
334
338
  # * :start (Date)
335
339
  # * :end_ (Date)
@@ -342,7 +346,7 @@ module CandidApiClient
342
346
  # api.pre_encounter.coverages.v_1.update(
343
347
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
344
348
  # version: "string",
345
- # request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), gender: MAN }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", type: PPO, period: { }, insurance_card_image_locator: "string" }, verified: true }
349
+ # request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true }
346
350
  # )
347
351
  def update(id:, version:, request:, request_options: nil)
348
352
  Async do
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "network_type"
4
+ require_relative "insurance_type_code"
4
5
  require_relative "../../../common/types/period"
5
6
  require "ostruct"
6
7
  require "json"
@@ -22,6 +23,8 @@ module CandidApiClient
22
23
  # @return [String]
23
24
  attr_reader :name
24
25
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType]
26
+ attr_reader :plan_type
27
+ # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode]
25
28
  attr_reader :type
26
29
  # @return [CandidApiClient::PreEncounter::Common::Types::Period]
27
30
  attr_reader :period
@@ -40,18 +43,20 @@ module CandidApiClient
40
43
  # @param payer_name [String]
41
44
  # @param group_number [String]
42
45
  # @param name [String]
43
- # @param type [CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType]
46
+ # @param plan_type [CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType]
47
+ # @param type [CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode]
44
48
  # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
45
49
  # @param insurance_card_image_locator [String]
46
50
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
47
51
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
48
- def initialize(member_id:, payer_id:, payer_name:, group_number: OMIT, name: OMIT, type: OMIT,
49
- period: OMIT, insurance_card_image_locator: OMIT, additional_properties: nil)
52
+ def initialize(member_id:, payer_id:, payer_name:, group_number: OMIT, name: OMIT, plan_type: OMIT,
53
+ type: OMIT, period: OMIT, insurance_card_image_locator: OMIT, additional_properties: nil)
50
54
  @member_id = member_id
51
55
  @payer_id = payer_id
52
56
  @payer_name = payer_name
53
57
  @group_number = group_number if group_number != OMIT
54
58
  @name = name if name != OMIT
59
+ @plan_type = plan_type if plan_type != OMIT
55
60
  @type = type if type != OMIT
56
61
  @period = period if period != OMIT
57
62
  @insurance_card_image_locator = insurance_card_image_locator if insurance_card_image_locator != OMIT
@@ -62,6 +67,7 @@ module CandidApiClient
62
67
  "payer_name": payer_name,
63
68
  "group_number": group_number,
64
69
  "name": name,
70
+ "plan_type": plan_type,
65
71
  "type": type,
66
72
  "period": period,
67
73
  "insurance_card_image_locator": insurance_card_image_locator
@@ -82,6 +88,7 @@ module CandidApiClient
82
88
  payer_name = struct["payer_name"]
83
89
  group_number = struct["group_number"]
84
90
  name = struct["name"]
91
+ plan_type = struct["plan_type"]
85
92
  type = struct["type"]
86
93
  if parsed_json["period"].nil?
87
94
  period = nil
@@ -96,6 +103,7 @@ module CandidApiClient
96
103
  payer_name: payer_name,
97
104
  group_number: group_number,
98
105
  name: name,
106
+ plan_type: plan_type,
99
107
  type: type,
100
108
  period: period,
101
109
  insurance_card_image_locator: insurance_card_image_locator,
@@ -122,7 +130,8 @@ module CandidApiClient
122
130
  obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
123
131
  obj.group_number&.is_a?(String) != false || raise("Passed value for field obj.group_number is not the expected type, validation failed.")
124
132
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
125
- obj.type&.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
133
+ obj.plan_type&.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType) != false || raise("Passed value for field obj.plan_type is not the expected type, validation failed.")
134
+ obj.type&.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
126
135
  obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
127
136
  obj.insurance_card_image_locator&.is_a?(String) != false || raise("Passed value for field obj.insurance_card_image_locator is not the expected type, validation failed.")
128
137
  end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Coverages
6
+ module V1
7
+ module Types
8
+ # Code identifying the type of insurance policy within a specific insurance
9
+ # program (X12 008020 Element 1336)
10
+ class InsuranceTypeCode
11
+ C_01 = "01"
12
+ C_12 = "12"
13
+ C_13 = "13"
14
+ C_14 = "14"
15
+ C_15 = "15"
16
+ C_16 = "16"
17
+ C_17 = "17"
18
+ C_18 = "18"
19
+ C_19 = "19"
20
+ C_41 = "41"
21
+ C_42 = "42"
22
+ C_43 = "43"
23
+ C_47 = "47"
24
+ CAP = "AP"
25
+ CC_1 = "C1"
26
+ CCO = "CO"
27
+ CCP = "CP"
28
+ CD = "D"
29
+ CDB = "DB"
30
+ CE = "E"
31
+ CEP = "EP"
32
+ CFF = "FF"
33
+ CGP = "GP"
34
+ CHA = "HA"
35
+ CHB = "HB"
36
+ CHD = "HD"
37
+ CHG = "HG"
38
+ CHM = "HM"
39
+ CHN = "HN"
40
+ CHP = "HP"
41
+ CHS = "HS"
42
+ CIN = "IN"
43
+ CIP = "IP"
44
+ CLC = "LC"
45
+ CLD = "LD"
46
+ CLI = "LI"
47
+ CLT = "LT"
48
+ CM = "M"
49
+ CMA = "MA"
50
+ CMB = "MB"
51
+ CMC = "MC"
52
+ CMD = "MD"
53
+ CME = "ME"
54
+ CMF = "MF"
55
+ CMH = "MH"
56
+ CMI = "MI"
57
+ CMJ = "MJ"
58
+ CMK = "MK"
59
+ CML = "ML"
60
+ CMM = "MM"
61
+ CMN = "MN"
62
+ CMO = "MO"
63
+ CMP = "MP"
64
+ CMR = "MR"
65
+ CMT = "MT"
66
+ CMV = "MV"
67
+ COA = "OA"
68
+ COT = "OT"
69
+ CPE = "PE"
70
+ CPL = "PL"
71
+ CPP = "PP"
72
+ CPR = "PR"
73
+ CPS = "PS"
74
+ CQM = "QM"
75
+ CRP = "RP"
76
+ CSP = "SP"
77
+ CTF = "TF"
78
+ CU = "U"
79
+ CWC = "WC"
80
+ CWU = "WU"
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -6,6 +6,8 @@ module CandidApiClient
6
6
  module V1
7
7
  module Types
8
8
  class NetworkType
9
+ SELF_PAY = "09"
10
+ OTHER_NON_FEDERAL_PROGRAMS = "11"
9
11
  PPO = "12"
10
12
  POS = "13"
11
13
  EPO = "14"
@@ -13,8 +15,11 @@ module CandidApiClient
13
15
  HMO_MEDICARE_RISK = "16"
14
16
  DMO = "17"
15
17
  AUTO = "AM"
18
+ BLUE_CROSS_BLUE_SHIELD = "BL"
16
19
  CHAMPUS = "CH"
20
+ COMMERCIAL_INSURANCE_CO = "CI"
17
21
  DISABILITY = "DS"
22
+ FEDERAL_EMPLOYEES = "FI"
18
23
  HMO = "HM"
19
24
  LIABILITY = "LM"
20
25
  MEDICARE_PART_A = "MA"
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "../../../common/types/human_name"
4
4
  require "date"
5
- require_relative "../../../common/types/gender"
5
+ require_relative "../../../common/types/sex"
6
6
  require "ostruct"
7
7
  require "json"
8
8
 
@@ -16,8 +16,8 @@ module CandidApiClient
16
16
  attr_reader :name
17
17
  # @return [Date]
18
18
  attr_reader :date_of_birth
19
- # @return [CandidApiClient::PreEncounter::Common::Types::Gender]
20
- attr_reader :gender
19
+ # @return [CandidApiClient::PreEncounter::Common::Types::Sex]
20
+ attr_reader :biological_sex
21
21
  # @return [OpenStruct] Additional properties unmapped to the current class definition
22
22
  attr_reader :additional_properties
23
23
  # @return [Object]
@@ -28,15 +28,15 @@ module CandidApiClient
28
28
 
29
29
  # @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
30
30
  # @param date_of_birth [Date]
31
- # @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
31
+ # @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex]
32
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
33
33
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Subscriber]
34
- def initialize(name:, date_of_birth:, gender:, additional_properties: nil)
34
+ def initialize(name:, date_of_birth:, biological_sex:, additional_properties: nil)
35
35
  @name = name
36
36
  @date_of_birth = date_of_birth
37
- @gender = gender
37
+ @biological_sex = biological_sex
38
38
  @additional_properties = additional_properties
39
- @_field_set = { "name": name, "date_of_birth": date_of_birth, "gender": gender }
39
+ @_field_set = { "name": name, "date_of_birth": date_of_birth, "biological_sex": biological_sex }
40
40
  end
41
41
 
42
42
  # Deserialize a JSON object to an instance of Subscriber
@@ -53,11 +53,11 @@ module CandidApiClient
53
53
  name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
54
54
  end
55
55
  date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
56
- gender = struct["gender"]
56
+ biological_sex = struct["biological_sex"]
57
57
  new(
58
58
  name: name,
59
59
  date_of_birth: date_of_birth,
60
- gender: gender,
60
+ biological_sex: biological_sex,
61
61
  additional_properties: struct
62
62
  )
63
63
  end
@@ -78,7 +78,7 @@ module CandidApiClient
78
78
  def self.validate_raw(obj:)
79
79
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
80
80
  obj.date_of_birth.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
81
- obj.gender.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
81
+ obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
82
82
  end
83
83
  end
84
84
  end
@@ -70,14 +70,14 @@ module CandidApiClient
70
70
  # * :external_id (String)
71
71
  # * :system_name (String)
72
72
  # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
73
- # * :general_practitioners (Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>)
73
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
74
74
  # * :filing_order (Hash)
75
75
  # * :coverages (Array<String>)
76
76
  # @param request_options [CandidApiClient::RequestOptions]
77
77
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
78
78
  # @example
79
79
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
80
- # api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, gender: MAN, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ name: { }, npi: "string", telecoms: [{ }], addresses: [{ }], period: { } }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
80
+ # api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
81
81
  def create(request:, request_options: nil)
82
82
  response = @request_client.conn.post do |req|
83
83
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -196,7 +196,7 @@ module CandidApiClient
196
196
  # * :external_id (String)
197
197
  # * :system_name (String)
198
198
  # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
199
- # * :general_practitioners (Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>)
199
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
200
200
  # * :filing_order (Hash)
201
201
  # * :coverages (Array<String>)
202
202
  # @param request_options [CandidApiClient::RequestOptions]
@@ -206,7 +206,7 @@ module CandidApiClient
206
206
  # api.pre_encounter.patients.v_1.update(
207
207
  # id: "string",
208
208
  # version: "string",
209
- # request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, gender: MAN, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ name: { }, npi: "string", telecoms: [{ }], addresses: [{ }], period: { } }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
209
+ # request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
210
210
  # )
211
211
  def update(id:, version:, request:, request_options: nil)
212
212
  response = @request_client.conn.put do |req|
@@ -370,14 +370,14 @@ module CandidApiClient
370
370
  # * :external_id (String)
371
371
  # * :system_name (String)
372
372
  # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
373
- # * :general_practitioners (Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>)
373
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
374
374
  # * :filing_order (Hash)
375
375
  # * :coverages (Array<String>)
376
376
  # @param request_options [CandidApiClient::RequestOptions]
377
377
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
378
378
  # @example
379
379
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
380
- # api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, gender: MAN, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ name: { }, npi: "string", telecoms: [{ }], addresses: [{ }], period: { } }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
380
+ # api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
381
381
  def create(request:, request_options: nil)
382
382
  Async do
383
383
  response = @request_client.conn.post do |req|
@@ -502,7 +502,7 @@ module CandidApiClient
502
502
  # * :external_id (String)
503
503
  # * :system_name (String)
504
504
  # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
505
- # * :general_practitioners (Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>)
505
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
506
506
  # * :filing_order (Hash)
507
507
  # * :coverages (Array<String>)
508
508
  # @param request_options [CandidApiClient::RequestOptions]
@@ -512,7 +512,7 @@ module CandidApiClient
512
512
  # api.pre_encounter.patients.v_1.update(
513
513
  # id: "string",
514
514
  # version: "string",
515
- # request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, gender: MAN, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ name: { }, npi: "string", telecoms: [{ }], addresses: [{ }], period: { } }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
515
+ # request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
516
516
  # )
517
517
  def update(id:, version:, request:, request_options: nil)
518
518
  Async do
@@ -2,7 +2,6 @@
2
2
 
3
3
  require_relative "../../../common/types/relationship"
4
4
  require_relative "../../../common/types/human_name"
5
- require_relative "../../../common/types/gender"
6
5
  require_relative "../../../common/types/contact_point"
7
6
  require_relative "../../../common/types/address"
8
7
  require_relative "../../../common/types/period"
@@ -19,8 +18,6 @@ module CandidApiClient
19
18
  attr_reader :relationship
20
19
  # @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
21
20
  attr_reader :name
22
- # @return [CandidApiClient::PreEncounter::Common::Types::Gender]
23
- attr_reader :gender
24
21
  # @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
25
22
  attr_reader :telecoms
26
23
  # @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
@@ -37,17 +34,14 @@ module CandidApiClient
37
34
 
38
35
  # @param relationship [Array<CandidApiClient::PreEncounter::Common::Types::Relationship>]
39
36
  # @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
40
- # @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
41
37
  # @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
42
38
  # @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
43
39
  # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
44
40
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
45
41
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Contact]
46
- def initialize(relationship:, name:, telecoms:, addresses:, gender: OMIT, period: OMIT,
47
- additional_properties: nil)
42
+ def initialize(relationship:, name:, telecoms:, addresses:, period: OMIT, additional_properties: nil)
48
43
  @relationship = relationship
49
44
  @name = name
50
- @gender = gender if gender != OMIT
51
45
  @telecoms = telecoms
52
46
  @addresses = addresses
53
47
  @period = period if period != OMIT
@@ -55,7 +49,6 @@ module CandidApiClient
55
49
  @_field_set = {
56
50
  "relationship": relationship,
57
51
  "name": name,
58
- "gender": gender,
59
52
  "telecoms": telecoms,
60
53
  "addresses": addresses,
61
54
  "period": period
@@ -78,7 +71,6 @@ module CandidApiClient
78
71
  name = parsed_json["name"].to_json
79
72
  name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
80
73
  end
81
- gender = struct["gender"]
82
74
  telecoms = parsed_json["telecoms"]&.map do |item|
83
75
  item = item.to_json
84
76
  CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
@@ -96,7 +88,6 @@ module CandidApiClient
96
88
  new(
97
89
  relationship: relationship,
98
90
  name: name,
99
- gender: gender,
100
91
  telecoms: telecoms,
101
92
  addresses: addresses,
102
93
  period: period,
@@ -120,7 +111,6 @@ module CandidApiClient
120
111
  def self.validate_raw(obj:)
121
112
  obj.relationship.is_a?(Array) != false || raise("Passed value for field obj.relationship is not the expected type, validation failed.")
122
113
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
123
- obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
124
114
  obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
125
115
  obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
126
116
  obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
@@ -13,7 +13,7 @@ require_relative "../../../common/types/address"
13
13
  require_relative "../../../common/types/contact_point"
14
14
  require_relative "external_provenance"
15
15
  require_relative "contact"
16
- require_relative "external_provider"
16
+ require_relative "../../../common/types/external_provider"
17
17
  require_relative "filing_order"
18
18
  require "ostruct"
19
19
  require "json"
@@ -35,7 +35,9 @@ module CandidApiClient
35
35
  attr_reader :birth_date
36
36
  # @return [String]
37
37
  attr_reader :social_security_number
38
- # @return [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient.
38
+ # @return [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
39
+ # AdministrativeGender
40
+ # https://www.hl7.org/fhir/valueset-administrative-gender.html
39
41
  attr_reader :biological_sex
40
42
  # @return [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
41
43
  attr_reader :sexual_orientation
@@ -73,7 +75,7 @@ module CandidApiClient
73
75
  attr_reader :external_provenance
74
76
  # @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
75
77
  attr_reader :contacts
76
- # @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>]
78
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
77
79
  attr_reader :general_practitioners
78
80
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
79
81
  attr_reader :filing_order
@@ -90,7 +92,9 @@ module CandidApiClient
90
92
  # @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
91
93
  # @param birth_date [Date]
92
94
  # @param social_security_number [String]
93
- # @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient.
95
+ # @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
96
+ # AdministrativeGender
97
+ # https://www.hl7.org/fhir/valueset-administrative-gender.html
94
98
  # @param sexual_orientation [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
95
99
  # @param race [CandidApiClient::PreEncounter::Common::Types::Race]
96
100
  # @param ethnicity [CandidApiClient::PreEncounter::Common::Types::Ethnicity]
@@ -110,18 +114,18 @@ module CandidApiClient
110
114
  # @param external_provenance [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance] Information about the upstream system that owns this patient data. Leave unset
111
115
  # if Candid owns patient data.
112
116
  # @param contacts [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
113
- # @param general_practitioners [Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>]
117
+ # @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
114
118
  # @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
115
119
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
116
120
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
117
- def initialize(name:, other_names:, gender:, birth_date:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, social_security_number: OMIT,
118
- biological_sex: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
121
+ def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
122
+ primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
119
123
  @name = name
120
124
  @other_names = other_names
121
- @gender = gender
125
+ @gender = gender if gender != OMIT
122
126
  @birth_date = birth_date
123
127
  @social_security_number = social_security_number if social_security_number != OMIT
124
- @biological_sex = biological_sex if biological_sex != OMIT
128
+ @biological_sex = biological_sex
125
129
  @sexual_orientation = sexual_orientation if sexual_orientation != OMIT
126
130
  @race = race if race != OMIT
127
131
  @ethnicity = ethnicity if ethnicity != OMIT
@@ -239,7 +243,7 @@ module CandidApiClient
239
243
  end
240
244
  general_practitioners = parsed_json["general_practitioners"]&.map do |item|
241
245
  item = item.to_json
242
- CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider.from_json(json_object: item)
246
+ CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: item)
243
247
  end
244
248
  if parsed_json["filing_order"].nil?
245
249
  filing_order = nil
@@ -293,10 +297,10 @@ module CandidApiClient
293
297
  def self.validate_raw(obj:)
294
298
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
295
299
  obj.other_names.is_a?(Array) != false || raise("Passed value for field obj.other_names is not the expected type, validation failed.")
296
- obj.gender.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
300
+ obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
297
301
  obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
298
302
  obj.social_security_number&.is_a?(String) != false || raise("Passed value for field obj.social_security_number is not the expected type, validation failed.")
299
- obj.biological_sex&.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
303
+ obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
300
304
  obj.sexual_orientation&.is_a?(CandidApiClient::PreEncounter::Common::Types::SexualOrientation) != false || raise("Passed value for field obj.sexual_orientation is not the expected type, validation failed.")
301
305
  obj.race&.is_a?(CandidApiClient::PreEncounter::Common::Types::Race) != false || raise("Passed value for field obj.race is not the expected type, validation failed.")
302
306
  obj.ethnicity&.is_a?(CandidApiClient::PreEncounter::Common::Types::Ethnicity) != false || raise("Passed value for field obj.ethnicity is not the expected type, validation failed.")
@@ -13,7 +13,7 @@ require_relative "../../../common/types/address"
13
13
  require_relative "../../../common/types/contact_point"
14
14
  require_relative "external_provenance"
15
15
  require_relative "contact"
16
- require_relative "external_provider"
16
+ require_relative "../../../common/types/external_provider"
17
17
  require_relative "filing_order"
18
18
  require "ostruct"
19
19
  require "json"
@@ -53,7 +53,9 @@ module CandidApiClient
53
53
  attr_reader :birth_date
54
54
  # @return [String]
55
55
  attr_reader :social_security_number
56
- # @return [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient.
56
+ # @return [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
57
+ # AdministrativeGender
58
+ # https://www.hl7.org/fhir/valueset-administrative-gender.html
57
59
  attr_reader :biological_sex
58
60
  # @return [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
59
61
  attr_reader :sexual_orientation
@@ -91,7 +93,7 @@ module CandidApiClient
91
93
  attr_reader :external_provenance
92
94
  # @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
93
95
  attr_reader :contacts
94
- # @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>]
96
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
95
97
  attr_reader :general_practitioners
96
98
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
97
99
  attr_reader :filing_order
@@ -119,7 +121,9 @@ module CandidApiClient
119
121
  # @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
120
122
  # @param birth_date [Date]
121
123
  # @param social_security_number [String]
122
- # @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient.
124
+ # @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
125
+ # AdministrativeGender
126
+ # https://www.hl7.org/fhir/valueset-administrative-gender.html
123
127
  # @param sexual_orientation [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
124
128
  # @param race [CandidApiClient::PreEncounter::Common::Types::Race]
125
129
  # @param ethnicity [CandidApiClient::PreEncounter::Common::Types::Ethnicity]
@@ -139,12 +143,12 @@ module CandidApiClient
139
143
  # @param external_provenance [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance] Information about the upstream system that owns this patient data. Leave unset
140
144
  # if Candid owns patient data.
141
145
  # @param contacts [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
142
- # @param general_practitioners [Array<CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider>]
146
+ # @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
143
147
  # @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
144
148
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
145
149
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
146
150
  def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
147
- other_names:, gender:, birth_date:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, social_security_number: OMIT, biological_sex: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
151
+ other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
148
152
  @id = id
149
153
  @mrn = mrn
150
154
  @organization_id = organization_id
@@ -154,10 +158,10 @@ module CandidApiClient
154
158
  @updating_user_id = updating_user_id
155
159
  @name = name
156
160
  @other_names = other_names
157
- @gender = gender
161
+ @gender = gender if gender != OMIT
158
162
  @birth_date = birth_date
159
163
  @social_security_number = social_security_number if social_security_number != OMIT
160
- @biological_sex = biological_sex if biological_sex != OMIT
164
+ @biological_sex = biological_sex
161
165
  @sexual_orientation = sexual_orientation if sexual_orientation != OMIT
162
166
  @race = race if race != OMIT
163
167
  @ethnicity = ethnicity if ethnicity != OMIT
@@ -289,7 +293,7 @@ module CandidApiClient
289
293
  end
290
294
  general_practitioners = parsed_json["general_practitioners"]&.map do |item|
291
295
  item = item.to_json
292
- CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider.from_json(json_object: item)
296
+ CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: item)
293
297
  end
294
298
  if parsed_json["filing_order"].nil?
295
299
  filing_order = nil
@@ -357,10 +361,10 @@ module CandidApiClient
357
361
  obj.updating_user_id.is_a?(String) != false || raise("Passed value for field obj.updating_user_id is not the expected type, validation failed.")
358
362
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
359
363
  obj.other_names.is_a?(Array) != false || raise("Passed value for field obj.other_names is not the expected type, validation failed.")
360
- obj.gender.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
364
+ obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
361
365
  obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
362
366
  obj.social_security_number&.is_a?(String) != false || raise("Passed value for field obj.social_security_number is not the expected type, validation failed.")
363
- obj.biological_sex&.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
367
+ obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
364
368
  obj.sexual_orientation&.is_a?(CandidApiClient::PreEncounter::Common::Types::SexualOrientation) != false || raise("Passed value for field obj.sexual_orientation is not the expected type, validation failed.")
365
369
  obj.race&.is_a?(CandidApiClient::PreEncounter::Common::Types::Race) != false || raise("Passed value for field obj.race is not the expected type, validation failed.")
366
370
  obj.ethnicity&.is_a?(CandidApiClient::PreEncounter::Common::Types::Ethnicity) != false || raise("Passed value for field obj.ethnicity is not the expected type, validation failed.")
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.5" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.7" }
47
47
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module CandidApiClient
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.5" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.7" }
91
91
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -240,10 +240,10 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/network_type"
240
240
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/insurance_plan"
241
241
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage"
242
242
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage"
243
+ require_relative "candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code"
243
244
  require_relative "candidhealth/pre_encounter/patients/v_1/types/marital_status"
244
245
  require_relative "candidhealth/pre_encounter/patients/v_1/types/external_provenance"
245
246
  require_relative "candidhealth/pre_encounter/patients/v_1/types/contact"
246
- require_relative "candidhealth/pre_encounter/patients/v_1/types/external_provider"
247
247
  require_relative "candidhealth/pre_encounter/patients/v_1/types/filing_order"
248
248
  require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient"
249
249
  require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
@@ -350,3 +350,5 @@ require_relative "candidhealth/pre_encounter/common/types/contact_point"
350
350
  require_relative "candidhealth/pre_encounter/common/types/error_base"
351
351
  require_relative "candidhealth/pre_encounter/common/types/not_found_error_body"
352
352
  require_relative "candidhealth/pre_encounter/common/types/version_conflict_error_body"
353
+ require_relative "candidhealth/pre_encounter/common/types/external_provider_type"
354
+ require_relative "candidhealth/pre_encounter/common/types/external_provider"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.5
4
+ version: 0.24.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
11
+ date: 2024-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -419,6 +419,8 @@ files:
419
419
  - lib/candidhealth/pre_encounter/common/types/disability_status.rb
420
420
  - lib/candidhealth/pre_encounter/common/types/error_base.rb
421
421
  - lib/candidhealth/pre_encounter/common/types/ethnicity.rb
422
+ - lib/candidhealth/pre_encounter/common/types/external_provider.rb
423
+ - lib/candidhealth/pre_encounter/common/types/external_provider_type.rb
422
424
  - lib/candidhealth/pre_encounter/common/types/gender.rb
423
425
  - lib/candidhealth/pre_encounter/common/types/human_name.rb
424
426
  - lib/candidhealth/pre_encounter/common/types/name_use.rb
@@ -434,6 +436,7 @@ files:
434
436
  - lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb
435
437
  - lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_status.rb
436
438
  - lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb
439
+ - lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb
437
440
  - lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb
438
441
  - lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb
439
442
  - lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb
@@ -441,7 +444,6 @@ files:
441
444
  - lib/candidhealth/pre_encounter/patients/v_1/client.rb
442
445
  - lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb
443
446
  - lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb
444
- - lib/candidhealth/pre_encounter/patients/v_1/types/external_provider.rb
445
447
  - lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb
446
448
  - lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb
447
449
  - lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb
@@ -1,122 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../../../common/types/human_name"
4
- require_relative "../../../common/types/contact_point"
5
- require_relative "../../../common/types/address"
6
- require_relative "../../../common/types/period"
7
- require "ostruct"
8
- require "json"
9
-
10
- module CandidApiClient
11
- module PreEncounter
12
- module Patients
13
- module V1
14
- module Types
15
- class ExternalProvider
16
- # @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
17
- attr_reader :name
18
- # @return [String]
19
- attr_reader :npi
20
- # @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
21
- attr_reader :telecoms
22
- # @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
23
- attr_reader :addresses
24
- # @return [CandidApiClient::PreEncounter::Common::Types::Period]
25
- attr_reader :period
26
- # @return [OpenStruct] Additional properties unmapped to the current class definition
27
- attr_reader :additional_properties
28
- # @return [Object]
29
- attr_reader :_field_set
30
- protected :_field_set
31
-
32
- OMIT = Object.new
33
-
34
- # @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
35
- # @param npi [String]
36
- # @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
37
- # @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
38
- # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
39
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
40
- # @return [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider]
41
- def initialize(name:, npi:, telecoms:, addresses:, period: OMIT, additional_properties: nil)
42
- @name = name
43
- @npi = npi
44
- @telecoms = telecoms
45
- @addresses = addresses
46
- @period = period if period != OMIT
47
- @additional_properties = additional_properties
48
- @_field_set = {
49
- "name": name,
50
- "npi": npi,
51
- "telecoms": telecoms,
52
- "addresses": addresses,
53
- "period": period
54
- }.reject do |_k, v|
55
- v == OMIT
56
- end
57
- end
58
-
59
- # Deserialize a JSON object to an instance of ExternalProvider
60
- #
61
- # @param json_object [String]
62
- # @return [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvider]
63
- def self.from_json(json_object:)
64
- struct = JSON.parse(json_object, object_class: OpenStruct)
65
- parsed_json = JSON.parse(json_object)
66
- if parsed_json["name"].nil?
67
- name = nil
68
- else
69
- name = parsed_json["name"].to_json
70
- name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
71
- end
72
- npi = struct["npi"]
73
- telecoms = parsed_json["telecoms"]&.map do |item|
74
- item = item.to_json
75
- CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
76
- end
77
- addresses = parsed_json["addresses"]&.map do |item|
78
- item = item.to_json
79
- CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
80
- end
81
- if parsed_json["period"].nil?
82
- period = nil
83
- else
84
- period = parsed_json["period"].to_json
85
- period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
86
- end
87
- new(
88
- name: name,
89
- npi: npi,
90
- telecoms: telecoms,
91
- addresses: addresses,
92
- period: period,
93
- additional_properties: struct
94
- )
95
- end
96
-
97
- # Serialize an instance of ExternalProvider to a JSON object
98
- #
99
- # @return [String]
100
- def to_json(*_args)
101
- @_field_set&.to_json
102
- end
103
-
104
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
105
- # hash and check each fields type against the current object's property
106
- # definitions.
107
- #
108
- # @param obj [Object]
109
- # @return [Void]
110
- def self.validate_raw(obj:)
111
- CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
112
- obj.npi.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
113
- obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
114
- obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
115
- obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
116
- end
117
- end
118
- end
119
- end
120
- end
121
- end
122
- end