Documentation ¶
Index ¶
- type ClinicalDocument
- func (cda *ClinicalDocument) DoFormatDisplayAddress(a addr) string
- func (cda *ClinicalDocument) DoFormatDisplayName(p person) string
- func (cda *ClinicalDocument) DoReformatDateTimeFields() error
- func (cda *ClinicalDocument) DoSetDateFormat(format string)
- func (cda *ClinicalDocument) DoSetDateTimeFormat(format string)
- func (cda *ClinicalDocument) DoSetReportLogo(URL string)
- func (cda *ClinicalDocument) DoSetReportStyleSheet(URL string)
- func (cda *ClinicalDocument) DoSwitchBR(replaceWith string)
- func (cda *ClinicalDocument) GenerateReport() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClinicalDocument ¶
type ClinicalDocument struct { RawXML string `xml:",innerxml"` Title string `xml:"title"` Code []codeSystem `xml:"code"` EffectiveTime []effectiveTime `xml:"effectiveTime"` IDs []id `xml:"id"` LanguageCode []languageCode `xml:"languageCode"` RealmCode []realmCode `xml:"realmCode"` VersionNumber []versionNumber `xml:"versionNumber"` RecordTarget []recordTarget `xml:"recordTarget"` Custodian []custodian `xml:"custodian>assignedCustodian>representedCustodianOrganization"` Authors []author `xml:"author"` IntendedRecipients []intendedRecipient `xml:"informationRecipient>intendedRecipient"` EncompassingEncounter []encompassingEncounter `xml:"componentOf>encompassingEncounter"` StructuredBodySections []structuredBodySection `xml:"component>structuredBody>component"` // contains filtered or unexported fields }
ClinicalDocument holds the parsed values from the supplied CDA XML document
func Parse ¶
func Parse(clinicalDocument string) (ClinicalDocument, error)
Parse accepts the CDA document as a string and passes it to the XML Unmarshal function to map the data items into in the struct fields.
func (*ClinicalDocument) DoFormatDisplayAddress ¶
func (cda *ClinicalDocument) DoFormatDisplayAddress(a addr) string
DoFormatDisplayAddress formats an address by concatenating the address segments
func (*ClinicalDocument) DoFormatDisplayName ¶
func (cda *ClinicalDocument) DoFormatDisplayName(p person) string
DoFormatDisplayName formats a name by concatenating, if present, the following values: - Prefix, Given, Family, Suffix
func (*ClinicalDocument) DoReformatDateTimeFields ¶
func (cda *ClinicalDocument) DoReformatDateTimeFields() error
DoReformatDateTimeFields parses the date/time fields and applies the formatting mask passed via DoSetDateFormat() & DoSetDateTimeFormat()
func (*ClinicalDocument) DoSetDateFormat ¶
func (cda *ClinicalDocument) DoSetDateFormat(format string)
DoSetDateFormat sets the format to be applied to date fields like DOB
func (*ClinicalDocument) DoSetDateTimeFormat ¶
func (cda *ClinicalDocument) DoSetDateTimeFormat(format string)
DoSetDateTimeFormat sets the format to be applied to date/time fields like effectiveTime
func (*ClinicalDocument) DoSetReportLogo ¶
func (cda *ClinicalDocument) DoSetReportLogo(URL string)
DoSetReportLogo sets a URL to a logo to be used within the HTML report.
func (*ClinicalDocument) DoSetReportStyleSheet ¶
func (cda *ClinicalDocument) DoSetReportStyleSheet(URL string)
DoSetReportStyleSheet sets a URL to an external style sheet to be used within the HTML report.
func (*ClinicalDocument) DoSwitchBR ¶
func (cda *ClinicalDocument) DoSwitchBR(replaceWith string)
DoSwitchBR replaces the carriage return text within LabReports from \.br\ to the string supplied in the replaceWith parameter
func (*ClinicalDocument) GenerateReport ¶
func (cda *ClinicalDocument) GenerateReport() string
GenerateReport returns a formatted HTML 5 report