Git Product home page Git Product logo

nhsconnect.prm-migrator's Introduction

PRM-Migrator

DEPRECATED

This repository should be considered deprecated and will receive no further updates. It is not tied to any live systems or service and so will not receive updates of any kind. It is for information purposes only.

If you wish to discuss this repository please contact the Patient Record Migration (PRM) team in GPITFutures.

Pre-requisites

  • node v8.10.0 (or above)
  • an IDE / text editor
  • Postman (optional, but useful to have)

Walking skeleton overview

This solution is a walking skeleton to explore the problem of a patient record being migrated from one practice to another.

  • It starts with an EHR extract being uploaded to the solution
  • We store the extract as JSON payload in a database (DynamoDB)
    • The database is shared across the lambdas for simplicity
  • The payload is validated with data retrieved from PDS
    • In this instance, it's just a very basic check to prove the concept of calling PDS via OpenTest
  • At any point after the extract is uploaded and stored as the payload, its translation status can be checked by calling the status endpoint
  • Once the stored payload has been fully translated, its status will be updated to reflect that, and it can be retrieved by calling the retrieve endpoint

Solution overview

For further information on the solution, please see the Core Infrastructure section in Confluence.

Lambdas

Each of the lambdas are independent of one another, so they can be packaged / deployed independently. As such, they each have their own node_modules and packages.json.

How to build the lambdas

From a command prompt, cd into the root directory of the lambda you want to build, then install its node packages with:

npm i

Running the tests

Run the tests with:

npm t

End to end tests

Please note: The end to end tests are for testing the deployed code, hosted in AWS, rather than any local changes you may want to test.

The end to end tests are Postman tests, and so we use Newman to run them from command line.

From a command prompt, cd into the e2e directory, then install its node packages with:

npm i

Run the tests by passing the postman collection to newman, along with the relevant environment variables collection:

i.e.

newman run postman-collections/PRM.postman_collection.json --environment postman-collections/PRM-dev-327778747031.postman_environment.json --delay-request 200

Postman

You can also run the tests from Postman directly, by importing them. You'll find the tests and their environment variable collection in the postman-collections directory.

Pipelines

The build pipelines for the lambdas are defined in the pipelines directory, however they are deployed by the PRM-Infra solution. All of the AWS dependencies, such as the API gateway and DynamoDB are deployed and configured by the the prm-infra solution as well.

nhsconnect.prm-migrator's People

Contributors

briandiggle avatar chrisjtaylortw avatar cynthiatw avatar dependabot[bot] avatar jamesspirit avatar kavi22 avatar subnova avatar vfabrizi-tw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.