Class: PrimaryConnectClient::OrderOrder
- Inherits:
-
Object
- Object
- PrimaryConnectClient::OrderOrder
- Defined in:
- lib/primary_connect_client/models/order_order.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#accession_date_time ⇒ Object
Timestamp when the specimen was received by the destination.
-
#application_order_id ⇒ Object
ID assigned by the application fulfilling the order.
-
#clinical_comments ⇒ Object
Clinically relevant comments regarding the order.
-
#clinical_info ⇒ Object
List of supplementary clinical information associated with the order.
-
#collection_date_time ⇒ Object
Timestamp when the specimen was collected (ISO-8601).
-
#collection_start_date_time ⇒ Object
Timestamp when the specimen was collected (ISO-8601).
-
#completion_date_time ⇒ Object
Timestamp when the results were composed into a report and released.
-
#diagnoses ⇒ Object
List of diagnoses associated with this order.
-
#expiration_date ⇒ Object
YYYY-MM-DD, Date when the order becomes invalid.
-
#external_ids ⇒ Object
Returns the value of attribute external_ids.
-
#id ⇒ Object
ID of the order assigned by the placing system.
-
#medication_administrations ⇒ Object
Array of medications administered to the subject.
-
#notes ⇒ Object
Order-level notes.
-
#ordering_facility ⇒ Object
Returns the value of attribute ordering_facility.
-
#ordering_provider ⇒ Object
Returns the value of attribute ordering_provider.
-
#priority ⇒ Object
Priority of the order.
-
#procedure ⇒ Object
Returns the value of attribute procedure.
-
#response_flag ⇒ Object
Specificity of the response requested from the receiving system.
-
#result_copy_providers ⇒ Object
Array of providers to be copied on the results.
-
#results ⇒ Object
List of result components.
-
#results_status ⇒ Object
Current overall status of the order.
-
#specimen ⇒ Object
Returns the value of attribute specimen.
-
#status ⇒ Object
The status of an order.
-
#transaction_date_time ⇒ Object
Timestamp when the order was placed (ISO-8601).
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OrderOrder
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ OrderOrder
Initializes the object
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/primary_connect_client/models/order_order.rb', line 180 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrder` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'application_order_id') self.application_order_id = attributes[:'application_order_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'transaction_date_time') self.transaction_date_time = attributes[:'transaction_date_time'] end if attributes.key?(:'collection_date_time') self.collection_date_time = attributes[:'collection_date_time'] end if attributes.key?(:'collection_start_date_time') self.collection_start_date_time = attributes[:'collection_start_date_time'] end if attributes.key?(:'completion_date_time') self.completion_date_time = attributes[:'completion_date_time'] end if attributes.key?(:'accession_date_time') self.accession_date_time = attributes[:'accession_date_time'] end if attributes.key?(:'expiration_date') self.expiration_date = attributes[:'expiration_date'] end if attributes.key?(:'specimen') self.specimen = attributes[:'specimen'] end if attributes.key?(:'medication_administrations') if (value = attributes[:'medication_administrations']).is_a?(Array) self.medication_administrations = value end end if attributes.key?(:'procedure') self.procedure = attributes[:'procedure'] end if attributes.key?(:'ordering_provider') self.ordering_provider = attributes[:'ordering_provider'] end if attributes.key?(:'result_copy_providers') if (value = attributes[:'result_copy_providers']).is_a?(Array) self.result_copy_providers = value end end if attributes.key?(:'ordering_facility') self.ordering_facility = attributes[:'ordering_facility'] end if attributes.key?(:'priority') self.priority = attributes[:'priority'] end if attributes.key?(:'diagnoses') if (value = attributes[:'diagnoses']).is_a?(Array) self.diagnoses = value end end if attributes.key?(:'clinical_comments') self.clinical_comments = attributes[:'clinical_comments'] end if attributes.key?(:'notes') if (value = attributes[:'notes']).is_a?(Array) self.notes = value end end if attributes.key?(:'clinical_info') if (value = attributes[:'clinical_info']).is_a?(Array) self.clinical_info = value end end if attributes.key?(:'results_status') self.results_status = attributes[:'results_status'] end if attributes.key?(:'response_flag') self.response_flag = attributes[:'response_flag'] end if attributes.key?(:'external_ids') if (value = attributes[:'external_ids']).is_a?(Array) self.external_ids = value end end if attributes.key?(:'results') if (value = attributes[:'results']).is_a?(Array) self.results = value end end end |
Instance Attribute Details
#accession_date_time ⇒ Object
Timestamp when the specimen was received by the destination. (ISO-8601)
40 41 42 |
# File 'lib/primary_connect_client/models/order_order.rb', line 40 def accession_date_time @accession_date_time end |
#application_order_id ⇒ Object
ID assigned by the application fulfilling the order
22 23 24 |
# File 'lib/primary_connect_client/models/order_order.rb', line 22 def application_order_id @application_order_id end |
#clinical_comments ⇒ Object
Clinically relevant comments regarding the order
66 67 68 |
# File 'lib/primary_connect_client/models/order_order.rb', line 66 def clinical_comments @clinical_comments end |
#clinical_info ⇒ Object
List of supplementary clinical information associated with the order. Often these are answers to Ask at Order Entry (AOE) questions.
72 73 74 |
# File 'lib/primary_connect_client/models/order_order.rb', line 72 def clinical_info @clinical_info end |
#collection_date_time ⇒ Object
Timestamp when the specimen was collected (ISO-8601)
31 32 33 |
# File 'lib/primary_connect_client/models/order_order.rb', line 31 def collection_date_time @collection_date_time end |
#collection_start_date_time ⇒ Object
Timestamp when the specimen was collected (ISO-8601)
34 35 36 |
# File 'lib/primary_connect_client/models/order_order.rb', line 34 def collection_start_date_time @collection_start_date_time end |
#completion_date_time ⇒ Object
Timestamp when the results were composed into a report and released. (ISO-8601)
37 38 39 |
# File 'lib/primary_connect_client/models/order_order.rb', line 37 def completion_date_time @completion_date_time end |
#diagnoses ⇒ Object
List of diagnoses associated with this order
63 64 65 |
# File 'lib/primary_connect_client/models/order_order.rb', line 63 def diagnoses @diagnoses end |
#expiration_date ⇒ Object
YYYY-MM-DD, Date when the order becomes invalid
43 44 45 |
# File 'lib/primary_connect_client/models/order_order.rb', line 43 def expiration_date @expiration_date end |
#external_ids ⇒ Object
Returns the value of attribute external_ids.
80 81 82 |
# File 'lib/primary_connect_client/models/order_order.rb', line 80 def external_ids @external_ids end |
#id ⇒ Object
ID of the order assigned by the placing system
19 20 21 |
# File 'lib/primary_connect_client/models/order_order.rb', line 19 def id @id end |
#medication_administrations ⇒ Object
Array of medications administered to the subject
48 49 50 |
# File 'lib/primary_connect_client/models/order_order.rb', line 48 def medication_administrations @medication_administrations end |
#notes ⇒ Object
Order-level notes
69 70 71 |
# File 'lib/primary_connect_client/models/order_order.rb', line 69 def notes @notes end |
#ordering_facility ⇒ Object
Returns the value of attribute ordering_facility.
57 58 59 |
# File 'lib/primary_connect_client/models/order_order.rb', line 57 def ordering_facility @ordering_facility end |
#ordering_provider ⇒ Object
Returns the value of attribute ordering_provider.
52 53 54 |
# File 'lib/primary_connect_client/models/order_order.rb', line 52 def ordering_provider @ordering_provider end |
#priority ⇒ Object
Priority of the order
60 61 62 |
# File 'lib/primary_connect_client/models/order_order.rb', line 60 def priority @priority end |
#procedure ⇒ Object
Returns the value of attribute procedure.
50 51 52 |
# File 'lib/primary_connect_client/models/order_order.rb', line 50 def procedure @procedure end |
#response_flag ⇒ Object
Specificity of the response requested from the receiving system
78 79 80 |
# File 'lib/primary_connect_client/models/order_order.rb', line 78 def response_flag @response_flag end |
#result_copy_providers ⇒ Object
Array of providers to be copied on the results
55 56 57 |
# File 'lib/primary_connect_client/models/order_order.rb', line 55 def result_copy_providers @result_copy_providers end |
#results ⇒ Object
List of result components
83 84 85 |
# File 'lib/primary_connect_client/models/order_order.rb', line 83 def results @results end |
#results_status ⇒ Object
Current overall status of the order
75 76 77 |
# File 'lib/primary_connect_client/models/order_order.rb', line 75 def results_status @results_status end |
#specimen ⇒ Object
Returns the value of attribute specimen.
45 46 47 |
# File 'lib/primary_connect_client/models/order_order.rb', line 45 def specimen @specimen end |
#status ⇒ Object
The status of an order.
25 26 27 |
# File 'lib/primary_connect_client/models/order_order.rb', line 25 def status @status end |
#transaction_date_time ⇒ Object
Timestamp when the order was placed (ISO-8601)
28 29 30 |
# File 'lib/primary_connect_client/models/order_order.rb', line 28 def transaction_date_time @transaction_date_time end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
138 139 140 |
# File 'lib/primary_connect_client/models/order_order.rb', line 138 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/primary_connect_client/models/order_order.rb', line 108 def self.attribute_map { :'id' => :'id', :'application_order_id' => :'applicationOrderId', :'status' => :'status', :'transaction_date_time' => :'transactionDateTime', :'collection_date_time' => :'collectionDateTime', :'collection_start_date_time' => :'collectionStartDateTime', :'completion_date_time' => :'completionDateTime', :'accession_date_time' => :'accessionDateTime', :'expiration_date' => :'expirationDate', :'specimen' => :'specimen', :'medication_administrations' => :'medicationAdministrations', :'procedure' => :'procedure', :'ordering_provider' => :'orderingProvider', :'result_copy_providers' => :'resultCopyProviders', :'ordering_facility' => :'orderingFacility', :'priority' => :'priority', :'diagnoses' => :'diagnoses', :'clinical_comments' => :'clinicalComments', :'notes' => :'notes', :'clinical_info' => :'clinicalInfo', :'results_status' => :'resultsStatus', :'response_flag' => :'responseFlag', :'external_ids' => :'externalIds', :'results' => :'results' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
411 412 413 |
# File 'lib/primary_connect_client/models/order_order.rb', line 411 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
173 174 175 176 |
# File 'lib/primary_connect_client/models/order_order.rb', line 173 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/primary_connect_client/models/order_order.rb', line 143 def self.openapi_types { :'id' => :'String', :'application_order_id' => :'String', :'status' => :'String', :'transaction_date_time' => :'Time', :'collection_date_time' => :'Time', :'collection_start_date_time' => :'Time', :'completion_date_time' => :'Time', :'accession_date_time' => :'Time', :'expiration_date' => :'String', :'specimen' => :'Specimen', :'medication_administrations' => :'Array<MedicationAdministration>', :'procedure' => :'CodedValue', :'ordering_provider' => :'Provider', :'result_copy_providers' => :'Array<Provider>', :'ordering_facility' => :'OrderOrderOrderingFacility', :'priority' => :'String', :'diagnoses' => :'Array<OrderOrderDiagnoses>', :'clinical_comments' => :'String', :'notes' => :'Array<String>', :'clinical_info' => :'Array<OrderOrderClinicalInfo>', :'results_status' => :'String', :'response_flag' => :'String', :'external_ids' => :'Array<Identifier>', :'results' => :'Array<Result>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/primary_connect_client/models/order_order.rb', line 367 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && application_order_id == o.application_order_id && status == o.status && transaction_date_time == o.transaction_date_time && collection_date_time == o.collection_date_time && collection_start_date_time == o.collection_start_date_time && completion_date_time == o.completion_date_time && accession_date_time == o.accession_date_time && expiration_date == o.expiration_date && specimen == o.specimen && medication_administrations == o.medication_administrations && procedure == o.procedure && ordering_provider == o.ordering_provider && result_copy_providers == o.result_copy_providers && ordering_facility == o.ordering_facility && priority == o.priority && diagnoses == o.diagnoses && clinical_comments == o.clinical_comments && notes == o.notes && clinical_info == o.clinical_info && results_status == o.results_status && response_flag == o.response_flag && external_ids == o.external_ids && results == o.results end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/primary_connect_client/models/order_order.rb', line 441 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = PrimaryConnectClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/primary_connect_client/models/order_order.rb', line 512 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/primary_connect_client/models/order_order.rb', line 418 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
398 399 400 |
# File 'lib/primary_connect_client/models/order_order.rb', line 398 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
404 405 406 |
# File 'lib/primary_connect_client/models/order_order.rb', line 404 def hash [id, application_order_id, status, transaction_date_time, collection_date_time, collection_start_date_time, completion_date_time, accession_date_time, expiration_date, specimen, medication_administrations, procedure, ordering_provider, result_copy_providers, ordering_facility, priority, diagnoses, clinical_comments, notes, clinical_info, results_status, response_flag, external_ids, results].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
306 307 308 309 |
# File 'lib/primary_connect_client/models/order_order.rb', line 306 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
488 489 490 |
# File 'lib/primary_connect_client/models/order_order.rb', line 488 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/primary_connect_client/models/order_order.rb', line 494 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
482 483 484 |
# File 'lib/primary_connect_client/models/order_order.rb', line 482 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/primary_connect_client/models/order_order.rb', line 313 def valid? status_validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW", "STATUS_REPORTED"]) return false unless status_validator.valid?(@status) priority_validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_ASAP", "PRIORITY_ROUTINE", "PRIORITY_PREOPERATIVE", "PRIORITY_TIMING_CRITICAL", "PRIORITY_STAT"]) return false unless priority_validator.valid?(@priority) results_status_validator = EnumAttributeValidator.new('String', ["UNAVAILABLE", "PRELIMINARY", "IN_PROCESS", "CORRECTED", "CANCELED", "FINAL"]) return false unless results_status_validator.valid?(@results_status) response_flag_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "EXCEPTIONS", "REPLACEMENTS", "ASSOCIATED_SEGMENTS", "CONFIRMATIONS", "ACKNOWLEDGEMENT"]) return false unless response_flag_validator.valid?(@response_flag) true end |