studies

package
v0.0.0-...-03ea0d3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Studies

type Studies []*Study

Studies defines a collection of clinical study records.

func New

func New() Studies

NewStudies creates a slice of studies.

func (*Studies) Add

func (ss *Studies) Add(s *Study)

Add adds the study to the studies.

func (Studies) Len

func (ss Studies) Len() int

Len returns the number of studies.

func (Studies) Parse

func (ss Studies) Parse()

Parse parses eligibility criteria text to relations for the studies ss.

type Study

type Study struct {
	// contains filtered or unexported fields
}

Study defines a record for a clinical study.

func NewStudy

func NewStudy(nct, name string, conditions []string, eligibilityCriteria string) *Study

NewStudy creates a record for a new study.

func (*Study) Criteria

func (s *Study) Criteria() ([]string, []string)

Criteria extracts inclusion and exclusion criteria from the eligibility criteria string.

func (*Study) CriteriaCount

func (s *Study) CriteriaCount() int

CriteriaCount returns the number of criteria.

func (*Study) ExclusionCriteria

func (s *Study) ExclusionCriteria() criteria.Criteria

ExclusionCriteria returns the exclusion criteria for the study.

func (*Study) InclusionCriteria

func (s *Study) InclusionCriteria() criteria.Criteria

InclusionCriteria returns the inclusion criteria for the study.

func (*Study) NCT

func (s *Study) NCT() string

NCT returns the national clinical trial id.

func (*Study) Name

func (s *Study) Name() string

Name returns the study name.

func (*Study) Parse

func (s *Study) Parse() *Study

Parse parses eligibility criteria text to relations for the study s.

func (*Study) ParsedCriteriaCount

func (s *Study) ParsedCriteriaCount() int

ParsedCriteriaCount returns the number of parsed unique criteria.

func (*Study) RelationCount

func (s *Study) RelationCount() int

RelationCount returns the number of parsed relations.

func (*Study) Relations

func (s *Study) Relations() string

Relations returns the string representation of the parsed criteria. Relations that are parsed from the same criterion and are conjoined by 'or' have the same criterion id (cid).

func (*Study) Transform

func (s *Study) Transform()

Transform transforms criteria relations by converting parsed values to strings of valid literals. If a valid literal cannot be inferred, the confidence score of the relation is set to zero.

Jump to

Keyboard shortcuts

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