Skip to content

Conversation

@nijk
Copy link
Contributor

@nijk nijk commented Dec 1, 2025

Ticket: PAE-000

Description

Define PRN data model via Entity Relationship Diagram and host an API definition for external consumption of PRN data in our system


Please see the Pull Requests standards.

@nijk nijk force-pushed the PAE-000-prn-modelling branch from cc95782 to d0e1a2e Compare December 2, 2025 17:21
@nijk nijk enabled auto-merge (squash) December 2, 2025 17:21
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

USER-SUMMARY updatedBy
bool isExport
bool isDecemberWaste
string prnNumber

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth considering using mongo id of the document as prnNumber instead of separate field?

I think it has to be in specific format and that's why modelled as separate field. Also does it has to be unique?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does have a specific format but I don't know much about it. We should get together with Fran to discuss this and define it fully here

ObjectId _id PK
ObjectId organisationId FK
string name
string position

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Organisation schema has a field called job or title for user details. If position represents same information better to be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout, let's take a look together and agree what consistent looks like

schema:
type: string
format: uuid
example: 123e4567-e89b-12d3-a456-426614174000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I misunderstood all id's are meant to be mongo one's not UUID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, I thought Fran had updated these. I will ask her

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc'ing @franv-1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot - I'd updated the id's in the Entities but missed the parameters - I'll update

description: Timestamp when the PRN or PERN was cancelled
example: 2024-12-01T11:00:00Z

Address:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for info, the site in accreditation has only line1 and postcode. The registration object will have full site address

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another one for Fran

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc'ing @franv-1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be shown on the PRN for a producers POV - I'll check if line1 & postcode is sufficient

items:
type: string
enum:
- awaiting_acceptance

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional not to allow querying by all statuses in schema further down?

         - awaiting_authorisation
        - awaiting_acceptance
        - accepted
        - awaiting_cancellation
        - cancelled
        - rejected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is because the consumer (RPD) only needs the two statuses. Fran to confirm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc'ing @franv-1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes was based on the RPD requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants