tukdbint

package module
v1.3.68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 11

README

tukdbint

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBConn *sql.DB
)

Functions

func CloseDBConnection added in v1.3.65

func CloseDBConnection()

DBConnection

func GetIDMapsLocalId added in v1.3.0

func GetIDMapsLocalId(user string, mid string) string

func GetIDMapsMappedId added in v1.3.0

func GetIDMapsMappedId(user string, localid string) string

Idmaps

func GetPathways added in v1.3.68

func GetPathways(user string) map[string]string

XDWs

func GetTaskNotes added in v1.3.0

func GetTaskNotes(pwy string, nhsid string, taskid int, ver int) (string, error)

Events

func GetWorkflowXDSMeta added in v1.3.0

func GetWorkflowXDSMeta(name string) (string, error)

func HasBrokerSub added in v1.3.68

func HasBrokerSub(expression string) (bool, string)

func HasUserSub added in v1.3.68

func HasUserSub(usersub Subscription) bool

func NewDBEvent

func NewDBEvent(i DBInterface) error

func NewSub added in v1.3.68

func NewSub(sub Subscription) error

func PersistTemplate added in v1.3.67

func PersistTemplate(user string, templatename string, templatestr string) error

Templates

func PersistWorkflowDefinition added in v1.3.67

func PersistWorkflowDefinition(name string, config string, isxdsmeta bool) error

Types

type DBConnection added in v1.3.68

type DBConnection struct {
	DBUser        string
	DBPassword    string
	DBHost        string
	DBPort        string
	DBName        string
	DBTimeout     string
	DBReadTimeout string
	DB_URL        string
	DEBUG_MODE    bool
}

type DBInterface added in v1.3.68

type DBInterface interface {
	// contains filtered or unexported methods
}

type Event

type Event struct {
	Id                 int    `json:"id"`
	Creationtime       string `json:"creationtime"`
	EventType          string `json:"eventtype"`
	DocName            string `json:"docname"`
	ClassCode          string `json:"classcode"`
	ConfCode           string `json:"confcode"`
	FormatCode         string `json:"formatcode"`
	FacilityCode       string `json:"facilitycode"`
	PracticeCode       string `json:"practicecode"`
	Expression         string `json:"expression"`
	Authors            string `json:"authors"`
	XdsPid             string `json:"xdspid"`
	XdsDocEntryUid     string `json:"xdsdocentryuid"`
	RepositoryUniqueId string `json:"repositoryuniqueid"`
	NhsId              string `json:"nhsid"`
	User               string `json:"user"`
	Org                string `json:"org"`
	Role               string `json:"role"`
	Speciality         string `json:"speciality"`
	Topic              string `json:"topic"`
	Pathway            string `json:"pathway"`
	Comments           string `json:"comments"`
	Version            int    `json:"ver"`
	TaskId             int    `json:"taskid"`
	BrokerRef          string `json:"brokerref"`
}

type Events

type Events struct {
	Action       string  `json:"action"`
	LastInsertId int     `json:"lastinsertid"`
	Count        int     `json:"count"`
	Events       []Event `json:"events"`
}

func (Events) Len added in v1.3.68

func (e Events) Len() int

sort interface for events

func (Events) Less added in v1.3.68

func (e Events) Less(i, j int) bool

func (Events) Swap added in v1.3.68

func (e Events) Swap(i, j int)

type IdMap added in v1.2.7

type IdMap struct {
	Id   int    `json:"id"`
	User string `json:"user"`
	Lid  string `json:"lid"`
	Mid  string `json:"mid"`
}

type IdMaps added in v1.2.7

type IdMaps struct {
	Action       string
	LastInsertId int
	Where        string
	Value        string
	Cnt          int
	LidMap       []IdMap
}

func (IdMaps) Len added in v1.3.68

func (e IdMaps) Len() int

sort interface for idmaps

func (IdMaps) Less added in v1.3.68

func (e IdMaps) Less(i, j int) bool

func (IdMaps) Swap added in v1.3.68

func (e IdMaps) Swap(i, j int)

type Static added in v1.3.15

type Static struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Content string `json:"content"`
}

type Statics added in v1.3.15

type Statics struct {
	Action       string   `json:"action"`
	LastInsertId int      `json:"lastinsertid"`
	Count        int      `json:"count"`
	Static       []Static `json:"static"`
}

type Subscription

type Subscription struct {
	Id         int    `json:"id"`
	Created    string `json:"created"`
	BrokerRef  string `json:"brokerref"`
	Pathway    string `json:"pathway"`
	Topic      string `json:"topic"`
	Expression string `json:"expression"`
	Email      string `json:"email"`
	NhsId      string `json:"nhsid"`
	User       string `json:"user"`
	Org        string `json:"org"`
	Role       string `json:"role"`
}

type Subscriptions

type Subscriptions struct {
	Action        string         `json:"action"`
	LastInsertId  int            `json:"lastinsertid"`
	Count         int            `json:"count"`
	Subscriptions []Subscription `json:"subscriptions"`
}

func CancelEsub added in v1.3.68

func CancelEsub(sub Subscription) Subscriptions

func GetPathwaySubs added in v1.3.68

func GetPathwaySubs(pathway string) Subscriptions

Subscriptions

func GetSubs added in v1.3.68

func GetSubs(sub Subscription) Subscriptions

type Template added in v1.2.10

type Template struct {
	Id       int    `json:"id"`
	Name     string `json:"name"`
	Template string `json:"template"`
	User     string `json:"user"`
}

type Templates added in v1.2.10

type Templates struct {
	Action       string     `json:"action"`
	LastInsertId int        `json:"lastinsertid"`
	Count        int        `json:"count"`
	Templates    []Template `json:"templates"`
}

type Workflow

type Workflow struct {
	Id        int    `json:"id"`
	Created   string `json:"created"`
	Pathway   string `json:"pathway"`
	NHSId     string `json:"nhsid"`
	XDW_Key   string `json:"xdw_key"`
	XDW_UID   string `json:"xdw_uid"`
	XDW_Doc   string `json:"xdw_doc"`
	XDW_Def   string `json:"xdw_def"`
	Version   int    `json:"version"`
	Published bool   `json:"published"`
	Status    string `json:"status"`
}

type WorkflowStates added in v1.3.23

type WorkflowStates struct {
	Action        string          `json:"action"`
	LastInsertId  int             `json:"lastinsertid"`
	Count         int             `json:"count"`
	Workflowstate []Workflowstate `json:"workflowstate"`
}

type Workflows

type Workflows struct {
	Action       string     `json:"action"`
	LastInsertId int        `json:"lastinsertid"`
	Count        int        `json:"count"`
	Workflows    []Workflow `json:"workflows"`
}

func GetWorkflows added in v1.3.0

func GetWorkflows(pathway string, nhsid string, version int, status string) (Workflows, error)

Workflows

func (Workflows) Len added in v1.3.68

func (e Workflows) Len() int

sort interface for Workflows

func (Workflows) Less added in v1.3.68

func (e Workflows) Less(i, j int) bool

func (Workflows) Swap added in v1.3.68

func (e Workflows) Swap(i, j int)

type Workflowstate added in v1.3.23

type Workflowstate struct {
	Id            int    `json:"id"`
	WorkflowId    int    `json:"workflowid"`
	Pathway       string `json:"pathway"`
	NHSId         string `json:"nhsid"`
	Version       int    `json:"version"`
	Published     bool   `json:"published"`
	Created       string `json:"created"`
	CreatedBy     string `json:"createdby"`
	Status        string `json:"status"`
	CompleteBy    string `json:"completeby"`
	LastUpdate    string `json:"lastupdate"`
	Owner         string `json:"owner"`
	Overdue       string `json:"overdue"`
	Escalated     string `json:"escalated"`
	TargetMet     string `json:"targetmet"`
	InProgress    string `json:"inprogress"`
	Duration      string `json:"duration"`
	TimeRemaining string `json:"timeremaining"`
}

type XDW

type XDW struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	IsXDSMeta bool   `json:"isxdsmeta"`
	XDW       string `json:"xdw"`
}

func GetWorkflowDefinition added in v1.3.0

func GetWorkflowDefinition(name string) (XDW, error)

type XDWS

type XDWS struct {
	Action       string `json:"action"`
	LastInsertId int    `json:"lastinsertid"`
	Count        int    `json:"count"`
	XDW          []XDW  `json:"xdws"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL