org.mitre.midiki.workshop
Class MedicalHistory

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

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

Represents an item in the patient's medical history which is suggestive of a particular disease. Typically, disease descriptions show those historys which must be present, while diagnosis queries may contain historys which have been identified as absent (as distinct from historys whose status is unknown).

Since:
1.0
See Also:
Serializable, Serialized Form

Field Summary
 java.lang.String name
          The name of the history.
 boolean present
          true if the history is present.
 boolean required
          true if the symptom is required vs suggestive.
 
Constructor Summary
MedicalHistory()
          Empty constructor.
MedicalHistory(java.lang.String n, boolean q, boolean p)
          Creates a new MedicalHistory instance.
 
Method Summary
 boolean matches(MedicalHistory s)
          Returns true if the history matches the query.
 java.lang.String toString()
          Generates a string representation of the history.
 
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 history.

required

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

present

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

MedicalHistory

public MedicalHistory()
Empty constructor.

MedicalHistory

public MedicalHistory(java.lang.String n,
                      boolean q,
                      boolean p)
Creates a new MedicalHistory instance.
Parameters:
n - 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 history.
Overrides:
toString in class java.lang.Object
Returns:
a String value

matches

public boolean matches(MedicalHistory s)
Returns true if the history 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 MedicalHistory value
Returns:
a boolean value