@Entity public class Allergy extends BaseFormRecordableOpenmrsData
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
FORM_NAMESPACE_PATH_MAX_LENGTH, FORM_NAMESPACE_PATH_SEPARATOR, formNamespaceAndPath
creator
Constructor and Description |
---|
Allergy()
Default constructor
|
Allergy(Patient patient,
Allergen allergen,
Concept severity,
String comments,
List<AllergyReaction> reactions) |
Modifier and Type | Method and Description |
---|---|
boolean |
addReaction(AllergyReaction reaction)
Adds a new allergy reaction
|
void |
copy(Allergy allergy)
Copies all property values, apart from the id and uuid,
from the given allergy into this object
|
Allergen |
getAllergen() |
AllergenType |
getAllergenType() |
Integer |
getAllergyId() |
AllergyReaction |
getAllergyReaction(Integer allergyReactionId)
Gets an allergy reaction with a given id
|
String |
getComment()
Deprecated.
as of 2.3.0, replaced by
getComments() |
String |
getComments() |
Date |
getDateLastUpdated() |
Encounter |
getEncounter()
Basic property getter for encounter
|
Integer |
getId() |
Patient |
getPatient() |
AllergyReaction |
getReaction(Concept concept)
Gets the reaction with a given concept
|
String |
getReactionNonCoded() |
List<AllergyReaction> |
getReactions() |
Concept |
getSeverity() |
boolean |
hasSameAllergen(Allergy allergy)
Checks if we have the same allergen as that in the given allergy
|
boolean |
hasSameValues(Allergy allergy)
Checks if this allergy has the same values as a given one.
|
boolean |
removeReaction(AllergyReaction reaction)
Removes an allergy reaction
|
void |
setAllergen(Allergen allergen) |
void |
setAllergenType(AllergenType allergenType)
set the allergyType of the Allergy
|
void |
setAllergenType(String type)
set the allergyType of the Allergy.
|
void |
setAllergyId(Integer allergyId) |
void |
setComment(String comment)
Deprecated.
as of 2.3.0, replaced by
setComments(String) |
void |
setComments(String comments) |
void |
setEncounter(Encounter encounter)
Basic property setter for encounter
|
void |
setId(Integer allergyId) |
void |
setPatient(Patient patient) |
void |
setReactions(List<AllergyReaction> reactions) |
void |
setSeverity(Concept severity) |
getFormFieldNamespace, getFormFieldNamespace, getFormFieldPath, getFormFieldPath, getFormNamespaceAndPath, getFormNamespaceAndPath, setFormField, setFormNamespaceAndPath
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, setUuid, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public Integer getAllergyId()
public void setAllergyId(Integer allergyId)
allergyId
- the allergyId to setpublic Integer getId()
OpenmrsObject.getId()
public void setId(Integer allergyId)
allergyId
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public Patient getPatient()
public void setPatient(Patient patient)
patient
- the patient to setpublic AllergenType getAllergenType()
public void setAllergenType(AllergenType allergenType)
allergenType
- the allergyType to setpublic void setAllergenType(String type)
AllergenType
, according to the given String type.type
- the allergyType to setpublic Allergen getAllergen()
public void setAllergen(Allergen allergen)
allergen
- the allergen to setpublic Concept getSeverity()
public void setSeverity(Concept severity)
severity
- the severity to set@Deprecated public String getComment()
getComments()
@Deprecated public void setComment(String comment)
setComments(String)
comment
- the comment to setpublic String getComments()
public void setComments(String comments)
comments
- the comments to setpublic List<AllergyReaction> getReactions()
public void setReactions(List<AllergyReaction> reactions)
reactions
- the reactions to setpublic boolean addReaction(AllergyReaction reaction)
reaction
- the reaction to addpublic boolean removeReaction(AllergyReaction reaction)
reaction
- the reaction to removepublic Date getDateLastUpdated()
public boolean hasSameValues(Allergy allergy)
allergy
- the allergy whose values to compare withpublic AllergyReaction getAllergyReaction(Integer allergyReactionId)
allergyReactionId
- the allergy reaction idpublic void copy(Allergy allergy)
allergy
- the allergy whose property values to copyInvocationTargetException
IllegalAccessException
public String getReactionNonCoded()
public AllergyReaction getReaction(Concept concept)
concept
- the conceptpublic boolean hasSameAllergen(Allergy allergy)
allergy
- the given allergy whose allergen to checkpublic Encounter getEncounter()
public void setEncounter(Encounter encounter)
encounter
- - the encounter to setCopyright © 2024 OpenMRS Inc.. All rights reserved.