Class: Renalware::HD::SessionFactory
- Inherits:
-
Object
- Object
- Renalware::HD::SessionFactory
- Defined in:
- app/models/renalware/hd/session_factory.rb
Instance Attribute Summary collapse
-
#patient ⇒ Object
readonly
Returns the value of attribute patient.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(patient:, user:, type: nil) ⇒ SessionFactory
constructor
The optional :type argument has been passed into the controller as a query string parameter.
Constructor Details
#initialize(patient:, user:, type: nil) ⇒ SessionFactory
The optional :type argument has been passed into the controller as a query string parameter. The only valid values are nil or “dna”. If “dna”, it is signifies we should build a Session::DNA object. Otherwise we always build a Session::Open.
13 14 15 16 17 |
# File 'app/models/renalware/hd/session_factory.rb', line 13 def initialize(patient:, user:, type: nil) @patient = patient @user = user @type = type end |
Instance Attribute Details
#patient ⇒ Object (readonly)
Returns the value of attribute patient.
8 9 10 |
# File 'app/models/renalware/hd/session_factory.rb', line 8 def patient @patient end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'app/models/renalware/hd/session_factory.rb', line 8 def type @type end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'app/models/renalware/hd/session_factory.rb', line 8 def user @user end |
Instance Method Details
#build ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/models/renalware/hd/session_factory.rb', line 19 def build session = build_session apply_profile(session) set_default_access(session) build_prescription_administrations(session) session end |