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 ¶
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 ¶
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.