1.0.0 • Published 5 years ago

fhirmapping v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

FHIR Mapping Language

Describes the implementation of FHIR Mapping Language. It is necessary to trnasfer FHIR resources from one version of FHIR standart to another.

The main part of implementation is mappingEngine.js

The engine works automatically. It receives a transformation map as input and applies it to the old version of the resource.

The code snippet is shown below.

//JavaScript code

        switch(operation){
        case 'move':
            setElement(newPathFromMap, saveResource, elementFromPath);
            deepDelete(oldPathFromMap, saveResource);
            break;
        case 'add':
            setElement(newPathFromMap, saveResource, {});
            break;
        default:
            new Error('Operations are not find!');
        }
    }

How it works

Example

Снимок экрана от 2019-06-19 13-59-58