Skip to content

A service for managing trainee's details.

License

Notifications You must be signed in to change notification settings

Health-Education-England/tis-trainee-details

Repository files navigation

TIS Trainee Details

Build Status License Quality Gate Status Coverage Stats

About

This is a Spring Boot microservice which provides a REST API for retrieving and managing trainee details data, such as Personal details, Placements and Programmes, to be used in the Profile page.

Developing

Running

gradlew bootRun

Pre-Requisites

  • A MongoDB instance.
  • A running instance of localstack with the appropriate SQS queue set up or permission to push messages onto an AWS SQS queue (reference to the queue url set to the environmental variable EVENT_QUEUE_URL)

Environmental Variables

Name Description Default
AWS_XRAY_DAEMON_ADDRESS The AWS XRay daemon host.
COJ_SIGNED_RABBIT_EXCHANGE The Rabbit exchange for sending CoJ signing events.
COJ_SIGNED_RABBIT_ROUTING_KEY The Rabbit routing key to include with CoJ signing event messages.
DB_HOST The MongoDB host to connect to. localhost
DB_PORT The port to connect to MongoDB on. 27017
DB_NAME The name of the MongoDB database. trainee
DB_USER The username to access the MongoDB instance. admin
DB_PASSWORD The password to access the MongoDB instance. pwd
ENVIRONMENT The environment to log events against. local
EVENT_QUEUE_URL The URL of the SQS event queue.
SENTRY_DSN A Sentry error monitoring Data Source Name.

Usage Examples

Get a Trainee Profile

This endpoint requires request header token as a String.

GET /trainee/api/trainee-profile
Get Trainee IDs by Email
GET /trainee/api/trainee-profile/trainee-ids?email={email}
Update Trainee Details

These PATCH endpoints apply to the following trainee details types:

  • Basic details*: basic-details
  • Contact details: contact-details
  • GDC details: gdc-details
  • GMC details: gmc-details
  • Personal information: personal-info
  • Person owner: person-owner
  • Placement: placement
  • Programme membership: programme-membership
  • Qualification: qualification
PATCH /trainee/api/{details_type}/{tisId}

*The PATCH endpoint for Basic details would publish an event to the SQS queue (EVENT_QUEUE_URL) when a trainee profile is first created, to trigger a full data refresh of the trainee.

Delete Trainee Details

These DELETE endpoints apply to the following trainee details types:

  • Trainee profile: trainee-profile
  • Programme membership: programme-membership
DELETE /trainee/api/{details_type}/{tisId}/
Delete Particular Trainee Details

These DELETE endpoints apply to the following trainee details types:

  • Placement: placement
  • Qualification: qualification
DELETE /trainee/api/{details_type}/{tisId}/{details_type_id}

Testing

The Gradle test task can be used to run automated tests and produce coverage reports.

gradlew test

The Gradle check lifecycle task can be used to run automated tests and also verify formatting conforms to the code style guidelines.

gradlew check

Building

gradlew bootBuildImage

Versioning

This project uses Semantic Versioning.

License

This project is license under The MIT License (MIT).

About

A service for managing trainee's details.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages