|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tolven.app.entity.MenuData
public class MenuData
Where MenuStructure represents metadata about an account's menus, MenuData contains the actual data. for each MenuStructure, there will be zero or more corresponding MenuData records. A MenuStructure entry defines the rules that control the creation of menu data.
A MenuData entity is often, but not required to be, associated with a single DocBase entity which provides the detailed backing for the MenuData entity. For example, a CBC lab result could be represented by a single MenuData entity with the individual results represented in a RIM-based DocBase entity. This makes chronological results displays convenient. That same lab result document could also be represented by a number of MenuData items, one for each numeric value in the test which would be convenient for graphing, aggregation, or simply sorting by type of test.
The MenuData entity has a number of generic columns, the purpose of which changes by MenuStructure definition.
MenuData is often derived by summarizing activity from various source documents. However, at least in one case, an entire menu structure may be based on a single document. for example, a CCR document is specifically intended as a summary and so it's display may be nothing but a number of MenuStructures that define how to display the CCR document located in this document. As such, there may be little purpose in creating separate MenuData items that essentially just mirror the CCR document. To accomplish a display such as this, the MenuStructure rules for a CCR document should not create MenuData items but rather navigate the CCR structure directly. There must be a MenuData item representing the document itself along with a corresponding MenuStructure covering the display requirements for the document. Beyond root level in the MenuHierarchy, expression language (EL) in the display template, can access the document directly.
| Constructor Summary | |
|---|---|
MenuData()
|
|
MenuData(MenuData md)
Copy constructor |
|
| Method Summary | |
|---|---|
void |
addPhrase(java.lang.String phrase,
java.lang.String field,
java.lang.String language)
Add a phrase to this MenuData Item's word list. |
void |
addPlaceholderID(java.lang.String root,
java.lang.String extension,
java.lang.String assigningAuthority)
Add a new id to the existing list of placeholders as long as the new id is unique. |
void |
addWord(java.lang.String word,
int position,
java.lang.String field,
java.lang.String language)
Add a word to this MenuData Item we quietly ignore duplicates. |
java.lang.String |
calculatePath()
As a MenuData item is persisted, a full path is created. |
boolean |
equals(java.lang.Object obj)
Compare two MenuData objects for equality. |
Account |
getAccount()
Account is denormalized here (from MenuStructure) for performance and security: A user cannot access MenuData beyond their account. |
java.lang.String |
getActStatus()
The Act Status of the underlying document, not of the MenuData item itself. |
MSColumn |
getColumn(java.lang.String fieldName)
|
java.util.Map<java.lang.String,MSColumn> |
getColumnMap()
A Transient attribute holding a map of the column definitions from the MenuStructure. |
java.util.Date |
getDate01()
An an arbitrary date, the contents and description of which is determined by a rule defined in MenuStructure |
java.util.Date |
getDate02()
An an arbitrary date, the contents and description of which is determined by a rule defined in MenuStructure |
java.util.Date |
getDate03()
An an arbitrary date, the contents and description of which is determined by a rule defined in MenuStructure |
java.util.Date |
getDate04()
An an arbitrary date, the contents and description of which is determined by a rule defined in MenuStructure |
java.util.Date |
getDateField(java.lang.String fieldName)
|
java.lang.Boolean |
getDeleted()
|
long |
getDocumentId()
Optionally references the document which gave rise to this MenuData item. |
java.util.Date |
getExpirationTime()
Expiration time, if non-null, defines when a particular MenuData item expires. |
java.lang.Object |
getExtendedField(java.lang.String fieldName)
Get an extended field. |
java.lang.Object |
getField(java.lang.String fieldName)
Return a field from MenuData by the name assigned by the Placeholder Columns in application.xml. |
long |
getId()
return the unique id of this MenuData item |
java.util.Date |
getInternalDateField(java.lang.String fieldName)
|
java.lang.Object |
getInternalField(java.lang.String fieldName)
|
java.lang.Long |
getInternalLongField(java.lang.String fieldName)
|
java.lang.Double |
getInternalPQValueField(java.lang.String fieldName)
|
java.lang.String |
getInternalStringField(java.lang.String fieldName)
|
long |
getKey(java.lang.String name)
Get the named id from this MenuData item. |
java.lang.Long |
getLong01()
An an arbitrary integer, the contents and description of which is determined by a rule defined in MenuStructure |
java.lang.Long |
getLong02()
An an arbitrary integer, the contents and description of which is determined by a rule defined in MenuStructure |
java.lang.Long |
getLong03()
An an arbitrary integer, the contents and description of which is determined by a rule defined in MenuStructure |
java.lang.Long |
getLong04()
An an arbitrary integer, the contents and description of which is determined by a rule defined in MenuStructure |
java.lang.Long |
getLongField(java.lang.String fieldName)
|
AccountMenuStructure |
getMenuStructure()
Required reference to the MenuStructure item that defines this MenuData item. |
MenuData |
getParent01()
A MenuStructure item can define a repeating data item. |
MenuData |
getParent02()
|
MenuData |
getParent03()
|
MenuData |
getParent04()
|
MenuData |
getParentPath(java.lang.String fieldName)
|
java.lang.String |
getParentPath01()
|
java.lang.String |
getParentPath02()
|
java.lang.String |
getParentPath03()
|
java.lang.String |
getParentPath04()
|
java.lang.String |
getPath()
Path is a denormalization of the hierarchical nodes collected into a single string. |
PlaceholderID[] |
getPlaceholderIDArray()
|
java.util.Set<PlaceholderID> |
getPlaceholderIDs()
|
AccountMenuStructure |
getPlaceholderMenuStructure()
Required reference to the MenuStructure item that defines this MenuData item. |
java.lang.String |
getPqStringVal01()
Return the string representation of the physical quantity value. |
java.lang.String |
getPqStringVal02()
|
java.lang.String |
getPqStringVal03()
|
java.lang.String |
getPqStringVal04()
|
java.lang.String |
getPqUnits01()
An abritrary Physicial Quanitity. |
java.lang.String |
getPqUnits02()
|
java.lang.String |
getPqUnits03()
|
java.lang.String |
getPqUnits04()
|
java.lang.Double |
getPqValue01()
|
java.lang.Double |
getPqValue02()
|
java.lang.Double |
getPqValue03()
|
java.lang.Double |
getPqValue04()
|
MenuData |
getReference()
A MenuData reference provides a way of referencing another object such as on lists. |
java.lang.String |
getReferencePath()
|
Status |
getStatus()
|
java.lang.String |
getStatusName()
|
java.lang.String |
getString01()
An arbitrary string used to describe a MenuData item. |
java.lang.String |
getString02()
|
java.lang.String |
getString03()
|
java.lang.String |
getString04()
|
java.lang.String |
getString05()
|
java.lang.String |
getString06()
|
java.lang.String |
getStringField(java.lang.String fieldName)
|
TrimHeader |
getTrimHeader()
|
java.util.Set<MenuDataWord> |
getWords()
Return the set of words associated with this MenuDataItem |
byte[] |
getXml01()
An arbitrary XML snippet associated with a MenuData item. |
int |
hashCode()
Return a hash code for this object. |
void |
populateContext(java.util.Map<java.lang.String,java.lang.String> context)
Use the current path to populate a context map. |
void |
setAccount(Account account)
|
void |
setActStatus(java.lang.String actStatus)
|
void |
setColumnMap(java.util.Map<java.lang.String,MSColumn> columnMap)
|
void |
setDate01(java.util.Date date01)
|
void |
setDate02(java.util.Date date02)
|
void |
setDate03(java.util.Date date03)
|
void |
setDate04(java.util.Date date04)
|
void |
setDeleted(java.lang.Boolean deleted)
|
void |
setDocumentId(long documentId)
|
void |
setExpirationTime(java.util.Date expirationTime)
|
void |
setExtendedField(java.lang.String fieldName,
java.lang.Object fieldValue)
|
void |
setField(java.lang.String fieldName,
java.lang.Object fieldValue)
Set the value for a field using the name assigned by the placeholder column definition. |
void |
setId(long id)
|
void |
setLong01(java.lang.Long long01)
|
void |
setLong02(java.lang.Long long02)
|
void |
setLong03(java.lang.Long long03)
|
void |
setLong04(java.lang.Long long04)
|
void |
setMenuStructure(AccountMenuStructure menuStructure)
|
void |
setParent01(MenuData parent01)
|
void |
setParent02(MenuData parent02)
|
void |
setParent03(MenuData parent03)
|
void |
setParent04(MenuData parent04)
|
void |
setParentPath01(java.lang.String parentPath01)
|
void |
setParentPath02(java.lang.String parentPath02)
|
void |
setParentPath03(java.lang.String parentPath03)
|
void |
setParentPath04(java.lang.String parentPath04)
|
void |
setParents(MenuData[] parents)
|
void |
setPath(java.lang.String path)
|
void |
setPqStringVal01(java.lang.String pqStringVal01)
|
void |
setPqStringVal02(java.lang.String pqStringVal02)
|
void |
setPqStringVal03(java.lang.String pqStringVal03)
|
void |
setPqStringVal04(java.lang.String pqStringVal04)
|
void |
setPqUnits01(java.lang.String pqUnits01)
|
void |
setPqUnits02(java.lang.String pqUnits02)
|
void |
setPqUnits03(java.lang.String pqUnits03)
|
void |
setPqUnits04(java.lang.String pqUnits04)
|
void |
setPqValue01(java.lang.Double pqValue01)
|
void |
setPqValue02(java.lang.Double pqValue02)
|
void |
setPqValue03(java.lang.Double pqValue03)
|
void |
setPqValue04(java.lang.Double pqValue04)
|
void |
setReference(MenuData reference)
|
void |
setReferencePath(java.lang.String referencePath)
|
void |
setStatus(Status status)
|
void |
setString01(java.lang.String string01)
|
void |
setString02(java.lang.String string02)
|
void |
setString03(java.lang.String string03)
|
void |
setString04(java.lang.String string04)
|
void |
setString05(java.lang.String string05)
|
void |
setString06(java.lang.String string06)
|
void |
setTrimHeader(TrimHeader trimHeader)
|
void |
setXml01(byte[] xml01)
|
java.lang.String |
toString()
Provide a debug string representation for this object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MenuData()
public MenuData(MenuData md)
md - | Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectjava.lang.IllegalStateException - if the id has not been establishedpublic long getKey(java.lang.String name)
echr:patients:patientIf it is "patient", then we can return the id of this object. However, if not, we'll look at the rest of the path in MenuStrcture for a match in which case we will use one of the parentKeys.
name - the node name of the key value requested
java.lang.IllegalArgumentException - if name is null or MenuStructure link is nullpublic void populateContext(java.util.Map<java.lang.String,java.lang.String> context)
public java.lang.String calculatePath()
As a MenuData item is persisted, a full path is created. For example, a MenuData item for a lab result for a patient might be: echr:patient-123:results:lab-456 which means the second and forth nodes in the path should have corresponding ids either from a parent attribute (patient in this case) or the ID of this object (in this case, the lab result itself).
This path should look similar to the path attribute in MenuStructure except that it has the keys inserted where appropriate. So, in the previous example, the menuStructure.getPath(): echr:patient:lab
This will not work at all unless this item is at least persisted so that it has an Id.
public long getId()
public void setId(long id)
public long getDocumentId()
Optionally references the document which gave rise to this MenuData item. If the MenuData item is a summary, then this will be the last document contributing to its value. If the NenuData item is updateable, then this will be the last document affecting the value(s). One document may affect many MenuData items. For example, a single CBC lab result might have separate MenuData items for each test value (RBC, WBC, HCT, HGB, etc).
public void setDocumentId(long documentId)
public AccountMenuStructure getPlaceholderMenuStructure()
public AccountMenuStructure getMenuStructure()
public void setMenuStructure(AccountMenuStructure menuStructure)
public MSColumn getColumn(java.lang.String fieldName)
public java.lang.Object getExtendedField(java.lang.String fieldName)
fieldName -
public void setExtendedField(java.lang.String fieldName,
java.lang.Object fieldValue)
public void setField(java.lang.String fieldName,
java.lang.Object fieldValue)
fieldName - fieldValue - public java.lang.Object getField(java.lang.String fieldName)
fieldName -
public java.lang.Object getInternalField(java.lang.String fieldName)
public java.util.Date getDateField(java.lang.String fieldName)
public java.lang.String getStringField(java.lang.String fieldName)
public java.lang.Long getLongField(java.lang.String fieldName)
public java.util.Date getInternalDateField(java.lang.String fieldName)
public java.lang.Long getInternalLongField(java.lang.String fieldName)
public java.lang.String getInternalStringField(java.lang.String fieldName)
public java.lang.Double getInternalPQValueField(java.lang.String fieldName)
public MenuData getParentPath(java.lang.String fieldName)
public java.util.Date getDate01()
public void setDate01(java.util.Date date01)
public java.util.Date getDate02()
public void setDate02(java.util.Date date02)
public java.util.Date getDate03()
public void setDate03(java.util.Date date03)
public java.util.Date getDate04()
public void setDate04(java.util.Date date04)
public java.lang.Long getLong01()
public void setLong01(java.lang.Long long01)
public java.lang.Long getLong02()
public void setLong02(java.lang.Long long02)
public java.lang.Long getLong03()
public void setLong03(java.lang.Long long03)
public java.lang.Long getLong04()
public void setLong04(java.lang.Long long04)
public java.lang.String getPqUnits01()
An abritrary Physicial Quanitity. PQs are in "value" and "unit of measure" pairs. The value is a real number, the unit of measure is defined by HL7 datatype PQ. However, the actual representation here may differ from the PQ in the document and thus what may actually be displayed. For example, say a lab result has a PQ of 1.000 mcg/mL. When stored here, the precision of the value is lost because neither Java nor the database retain that information in a real datatype. So it may be that the display of the PQ occurs in a string field which this is used only for graphing and perhaps sorting purposes.
A unit of measure should always be present in a PQ. If no other unit fits, then a "1" is implied.
public void setPqUnits01(java.lang.String pqUnits01)
public java.lang.String getPqUnits02()
public void setPqUnits02(java.lang.String pqUnits02)
public java.lang.String getPqUnits03()
public void setPqUnits03(java.lang.String pqUnits03)
public java.lang.String getPqUnits04()
public void setPqUnits04(java.lang.String pqUnits04)
public java.lang.Double getPqValue01()
public void setPqValue01(java.lang.Double pqValue01)
public java.lang.Double getPqValue02()
public void setPqValue02(java.lang.Double pqValue02)
public java.lang.Double getPqValue03()
public void setPqValue03(java.lang.Double pqValue03)
public java.lang.Double getPqValue04()
public void setPqValue04(java.lang.Double pqValue04)
public java.lang.String getString01()
public void setString01(java.lang.String string01)
public java.lang.String getString02()
public void setString02(java.lang.String string02)
public java.lang.String getString03()
public void setString03(java.lang.String string03)
public java.lang.String getString04()
public void setString04(java.lang.String string04)
public byte[] getXml01()
An arbitrary XML snippet associated with a MenuData item. This attribute is usually the last resort as a means of displaying information. the most efficient technique is usually to store each display attribute in one of the explicit datatypes in this entity. the most thorough method is to provide a drilldown to the actual underlying document using the document attribute. In these fields, an XML snippet, the schema of which is known to the menu structure, holds either a copy of part of the document or a completely separate snippet created for display purpose.
Consider Patient name as an example: A rule can extract patient name information for a complete document and store it in a single String field. While most efficient, it means the name format is determined, forever more, by the rule, not by the display template. Instead, the display could navigate into the document to pull out the name field. But this could require coupling display logic to the possible many different document formats containing name information. A compromise provides maximum decoupling: The rule knows where to find the name information and provides it to the application as an XML snippet (making no assumption about how it will be displayed). The display template can then decide how to display the name without having to know anything about the original transaction.
Performance note: One larger XML snippet is more efficient than two smaller ones, all else being equal.
public void setXml01(byte[] xml01)
public java.util.Date getExpirationTime()
Expiration time, if non-null, defines when a particular MenuData item expires. The query for display will always ignore any items where the current time (now) is after expirationTime. For example, an appointment list item might automatically be removed after a certain time.
Once a MenuData item has expired, a utility program is free to delete the item from the database. In such cases, the item should have no intrinsic value for any purpose. If that is NOT the case, use a different attribute to store the date. For example, if there is an expiration time associated with a medication product, that would have no bearing on whether the item is displayed or not.
In summary, this field means that the MenuData item has no value whatsoever after this expiration time. If the expirationTime is null, the item never exists.
public void setExpirationTime(java.util.Date expirationTime)
public MenuData getParent01()
A MenuStructure item can define a repeating data item. For example, a MenuStructure defining HealthRecord at the top level and then appointment (encounter) within that healthRecord will use parent01 (all Tolven surrogate keys are long value). These keys are typically not displayed. Instead, "real world" keys, such as medical record number, are extracted from the document and displayed, if needed. Therefore, these key are typically used in a hierarchy starting with whole and proceeding toward the parts.
Account id should not be included in these keys since in most cases the account id is the overall security partitioning value. Thus, including accountId as a key would never provide access to an account beyond the account owning this MenuData item. (Sub-accounts would be reasonable to include in a key, if appropriate).
If the MenuStructure defines only a single MenuData item, which is rare but possible, all key values would contain zero. Example, a clinic keeps a summary item showing the total number of active patients.
These arbitrary keys represent an important architectural concept: Tolven makes no intrinsic assumption about the organization structure of an account. A single Tolven installation can handle patients (clinical), subjects (research), and family members (personal). Note, patients can be humans or animals without affecting the core structure. However, that distinction is due to HL7 RIM more than Tolven since the patient role itself is separate from the living subject playing that role.
public void setParent01(MenuData parent01)
public MenuData getParent02()
public void setParent02(MenuData parent02)
public MenuData getParent03()
public void setParent03(MenuData parent03)
public MenuData getParent04()
public void setParent04(MenuData parent04)
public void setParents(MenuData[] parents)
public Account getAccount()
public void setAccount(Account account)
public java.lang.String getParentPath01()
public void setParentPath01(java.lang.String parentPath01)
public java.lang.String getParentPath02()
public void setParentPath02(java.lang.String parentPath02)
public java.lang.String getParentPath03()
public void setParentPath03(java.lang.String parentPath03)
public java.lang.String getParentPath04()
public void setParentPath04(java.lang.String parentPath04)
public java.lang.String getPath()
public void setPath(java.lang.String path)
public MenuData getReference()
public void setReference(MenuData reference)
public java.lang.String getReferencePath()
public void setReferencePath(java.lang.String referencePath)
public java.lang.String getPqStringVal01()
public void setPqStringVal01(java.lang.String pqStringVal01)
public java.lang.String getPqStringVal02()
public void setPqStringVal02(java.lang.String pqStringVal02)
public java.lang.String getPqStringVal03()
public void setPqStringVal03(java.lang.String pqStringVal03)
public java.lang.String getPqStringVal04()
public void setPqStringVal04(java.lang.String pqStringVal04)
public TrimHeader getTrimHeader()
public void setTrimHeader(TrimHeader trimHeader)
public Status getStatus()
public java.lang.String getStatusName()
public void setStatus(Status status)
public java.lang.Boolean getDeleted()
public void setDeleted(java.lang.Boolean deleted)
public java.util.Set<PlaceholderID> getPlaceholderIDs()
public PlaceholderID[] getPlaceholderIDArray()
public void addPlaceholderID(java.lang.String root,
java.lang.String extension,
java.lang.String assigningAuthority)
root - extension - assigningAuthority - public java.util.Set<MenuDataWord> getWords()
public void addWord(java.lang.String word,
int position,
java.lang.String field,
java.lang.String language)
word - - the word to be addedposition - - the position of the word in the phrase it was extract fromfield - - which field or semantic relationship the word is fromlanguage - - which language the phrase is in
public void addPhrase(java.lang.String phrase,
java.lang.String field,
java.lang.String language)
phrase - - the phrase to be addedposition - - the position of the word in the phrase it was extract fromfield - - which field or semantic relationship the word is fromlanguage - - which language the phrase is inpublic java.lang.String getString05()
public void setString05(java.lang.String string05)
public java.lang.String getString06()
public void setString06(java.lang.String string06)
public java.lang.String getActStatus()
public void setActStatus(java.lang.String actStatus)
public java.util.Map<java.lang.String,MSColumn> getColumnMap()
public void setColumnMap(java.util.Map<java.lang.String,MSColumn> columnMap)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||