org.mitre.midiki.workshop
Class DiagnosticTest

java.lang.Object
  |
  +--org.mitre.midiki.workshop.DiagnosticTest
All Implemented Interfaces:
java.io.Serializable

public class DiagnosticTest
extends java.lang.Object
implements java.io.Serializable

Represents a diagnostic test which can be used to confirm the presence or absence of a named symptom, a short text description of a positive test result, and whether the symptom diagnosed by the test must be present or absent. Typically, disease descriptions show those symptoms which must be present, while diagnosis queries may contain symptoms which have been identified as absent (as distinct from symptoms whose status is unknown).

Since:
1.0
See Also:
Serializable, Serialized Form

Field Summary
 java.lang.String name
          The name of the symptom.
 boolean present
          true if the symptom is present.
 boolean required
          true if the symptom is required vs suggestive.
 java.lang.String result
          The description of a positive test result.
 java.lang.String test
          The name of the appropriate test.
 
Constructor Summary
DiagnosticTest()
          Empty constructor.
DiagnosticTest(java.lang.String n, java.lang.String t, java.lang.String r, boolean q, boolean p)
          Creates a new DiagnosticTest instance.
 
Method Summary
 boolean matches(DiagnosticTest s)
          Returns true if the symptom matches the query.
 java.lang.String toString()
          Generates a string representation of the symptom.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the symptom.

test

public java.lang.String test
The name of the appropriate test.

result

public java.lang.String result
The description of a positive test result.

required

public boolean required
true if the symptom is required vs suggestive.

present

public boolean present
true if the symptom is present.
Constructor Detail

DiagnosticTest

public DiagnosticTest()
Empty constructor.

DiagnosticTest

public DiagnosticTest(java.lang.String n,
                      java.lang.String t,
                      java.lang.String r,
                      boolean q,
                      boolean p)
Creates a new DiagnosticTest instance.
Parameters:
n - a String value
t - a String value
r - a String value
q - a boolean value
p - a boolean value
Method Detail

toString

public java.lang.String toString()
Generates a string representation of the symptom.
Overrides:
toString in class java.lang.Object
Returns:
a String value

matches

public boolean matches(DiagnosticTest s)
Returns true if the symptom matches the query. Since synonyms are not considered, this is a less powerful match than the one performed by WorkshopDatabase in calculating a diagnosis.
Parameters:
s - a DiagnosticTest value
Returns:
a boolean value