Documentation ¶
Index ¶
- Constants
- Variables
- func AddComposition(ehrID string, cmp *model.Composition) error
- func AddEHR(ehr *model.EHR) error
- type Attributes
- type BaseNode
- type CompositionNode
- type Container
- type DataValueNode
- type EHRIndex
- type EHRNode
- type EventContextNode
- type NodeType
- type NodeWrapper
- type Noder
- type ObjectNode
- type SliceNode
- type Tree
- type ValueNode
Constants ¶
View Source
const ( ACTION = "ACTION" EVALUATION = "EVALUATION" INSTRUCTION = "INSTRUCTION" OBSERVATION = "OBSERVATION" )
Variables ¶
View Source
var DefaultEHRIndex = NewEHRIndex()
Functions ¶
func AddComposition ¶
func AddComposition(ehrID string, cmp *model.Composition) error
Types ¶
type Attributes ¶
func (*Attributes) DecodeMsgpack ¶
func (attributes *Attributes) DecodeMsgpack(dec *msgpack.Decoder) error
type BaseNode ¶
type BaseNode struct { ID string `json:"id,omitempty" msgpack:"id,omitempty"` Type base.ItemType `json:"type,omitempty" msgpack:"type,omitempty"` Name string `json:"name,omitempty" msgpack:"name,omitempty"` NodeType NodeType `json:"node_type" msgpack:"node_type"` }
func (BaseNode) GetNodeType ¶
func (BaseNode) TryGetChild ¶
type CompositionNode ¶
type CompositionNode struct { BaseNode Tree Attributes Attributes }
func ProcessComposition ¶
func ProcessComposition(cmp *model.Composition) (*CompositionNode, error)
func (CompositionNode) GetID ¶
func (cmp CompositionNode) GetID() string
func (CompositionNode) TryGetChild ¶
func (cmp CompositionNode) TryGetChild(key string) Noder
type Container ¶
func (*Container) DecodeMsgpack ¶
type DataValueNode ¶
type DataValueNode struct { BaseNode Values Attributes `json:"values,omitempty"` }
func (DataValueNode) GetID ¶
func (node DataValueNode) GetID() string
func (DataValueNode) TryGetChild ¶
func (node DataValueNode) TryGetChild(key string) Noder
type EHRIndex ¶
func NewEHRIndex ¶
func NewEHRIndex() *EHRIndex
func (*EHRIndex) AddComposition ¶
func (idx *EHRIndex) AddComposition(ehrID string, cmp *model.Composition) error
func (*EHRIndex) AddEHRNode ¶
func (EHRIndex) MarshalJSON ¶
type EHRNode ¶
type EHRNode struct { BaseNode Attributes Attributes `json:"-"` Compositions Container }
func (*EHRNode) AddCompositionNode ¶
func (ehr *EHRNode) AddCompositionNode(cmpNode *CompositionNode) error
func (EHRNode) GetCompositions ¶
func (EHRNode) MarshalJSON ¶
func (EHRNode) TryGetChild ¶
type EventContextNode ¶
type EventContextNode struct { BaseNode Attributes Attributes `json:"-"` }
func NewEventContextNode ¶
func NewEventContextNode(ctx model.EventContext) *EventContextNode
func (*EventContextNode) GetID ¶
func (n *EventContextNode) GetID() string
func (*EventContextNode) TryGetChild ¶
func (n *EventContextNode) TryGetChild(key string) Noder
type NodeWrapper ¶
type NodeWrapper struct {
// contains filtered or unexported fields
}
func (*NodeWrapper) UnmarshalMsgpack ¶
func (nw *NodeWrapper) UnmarshalMsgpack(data []byte) error
type ObjectNode ¶
type ObjectNode struct { BaseNode AttributesOrder []string Attributes Attributes `json:"-"` }
func (ObjectNode) GetID ¶
func (node ObjectNode) GetID() string
func (ObjectNode) MarshalJSON ¶
func (node ObjectNode) MarshalJSON() ([]byte, error)
func (ObjectNode) TryGetChild ¶
func (node ObjectNode) TryGetChild(key string) Noder
type SliceNode ¶
type SliceNode struct { BaseNode Data Attributes }
func (SliceNode) MarshalJSON ¶
func (SliceNode) TryGetChild ¶
type Tree ¶
func (*Tree) AddComposition ¶
func (t *Tree) AddComposition(com model.Composition) error
type ValueNode ¶
func (ValueNode) MarshalJSON ¶
func (ValueNode) TryGetChild ¶
func (*ValueNode) UnmarshalMsgpack ¶
Click to show internal directories.
Click to hide internal directories.