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

#expectedPatientIdentifier

Get the expected PatientIdentifier value.

Returns:



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

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

#expected=(patient_identifier) ⇒ Object

Set the expected PatientIdentifier value.

Parameters:



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

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

#matches_expected?(pi) ⇒ true|false

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

Parameters:

Returns:

  • (true|false)

    true if pi matches expected, false otherwise.



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