Class: HealthcarePhony::VisitDischarge
- Inherits:
-
Object
- Object
- HealthcarePhony::VisitDischarge
- Defined in:
- lib/healthcare_phony/visit_discharge.rb
Overview
Public: Creates discharge information for a patient visit.
Instance Attribute Summary collapse
-
#datetime ⇒ Object
Returns the value of attribute datetime.
-
#disposition ⇒ Object
Returns the value of attribute disposition.
-
#location ⇒ Object
Returns the value of attribute location.
Instance Method Summary collapse
-
#initialize(init_args = {}) ⇒ VisitDischarge
constructor
Public: Initializes an EthnicGroup.
Constructor Details
#initialize(init_args = {}) ⇒ VisitDischarge
Public: Initializes an EthnicGroup. Pass in hash of different parameters, currently this includes: visit_type - VisitType of this patient’s visit discharge_disposition - Array of discharge disposition codes (PV1.36) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0112 values are used. discharge_location - Array of discharge locations to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a string of data is generated with Faker::Lorem.sentence admit_datetime - The admit date/time associated with this visit. If not specified the current date/time is used.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/healthcare_phony/visit_discharge.rb', line 17 def initialize(init_args = {}) if init_args[:visit_type] == HealthcarePhony::VisitType::DISCHARGE # init_args[:event_type] == 'A03' @disposition = define_discharge_disposition(init_args) @location = define_discharge_location(init_args) @datetime = define_discharge_datetime(init_args) else @disposition = '' @location = '' @datetime = nil end end |
Instance Attribute Details
#datetime ⇒ Object
Returns the value of attribute datetime.
6 7 8 |
# File 'lib/healthcare_phony/visit_discharge.rb', line 6 def datetime @datetime end |
#disposition ⇒ Object
Returns the value of attribute disposition.
6 7 8 |
# File 'lib/healthcare_phony/visit_discharge.rb', line 6 def disposition @disposition end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/healthcare_phony/visit_discharge.rb', line 6 def location @location end |