Data map API: Difference between revisions
DavidStables (talk | contribs) No edit summary |
DavidStables (talk | contribs) |
||
Line 46: | Line 46: | ||
The first thing to do may be to try and converge to a common node, this node being a map node | The first thing to do may be to try and converge to a common node, this node being a map node | ||
== Domain mapping node == | == Domain mapping node chain == | ||
[[File:MapClass.jpg|thumb]] | [[File:MapClass.jpg|thumb]] | ||
The mapping class 'Domain mapping node' sums up the idea that a number of different source structures can in the end converge and map to a single target structure, by dint of the common domain in which the map occurs, and the common context in which a particular set of sources share. | The mapping class 'Domain mapping node' sums up the idea that a number of different source structures can in the end converge and map to a single target structure, by dint of the common domain in which the map occurs, and the common context in which a particular set of sources share. | ||
The primary object is the 'Domain mapping node' which has a uniquely identified context to which a number of sources map to. Each different source is referred to as a ' | The primary object is the 'Domain mapping node' which has a uniquely identified context to which a number of sources map to. Each different source is referred to as a 'Input slots' and all slots must be filled for the map node to be triggered. | ||
A mapping node is authored over time, perhaps initially by selecting a single source but then recognising that additional sources are able to converge. | A mapping node is authored over time, perhaps initially by selecting a single source, but then recognising that additional sources are able to converge. | ||
In the above example, the author has decided that there us similarities between the EMIS and TPP prescription tables. A node can be created with a set of properties that indicate a convergence. For example: | In the above example, the author has decided that there us similarities between the EMIS and TPP prescription tables. A node can be created with a set of properties that indicate a convergence sufficiently to know that the output is class and property. For example: | ||
<div class="toccolours mw-collapsible mw-collapsed"> | <div class="toccolours mw-collapsible mw-collapsed"> | ||
An example mapping node configuration that deals with some inbound medication | An example mapping node configuration that deals with some inbound medication |
Revision as of 15:40, 28 May 2020
This page is under review The mappings package is one of the 5 main component categories in the information model.
For the information model to be even more useful than simply a reference, it is helpful to be able to map published data to the common model, and map the common model content to implemented databases. This provides a mechanism of resolving many to many relationships between a source and a destination whilst at the same time 'cleaning' the data on the way to provide a standard.
In order to support this, there are two main data resources required.
- A map that takes some source published data and outputs the data in the common model format.
- A map that takes some common model data and outputs the data to a database that holds an actual implementation of part of, or the whole of, the model.
For this to operate, a mapping server API is required so that a client wishing to transform some data from A to B, is able to obtain the information in a computable manner.
Fundamentals
At its most basic level the objective of a mapping process is to take some source value and produce a target structure, which provides information about the class, property, and target value that the source value maps to.
For the source value to be understood, it is necessary to provide some context to it. All values are therefore set in some form of context. As a minimum this context would be the source property i.e. the property for which the value is a value of. In many cases though, the context will be much more extensive.
For example, in a source system, the word 'negative, a value of the field 'result text' associated with a code value '12345', a value in the field 'test', which is a field of the table of 'clinical events', used by the system 'Cerner Millennium', in the hospital 'Barts NHS trust', may mean something completely different to 'negative' with the code '12345' set in another hospital, even with the same system.
A further layer of context includes the Domain in which the mapping takes place. A map generated for one purpose may be different when generated for another purpose.
For example, when processing published data into Discovery, the domain in question could be described as the 'inbound publisher mapping domain'.
Consequently, the implicit idea of a context and a domain, is explicitly modelled as a 'Domain mapping node' object. The class, and the various supporting classes are described in the following sections.
Mapping Convergence
Mapping can be seen as a set of interconnected nodes, each node being triggered by one or map source objects and resulting in a target object which is then used as a source to trigger another node.
Mapping convergence is the means by which we try to rationalise the huge number of source types to a fewer number in order to make map authoring simpler and more efficient.
Let us say that we are trying to map a drug code from an EMIS drug issue to the common model. We understand that the code comes from Chrisp Street Health Centre, which uses EMIS Web, and the source table in question is the Prescribing issue table, with field of Codeid, and the code value is '12345'.
Likewise, we are also trying to map a drug code from a TPP practice source. We understand that the code comes from the Parkdale medical centre, that they use TPP SystmOne, that the source table in question is the PrimaryCareMedication table , the field is code and the id is 232000001108.
We also know that EMIS provides a look up table between their code and DM&D, but SystmOne provides the DM&D code itself.
The first thing we recognise is that the context of the above two sources appears to be nearly equivalent. Both are equivalent to the same target structure and both will end up with the same target value when mapped from DM&D. There is a variation in EMIS in that before getting to exactly the same context, there is a prior step to perform, the map between EMIS 'X' and the DM+D 'Y'. However, if that mapping were to occur first, then the two context's would be exactly equivalent.
It appears that there is some form of convergence from two sources. This can be illustrated in the following way:
The first thing to do may be to try and converge to a common node, this node being a map node
Domain mapping node chain
The mapping class 'Domain mapping node' sums up the idea that a number of different source structures can in the end converge and map to a single target structure, by dint of the common domain in which the map occurs, and the common context in which a particular set of sources share.
The primary object is the 'Domain mapping node' which has a uniquely identified context to which a number of sources map to. Each different source is referred to as a 'Input slots' and all slots must be filled for the map node to be triggered.
A mapping node is authored over time, perhaps initially by selecting a single source, but then recognising that additional sources are able to converge.
In the above example, the author has decided that there us similarities between the EMIS and TPP prescription tables. A node can be created with a set of properties that indicate a convergence sufficiently to know that the output is class and property. For example:
An example mapping node configuration that deals with some inbound medication
We see here that if any provider, using EMIS Web or SystmOne as their source, if the source table is either Prescription issue, or SRPrimaryCareMedication then we are going to end up eventually with the same context and a class of medication request and a property of requested medication.
We have yet to deal with the remaining EMIS value problem. To do that we create another node to deal with the EMIS variation, which only requires the Codeid and the value as input slots.
This node calls a mapping function with the three parameters one of which is the property value of the input property
A simple mapping node with a property code look up
We are now ready to converge the two outputs into the final node, which only has to do the final map.
The final mapping node in the chain performing a concept look up
Cumulatively, the result of the map contains the target class, property and value as well as the context node identifiers that generated it.
The final target output to the client