Class: CandidApiClient::Encounters::V4::Types::VitalsUpdate
- Inherits:
-
Object
- Object
- CandidApiClient::Encounters::V4::Types::VitalsUpdate
- Defined in:
- lib/candidhealth/encounters/v_4/types/vitals_update.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #blood_pressure_diastolic_mmhg ⇒ Integer readonly
- #blood_pressure_systolic_mmhg ⇒ Integer readonly
- #body_temperature_f ⇒ Float readonly
- #height_in ⇒ Integer readonly
- #hematocrit_pct ⇒ Float readonly
- #hemoglobin_gdl ⇒ Float readonly
- #weight_lbs ⇒ Integer readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::Encounters::V4::Types::VitalsUpdate
Deserialize a JSON object to an instance of VitalsUpdate.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(height_in: OMIT, weight_lbs: OMIT, blood_pressure_systolic_mmhg: OMIT, blood_pressure_diastolic_mmhg: OMIT, body_temperature_f: OMIT, hemoglobin_gdl: OMIT, hematocrit_pct: OMIT, additional_properties: nil) ⇒ CandidApiClient::Encounters::V4::Types::VitalsUpdate constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of VitalsUpdate to a JSON object.
Constructor Details
#initialize(height_in: OMIT, weight_lbs: OMIT, blood_pressure_systolic_mmhg: OMIT, blood_pressure_diastolic_mmhg: OMIT, body_temperature_f: OMIT, hemoglobin_gdl: OMIT, hematocrit_pct: OMIT, additional_properties: nil) ⇒ CandidApiClient::Encounters::V4::Types::VitalsUpdate
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 42 def initialize(height_in: OMIT, weight_lbs: OMIT, blood_pressure_systolic_mmhg: OMIT, blood_pressure_diastolic_mmhg: OMIT, body_temperature_f: OMIT, hemoglobin_gdl: OMIT, hematocrit_pct: OMIT, additional_properties: nil) @height_in = height_in if height_in != OMIT @weight_lbs = weight_lbs if weight_lbs != OMIT @blood_pressure_systolic_mmhg = blood_pressure_systolic_mmhg if blood_pressure_systolic_mmhg != OMIT @blood_pressure_diastolic_mmhg = blood_pressure_diastolic_mmhg if blood_pressure_diastolic_mmhg != OMIT @body_temperature_f = body_temperature_f if body_temperature_f != OMIT @hemoglobin_gdl = hemoglobin_gdl if hemoglobin_gdl != OMIT @hematocrit_pct = hematocrit_pct if hematocrit_pct != OMIT @additional_properties = additional_properties @_field_set = { "height_in": height_in, "weight_lbs": weight_lbs, "blood_pressure_systolic_mmhg": blood_pressure_systolic_mmhg, "blood_pressure_diastolic_mmhg": blood_pressure_diastolic_mmhg, "body_temperature_f": body_temperature_f, "hemoglobin_gdl": hemoglobin_gdl, "hematocrit_pct": hematocrit_pct }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
26 27 28 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 26 def additional_properties @additional_properties end |
#blood_pressure_diastolic_mmhg ⇒ Integer (readonly)
18 19 20 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 18 def blood_pressure_diastolic_mmhg @blood_pressure_diastolic_mmhg end |
#blood_pressure_systolic_mmhg ⇒ Integer (readonly)
16 17 18 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 16 def blood_pressure_systolic_mmhg @blood_pressure_systolic_mmhg end |
#body_temperature_f ⇒ Float (readonly)
20 21 22 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 20 def body_temperature_f @body_temperature_f end |
#height_in ⇒ Integer (readonly)
12 13 14 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 12 def height_in @height_in end |
#hematocrit_pct ⇒ Float (readonly)
24 25 26 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 24 def hematocrit_pct @hematocrit_pct end |
#hemoglobin_gdl ⇒ Float (readonly)
22 23 24 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 22 def hemoglobin_gdl @hemoglobin_gdl end |
#weight_lbs ⇒ Integer (readonly)
14 15 16 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 14 def weight_lbs @weight_lbs end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::Encounters::V4::Types::VitalsUpdate
Deserialize a JSON object to an instance of VitalsUpdate
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 69 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) height_in = struct["height_in"] weight_lbs = struct["weight_lbs"] blood_pressure_systolic_mmhg = struct["blood_pressure_systolic_mmhg"] blood_pressure_diastolic_mmhg = struct["blood_pressure_diastolic_mmhg"] body_temperature_f = struct["body_temperature_f"] hemoglobin_gdl = struct["hemoglobin_gdl"] hematocrit_pct = struct["hematocrit_pct"] new( height_in: height_in, weight_lbs: weight_lbs, blood_pressure_systolic_mmhg: blood_pressure_systolic_mmhg, blood_pressure_diastolic_mmhg: blood_pressure_diastolic_mmhg, body_temperature_f: body_temperature_f, hemoglobin_gdl: hemoglobin_gdl, hematocrit_pct: hematocrit_pct, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
103 104 105 106 107 108 109 110 111 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 103 def self.validate_raw(obj:) obj.height_in&.is_a?(Integer) != false || raise("Passed value for field obj.height_in is not the expected type, validation failed.") obj.weight_lbs&.is_a?(Integer) != false || raise("Passed value for field obj.weight_lbs is not the expected type, validation failed.") obj.blood_pressure_systolic_mmhg&.is_a?(Integer) != false || raise("Passed value for field obj.blood_pressure_systolic_mmhg is not the expected type, validation failed.") obj.blood_pressure_diastolic_mmhg&.is_a?(Integer) != false || raise("Passed value for field obj.blood_pressure_diastolic_mmhg is not the expected type, validation failed.") obj.body_temperature_f&.is_a?(Float) != false || raise("Passed value for field obj.body_temperature_f is not the expected type, validation failed.") obj.hemoglobin_gdl&.is_a?(Float) != false || raise("Passed value for field obj.hemoglobin_gdl is not the expected type, validation failed.") obj.hematocrit_pct&.is_a?(Float) != false || raise("Passed value for field obj.hematocrit_pct is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of VitalsUpdate to a JSON object
93 94 95 |
# File 'lib/candidhealth/encounters/v_4/types/vitals_update.rb', line 93 def to_json(*_args) @_field_set&.to_json end |