public class EncounterDisplayController.FieldHolder extends Object implements Comparable<EncounterDisplayController.FieldHolder>
Constructor and Description |
---|
FieldHolder(FormField formField,
Obs obsToAdd)
A row must be created with both a FormField to act as its label and an obs that is the
first of possibly several rows to display
|
Modifier and Type | Method and Description |
---|---|
void |
addObservation(Obs obsToAdd)
Add another obs grouper to this row This method shouldn't be called with obs that are
within another grouped obs.
|
int |
compareTo(EncounterDisplayController.FieldHolder other)
Use this row's FormField to make comparisons about where to put it in relation to the
FieldHolder's
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
FormField |
getFormField()
public getter method for the formfield that is the label for this row
|
Set<Concept> |
getGroupMemberConcepts()
public getter for the columns (that are unique concepts across all obs in this
FieldHolder)
|
String |
getLabel()
Convenience method to get the label that this field should have.
|
List<Obs> |
getObs()
public getter for the obs that are the different rows for this FieldHolder.
|
Map<Obs,List<List<Obs>>> |
getObsGroupMatrix()
List of columns for each obs grouper in this fieldholder.
|
Integer |
getPageNumber()
Convenience method to get the page number for this row.
|
int |
hashCode() |
boolean |
isObsGrouping()
Convenience method to know whether this row is an obs grouping and should be displayed
with a table or if its a single one-and-done obs and should just be shown as one value
|
public FieldHolder(FormField formField, Obs obsToAdd) throws Exception
Exception
- if the obsToAdd is an invalid type (meaning its contained in another
obs group)public FormField getFormField()
public Set<Concept> getGroupMemberConcepts()
public List<Obs> getObs()
public boolean isObsGrouping()
public Map<Obs,List<List<Obs>>> getObsGroupMatrix()
public void addObservation(Obs obsToAdd)
obsToAdd
- Obs that should be an obs grouperpublic int compareTo(EncounterDisplayController.FieldHolder other)
compareTo
in interface Comparable<EncounterDisplayController.FieldHolder>
org.openmrs.FormField#compareTo(org.openmrs.FormField)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String getLabel()
public Integer getPageNumber()
Copyright © 2015 OpenMRS Inc.. All rights reserved.