Git Product home page Git Product logo

nhsconnect.prm-gp2gp-data-pipeline's Introduction

prm-gp2gp-data-pipeline

This repo contains the data pipeline responsible for deriving GP2GP metrics from data sources such as NMS.

Running

Extracting Spine data from NMS

Run the following query for the desired time range and save the results as a csv.

index="spine2vfmmonitor" service="gp2gp" logReference="MPS0053d"
| table _time, conversationID, GUID, interactionID, messageSender, messageRecipient, messageRef, jdiEvent, toSystem, fromSystem

Developing

Common development workflows are defined in the tasks script.

These generally work by running a command in a virtual environment configured via tox.ini.

Prerequisites

Running the unit and integration tests

./tasks test

Running the end to end tests

./tasks e2e-test

Running tests, linting, and type checking

./tasks validate

Running tests, linting, and type checking in a docker container

This will run the validation commands in the same container used by the GoCD pipeline.

./tasks dojo-validate

Auto Formatting

./tasks format

Dependency Scanning

./tasks check-deps

ODS Data

If you need ODS codes and names of all active GP practices please check this out.

Data Platform Pipeline

This pipeline will derive GP2GP metrics and metadata for practices produced by the ODS Portal Pipeline. It does this by performing a number of transformations on GP2GP messages provided by NMS.

The following examples show how to run this pipeline. Run platform-metrics-pipeline --help for usage details.

Outputting to local directory

Example: platform-metrics-pipeline --month 1 --year 2021 --organisation-list-file "data/organisation-list.json" --input-files "data/jan.csv.gz,data/feb.csv.gz" --output-directory "data"

Outputting to S3 bucket

Example: platform-metrics-pipeline --month 1 --year 2021 --organisation-list-file "data/organisation-list.json" --input-files "data/jan.csv.gz,data/feb.csv.gz" --output-bucket "example-bucket"

  • When outputting to AWS ensure the environment has the appropriate access.
  • Note this will use the year and month as part of the s3 key structure, as well 'v2' (data pipeline output version).

Troubleshooting

ERROR: InvocationError for command /YOUR_PROJECT_DIRECTORY/prm-gp2gp-data-pipeline/.tox/check-format/bin/black --check -t py38 -l100 src/ tests/ setup.py (exited with code 2)

If you see this error, you need to delete the .tox package and try again

nhsconnect.prm-gp2gp-data-pipeline's People

Contributors

dorota-tw avatar eypaksu avatar eyupaksu-nhs avatar jakeoblivion avatar jfgreen avatar jfgreen-nhs avatar jfgreen-tw avatar jnewman-nhs avatar matthew-peers avatar nhshz avatar smma1 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.