Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rcpch-pdu #24

Merged
merged 4 commits into from
Aug 16, 2024
Merged

Rcpch-pdu #24

merged 4 commits into from
Aug 16, 2024

Conversation

eatyourpeas
Copy link
Member

Overview

Creates a new endpoint returning paediatric_diabetes_units/paediatric_diabetes_units_trust_list with the structure:

{
    "pz_code": "PZ215",
    "parent": {
      "ods_code": "RJZ",
      "name": "KING'S COLLEGE HOSPITAL NHS FOUNDATION TRUST",
      "address_line_1": "DENMARK HILL",
      "address_line_2": "",
      "town": "LONDON",
      "postcode": "SE5 9RS",
      "country": "ENGLAND",
      "telephone": null,
      "website": null,
      "active": true,
      "published_at": null
    },
    "primary_organisation": {
      "ods_code": "RJZ01",
      "name": "KING'S COLLEGE HOSPITAL (DENMARK HILL)"
    }
  }

If no pz code is supplied, a list is supplied.

This returns the PZ code, the associated trust and the lead PDU organisation if more than one organisation.
RCPCH has been added as PZ code PZ999

Code changes

Adds a new serializer and a viewset, and a new endpoint to urls.py
Only GET requests are accepted
All the models are now also registered with admin.

Documentation changes (done or required as a result of this PR)

This is in swagger

Related Issues

This is part of NPDA implementation
As part of this Bedford and Luton (which are the same trust) have been updated to reflect they have different PZ numbers - closes #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant