Computing Bindings

TBD: potentially do without this section altogether, and let implementations do their own thing. However, it requires that call signatures exactly match the declarations in the definition section.

Expressions may contain user-defined functions and procedures, whose signatures are declared in the definition part of an EL Module. The implementations of such routines can be developed or provided in a library in any language, e.g. TypeScript, Java, C#, Python etc. Implementations of used routines are bound to their EL declarations in the computing_bindings section of a full EL Module. The following provides an example in which two libraries, one in Java and one in Python are bound to functions declared in an EL Module.

computing_bindings
    library_bindings = <
        ["onco_staging_lib"] = <
            connector = <
                language = <"java8">
                library = <"onco_staging_lib.jar">
                xxx = <"xxx">  -- other connector details
            >
            bindings = <
                ["tnm_major_number"] = <"TnmCalculator::tnmNumericVal">
                ["tnm_prefix"] = <"TnmCalculator::tnmPrefixVal">
            >
        >

        ["anti_coag_lib"] = <
            connector = <
                language = <"python">
                library = <"anti_coagulation_algorithms">
                xxx = <"xxx">  -- other connector details
            >
            bindings = <
                ["chadsvasc_score"] = <"Anti_coag_lib_wrapper::CHA2DS2_VASc_score">
                ["warfarin_dose"] = <"Anti_coag_lib_wrapper::calc_warfarin_dose">
            >
        >
    >

In the above, the Java function tnmNumericVal() from the class TnmCalculator is bound to the EL-declared function tnm_major_number(). It is assumed that the two functions match in signatures, i.e. have the same number of arguments in the same order and of the same types. This is most likely to be achieved by writing a wrapper class around one or more classes that are found in existing libraries. Additionally, it must be possible for the implementation class to be instantiated with no arguments.

TBD: or else they have to be supplied in the binding