Class: HealthcarePhony::VisitLocation
- Inherits:
-
Object
- Object
- HealthcarePhony::VisitLocation
- Defined in:
- lib/healthcare_phony/visit_location.rb
Overview
Public: Generates various location information associated with a visit.
Instance Attribute Summary collapse
-
#bed ⇒ Object
Returns the value of attribute bed.
-
#building ⇒ Object
Returns the value of attribute building.
-
#description ⇒ Object
Returns the value of attribute description.
-
#facility ⇒ Object
Returns the value of attribute facility.
-
#floor ⇒ Object
Returns the value of attribute floor.
-
#point_of_care ⇒ Object
Returns the value of attribute point_of_care.
-
#room ⇒ Object
Returns the value of attribute room.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(**init_args) ⇒ VisitLocation
constructor
Public: Initializes an Address.
Constructor Details
#initialize(**init_args) ⇒ VisitLocation
Public: Initializes an Address. Pass in hash of different parameters, currently this includes: point_of_care - Array of potential points of care (PV1.3.1) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise random example generated. room - Array of potential rooms (PV1.3.2) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random 3 digit number is generated. bed - Array of potential beds (PV1.3.3) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a 3 character sequence is created. facility - Array of potential facility names (PV1.3.4) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random string is generated. location_status - Array of potential location statuses (PV1.3.5) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random uppercase letter is generated to use. person_location_type - Array of potential person location types (PV1.3.6) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise values from HL7 v2.5.1 Table 0305 will be used. building - Array of potential building information (PV1.3.7) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random digit 1-9 is used. floor - Array of potential floor information (PV1.3.8) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random 2 digit number is used. location_description - Array of potential location descriptions (PV1.3.9) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random string is generated.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/healthcare_phony/visit_location.rb', line 35 def initialize(**init_args) @point_of_care = define_point_of_care(init_args) @room = define_room(init_args) @bed = define_bed(init_args) @facility = define_facility(init_args) @status = define_status(init_args) @type = define_type(init_args) @building = define_building(init_args) @floor = define_floor(init_args) @description = define_description(init_args) end |
Instance Attribute Details
#bed ⇒ Object
Returns the value of attribute bed.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def bed @bed end |
#building ⇒ Object
Returns the value of attribute building.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def building @building end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def description @description end |
#facility ⇒ Object
Returns the value of attribute facility.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def facility @facility end |
#floor ⇒ Object
Returns the value of attribute floor.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def floor @floor end |
#point_of_care ⇒ Object
Returns the value of attribute point_of_care.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def point_of_care @point_of_care end |
#room ⇒ Object
Returns the value of attribute room.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def room @room end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def status @status end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/healthcare_phony/visit_location.rb', line 6 def type @type end |