Categorygithub.com/ipthomas/tukutil
modulepackage
1.3.14
Repository: https://github.com/ipthomas/tukutil.git
Documentation: pkg.go.dev

# README

tukutil

# Functions

No description provided by the author
containsError checks to see if the supplied message contains one of the two error tags.
CreateLog checks if the log folder exists and creates it if not.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetCodeSystemVal takes a string input (key) and returns from the codesystem the string value corresponding to the input (key).
getDocumentReturnList extracts the document return list from the SOAP response message.
GetDuration takes 2 times as string inputs in RFC3339 format (yyyy-MM-ddThh:mm:ssZ) and returns the duration in days, hours and mins in a 'pretty format' eg '2 Days 0 Hrs 52 Mins' between the provided times as a string Example : GetDuration("2022-09-04T13:15:20Z", "2022-09-14T16:20:01Z") returns `10 Days 3 Hrs 4 Mins`.
GetDurationSince takes a time as string input in RFC3339 format (yyyy-MM-ddThh:mm:ssZ) and returns the duration in days, hours and mins in a 'pretty format' eg '2 Days 0 Hrs 52 Mins' between the provided time and time.Now() as a string.
getErrorMessage returns the error message within the SOAP response or returns a generic error message.
No description provided by the author
GetFolderFiles takes a string input of the complete folder path and returns a fs.DirEntry.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetIntFromString takes a string input with an integer value and returns an int of that value.
No description provided by the author
No description provided by the author
GetStringFromInt takes a int input and returns a string of that value.
No description provided by the author
No description provided by the author
GetXMLNodeList takes an xml message as input and returns the xml node list as a string for the node input value provide.
No description provided by the author
No description provided by the author
IsAfterNow takes a time as a string input in RFC3339 format (yyyy-MM-ddThh:mm:ssZ) and returns true if the input time is after time.Now() and false if input time is before time.Now().
No description provided by the author
LoadCodeSystemFile loads the `codesystem.json` file from the `configs` folder.
No description provided by the author
Log takes any struc as input and logs out the struc as a json string.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
returns unique id in format '1.2.40.0.13.1.1.3542466645.20211021090059143.32643' idroot constant - 1.2.40.0.13.1.1.3542466645.
NewUuid returns a random UUID as a string.
No description provided by the author
No description provided by the author
No description provided by the author
OHT_FutureDate takes a 'start date' and a period in the future as a string containing an OASIS Human Task api function eg.
No description provided by the author
Pretty_Time_Now returns a pretty version of the current time for location Europe/London (strips everything after the `.` in Tuk_Time).
PrettyAuthorInstitution takes a string input (XDS Author.Institution format) and returns a string with just the Institution name.
PrettyAuthorPerson takes a string input (XDS Author.Person format) and returns a string with the person last and first names.
No description provided by the author
PrettyTime fist splits the input based on sep =`.`, it takes index 0 of the split and replaces any T with a space then removes any trailing Z.
No description provided by the author
No description provided by the author
SetCodeSystem takes a map input and sets the codesystem map with the input.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SplitXDWKey takes a string input (xdwkey) and returns the pathway and nhs id for the xdw.
Substr takes a string input and returns the rune (Substring) defined by the start and length in th start and length input values.
TemplateFuncMap returns a functionMap of ttutils for use in templates.
Time_Now returns the current time for location Europe/London.
TUK_Day returns the current day as a 2 digit string.
TUK_Hour returns the current hour as a 2 digit string.
TUK_MilliSec returns the current milliseconds as a 3 digit int.
TUK_Min returns the current minute as a 2 digit string.
TUK_Month returns the current month as a 2 digit string.
TUK_Sec returns the current second as a 2 digit string.
TUK_Year returns the current year as a 4 digit string.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author