Skip to content

Commit 257de74

Browse files
committed
[NRL-1290] Extend model to support structured content format
1 parent 57c177f commit 257de74

File tree

5 files changed

+37
-9
lines changed

5 files changed

+37
-9
lines changed

api/consumer/swagger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,12 +1250,14 @@ components:
12501250
enum:
12511251
- "urn:nhs-ic:record-contact"
12521252
- "urn:nhs-ic:unstructured"
1253+
- "urn:nhs-ic:structured"
12531254
description: The code representing the format of the document.
12541255
display:
12551256
type: string
12561257
enum:
12571258
- "Contact details (HTTP Unsecured)"
12581259
- "Unstructured Document"
1260+
- "Structured Document"
12591261
description: The display text for the code.
12601262
required:
12611263
- system

api/producer/swagger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,12 +1868,14 @@ components:
18681868
enum:
18691869
- "urn:nhs-ic:record-contact"
18701870
- "urn:nhs-ic:unstructured"
1871+
- "urn:nhs-ic:structured"
18711872
description: The code representing the format of the document.
18721873
display:
18731874
type: string
18741875
enum:
18751876
- "Contact details (HTTP Unsecured)"
18761877
- "Unstructured Document"
1878+
- "Structured Document"
18771879
description: The display text for the code.
18781880
required:
18791881
- system

layer/nrlf/consumer/fhir/r4/model.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: swagger.yaml
3-
# timestamp: 2025-02-07T14:10:39+00:00
3+
# timestamp: 2025-02-13T08:42:14+00:00
44

55
from __future__ import annotations
66

@@ -246,11 +246,19 @@ class NRLFormatCode(Coding):
246246
Field(description="The system URL for the NRLF Format Code."),
247247
]
248248
code: Annotated[
249-
Literal["urn:nhs-ic:record-contact", "urn:nhs-ic:unstructured"],
249+
Literal[
250+
"urn:nhs-ic:record-contact",
251+
"urn:nhs-ic:unstructured",
252+
"urn:nhs-ic:structured",
253+
],
250254
Field(description="The code representing the format of the document."),
251255
]
252256
display: Annotated[
253-
Literal["Contact details (HTTP Unsecured)", "Unstructured Document"],
257+
Literal[
258+
"Contact details (HTTP Unsecured)",
259+
"Unstructured Document",
260+
"Structured Document",
261+
],
254262
Field(description="The display text for the code."),
255263
]
256264

layer/nrlf/producer/fhir/r4/model.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: swagger.yaml
3-
# timestamp: 2025-02-07T14:10:35+00:00
3+
# timestamp: 2025-02-13T08:42:12+00:00
44

55
from __future__ import annotations
66

@@ -290,11 +290,19 @@ class NRLFormatCode(Coding):
290290
Field(description="The system URL for the NRLF Format Code."),
291291
]
292292
code: Annotated[
293-
Literal["urn:nhs-ic:record-contact", "urn:nhs-ic:unstructured"],
293+
Literal[
294+
"urn:nhs-ic:record-contact",
295+
"urn:nhs-ic:unstructured",
296+
"urn:nhs-ic:structured",
297+
],
294298
Field(description="The code representing the format of the document."),
295299
]
296300
display: Annotated[
297-
Literal["Contact details (HTTP Unsecured)", "Unstructured Document"],
301+
Literal[
302+
"Contact details (HTTP Unsecured)",
303+
"Unstructured Document",
304+
"Structured Document",
305+
],
298306
Field(description="The display text for the code."),
299307
]
300308

layer/nrlf/producer/fhir/r4/strict_model.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: swagger.yaml
3-
# timestamp: 2025-02-07T14:10:37+00:00
3+
# timestamp: 2025-02-13T08:42:13+00:00
44

55
from __future__ import annotations
66

@@ -261,11 +261,19 @@ class NRLFormatCode(Coding):
261261
Field(description="The system URL for the NRLF Format Code."),
262262
]
263263
code: Annotated[
264-
Literal["urn:nhs-ic:record-contact", "urn:nhs-ic:unstructured"],
264+
Literal[
265+
"urn:nhs-ic:record-contact",
266+
"urn:nhs-ic:unstructured",
267+
"urn:nhs-ic:structured",
268+
],
265269
Field(description="The code representing the format of the document."),
266270
]
267271
display: Annotated[
268-
Literal["Contact details (HTTP Unsecured)", "Unstructured Document"],
272+
Literal[
273+
"Contact details (HTTP Unsecured)",
274+
"Unstructured Document",
275+
"Structured Document",
276+
],
269277
Field(description="The display text for the code."),
270278
]
271279

0 commit comments

Comments
 (0)