Monk is LISP variant used by the eGate HL7 engine
https://docs.oracle.com/cd/E18867_01/SR ... ce_SRE.pdf
It has a function called list-lookup
Essentially it's a dictionary of string replacements and a default value if non match, what's an elegant way of replicating this functionality in javascript, currently I'm doing a big list of string.replace() commands.
Thanks
https://docs.oracle.com/cd/E18867_01/SR ... ce_SRE.pdf
It has a function called list-lookup
list-lookup
Syntax
(list-lookup source-path destination_path lookup-list format trim-chars)
Description
Matches data in the source-path against the key elements of a list and copies the associated value into the structured event.
Code:
(list-lookup ~input%ADT.PID.PID-8-sex.CE.ID_code ~output%ADT.PID.PID-8-sex '(("1" "M")("2" "F")("M" "M")("F" "F")("Male" "M")("Female" "F") (else "U")) "" "")
Essentially it's a dictionary of string replacements and a default value if non match, what's an elegant way of replicating this functionality in javascript, currently I'm doing a big list of string.replace() commands.
Thanks