Class: PixFeedPlan

Inherits:
PixPdqPlan show all
Defined in:
app/models/pix_feed_plan.rb

Defined Under Namespace

Modules: Actions

Instance Method Summary (collapse)

Methods inherited from TestPlan

#clone, completed_actions, #completed_actions, #count_errors, #count_warnings, manual_inspection, #manual_inspection?, manual_inspection?, normalize_name, #override_state!, #parameterized_name, #pending_actions, pending_actions, #test_actions, #test_name, test_name, test_types, #to_s

Instance Method Details

- (PatientIdentifier) expected

Get the expected PatientIdentifier value.



11
12
13
# File 'app/models/pix_feed_plan.rb', line 11

def expected
  PatientIdentifier.new(test_type_data || {})
end

- (Object) expected=(patient_identifier)

Set the expected PatientIdentifier value.



18
19
20
# File 'app/models/pix_feed_plan.rb', line 18

def expected= patient_identifier
  self.test_type_data = patient_identifier.attributes
end

- (true|false) matches_expected?(pi)

Compare the provided patient identifier to the expected value. This is the primary test used to determine pass/fail state.



27
28
29
30
# File 'app/models/pix_feed_plan.rb', line 27

def matches_expected? pi
  pi.patient_identifier == expected.patient_identifier &&
    pi.affinity_domain == expected.affinity_domain
end