document

package
v0.0.0-...-e69eef7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Overview

Package document contains functions needed to generate a ir.Document object.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	DocumentConfig *config.HL7Document
	TextGenerator  text.Generator
}

Generator generates a document.

func (*Generator) Document

func (g *Generator) Document(eventTime time.Time, d *pathway.Document) *ir.Document

Document returns a Document from the given configuration. See pathway.Document for information on how every field is populated. A UniqueDocumentNumber is randomly generated. ActivityDateTime and EditDateTime are set to eventTime.

func (*Generator) UpdateDocumentContent

func (g *Generator) UpdateDocumentContent(dm *ir.Document, dp *pathway.Document) error

UpdateDocumentContent updates an existing document, 'dm', content in place based on a pathway.Document configuration, 'dp'. Update type is determined in the pathway can be set to "append" or "overwrite". An error is returned if the set update type is not one of the above mentioned.

Jump to

Keyboard shortcuts

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