notes

package
v0.0.0-...-d424132 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package notes contains functions needed to generate a ir.ClinicalNote object given the pathway.ClinicalNote object.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator generates random clinical notes.

func NewGenerator

func NewGenerator(d *config.Data, t text.Generator) *Generator

NewGenerator returns a new Generator struct.

func (*Generator) RandomDocumentForClinicalNote

func (g *Generator) RandomDocumentForClinicalNote(ctx context.Context, np *pathway.ClinicalNote, note *ir.ClinicalNote, eventTime time.Time) (*ir.ClinicalNote, error)

RandomDocumentForClinicalNote generates or updates a ClinicalNote document from the given pathway event. If note is nil, it generates a new ClinicalNote object. If note is not nil, it updates it. If the content type is a txt, random text is generated as the content. Otherwise a random file matching the content type is read from the list of sample files as the content. If there is an existing note, the document type and title are only updated if a new type or title is specified in the pathway.

func (*Generator) RandomNotesForResult

func (g *Generator) RandomNotesForResult() []string

RandomNotesForResult generates between 0 to 2 notes, with the following probabilities: 0.4 - no notes 0.5 - 1 note 0.1 - 2 notes Each note has between 1 - 10 random words.

Jump to

Keyboard shortcuts

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