File tree Expand file tree Collapse file tree 4 files changed +31
-10
lines changed
Expand file tree Collapse file tree 4 files changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -185,3 +185,10 @@ def coding_value(self):
185185
186186
187187SYSTEM_SHORT_IDS = {"http://snomed.info/sct" : "SCT" , "https://nicip.nhs.uk" : "NICIP" }
188+ CONTENT_STABILITY_EXTENSION_URL = (
189+ "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability"
190+ )
191+ CONTENT_STABILITY_SYSTEM_URL = (
192+ "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability"
193+ )
194+ CONTENT_FORMAT_CODE_URL = "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode"
Original file line number Diff line number Diff line change 33from pydantic import ValidationError
44from pydantic_core import ErrorDetails
55
6+ from nrlf .core .constants import CONTENT_FORMAT_CODE_URL , CONTENT_STABILITY_SYSTEM_URL
67from nrlf .core .response import Response
78from nrlf .core .types import CodeableConcept
89from nrlf .producer .fhir .r4 import model as producer_model
@@ -25,9 +26,9 @@ def append_value_set_url(loc_string: str) -> str:
2526
2627 if "content" in loc_string :
2728 if "extension" in loc_string :
28- return ". See ValueSet: https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability "
29+ return f ". See ValueSet: { CONTENT_STABILITY_SYSTEM_URL } "
2930 if "format" in loc_string :
30- return ". See ValueSet: https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode "
31+ return f ". See ValueSet: { CONTENT_FORMAT_CODE_URL } "
3132
3233 return ""
3334
Original file line number Diff line number Diff line change 1- from layer .nrlf .core .constants import CATEGORY_ATTRIBUTES , TYPE_ATTRIBUTES
1+ from layer .nrlf .core .constants import (
2+ CATEGORY_ATTRIBUTES ,
3+ CONTENT_FORMAT_CODE_URL ,
4+ CONTENT_STABILITY_EXTENSION_URL ,
5+ CONTENT_STABILITY_SYSTEM_URL ,
6+ TYPE_ATTRIBUTES ,
7+ )
28from nrlf .producer .fhir .r4 .model import (
39 Attachment ,
410 CodeableConcept ,
@@ -43,18 +49,18 @@ def create_test_document_reference(items: dict) -> DocumentReference:
4349 format = NRLFormatCode (
4450 system = items .get (
4551 "formatSystem" ,
46- "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode" ,
52+ CONTENT_FORMAT_CODE_URL ,
4753 ),
4854 code = items .get ("formatCode" , "urn:nhs-ic:unstructured" ),
4955 display = items .get ("formatDisplay" , "Unstructured Document" ),
5056 ),
5157 extension = [
5258 ContentStabilityExtension (
53- url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability" ,
59+ url = CONTENT_STABILITY_EXTENSION_URL ,
5460 valueCodeableConcept = ContentStabilityExtensionValueCodeableConcept (
5561 coding = [
5662 ContentStabilityExtensionCoding (
57- system = "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability" ,
63+ system = CONTENT_STABILITY_SYSTEM_URL ,
5864 code = "static" ,
5965 display = "Static" ,
6066 )
Original file line number Diff line number Diff line change 1- from nrlf .core .constants import TYPE_ATTRIBUTES , Categories , PointerTypes
1+ from nrlf .core .constants import (
2+ CONTENT_FORMAT_CODE_URL ,
3+ CONTENT_STABILITY_EXTENSION_URL ,
4+ CONTENT_STABILITY_SYSTEM_URL ,
5+ TYPE_ATTRIBUTES ,
6+ Categories ,
7+ PointerTypes ,
8+ )
29from nrlf .producer .fhir .r4 .model import (
310 Attachment ,
411 CodeableConcept ,
@@ -37,17 +44,17 @@ def build_document_reference(
3744 url = content_url ,
3845 ),
3946 format = NRLFormatCode (
40- system = "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode" ,
47+ system = CONTENT_FORMAT_CODE_URL ,
4148 code = "urn:nhs-ic:unstructured" ,
4249 display = "Unstructured Document" ,
4350 ),
4451 extension = [
4552 ContentStabilityExtension (
46- url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability" ,
53+ url = CONTENT_STABILITY_EXTENSION_URL ,
4754 valueCodeableConcept = ContentStabilityExtensionValueCodeableConcept (
4855 coding = [
4956 ContentStabilityExtensionCoding (
50- system = "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability" ,
57+ system = CONTENT_STABILITY_SYSTEM_URL ,
5158 code = "static" ,
5259 display = "Static" ,
5360 )
You can’t perform that action at this time.
0 commit comments