MDR Injector

The MDR Injector is a JavaScirpt library for resolving identifiers of a meta data repository.


You can use the libary by including the JavaScript file.
This can be done by adding the following line between the <head> tag:


<script src="injector.js" charset="utf-8"></script>


and then call the method:

search(tagname or tagID,MDRURL,regular expression, interface-dependent attribute(key) ,interface-dependent attribute(subkey), popupID)


search('output',"",'urn:dktk:dataelement:\\d+:\\d+','designations','designation', 'definition')


The tagname or the tagID like:

<div id='output'> or <output>

which should be searched for identifiers.


The URL of the meta data repository:

Add always a "%s" in the end of the URL to replace it by the identifier and to call the URL of the identifier: =>

Regular Expression

A regular expression is necessary to search after identifiers.
With the regular expression:

the key urn:dktk:dataelement:12:1 can be found.

Key, Subkey and PopupID

If the JSON file is a twoDimensional array you need a key and a subkey to get access to the identifiers.
Example for "designations"(key), "designation"(subkey) and "definition" (popupID):

                "designation":"smoking status",
                "definition":"An indication of a person's current tobacco and nicotine consumption as well as some indication of smoking history

With the popupID you can choose which text should appear in the popup when the mouse is hovering over a identifier.

Release notes


  • Changed popup style
  • fixed issue where div id and tag name can be the same


  • first version