Skip to content

Commit a4109c4

Browse files
authored
Merge pull request #375 from NHSDigital/release/2024-10-25
Release/2024 10 25
2 parents 6864d24 + e63aece commit a4109c4

File tree

10 files changed

+56
-12
lines changed

10 files changed

+56
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2024-10-25
4+
- [PI-551] Remove FHIR from Read CPM Product flow
5+
- [PI-553] Remove FHIR from Delete CPM Product flow
6+
37
## 2024-10-22
48
- [PI-552] Remove FHIR from search CPMProduct
59
- [PI-557] Remove search Device

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.10.22
1+
2024.10.25

changelog/2024-10-25.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [PI-551] Remove FHIR from Read CPM Product flow
2+
- [PI-553] Remove FHIR from Delete CPM Product flow

infrastructure/swagger/05_paths.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,7 @@ paths:
199199
responses:
200200
responses:
201201
"200":
202-
description: Read Product operation successful
203-
content:
204-
application/fhir+json:
205-
schema:
206-
$ref: "#/components/schemas/Bundle"
202+
$ref: "#/components/responses/ProductResponse"
207203
"4XX":
208204
<<: *Response4XX
209205
x-amazon-apigateway-integration:

infrastructure/swagger/12_components--responses.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,47 @@ components:
7676
keys:
7777
- key_type: "product_team_id_alias"
7878
key_value: "FOOBAR"
79+
ProductResponse:
80+
description: Read Product operation successful
81+
content:
82+
application/json:
83+
schema:
84+
type: object
85+
properties:
86+
id:
87+
type: string
88+
name:
89+
type: string
90+
ods_code:
91+
type: string
92+
status:
93+
type: string
94+
created_on:
95+
type: string
96+
updated_on:
97+
type: string
98+
deleted_on:
99+
type: string
100+
keys:
101+
type: array
102+
items:
103+
type: object
104+
properties:
105+
key_type:
106+
type: string
107+
key_value:
108+
type: string
109+
example:
110+
id: "123-XXX"
111+
name: "Sample Product Team"
112+
ods_code: "F5H1R"
113+
status: "active"
114+
created_on: "2024-10-15T10:00:00Z"
115+
updated_on: "2024-10-15T10:00:00Z"
116+
deleted_on: "null"
117+
keys:
118+
- key_type: "product_team_id_alias"
119+
key_value: "FOOBAR"
79120
DeviceReferenceDataResponse:
80121
description: Read Device Reference Data operation successful
81122
content:

infrastructure/swagger/swagger-fhir-generator-definitions/endpoints.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
# described in https://hl7.org/fhir/r4b/http.html
1111

1212
Device: [create, read]
13-
Product: [read]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "connecting-party-manager"
3-
version = "2024.10.22"
3+
version = "2024.10.25"
44
description = "Repository for the Connecting Party Manager API and related services"
55
authors = ["NHS England"]
66
license = "LICENSE.md"

src/api/deleteCpmProduct/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from api_utils.api_step_chain import execute_step_chain_fhir as execute_step_chain
1+
from api_utils.api_step_chain import execute_step_chain
22
from domain.logging.step_decorators import logging_step_decorators
33
from event.aws.client import dynamodb_client
44
from event.environment import BaseEnvironment

src/api/readCpmProduct/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from api_utils.api_step_chain import execute_step_chain_fhir as execute_step_chain
1+
from api_utils.api_step_chain import execute_step_chain
22
from event.aws.client import dynamodb_client
33
from event.environment import BaseEnvironment
44
from event.logging.logger import setup_logger

src/layers/domain/api/common_steps/read_product.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from http import HTTPStatus
2+
13
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEvent
24
from domain.core.cpm_product.v1 import CpmProduct
35
from domain.core.product_team.v3 import ProductTeam
@@ -33,9 +35,9 @@ def read_product(data, cache) -> CpmProduct:
3335
return cpm_product
3436

3537

36-
def product_to_dict(data, cache) -> dict:
38+
def product_to_dict(data, cache) -> tuple[str, dict]:
3739
product: CpmProduct = data[read_product]
38-
return product.state()
40+
return HTTPStatus.OK, product.state()
3941

4042

4143
before_steps = [

0 commit comments

Comments
 (0)