From 5f62ee74f28134909f7d8d54c4238b9d6255aed8 Mon Sep 17 00:00:00 2001 From: Aleksandr Penskoi Date: Wed, 17 Dec 2025 09:13:10 +0100 Subject: [PATCH 01/17] py: fhirpy: add client test --- examples/python/fhirpy_client.py | 65 ++++++++++++++++++++++++++++++++ examples/python/generate.ts | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 examples/python/fhirpy_client.py diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py new file mode 100644 index 000000000..601092bdd --- /dev/null +++ b/examples/python/fhirpy_client.py @@ -0,0 +1,65 @@ +import asyncio +import base64 + +from fhir_types.hl7_fhir_r4_core import HumanName +from fhir_types.hl7_fhir_r4_core.bundle import Bundle +from fhir_types.hl7_fhir_r4_core.patient import Patient +from fhirpy import AsyncFHIRClient + +FHIR_SERVER_URL = "http://localhost:8080/fhir" +USERNAME = "root" +PASSWORD = ( + "" # get actual value from docker-compose.yaml: BOX_ROOT_CLIENT_SECRET +) +TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() + + +async def main(): + # Create an instance + client = AsyncFHIRClient( + "http://localhost:8080/fhir", + authorization=f"Basic {TOKEN}", + ) + + # Search for patients + resources = client.resources("Patient") # Return lazy search set + resources = resources.search(name="John").limit(10).sort("name") + patients = await resources.fetch() # Returns list of AsyncFHIRResource + + # Create Patient reource + patient = Patient( + name=[HumanName(given=["Create"], family="Test")], + gender="female", + birthDate="1980-01-01", + ) + pat = await client.create(patient) # returns Patient + print(pat) + + # Create Organization resource + organization = client.resource("Organization", name="beda.software", active=False) + await organization.save() + + # Update (PATCH) organization. Resource support accessing its elements + # both as attribute and as a dictionary keys + if organization["active"] is False: + organization.active = True + await organization.save(fields=["active"]) + # `await organization.patch(active=True)` would do the same PATCH operation + + # # Get patient resource by reference and delete + # patient_ref = client.reference("Patient", "new_patient") + # # Get resource from this reference + # # (throw ResourceNotFound if no resource was found) + # patient_res = await patient_ref.to_resource() + # await patient_res.delete() + + # Iterate over search set + org_resources = client.resources("Organization") + # Lazy loading resources page by page with page count = 100 + async for org_resource in org_resources.limit(100): + print(org_resource.serialize()) + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/examples/python/generate.ts b/examples/python/generate.ts index 18bdf3c17..4821bc16c 100644 --- a/examples/python/generate.ts +++ b/examples/python/generate.ts @@ -9,7 +9,7 @@ if (require.main === module) { .python({ allowExtraFields: false, staticDir: "./src/api/writer-generator/python/static-files", - fieldFormat: "snake_case", + fieldFormat: "camelCase", }) .outputTo("./examples/python/fhir_types") .cleanOutput(true); From 0bfef03b2fc6bfa3b9d489b13e296232387405e6 Mon Sep 17 00:00:00 2001 From: Aleksandr Penskoi Date: Wed, 17 Dec 2025 09:13:10 +0100 Subject: [PATCH 02/17] py: fhirpy: add client test --- examples/python/fhirpy_client.py | 65 ++++++++++++++++++++++++++++++++ examples/python/generate.ts | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 examples/python/fhirpy_client.py diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py new file mode 100644 index 000000000..601092bdd --- /dev/null +++ b/examples/python/fhirpy_client.py @@ -0,0 +1,65 @@ +import asyncio +import base64 + +from fhir_types.hl7_fhir_r4_core import HumanName +from fhir_types.hl7_fhir_r4_core.bundle import Bundle +from fhir_types.hl7_fhir_r4_core.patient import Patient +from fhirpy import AsyncFHIRClient + +FHIR_SERVER_URL = "http://localhost:8080/fhir" +USERNAME = "root" +PASSWORD = ( + "" # get actual value from docker-compose.yaml: BOX_ROOT_CLIENT_SECRET +) +TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() + + +async def main(): + # Create an instance + client = AsyncFHIRClient( + "http://localhost:8080/fhir", + authorization=f"Basic {TOKEN}", + ) + + # Search for patients + resources = client.resources("Patient") # Return lazy search set + resources = resources.search(name="John").limit(10).sort("name") + patients = await resources.fetch() # Returns list of AsyncFHIRResource + + # Create Patient reource + patient = Patient( + name=[HumanName(given=["Create"], family="Test")], + gender="female", + birthDate="1980-01-01", + ) + pat = await client.create(patient) # returns Patient + print(pat) + + # Create Organization resource + organization = client.resource("Organization", name="beda.software", active=False) + await organization.save() + + # Update (PATCH) organization. Resource support accessing its elements + # both as attribute and as a dictionary keys + if organization["active"] is False: + organization.active = True + await organization.save(fields=["active"]) + # `await organization.patch(active=True)` would do the same PATCH operation + + # # Get patient resource by reference and delete + # patient_ref = client.reference("Patient", "new_patient") + # # Get resource from this reference + # # (throw ResourceNotFound if no resource was found) + # patient_res = await patient_ref.to_resource() + # await patient_res.delete() + + # Iterate over search set + org_resources = client.resources("Organization") + # Lazy loading resources page by page with page count = 100 + async for org_resource in org_resources.limit(100): + print(org_resource.serialize()) + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/examples/python/generate.ts b/examples/python/generate.ts index 18bdf3c17..4821bc16c 100644 --- a/examples/python/generate.ts +++ b/examples/python/generate.ts @@ -9,7 +9,7 @@ if (require.main === module) { .python({ allowExtraFields: false, staticDir: "./src/api/writer-generator/python/static-files", - fieldFormat: "snake_case", + fieldFormat: "camelCase", }) .outputTo("./examples/python/fhir_types") .cleanOutput(true); From a881e099f6b52856e61baa449d6ea54698306eba Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Fri, 19 Dec 2025 17:01:18 +0000 Subject: [PATCH 03/17] py: fhirpy: fixed fhirpy client --- examples/python/fhirpy_client.py | 204 ++++++++++++++++++++++++------- 1 file changed, 162 insertions(+), 42 deletions(-) diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py index 601092bdd..1258203bd 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python/fhirpy_client.py @@ -1,65 +1,185 @@ import asyncio import base64 +from typing import TypeVar, Dict, Any +from pydantic import BaseModel +from fhirpy import AsyncFHIRClient from fhir_types.hl7_fhir_r4_core import HumanName -from fhir_types.hl7_fhir_r4_core.bundle import Bundle from fhir_types.hl7_fhir_r4_core.patient import Patient -from fhirpy import AsyncFHIRClient +from fhir_types.hl7_fhir_r4_core.organization import Organization + +T = TypeVar('T', bound=BaseModel) FHIR_SERVER_URL = "http://localhost:8080/fhir" USERNAME = "root" -PASSWORD = ( - "" # get actual value from docker-compose.yaml: BOX_ROOT_CLIENT_SECRET -) +PASSWORD = "" TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() +class CompatibleClient(AsyncFHIRClient): + + async def create_from_pydantic_model(self, model: T): + resource_dict = model.model_dump( + mode='json', + by_alias=True, + exclude_none=True + ) + + resource_type = resource_dict.pop('resourceType', None) + if not resource_type and hasattr(model, 'resource_type'): + resource_type = model.resource_type + + if not resource_type: + raise ValueError("Cannot determine resource type from model") + + resource = self.resource(resource_type, **resource_dict) + await resource.save() + return resource + + async def update_from_pydantic_model(self, model: T, resource_id: str): + resource_dict = model.model_dump( + mode='json', + by_alias=True, + exclude_none=True + ) + + resource_type = resource_dict.pop('resourceType', None) + if not resource_type and hasattr(model, 'resource_type'): + resource_type = model.resource_type + + if not resource_type: + raise ValueError("Cannot determine resource type from model") + + resource = self.resource(resource_type, id=resource_id, **resource_dict) + await resource.save() + return resource + + def pydantic_model_to_resource(self, model: T): + resource_dict = model.model_dump( + mode='json', + by_alias=True, + exclude_none=True + ) + + resource_type = resource_dict.pop('resourceType', None) + if not resource_type and hasattr(model, 'resource_type'): + resource_type = model.resource_type + + if not resource_type: + raise ValueError("Cannot determine resource type from model") + + return self.resource(resource_type, **resource_dict) + + async def main(): - # Create an instance - client = AsyncFHIRClient( - "http://localhost:8080/fhir", + + client = CompatibleClient( + FHIR_SERVER_URL, authorization=f"Basic {TOKEN}", ) - # Search for patients - resources = client.resources("Patient") # Return lazy search set - resources = resources.search(name="John").limit(10).sort("name") - patients = await resources.fetch() # Returns list of AsyncFHIRResource - - # Create Patient reource patient = Patient( name=[HumanName(given=["Create"], family="Test")], gender="female", birthDate="1980-01-01", ) - pat = await client.create(patient) # returns Patient - print(pat) - - # Create Organization resource - organization = client.resource("Organization", name="beda.software", active=False) - await organization.save() - - # Update (PATCH) organization. Resource support accessing its elements - # both as attribute and as a dictionary keys - if organization["active"] is False: - organization.active = True - await organization.save(fields=["active"]) - # `await organization.patch(active=True)` would do the same PATCH operation - - # # Get patient resource by reference and delete - # patient_ref = client.reference("Patient", "new_patient") - # # Get resource from this reference - # # (throw ResourceNotFound if no resource was found) - # patient_res = await patient_ref.to_resource() - # await patient_res.delete() - - # Iterate over search set - org_resources = client.resources("Organization") - # Lazy loading resources page by page with page count = 100 - async for org_resource in org_resources.limit(100): - print(org_resource.serialize()) + + created_patient = await client.create_from_pydantic_model(patient) + print(f"Created patient: {created_patient.id}") + print(created_patient.serialize()) + + organization = Organization( + name="Beda Software", + active=True + ) + + created_org = await client.create_from_pydantic_model(organization) + print(f"Created organization: {created_org.id}") + + another_patient = Patient( + name=[HumanName(given=["John"], family="Doe")], + gender="male", + birthDate="1990-05-15", + ) + + patient_resource = client.pydantic_model_to_resource(another_patient) + + await patient_resource.save() + patient_resource.active = True + await patient_resource.save() + + patients = await client.resources("Patient").search(name="Test").fetch() + for pat in patients: + print(f"Found: {pat.get('name', [{}])[0].get('family', 'N/A')}") if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) + + +# import asyncio +# import base64 +# +# from fhir_types.hl7_fhir_r4_core import HumanName +# from fhir_types.hl7_fhir_r4_core.bundle import Bundle +# from fhir_types.hl7_fhir_r4_core.patient import Patient +# from fhirpy import AsyncFHIRClient +# +# FHIR_SERVER_URL = "http://localhost:8080/fhir" +# USERNAME = "root" +# PASSWORD = ( +# "mNZq6yJaRi"#"" # get actual value from docker-compose.yaml: BOX_ROOT_CLIENT_SECRET +# ) +# TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() +# +# +# async def main(): +# # Create an instance +# client = AsyncFHIRClient( +# "http://localhost:8080/fhir", +# authorization=f"Basic {TOKEN}", +# ) +# +# # Search for patients +# resources = client.resources("Patient") # Return lazy search set +# resources = resources.search(name="John").limit(10).sort("name") +# patients = await resources.fetch() # Returns list of AsyncFHIRResource +# +# # Create Patient reource +# patient = Patient( +# name=[HumanName(given=["Create"], family="Test")], +# gender="female", +# birthDate="1980-01-01", +# ) +# +# pat = await client.create(patient) # returns Patient +# print(pat) +# +# # Create Organization resource +# organization = client.resource("Organization", name="beda.software", active=False) +# await organization.save() +# +# # Update (PATCH) organization. Resource support accessing its elements +# # both as attribute and as a dictionary keys +# if organization["active"] is False: +# organization.active = True +# await organization.save(fields=["active"]) +# # `await organization.patch(active=True)` would do the same PATCH operation +# +# # # Get patient resource by reference and delete +# # patient_ref = client.reference("Patient", "new_patient") +# # # Get resource from this reference +# # # (throw ResourceNotFound if no resource was found) +# # patient_res = await patient_ref.to_resource() +# # await patient_res.delete() +# +# # Iterate over search set +# org_resources = client.resources("Organization") +# # Lazy loading resources page by page with page count = 100 +# async for org_resource in org_resources.limit(100): +# print(org_resource.serialize()) +# +# +# if __name__ == "__main__": +# loop = asyncio.get_event_loop() +# loop.run_until_complete(main()) From c57d60218b1760bbcbeda78502ca8b5b923454d3 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Mon, 22 Dec 2025 20:25:04 +0000 Subject: [PATCH 04/17] py: fhirpy: direct usage of AsyncFHIRClient --- examples/python/fhirpy_client.py | 162 +++++-------------------------- examples/python/generate.ts | 2 +- 2 files changed, 24 insertions(+), 140 deletions(-) diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py index 1258203bd..c41424d21 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python/fhirpy_client.py @@ -1,5 +1,6 @@ import asyncio import base64 +import json from typing import TypeVar, Dict, Any from pydantic import BaseModel from fhirpy import AsyncFHIRClient @@ -16,170 +17,53 @@ TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() -class CompatibleClient(AsyncFHIRClient): - - async def create_from_pydantic_model(self, model: T): - resource_dict = model.model_dump( - mode='json', - by_alias=True, - exclude_none=True - ) - - resource_type = resource_dict.pop('resourceType', None) - if not resource_type and hasattr(model, 'resource_type'): - resource_type = model.resource_type - - if not resource_type: - raise ValueError("Cannot determine resource type from model") - - resource = self.resource(resource_type, **resource_dict) - await resource.save() - return resource - - async def update_from_pydantic_model(self, model: T, resource_id: str): - resource_dict = model.model_dump( - mode='json', - by_alias=True, - exclude_none=True - ) - - resource_type = resource_dict.pop('resourceType', None) - if not resource_type and hasattr(model, 'resource_type'): - resource_type = model.resource_type - - if not resource_type: - raise ValueError("Cannot determine resource type from model") - - resource = self.resource(resource_type, id=resource_id, **resource_dict) - await resource.save() - return resource - - def pydantic_model_to_resource(self, model: T): - resource_dict = model.model_dump( - mode='json', - by_alias=True, - exclude_none=True - ) - - resource_type = resource_dict.pop('resourceType', None) - if not resource_type and hasattr(model, 'resource_type'): - resource_type = model.resource_type +def get_resource_components(model: T): + resource_dict = model.model_dump( + mode='json', + by_alias=True, + exclude_none=True + ) - if not resource_type: - raise ValueError("Cannot determine resource type from model") + resource_type = resource_dict.pop('resourceType', None) + if not resource_type and hasattr(model, 'resource_type'): + resource_type = model.resource_type - return self.resource(resource_type, **resource_dict) + if not resource_type: + raise ValueError("Cannot determine resource type from model") + return resource_type, resource_dict async def main(): - client = CompatibleClient( + client = AsyncFHIRClient( FHIR_SERVER_URL, authorization=f"Basic {TOKEN}", ) patient = Patient( - name=[HumanName(given=["Create"], family="Test")], + name=[HumanName(given=["Bob"], family="Cool")], gender="female", birthDate="1980-01-01", ) - created_patient = await client.create_from_pydantic_model(patient) + patient_resource_type, patient_fields = get_resource_components(patient) + + created_patient = await client.resource(patient_resource_type, **patient_fields).save() print(f"Created patient: {created_patient.id}") - print(created_patient.serialize()) + print(json.dumps(created_patient.serialize(), indent=2)) organization = Organization( name="Beda Software", active=True ) - created_org = await client.create_from_pydantic_model(organization) - print(f"Created organization: {created_org.id}") - - another_patient = Patient( - name=[HumanName(given=["John"], family="Doe")], - gender="male", - birthDate="1990-05-15", - ) - - patient_resource = client.pydantic_model_to_resource(another_patient) - - await patient_resource.save() - patient_resource.active = True - await patient_resource.save() + organization_resource = await client.resource("Organization", **organization.model_dump(exclude_none=True)).save() + print(f"Created organization: {organization_resource.id}") - patients = await client.resources("Patient").search(name="Test").fetch() + patients = await client.resources("Patient").fetch() for pat in patients: print(f"Found: {pat.get('name', [{}])[0].get('family', 'N/A')}") if __name__ == "__main__": - asyncio.run(main()) - - -# import asyncio -# import base64 -# -# from fhir_types.hl7_fhir_r4_core import HumanName -# from fhir_types.hl7_fhir_r4_core.bundle import Bundle -# from fhir_types.hl7_fhir_r4_core.patient import Patient -# from fhirpy import AsyncFHIRClient -# -# FHIR_SERVER_URL = "http://localhost:8080/fhir" -# USERNAME = "root" -# PASSWORD = ( -# "mNZq6yJaRi"#"" # get actual value from docker-compose.yaml: BOX_ROOT_CLIENT_SECRET -# ) -# TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() -# -# -# async def main(): -# # Create an instance -# client = AsyncFHIRClient( -# "http://localhost:8080/fhir", -# authorization=f"Basic {TOKEN}", -# ) -# -# # Search for patients -# resources = client.resources("Patient") # Return lazy search set -# resources = resources.search(name="John").limit(10).sort("name") -# patients = await resources.fetch() # Returns list of AsyncFHIRResource -# -# # Create Patient reource -# patient = Patient( -# name=[HumanName(given=["Create"], family="Test")], -# gender="female", -# birthDate="1980-01-01", -# ) -# -# pat = await client.create(patient) # returns Patient -# print(pat) -# -# # Create Organization resource -# organization = client.resource("Organization", name="beda.software", active=False) -# await organization.save() -# -# # Update (PATCH) organization. Resource support accessing its elements -# # both as attribute and as a dictionary keys -# if organization["active"] is False: -# organization.active = True -# await organization.save(fields=["active"]) -# # `await organization.patch(active=True)` would do the same PATCH operation -# -# # # Get patient resource by reference and delete -# # patient_ref = client.reference("Patient", "new_patient") -# # # Get resource from this reference -# # # (throw ResourceNotFound if no resource was found) -# # patient_res = await patient_ref.to_resource() -# # await patient_res.delete() -# -# # Iterate over search set -# org_resources = client.resources("Organization") -# # Lazy loading resources page by page with page count = 100 -# async for org_resource in org_resources.limit(100): -# print(org_resource.serialize()) -# -# -# if __name__ == "__main__": -# loop = asyncio.get_event_loop() -# loop.run_until_complete(main()) + asyncio.run(main()) \ No newline at end of file diff --git a/examples/python/generate.ts b/examples/python/generate.ts index 4821bc16c..18bdf3c17 100644 --- a/examples/python/generate.ts +++ b/examples/python/generate.ts @@ -9,7 +9,7 @@ if (require.main === module) { .python({ allowExtraFields: false, staticDir: "./src/api/writer-generator/python/static-files", - fieldFormat: "camelCase", + fieldFormat: "snake_case", }) .outputTo("./examples/python/fhir_types") .cleanOutput(true); From 9990bc26b306cdb970885cd88a477019fb25b173 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Tue, 23 Dec 2025 15:57:47 +0000 Subject: [PATCH 05/17] py: fhirpy: extended fhirpy client support --- .../api/writer-generator/python/FHIRBase.py | 31 +++++++++++++++++++ .../writer-generator/python/requirements.txt | 1 + .../fhir_types/hl7_fhir_r4_core/FHIRBase.py | 31 +++++++++++++++++++ examples/python/fhir_types/requirements.txt | 1 + src/api/writer-generator/python.ts | 19 ++++++++---- 5 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 assets/api/writer-generator/python/FHIRBase.py create mode 100644 examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py diff --git a/assets/api/writer-generator/python/FHIRBase.py b/assets/api/writer-generator/python/FHIRBase.py new file mode 100644 index 000000000..6d3090398 --- /dev/null +++ b/assets/api/writer-generator/python/FHIRBase.py @@ -0,0 +1,31 @@ +from typing import Any, Union, Optional, Iterator, Tuple +from pydantic import BaseModel, Field +from typing import Protocol + +class ResourceProtocol(Protocol): + resourceType: Any + id: Union[str, None] + + +class FHIRBase(BaseModel): + """ + This class satisfies ResourceProtocol + """ + resource_type: str = Field(alias="resourceType") + id: Optional[str] = Field(None, alias="id") + + @property + def resourceType(self) -> str: + return self.resource_type + + @resourceType.setter + def resourceType(self, value: str): + self.resource_type = value + + def __iter__(self) -> Iterator[Tuple[str, Any]]: + data = self.model_dump(mode='json', by_alias=True, exclude_none=True) + return iter(data.items()) + + def serialize(self) -> dict: + """Serialize to dict (compatible with fhirpy's serialize method)""" + return self.model_dump(mode='json', by_alias=True, exclude_none=True) \ No newline at end of file diff --git a/assets/api/writer-generator/python/requirements.txt b/assets/api/writer-generator/python/requirements.txt index 82b6749a5..79dcfd3c6 100644 --- a/assets/api/writer-generator/python/requirements.txt +++ b/assets/api/writer-generator/python/requirements.txt @@ -1,5 +1,6 @@ requests>=2.32.0,<3.0.0 pytest>=8.3.0,<9.0.0 pydantic>=2.11.0,<3.0.0 +fhirpy>=2.2.0 mypy>=1.9.0,<2.0.0 types-requests>=2.32.0,<3.0.0 \ No newline at end of file diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py b/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py new file mode 100644 index 000000000..6d3090398 --- /dev/null +++ b/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py @@ -0,0 +1,31 @@ +from typing import Any, Union, Optional, Iterator, Tuple +from pydantic import BaseModel, Field +from typing import Protocol + +class ResourceProtocol(Protocol): + resourceType: Any + id: Union[str, None] + + +class FHIRBase(BaseModel): + """ + This class satisfies ResourceProtocol + """ + resource_type: str = Field(alias="resourceType") + id: Optional[str] = Field(None, alias="id") + + @property + def resourceType(self) -> str: + return self.resource_type + + @resourceType.setter + def resourceType(self, value: str): + self.resource_type = value + + def __iter__(self) -> Iterator[Tuple[str, Any]]: + data = self.model_dump(mode='json', by_alias=True, exclude_none=True) + return iter(data.items()) + + def serialize(self) -> dict: + """Serialize to dict (compatible with fhirpy's serialize method)""" + return self.model_dump(mode='json', by_alias=True, exclude_none=True) \ No newline at end of file diff --git a/examples/python/fhir_types/requirements.txt b/examples/python/fhir_types/requirements.txt index 82b6749a5..79dcfd3c6 100644 --- a/examples/python/fhir_types/requirements.txt +++ b/examples/python/fhir_types/requirements.txt @@ -1,5 +1,6 @@ requests>=2.32.0,<3.0.0 pytest>=8.3.0,<9.0.0 pydantic>=2.11.0,<3.0.0 +fhirpy>=2.2.0 mypy>=1.9.0,<2.0.0 types-requests>=2.32.0,<3.0.0 \ No newline at end of file diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index eb5b155d6..0e1009b23 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -102,7 +102,7 @@ const fixReservedWords = (name: string): string => { }; const injectSuperClasses = (name: string): string[] => { - return name === "Resource" || name === "Element" ? ["BaseModel"] : []; + return name === "Resource" ? ["FHIRBase"] : name === "Element" ? ["BaseModel"] : []; }; const canonicalToName = (canonical: string | undefined, dropFragment = true) => { @@ -175,8 +175,10 @@ export class Python extends Writer { } private generateComplexTypesPackages(groupedComplexTypes: Record): void { - for (const [packageName, packageComplexTypes] of Object.entries(groupedComplexTypes)) { - this.cd(`/${snakeCase(packageName)}`, () => { + for (let [packageName, packageComplexTypes] of Object.entries(groupedComplexTypes)) { + packageName = snakeCase(packageName); + fs.cpSync(resolvePyAssets("FHIRBase.py"), Path.resolve(this.opts.outputDir, packageName, "FHIRBase.py")); + this.cd(`/${packageName}`, () => { this.generateBasePy(packageComplexTypes); }); } @@ -367,6 +369,7 @@ export class Python extends Writer { this.cat(`${snakeCase(schema.identifier.name)}.py`, () => { this.generateDisclaimer(); this.generateDefaultImports(); + this.generateFHIRBaseImport(schema.identifier.package); this.line(); this.generateDependenciesImports(schema); this.line(); @@ -376,7 +379,11 @@ export class Python extends Writer { }); } - generateType(schema: RegularTypeSchema): void { + private generateFHIRBaseImport(packageName: string): void { + this.pyImportFrom(`${this.pyFhirPackageByName(packageName)}.FHIRBase`, "FHIRBase"); + } + + private generateType(schema: RegularTypeSchema): void { const className = deriveResourceName(schema.identifier); const superClasses = this.getSuperClasses(schema); @@ -502,7 +509,7 @@ export class Python extends Writer { this.line(" return cls.model_validate_json(json)"); } - generateNestedTypes(schema: RegularTypeSchema): void { + private generateNestedTypes(schema: RegularTypeSchema): void { if (!schema.nested) return; this.line(); @@ -559,7 +566,7 @@ export class Python extends Writer { return grouped; } - pyImportFrom(pyPackage: string, ...entities: string[]): void { + private pyImportFrom(pyPackage: string, ...entities: string[]): void { const oneLine = `from ${pyPackage} import ${entities.join(", ")}`; if (this.shouldUseSingleLineImport(oneLine, entities)) { From 07f9cbb139eeb0a484f5e80f9e0089c9817d081e Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Tue, 23 Dec 2025 15:59:08 +0000 Subject: [PATCH 06/17] py: changed example for supporting fhirpy client --- examples/python/fhir_types/hl7_fhir_r4_core/account.py | 1 + .../fhir_types/hl7_fhir_r4_core/activity_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py | 1 + .../fhir_types/hl7_fhir_r4_core/allergy_intolerance.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/appointment.py | 1 + .../fhir_types/hl7_fhir_r4_core/appointment_response.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/basic.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/binary.py | 1 + .../hl7_fhir_r4_core/biologically_derived_product.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/body_structure.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/bundle.py | 1 + .../fhir_types/hl7_fhir_r4_core/capability_statement.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/care_team.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py | 1 + .../fhir_types/hl7_fhir_r4_core/charge_item_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/claim.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/claim_response.py | 1 + .../fhir_types/hl7_fhir_r4_core/clinical_impression.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/code_system.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/communication.py | 1 + .../fhir_types/hl7_fhir_r4_core/communication_request.py | 1 + .../fhir_types/hl7_fhir_r4_core/compartment_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/composition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/condition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/consent.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/contract.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/coverage.py | 1 + .../hl7_fhir_r4_core/coverage_eligibility_request.py | 1 + .../hl7_fhir_r4_core/coverage_eligibility_response.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/detected_issue.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/device.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/device_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/device_request.py | 1 + .../fhir_types/hl7_fhir_r4_core/device_use_statement.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/document_manifest.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/document_reference.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/domain_resource.py | 1 + .../fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/encounter.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/enrollment_request.py | 1 + .../fhir_types/hl7_fhir_r4_core/enrollment_response.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/episode_of_care.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/event_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/evidence.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/evidence_variable.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/example_scenario.py | 1 + .../fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py | 1 + .../fhir_types/hl7_fhir_r4_core/family_member_history.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/flag.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/goal.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/graph_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/group.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/guidance_response.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/healthcare_service.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/immunization.py | 1 + .../fhir_types/hl7_fhir_r4_core/immunization_evaluation.py | 1 + .../hl7_fhir_r4_core/immunization_recommendation.py | 1 + .../fhir_types/hl7_fhir_r4_core/implementation_guide.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/insurance_plan.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/invoice.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/library.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/linkage.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/list.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/location.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/measure.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/measure_report.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/media.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/medication.py | 1 + .../fhir_types/hl7_fhir_r4_core/medication_administration.py | 1 + .../fhir_types/hl7_fhir_r4_core/medication_dispense.py | 1 + .../fhir_types/hl7_fhir_r4_core/medication_knowledge.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/medication_request.py | 1 + .../fhir_types/hl7_fhir_r4_core/medication_statement.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/medicinal_product.py | 1 + .../hl7_fhir_r4_core/medicinal_product_authorization.py | 1 + .../hl7_fhir_r4_core/medicinal_product_contraindication.py | 1 + .../hl7_fhir_r4_core/medicinal_product_indication.py | 1 + .../hl7_fhir_r4_core/medicinal_product_ingredient.py | 1 + .../hl7_fhir_r4_core/medicinal_product_interaction.py | 1 + .../hl7_fhir_r4_core/medicinal_product_manufactured.py | 1 + .../hl7_fhir_r4_core/medicinal_product_packaged.py | 1 + .../hl7_fhir_r4_core/medicinal_product_pharmaceutical.py | 1 + .../hl7_fhir_r4_core/medicinal_product_undesirable_effect.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/message_definition.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/message_header.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/nutrition_order.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/observation.py | 1 + .../fhir_types/hl7_fhir_r4_core/observation_definition.py | 1 + .../fhir_types/hl7_fhir_r4_core/operation_definition.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/operation_outcome.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/organization.py | 1 + .../fhir_types/hl7_fhir_r4_core/organization_affiliation.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/parameters.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/payment_notice.py | 1 + .../fhir_types/hl7_fhir_r4_core/payment_reconciliation.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/person.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/plan_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/practitioner_role.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/procedure.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/provenance.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py | 1 + .../fhir_types/hl7_fhir_r4_core/questionnaire_response.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/related_person.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/request_group.py | 1 + .../fhir_types/hl7_fhir_r4_core/research_definition.py | 1 + .../hl7_fhir_r4_core/research_element_definition.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/research_study.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/research_subject.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/resource.py | 3 ++- .../python/fhir_types/hl7_fhir_r4_core/risk_assessment.py | 1 + .../fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/schedule.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/search_parameter.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/service_request.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/slot.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/specimen.py | 1 + .../fhir_types/hl7_fhir_r4_core/specimen_definition.py | 1 + .../fhir_types/hl7_fhir_r4_core/structure_definition.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/subscription.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/substance.py | 1 + .../fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/substance_polymer.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/substance_protein.py | 1 + .../hl7_fhir_r4_core/substance_reference_information.py | 1 + .../fhir_types/hl7_fhir_r4_core/substance_source_material.py | 1 + .../fhir_types/hl7_fhir_r4_core/substance_specification.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/supply_delivery.py | 1 + .../python/fhir_types/hl7_fhir_r4_core/supply_request.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/task.py | 1 + .../fhir_types/hl7_fhir_r4_core/terminology_capabilities.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/test_report.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/test_script.py | 1 + examples/python/fhir_types/hl7_fhir_r4_core/value_set.py | 1 + .../fhir_types/hl7_fhir_r4_core/verification_result.py | 1 + .../fhir_types/hl7_fhir_r4_core/vision_prescription.py | 1 + examples/python/fhirpy_client.py | 5 ++--- 148 files changed, 150 insertions(+), 4 deletions(-) diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/account.py b/examples/python/fhir_types/hl7_fhir_r4_core/account.py index 1acbac725..6d0614147 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/account.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/account.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py index 87d3d982a..8d2d68211 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, BackboneElement, CodeableConcept, ContactDetail, Dosage, Duration, Expression, Identifier, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py b/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py index 3c930f141..08f40fc6c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py b/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py index e2a721ba8..0dcc78d78 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py b/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py index 7f8651103..e345b9a48 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py index ee477d875..4dc952edd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py b/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py index 9742b4055..c02bff33b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/basic.py b/examples/python/fhir_types/hl7_fhir_r4_core/basic.py index 062e0eb66..d0d472657 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/basic.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/basic.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/binary.py b/examples/python/fhir_types/hl7_fhir_r4_core/binary.py index 991565ab4..6e9b43a72 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/binary.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/binary.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Reference from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py b/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py index f6b4e3f39..f3dc519e9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py b/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py index 3a439aac1..2551a1636 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Attachment, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py b/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py index a799de1b3..2e3679880 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Identifier, Signature from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py index b19479787..e69d88911 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py b/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py index 63ff387cc..63bdf5894 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py b/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py index 8325274f6..4a1f2b011 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py b/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py index 7cd6490d3..baf38712b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py index ecd57117f..a37d2234c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py index e9190dfac..32d3807e3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, Money, Period, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/claim.py b/examples/python/fhir_types/hl7_fhir_r4_core/claim.py index bb7c3ecfc..b82de4350 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/claim.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/claim.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py index c6c697cc2..75fabdf51 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py b/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py index 27eb4514e..a58859a48 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py b/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py index 06589a38e..e4794a3d8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/communication.py b/examples/python/fhir_types/hl7_fhir_r4_core/communication.py index dc740e92a..190b268b9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/communication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/communication.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py index 55ccbdfce..a1aa12919 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py index 3fce8a5f0..f374b4fea 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, ContactDetail, UsageContext from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/composition.py b/examples/python/fhir_types/hl7_fhir_r4_core/composition.py index a45147ccf..d3e5e1890 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/composition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/composition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Narrative, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py b/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py index 265852b87..8174c44dc 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/condition.py b/examples/python/fhir_types/hl7_fhir_r4_core/condition.py index a63b157b5..328dde0a0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/condition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/condition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/consent.py b/examples/python/fhir_types/hl7_fhir_r4_core/consent.py index 136117e4f..74ef91a30 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/consent.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/consent.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/contract.py b/examples/python/fhir_types/hl7_fhir_r4_core/contract.py index d60a8e057..70a497a47 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/contract.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/contract.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Money, Period, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py index 2cf31f0ab..9bf393f75 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py index b15353bdd..713074a2d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py index fa662da16..926a5ec11 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py b/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py index 3b98dfb2b..7980ec914 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device.py b/examples/python/fhir_types/hl7_fhir_r4_core/device.py index e2462d8b1..bbf024fb6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py index b0102616f..3d4f42c04 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, ProdCharacteristic, ProductShelfLife, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py index 5b2bdc361..1f7b301c1 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py index 57993c264..5ae3d9d21 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py index a8e66b83c..ca8b2f69c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Identifier, Period, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py index 17083fca3..ca9585487 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py b/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py index d9be4e2cd..062ff66fa 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py b/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py index aa36ca1a6..c73381948 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py b/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py index 9b9616e28..e090fd6ad 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Extension, Narrative from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py b/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py index 3cd43b44e..3bae98da9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py b/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py index 5b1eaa903..1dfeb1442 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Duration, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py b/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py index 8283f6c03..13ca5b77d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, Coding, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py index d5f5c3467..c9caa8d8b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py index 08cdc12cd..adfbfc3c7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py b/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py index 50accd2d7..9e5d2829e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py index be2d561c0..e2ad84191 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, TriggerDefinition, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py b/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py index 5fff0dfdb..2fb3e872b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py b/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py index 16a7003c9..dfe22ba24 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py b/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py index b04422249..f18851b06 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py b/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py index c69f229e7..1e9637cb5 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py b/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py index 1b6359861..4fbf3b2ee 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/flag.py b/examples/python/fhir_types/hl7_fhir_r4_core/flag.py index 3f23e5f2d..a4d87d01e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/flag.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/flag.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/goal.py b/examples/python/fhir_types/hl7_fhir_r4_core/goal.py index e97d85ab6..09652b3ad 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/goal.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/goal.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Range, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py index ba6a6fa19..051beaff6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/group.py b/examples/python/fhir_types/hl7_fhir_r4_core/group.py index 78ccec869..5f0a6ae1e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/group.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/group.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py index 239a8d8bd..aa0374076 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, DataRequirement, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py b/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py index 627d4da8d..b844506d7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py b/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py index 3ed95f682..b238ed168 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Coding, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py index c4ddb0537..bfbbe006d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py index 5f7c53886..321771663 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py index 1b9d3c5d8..f15128875 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py b/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py index 7c71bd68d..104aeacbd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py b/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py index da9062c52..8bc6eef76 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Money, Period, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py b/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py index 683b55dad..aeb18236a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Money, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/library.py b/examples/python/fhir_types/hl7_fhir_r4_core/library.py index 31b189069..803055c60 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/library.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/library.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, CodeableConcept, ContactDetail, DataRequirement, Identifier, ParameterDefinition, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py b/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py index 231e44251..8acc6c1aa 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/list.py b/examples/python/fhir_types/hl7_fhir_r4_core/list.py index 010ad1c1a..9e7a52fff 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/list.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/list.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/location.py b/examples/python/fhir_types/hl7_fhir_r4_core/location.py index 801f51348..a46d795c5 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/location.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/location.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, Coding, ContactPoint, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/measure.py b/examples/python/fhir_types/hl7_fhir_r4_core/measure.py index 64a7d5e50..ac889171b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/measure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/measure.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Expression, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py index d6003f456..102b168f3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/media.py b/examples/python/fhir_types/hl7_fhir_r4_core/media.py index 0c80f45a8..4fbcec101 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/media.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/media.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication.py index 1a19f540d..e42b3c630 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py index 94f879d94..eaa570841 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py index f2ebffcc2..6fd06758e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Dosage, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py index 3d9b274fa..ec4512fcb 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Dosage, Duration, Money, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py index b071220e9..bc4c14a75 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Dosage, Duration, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py index 90c1d3ed0..ce88674cf 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Dosage, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py index e040b436c..711487ebd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Identifier, MarketingStatus, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py index 235d7ec12..eba31b339 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py index cedaa84a0..8d05ddad9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Population, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py index 3c5451810..6ac4aa575 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Population, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py index 036a7802f..d4e47cb57 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py index 9c0571241..d4602e0a3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py index 437324f09..912a7a950 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ProdCharacteristic, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py index a3da85482..c69152b04 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, MarketingStatus, ProdCharacteristic, ProductShelfLife, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py index 182ce7511..ebf5cd8a8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py index 340ceea2a..3995574ec 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Population, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py index a725e0388..ce3a7cc29 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py b/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py index c284b5bc3..1bc50d87a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactPoint, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py b/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py index bc07826b9..40cad5e4a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py b/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py index 32682d273..5f969be1a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Period, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py b/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py index 4b9a957af..e0e888e8f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Ratio, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/observation.py b/examples/python/fhir_types/hl7_fhir_r4_core/observation.py index bb57716c2..1458ab1de 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/observation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/observation.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Ratio, Reference, SampledData, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py index c48f4b577..d3812ad34 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py index e9a46d4d4..cadfcce6c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py b/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py index 6b8b7f8d1..2adeac108 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/organization.py b/examples/python/fhir_types/hl7_fhir_r4_core/organization.py index 0f135c604..008a508d4 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/organization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/organization.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py b/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py index fc06fa09a..06e6a3780 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py b/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py index f9f2d0882..41d11a940 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py b/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py index 581fa3a5d..a44ab1750 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Money, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py b/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py index ddb3e93e7..9338c1639 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/person.py b/examples/python/fhir_types/hl7_fhir_r4_core/person.py index 663e0ad89..afc97f64c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/person.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/person.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, ContactPoint, HumanName, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py index 55a7e4abb..91b4af2e1 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py index 9f08db5ec..0ceb20d46 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py index 8c12660d8..1d0433e8f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py b/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py index 50461d757..1207a9c73 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py b/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py index 92e96ef1a..6a75ff37b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Period, Reference, Signature diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py index 3669e8f0a..957bf55ee 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, Period, Quantity, Reference, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py index 972b5cbd6..9c4289b60 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, Coding, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py b/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py index 75a3ebf92..5b90077d7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py b/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py index e19194564..3f72e9d2a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Duration, Expression, Identifier, Period, Range, Reference, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py index f65a66079..f53f671ab 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py index 021c68f99..a92f35578 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py index 2096053a5..153b93d3c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py index c3539a842..e9cf62013 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/resource.py b/examples/python/fhir_types/hl7_fhir_r4_core/resource.py index 910f9ef1a..197b0513a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/resource.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/resource.py @@ -5,11 +5,12 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Meta -class Resource(BaseModel): +class Resource(FHIRBase): model_config = ConfigDict(validate_by_name=True, serialize_by_alias=True, extra="forbid") resource_type: str = Field( default='Resource', diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py b/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py index 7b87d68f9..af322b3dd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py b/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py index f46265529..137cd40b0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py b/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py index 31cc15aa6..78822132f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py b/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py index 097261c36..f9209fd2f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py index 035a86cc3..68532c536 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Identifier, Period, Quantity, Range, Ratio, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/slot.py b/examples/python/fhir_types/hl7_fhir_r4_core/slot.py index 98bd18b07..0e5d4f517 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/slot.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/slot.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py b/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py index d8310f435..9c2782001 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Duration, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py index 55346a7ea..93f1b729c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py index cbd9147c3..5efbc557a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, ElementDefinition, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py b/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py index 2085d8665..f0cb87bc6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py b/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py index 536240f32..d763e78f7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, ContactPoint from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance.py index b8fbf86f2..2f61b6bd9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py index e855cd072..db80c55c3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py index 496bedc1c..6a64ba14a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, SubstanceAmount diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py index bb526867d..81a519caf 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py index c14226bbc..80d19eedd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py index 4575afd59..6606bb93d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py index ddae58f28..c127fb0b9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier, Quantity, Range, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py b/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py index 97e022314..7ac7837fd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py index 38bee6a22..3241317a6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/task.py b/examples/python/fhir_types/hl7_fhir_r4_core/task.py index c37f7900d..b70e2e692 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/task.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/task.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py b/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py index 2fe997d14..b15e8d9e9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py index 85efeb18c..7bd130747 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py b/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py index 9db156995..2bd25c934 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py b/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py index a75538791..f52e49718 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py b/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py index 1ca0d0bae..767841cb5 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Reference, Signature, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py b/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py index b921af877..4145d078a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py @@ -5,6 +5,7 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal +from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py index c41424d21..f855b7a95 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python/fhirpy_client.py @@ -41,14 +41,13 @@ async def main(): ) patient = Patient( - name=[HumanName(given=["Bob"], family="Cool")], + name=[HumanName(given=["Bob"], family="Cool2")], gender="female", birthDate="1980-01-01", ) - patient_resource_type, patient_fields = get_resource_components(patient) + created_patient = await client.create(patient) - created_patient = await client.resource(patient_resource_type, **patient_fields).save() print(f"Created patient: {created_patient.id}") print(json.dumps(created_patient.serialize(), indent=2)) From 1097371926194afa1ad057d6b40e8401ab0c949b Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Tue, 23 Dec 2025 16:05:34 +0000 Subject: [PATCH 07/17] minor format fix --- src/api/writer-generator/python.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index 0e1009b23..559d59ab8 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -102,7 +102,9 @@ const fixReservedWords = (name: string): string => { }; const injectSuperClasses = (name: string): string[] => { - return name === "Resource" ? ["FHIRBase"] : name === "Element" ? ["BaseModel"] : []; + if (name === "Resource") return ["FHIRBase"]; + if (name === "Element") return ["BaseModel"]; + return []; }; const canonicalToName = (canonical: string | undefined, dropFragment = true) => { From 2721421f47cfe74f36c2c3916b3502708d8f401f Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Fri, 26 Dec 2025 17:40:29 +0000 Subject: [PATCH 08/17] py: replaced fhirpy example with a common client example --- assets/api/writer-generator/python/requirements.txt | 1 - examples/python/fhir_types/hl7_fhir_r4_core/account.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/activity_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/appointment.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/appointment_response.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/basic.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/binary.py | 1 - .../hl7_fhir_r4_core/biologically_derived_product.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/bundle.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/capability_statement.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/care_team.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py | 1 - .../fhir_types/hl7_fhir_r4_core/charge_item_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/claim.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/clinical_impression.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/code_system.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/communication.py | 1 - .../fhir_types/hl7_fhir_r4_core/communication_request.py | 1 - .../fhir_types/hl7_fhir_r4_core/compartment_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/composition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/condition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/consent.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/contract.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/coverage.py | 1 - .../hl7_fhir_r4_core/coverage_eligibility_request.py | 1 - .../hl7_fhir_r4_core/coverage_eligibility_response.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/device.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/device_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/device_request.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/device_use_statement.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/document_manifest.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/document_reference.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py | 1 - .../fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/encounter.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/enrollment_request.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/enrollment_response.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/event_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/evidence.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/evidence_variable.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/example_scenario.py | 1 - .../fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py | 1 - .../fhir_types/hl7_fhir_r4_core/family_member_history.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/flag.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/goal.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/graph_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/group.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/guidance_response.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/healthcare_service.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/immunization.py | 1 - .../fhir_types/hl7_fhir_r4_core/immunization_evaluation.py | 1 - .../fhir_types/hl7_fhir_r4_core/immunization_recommendation.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/implementation_guide.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/invoice.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/library.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/linkage.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/list.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/location.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/measure.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/media.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/medication.py | 1 - .../fhir_types/hl7_fhir_r4_core/medication_administration.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/medication_dispense.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/medication_request.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/medication_statement.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/medicinal_product.py | 1 - .../hl7_fhir_r4_core/medicinal_product_authorization.py | 1 - .../hl7_fhir_r4_core/medicinal_product_contraindication.py | 1 - .../hl7_fhir_r4_core/medicinal_product_indication.py | 1 - .../hl7_fhir_r4_core/medicinal_product_ingredient.py | 1 - .../hl7_fhir_r4_core/medicinal_product_interaction.py | 1 - .../hl7_fhir_r4_core/medicinal_product_manufactured.py | 1 - .../fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py | 1 - .../hl7_fhir_r4_core/medicinal_product_pharmaceutical.py | 1 - .../hl7_fhir_r4_core/medicinal_product_undesirable_effect.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/message_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/message_header.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/observation.py | 1 - .../fhir_types/hl7_fhir_r4_core/observation_definition.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/operation_definition.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/operation_outcome.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/organization.py | 1 - .../fhir_types/hl7_fhir_r4_core/organization_affiliation.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/parameters.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py | 1 - .../fhir_types/hl7_fhir_r4_core/payment_reconciliation.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/person.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/practitioner_role.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/procedure.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/provenance.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py | 1 - .../fhir_types/hl7_fhir_r4_core/questionnaire_response.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/related_person.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/request_group.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/research_definition.py | 1 - .../fhir_types/hl7_fhir_r4_core/research_element_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/research_study.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/research_subject.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/resource.py | 3 +-- examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py | 1 - .../fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/schedule.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/search_parameter.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/service_request.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/slot.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/specimen.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/specimen_definition.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/structure_definition.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/subscription.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/substance.py | 1 - .../fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/substance_polymer.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/substance_protein.py | 1 - .../hl7_fhir_r4_core/substance_reference_information.py | 1 - .../fhir_types/hl7_fhir_r4_core/substance_source_material.py | 1 - .../fhir_types/hl7_fhir_r4_core/substance_specification.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/task.py | 1 - .../fhir_types/hl7_fhir_r4_core/terminology_capabilities.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/test_report.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/test_script.py | 1 - examples/python/fhir_types/hl7_fhir_r4_core/value_set.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/verification_result.py | 1 - .../python/fhir_types/hl7_fhir_r4_core/vision_prescription.py | 1 - examples/python/fhir_types/requirements.txt | 1 - examples/python/generate.ts | 2 +- 150 files changed, 2 insertions(+), 151 deletions(-) diff --git a/assets/api/writer-generator/python/requirements.txt b/assets/api/writer-generator/python/requirements.txt index 79dcfd3c6..82b6749a5 100644 --- a/assets/api/writer-generator/python/requirements.txt +++ b/assets/api/writer-generator/python/requirements.txt @@ -1,6 +1,5 @@ requests>=2.32.0,<3.0.0 pytest>=8.3.0,<9.0.0 pydantic>=2.11.0,<3.0.0 -fhirpy>=2.2.0 mypy>=1.9.0,<2.0.0 types-requests>=2.32.0,<3.0.0 \ No newline at end of file diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/account.py b/examples/python/fhir_types/hl7_fhir_r4_core/account.py index 6d0614147..1acbac725 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/account.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/account.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py index 8d2d68211..87d3d982a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/activity_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, BackboneElement, CodeableConcept, ContactDetail, Dosage, Duration, Expression, Identifier, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py b/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py index 08f40fc6c..3c930f141 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/adverse_event.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py b/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py index 0dcc78d78..e2a721ba8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/allergy_intolerance.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py b/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py index e345b9a48..7f8651103 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/appointment.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py index 4dc952edd..ee477d875 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/appointment_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py b/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py index c02bff33b..9742b4055 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/audit_event.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/basic.py b/examples/python/fhir_types/hl7_fhir_r4_core/basic.py index d0d472657..062e0eb66 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/basic.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/basic.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/binary.py b/examples/python/fhir_types/hl7_fhir_r4_core/binary.py index 6e9b43a72..991565ab4 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/binary.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/binary.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Reference from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py b/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py index f3dc519e9..f6b4e3f39 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/biologically_derived_product.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py b/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py index 2551a1636..3a439aac1 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/body_structure.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Attachment, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py b/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py index 2e3679880..a799de1b3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/bundle.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Identifier, Signature from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py index e69d88911..b19479787 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/capability_statement.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py b/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py index 63bdf5894..63ff387cc 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/care_plan.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py b/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py index 4a1f2b011..8325274f6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/care_team.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py b/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py index baf38712b..7cd6490d3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/catalog_entry.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py index a37d2234c..ecd57117f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py index 32d3807e3..e9190dfac 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/charge_item_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, Money, Period, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/claim.py b/examples/python/fhir_types/hl7_fhir_r4_core/claim.py index b82de4350..bb7c3ecfc 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/claim.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/claim.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py index 75fabdf51..c6c697cc2 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/claim_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py b/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py index a58859a48..27eb4514e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/clinical_impression.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py b/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py index e4794a3d8..06589a38e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/code_system.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/communication.py b/examples/python/fhir_types/hl7_fhir_r4_core/communication.py index 190b268b9..dc740e92a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/communication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/communication.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py index a1aa12919..55ccbdfce 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/communication_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py index f374b4fea..3fce8a5f0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/compartment_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, ContactDetail, UsageContext from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/composition.py b/examples/python/fhir_types/hl7_fhir_r4_core/composition.py index d3e5e1890..a45147ccf 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/composition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/composition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Narrative, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py b/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py index 8174c44dc..265852b87 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/concept_map.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/condition.py b/examples/python/fhir_types/hl7_fhir_r4_core/condition.py index 328dde0a0..a63b157b5 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/condition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/condition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/consent.py b/examples/python/fhir_types/hl7_fhir_r4_core/consent.py index 74ef91a30..136117e4f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/consent.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/consent.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/contract.py b/examples/python/fhir_types/hl7_fhir_r4_core/contract.py index 70a497a47..d60a8e057 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/contract.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/contract.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Money, Period, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py index 9bf393f75..2cf31f0ab 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py index 713074a2d..b15353bdd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py index 926a5ec11..fa662da16 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/coverage_eligibility_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py b/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py index 7980ec914..3b98dfb2b 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/detected_issue.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device.py b/examples/python/fhir_types/hl7_fhir_r4_core/device.py index bbf024fb6..e2462d8b1 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py index 3d4f42c04..b0102616f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactPoint, Identifier, ProdCharacteristic, ProductShelfLife, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py index 1f7b301c1..5b2bdc361 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_metric.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py index 5ae3d9d21..57993c264 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py index ca8b2f69c..a8e66b83c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/device_use_statement.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Identifier, Period, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py index ca9585487..17083fca3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/diagnostic_report.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py b/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py index 062ff66fa..d9be4e2cd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/document_manifest.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py b/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py index c73381948..aa36ca1a6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/document_reference.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py b/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py index e090fd6ad..9b9616e28 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/domain_resource.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Extension, Narrative from fhir_types.hl7_fhir_r4_core.resource import Resource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py b/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py index 3bae98da9..3cd43b44e 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/effect_evidence_synthesis.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py b/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py index 1dfeb1442..5b1eaa903 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/encounter.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Duration, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py b/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py index 13ca5b77d..8283f6c03 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/endpoint.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, Coding, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py index c9caa8d8b..d5f5c3467 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py index adfbfc3c7..08cdc12cd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/enrollment_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py b/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py index 9e5d2829e..50accd2d7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/episode_of_care.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py index e2ad84191..be2d561c0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/event_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, TriggerDefinition, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py b/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py index 2fb3e872b..5fff0dfdb 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/evidence.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py b/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py index dfe22ba24..16a7003c9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/evidence_variable.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py b/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py index f18851b06..b04422249 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/example_scenario.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py b/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py index 1e9637cb5..c69f229e7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/explanation_of_benefit.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, Coding, Identifier, Money, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py b/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py index 4fbf3b2ee..1b6359861 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/family_member_history.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/flag.py b/examples/python/fhir_types/hl7_fhir_r4_core/flag.py index a4d87d01e..3f23e5f2d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/flag.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/flag.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/goal.py b/examples/python/fhir_types/hl7_fhir_r4_core/goal.py index 09652b3ad..e97d85ab6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/goal.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/goal.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Range, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py index 051beaff6..ba6a6fa19 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/graph_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/group.py b/examples/python/fhir_types/hl7_fhir_r4_core/group.py index 5f0a6ae1e..78ccec869 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/group.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/group.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py index aa0374076..239a8d8bd 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/guidance_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, DataRequirement, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py b/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py index b844506d7..627d4da8d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/healthcare_service.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py b/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py index b238ed168..3ed95f682 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/imaging_study.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Coding, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py index bfbbe006d..c4ddb0537 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py index 321771663..5f7c53886 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_evaluation.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py index f15128875..1b9d3c5d8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/immunization_recommendation.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py b/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py index 104aeacbd..7c71bd68d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/implementation_guide.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py b/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py index 8bc6eef76..da9062c52 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/insurance_plan.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Money, Period, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py b/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py index aeb18236a..683b55dad 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/invoice.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Money, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/library.py b/examples/python/fhir_types/hl7_fhir_r4_core/library.py index 803055c60..31b189069 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/library.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/library.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, CodeableConcept, ContactDetail, DataRequirement, Identifier, ParameterDefinition, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py b/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py index 8acc6c1aa..231e44251 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/linkage.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/list.py b/examples/python/fhir_types/hl7_fhir_r4_core/list.py index 9e7a52fff..010ad1c1a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/list.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/list.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/location.py b/examples/python/fhir_types/hl7_fhir_r4_core/location.py index a46d795c5..801f51348 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/location.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/location.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, Coding, ContactPoint, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/measure.py b/examples/python/fhir_types/hl7_fhir_r4_core/measure.py index ac889171b..64a7d5e50 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/measure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/measure.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Expression, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py index 102b168f3..d6003f456 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/measure_report.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/media.py b/examples/python/fhir_types/hl7_fhir_r4_core/media.py index 4fbcec101..0c80f45a8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/media.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/media.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, Attachment, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication.py index e42b3c630..1a19f540d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py index eaa570841..94f879d94 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_administration.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py index 6fd06758e..f2ebffcc2 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_dispense.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Dosage, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py index ec4512fcb..3d9b274fa 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_knowledge.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Dosage, Duration, Money, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py index bc4c14a75..b071220e9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Dosage, Duration, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py b/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py index ce88674cf..90c1d3ed0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medication_statement.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Dosage, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py index 711487ebd..e040b436c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, Identifier, MarketingStatus, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py index eba31b339..235d7ec12 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_authorization.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py index 8d05ddad9..cedaa84a0 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_contraindication.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Population, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py index 6ac4aa575..3c5451810 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_indication.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Population, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py index d4e47cb57..036a7802f 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_ingredient.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py index d4602e0a3..9c0571241 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_interaction.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py index 912a7a950..437324f09 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_manufactured.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ProdCharacteristic, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py index c69152b04..a3da85482 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_packaged.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, MarketingStatus, ProdCharacteristic, ProductShelfLife, Quantity, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py index ebf5cd8a8..182ce7511 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_pharmaceutical.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py index 3995574ec..340ceea2a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/medicinal_product_undesirable_effect.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Population, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py index ce3a7cc29..a725e0388 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/message_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py b/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py index 1bc50d87a..c284b5bc3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/message_header.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactPoint, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py b/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py index 40cad5e4a..bc07826b9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/molecular_sequence.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py b/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py index 5f969be1a..32682d273 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/naming_system.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, Period, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py b/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py index e0e888e8f..4b9a957af 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/nutrition_order.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Ratio, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/observation.py b/examples/python/fhir_types/hl7_fhir_r4_core/observation.py index 1458ab1de..bb57716c2 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/observation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/observation.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Ratio, Reference, SampledData, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py index d3812ad34..c48f4b577 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/observation_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py index cadfcce6c..e9a46d4d4 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/operation_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py b/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py index 2adeac108..6b8b7f8d1 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/operation_outcome.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/organization.py b/examples/python/fhir_types/hl7_fhir_r4_core/organization.py index 008a508d4..0f135c604 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/organization.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/organization.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py b/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py index 06e6a3780..fc06fa09a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/organization_affiliation.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py b/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py index 41d11a940..f9f2d0882 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/parameters.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py b/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py index a44ab1750..581fa3a5d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/payment_notice.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Money, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py b/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py index 9338c1639..ddb3e93e7 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/payment_reconciliation.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Money, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/person.py b/examples/python/fhir_types/hl7_fhir_r4_core/person.py index afc97f64c..663e0ad89 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/person.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/person.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, ContactPoint, HumanName, Identifier, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py index 91b4af2e1..55a7e4abb 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/plan_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py index 0ceb20d46..9f08db5ec 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py index 1d0433e8f..8c12660d8 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/practitioner_role.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactPoint, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py b/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py index 1207a9c73..50461d757 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/procedure.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py b/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py index 6a75ff37b..92e96ef1a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/provenance.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Period, Reference, Signature diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py index 957bf55ee..3669e8f0a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, Period, Quantity, Reference, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py index 9c4289b60..972b5cbd6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/questionnaire_response.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, Coding, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py b/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py index 5b90077d7..75a3ebf92 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/related_person.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Period, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py b/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py index 3f72e9d2a..e19194564 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/request_group.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Age, Annotation, BackboneElement, CodeableConcept, Duration, Expression, Identifier, Period, Range, Reference, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py index f53f671ab..f65a66079 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py index a92f35578..021c68f99 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_element_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, DataRequirement, Duration, Expression, Identifier, Period, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py index 153b93d3c..2096053a5 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_study.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py b/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py index e9cf62013..c3539a842 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/research_subject.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/resource.py b/examples/python/fhir_types/hl7_fhir_r4_core/resource.py index 197b0513a..910f9ef1a 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/resource.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/resource.py @@ -5,12 +5,11 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import Meta -class Resource(FHIRBase): +class Resource(BaseModel): model_config = ConfigDict(validate_by_name=True, serialize_by_alias=True, extra="forbid") resource_type: str = Field( default='Resource', diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py b/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py index af322b3dd..7b87d68f9 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/risk_assessment.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Period, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py b/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py index 137cd40b0..f46265529 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/risk_evidence_synthesis.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, ContactDetail, Identifier, Period, Reference, RelatedArtifact, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py b/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py index 78822132f..31cc15aa6 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/schedule.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Period, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py b/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py index f9209fd2f..097261c36 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/search_parameter.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py index 68532c536..035a86cc3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/service_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, CodeableConcept, Identifier, Period, Quantity, Range, Ratio, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/slot.py b/examples/python/fhir_types/hl7_fhir_r4_core/slot.py index 0e5d4f517..98bd18b07 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/slot.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/slot.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import CodeableConcept, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py b/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py index 9c2782001..d8310f435 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/specimen.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Duration, Identifier, Period, Quantity, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py index 93f1b729c..55346a7ea 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/specimen_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Duration, Identifier, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py b/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py index 5efbc557a..cbd9147c3 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/structure_definition.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, ElementDefinition, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py b/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py index f0cb87bc6..2085d8665 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/structure_map.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py b/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py index d763e78f7..536240f32 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/subscription.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, ContactPoint from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance.py index 2f61b6bd9..b8fbf86f2 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py index db80c55c3..e855cd072 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_nucleic_acid.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py index 6a64ba14a..496bedc1c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_polymer.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, SubstanceAmount diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py index 81a519caf..bb526867d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_protein.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py index 80d19eedd..c14226bbc 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_reference_information.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Quantity, Range, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py index 6606bb93d..4575afd59 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_source_material.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, CodeableConcept, Identifier from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py b/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py index c127fb0b9..ddae58f28 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/substance_specification.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Attachment, BackboneElement, CodeableConcept, Identifier, Quantity, Range, Ratio, Reference diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py b/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py index 7ac7837fd..97e022314 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/supply_delivery.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py b/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py index 3241317a6..38bee6a22 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/supply_request.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Identifier, Period, Quantity, Range, Reference, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/task.py b/examples/python/fhir_types/hl7_fhir_r4_core/task.py index b70e2e692..c37f7900d 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/task.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/task.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Address, Age, Annotation, Attachment, BackboneElement, CodeableConcept, Coding, ContactDetail, ContactPoint, \ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py b/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py index b15e8d9e9..2fe997d14 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/terminology_capabilities.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, ContactDetail, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py b/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py index 7bd130747..85efeb18c 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/test_report.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import BackboneElement, Identifier, Reference from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py b/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py index 2bd25c934..9db156995 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/test_script.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, Reference, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py b/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py index f52e49718..a75538791 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/value_set.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Coding, ContactDetail, Identifier, UsageContext diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py b/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py index 767841cb5..1ca0d0bae 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/verification_result.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ BackboneElement, CodeableConcept, Reference, Signature, Timing diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py b/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py index 4145d078a..b921af877 100644 --- a/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py +++ b/examples/python/fhir_types/hl7_fhir_r4_core/vision_prescription.py @@ -5,7 +5,6 @@ from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt from typing import List as PyList, Literal -from fhir_types.hl7_fhir_r4_core.FHIRBase import FHIRBase from fhir_types.hl7_fhir_r4_core.base import (\ Annotation, BackboneElement, CodeableConcept, Identifier, Quantity, Reference diff --git a/examples/python/fhir_types/requirements.txt b/examples/python/fhir_types/requirements.txt index 79dcfd3c6..82b6749a5 100644 --- a/examples/python/fhir_types/requirements.txt +++ b/examples/python/fhir_types/requirements.txt @@ -1,6 +1,5 @@ requests>=2.32.0,<3.0.0 pytest>=8.3.0,<9.0.0 pydantic>=2.11.0,<3.0.0 -fhirpy>=2.2.0 mypy>=1.9.0,<2.0.0 types-requests>=2.32.0,<3.0.0 \ No newline at end of file diff --git a/examples/python/generate.ts b/examples/python/generate.ts index 18bdf3c17..2b86395df 100644 --- a/examples/python/generate.ts +++ b/examples/python/generate.ts @@ -8,8 +8,8 @@ if (require.main === module) { .fromPackage("hl7.fhir.r4.core", "4.0.1") .python({ allowExtraFields: false, - staticDir: "./src/api/writer-generator/python/static-files", fieldFormat: "snake_case", + fhirpyClient: false, }) .outputTo("./examples/python/fhir_types") .cleanOutput(true); From e3af334328f2de237852f5d72d77e87219ec8026 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Fri, 26 Dec 2025 18:11:40 +0000 Subject: [PATCH 09/17] py: renamed FHIRBase into FhirBaseModel fhirpy: created a separate generation file for fhirpy --- Makefile | 7 +++- .../{FHIRBase.py => fhir_base_model.py} | 2 +- .../fhir_types/hl7_fhir_r4_core/FHIRBase.py | 31 ----------------- examples/python/fhirpy_client.py | 6 ++-- examples/python/fhirpy_generate.ts | 28 +++++++++++++++ src/api/writer-generator/python.ts | 34 ++++++++++--------- 6 files changed, 56 insertions(+), 52 deletions(-) rename assets/api/writer-generator/python/{FHIRBase.py => fhir_base_model.py} (96%) delete mode 100644 examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py create mode 100644 examples/python/fhirpy_generate.ts diff --git a/Makefile b/Makefile index be348a29f..fad48a147 100644 --- a/Makefile +++ b/Makefile @@ -71,10 +71,15 @@ test-csharp-sdk: typecheck format prepare-aidbox-runme lint PYTHON=python3.13 PYTHON_SDK_EXAMPLE=./examples/python -test-python-sdk: typecheck format prepare-aidbox-runme lint +generate-python-sdk: $(TYPECHECK) --project examples/python/tsconfig.json bun run examples/python/generate.ts +generate-python-sdk-fhirpy: + $(TYPECHECK) --project examples/python/tsconfig.json + bun run examples/python/fhirpy_generate.ts + +test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk @if [ ! -d "$(PYTHON_SDK_EXAMPLE)/venv" ]; then \ cd $(PYTHON_SDK_EXAMPLE) && \ $(PYTHON) -m venv venv && \ diff --git a/assets/api/writer-generator/python/FHIRBase.py b/assets/api/writer-generator/python/fhir_base_model.py similarity index 96% rename from assets/api/writer-generator/python/FHIRBase.py rename to assets/api/writer-generator/python/fhir_base_model.py index 6d3090398..0a793b55a 100644 --- a/assets/api/writer-generator/python/FHIRBase.py +++ b/assets/api/writer-generator/python/fhir_base_model.py @@ -7,7 +7,7 @@ class ResourceProtocol(Protocol): id: Union[str, None] -class FHIRBase(BaseModel): +class FhirBaseModel(BaseModel): """ This class satisfies ResourceProtocol """ diff --git a/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py b/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py deleted file mode 100644 index 6d3090398..000000000 --- a/examples/python/fhir_types/hl7_fhir_r4_core/FHIRBase.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Any, Union, Optional, Iterator, Tuple -from pydantic import BaseModel, Field -from typing import Protocol - -class ResourceProtocol(Protocol): - resourceType: Any - id: Union[str, None] - - -class FHIRBase(BaseModel): - """ - This class satisfies ResourceProtocol - """ - resource_type: str = Field(alias="resourceType") - id: Optional[str] = Field(None, alias="id") - - @property - def resourceType(self) -> str: - return self.resource_type - - @resourceType.setter - def resourceType(self, value: str): - self.resource_type = value - - def __iter__(self) -> Iterator[Tuple[str, Any]]: - data = self.model_dump(mode='json', by_alias=True, exclude_none=True) - return iter(data.items()) - - def serialize(self) -> dict: - """Serialize to dict (compatible with fhirpy's serialize method)""" - return self.model_dump(mode='json', by_alias=True, exclude_none=True) \ No newline at end of file diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py index f855b7a95..0acd2fec9 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python/fhirpy_client.py @@ -5,9 +5,9 @@ from pydantic import BaseModel from fhirpy import AsyncFHIRClient -from fhir_types.hl7_fhir_r4_core import HumanName -from fhir_types.hl7_fhir_r4_core.patient import Patient -from fhir_types.hl7_fhir_r4_core.organization import Organization +from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core import HumanName +from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core.patient import Patient +from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core.organization import Organization T = TypeVar('T', bound=BaseModel) diff --git a/examples/python/fhirpy_generate.ts b/examples/python/fhirpy_generate.ts new file mode 100644 index 000000000..ffe000f5b --- /dev/null +++ b/examples/python/fhirpy_generate.ts @@ -0,0 +1,28 @@ +import { APIBuilder } from "../../src"; + +if (require.main === module) { + console.log("📦 Generating FHIR R4 Core Types with FHIR base class..."); + + const builder = new APIBuilder() + .throwException() + .fromPackage("hl7.fhir.r4.core", "4.0.1") + .python({ + allowExtraFields: false, + fieldFormat: "snake_case", + rootPackageName: "fhir_types_with_FhirBaseModel", + fhirpyClient: true, + }) + .outputTo("./examples/python/fhir_types_with_FhirBaseModel") + .cleanOutput(true); + + const report = await builder.generate(); + + console.log(report); + + if (report.success) { + console.log("✅ FHIR R4 types generated successfully!"); + } else { + console.error("❌ FHIR R4 types generation failed."); + process.exit(1); + } +} diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index 559d59ab8..fbdce99c4 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -82,9 +82,9 @@ const MAX_IMPORT_LINE_LENGTH = 100; export interface PythonGeneratorOptions extends WriterOptions { allowExtraFields?: boolean; - staticDir?: string; rootPackageName: string; /// e.g. .hl7_fhir_r4_core.Patient. fieldFormat: StringFormatKey; + fhirpyClient?: boolean; } interface ImportGroup { @@ -101,12 +101,6 @@ const fixReservedWords = (name: string): string => { return PYTHON_KEYWORDS.has(name) ? `${name}_` : name; }; -const injectSuperClasses = (name: string): string[] => { - if (name === "Resource") return ["FHIRBase"]; - if (name === "Element") return ["BaseModel"]; - return []; -}; - const canonicalToName = (canonical: string | undefined, dropFragment = true) => { if (!canonical) return undefined; let localName = canonical.split("/").pop(); @@ -150,10 +144,12 @@ type TypeSchemaPackageGroups = { export class Python extends Writer { private readonly nameFormatFunction: (name: string) => string; private tsIndex: TypeSchemaIndex | undefined; + private readonly forFhirpyClient: boolean; constructor(options: PythonGeneratorOptions) { super(options); this.nameFormatFunction = this.getFieldFormatFunction(options.fieldFormat); + this.forFhirpyClient = options.fhirpyClient ?? false; } override async generate(tsIndex: TypeSchemaIndex): Promise { @@ -168,6 +164,8 @@ export class Python extends Writer { private generateRootPackages(groups: TypeSchemaPackageGroups): void { this.generateRootInitFile(groups); + if (this.forFhirpyClient) + fs.cpSync(resolvePyAssets("fhir_base_model.py"), Path.resolve(this.opts.outputDir, "fhir_base_model.py")); fs.cpSync(resolvePyAssets("requirements.txt"), Path.resolve(this.opts.outputDir, "requirements.txt")); } @@ -177,10 +175,8 @@ export class Python extends Writer { } private generateComplexTypesPackages(groupedComplexTypes: Record): void { - for (let [packageName, packageComplexTypes] of Object.entries(groupedComplexTypes)) { - packageName = snakeCase(packageName); - fs.cpSync(resolvePyAssets("FHIRBase.py"), Path.resolve(this.opts.outputDir, packageName, "FHIRBase.py")); - this.cd(`/${packageName}`, () => { + for (const [packageName, packageComplexTypes] of Object.entries(groupedComplexTypes)) { + this.cd(`/${snakeCase(packageName)}`, () => { this.generateBasePy(packageComplexTypes); }); } @@ -371,7 +367,7 @@ export class Python extends Writer { this.cat(`${snakeCase(schema.identifier.name)}.py`, () => { this.generateDisclaimer(); this.generateDefaultImports(); - this.generateFHIRBaseImport(schema.identifier.package); + this.generateFhirBaseModelImport(); this.line(); this.generateDependenciesImports(schema); this.line(); @@ -381,8 +377,8 @@ export class Python extends Writer { }); } - private generateFHIRBaseImport(packageName: string): void { - this.pyImportFrom(`${this.pyFhirPackageByName(packageName)}.FHIRBase`, "FHIRBase"); + private generateFhirBaseModelImport(): void { + if (this.forFhirpyClient) this.pyImportFrom(`${this.opts.rootPackageName}.fhir_base_model`, "FhirBaseModel"); } private generateType(schema: RegularTypeSchema): void { @@ -397,7 +393,7 @@ export class Python extends Writer { } private getSuperClasses(schema: RegularTypeSchema): string[] { - return [...(schema.base ? [schema.base.name] : []), ...injectSuperClasses(schema.identifier.name)]; + return [...(schema.base ? [schema.base.name] : []), ...this.injectSuperClasses(schema.identifier.name)]; } private generateClassBody(schema: RegularTypeSchema): void { @@ -688,7 +684,7 @@ export class Python extends Writer { return this.pyFhirPackage(identifier); } - getFieldFormatFunction(format: StringFormatKey): (name: string) => string { + private getFieldFormatFunction(format: StringFormatKey): (name: string) => string { if (!AVAILABLE_STRING_FORMATS[format]) { this.logger()?.warn(`Unknown field format '${format}'. Defaulting to SnakeCase.`); this.logger()?.warn(`Supported formats: ${Object.keys(AVAILABLE_STRING_FORMATS).join(", ")}`); @@ -696,4 +692,10 @@ export class Python extends Writer { } return AVAILABLE_STRING_FORMATS[format]; } + + private injectSuperClasses(name: string): string[] { + if (name === "Resource") return this.forFhirpyClient ? ["FhirBaseModel"] : ["BaseModel"]; + if (name === "Element") return ["BaseModel"]; + return []; + } } From ac8e69360a35b4bb66b287d383c42a234e228a27 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Mon, 5 Jan 2026 17:32:51 +0000 Subject: [PATCH 10/17] py: renamed FhirBaseModel into FhirpyBaseModel injectSuperClasses now checks canonical urls instead of names --- .../{fhir_base_model.py => fhirpy_base_model.py} | 2 +- src/api/writer-generator/python.ts | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) rename assets/api/writer-generator/python/{fhir_base_model.py => fhirpy_base_model.py} (96%) diff --git a/assets/api/writer-generator/python/fhir_base_model.py b/assets/api/writer-generator/python/fhirpy_base_model.py similarity index 96% rename from assets/api/writer-generator/python/fhir_base_model.py rename to assets/api/writer-generator/python/fhirpy_base_model.py index 0a793b55a..2635a726c 100644 --- a/assets/api/writer-generator/python/fhir_base_model.py +++ b/assets/api/writer-generator/python/fhirpy_base_model.py @@ -7,7 +7,7 @@ class ResourceProtocol(Protocol): id: Union[str, None] -class FhirBaseModel(BaseModel): +class FhirpyBaseModel(BaseModel): """ This class satisfies ResourceProtocol """ diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index fbdce99c4..8106c56e5 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -165,7 +165,7 @@ export class Python extends Writer { private generateRootPackages(groups: TypeSchemaPackageGroups): void { this.generateRootInitFile(groups); if (this.forFhirpyClient) - fs.cpSync(resolvePyAssets("fhir_base_model.py"), Path.resolve(this.opts.outputDir, "fhir_base_model.py")); + fs.cpSync(resolvePyAssets("fhirpy_base_model.py"), Path.resolve(this.opts.outputDir, "fhirpy_base_model.py")); fs.cpSync(resolvePyAssets("requirements.txt"), Path.resolve(this.opts.outputDir, "requirements.txt")); } @@ -393,7 +393,7 @@ export class Python extends Writer { } private getSuperClasses(schema: RegularTypeSchema): string[] { - return [...(schema.base ? [schema.base.name] : []), ...this.injectSuperClasses(schema.identifier.name)]; + return [...(schema.base ? [schema.base.name] : []), ...this.injectSuperClasses(schema.identifier.url)]; } private generateClassBody(schema: RegularTypeSchema): void { @@ -693,9 +693,10 @@ export class Python extends Writer { return AVAILABLE_STRING_FORMATS[format]; } - private injectSuperClasses(name: string): string[] { - if (name === "Resource") return this.forFhirpyClient ? ["FhirBaseModel"] : ["BaseModel"]; - if (name === "Element") return ["BaseModel"]; + private injectSuperClasses(url: string): string[] { + const name = canonicalToName(url); + if (name === "resource") return this.forFhirpyClient ? ["FhirBaseModel"] : ["BaseModel"]; + if (name === "element") return ["BaseModel"]; return []; } } From b5b3eee129f8fd85271290da1d7be4e830c8cb12 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Mon, 5 Jan 2026 17:43:05 +0000 Subject: [PATCH 11/17] py: fhirpy: added comments to fhirpy_client.py --- examples/python/fhirpy_client.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/python/fhirpy_client.py b/examples/python/fhirpy_client.py index 0acd2fec9..b5cc26084 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python/fhirpy_client.py @@ -18,6 +18,11 @@ def get_resource_components(model: T): + """ + Extracts the FHIR resource type and the serialized resource body + from a Pydantic FHIR model. + """ + resource_dict = model.model_dump( mode='json', by_alias=True, @@ -33,7 +38,12 @@ def get_resource_components(model: T): return resource_type, resource_dict + async def main(): + """ + Demonstrates usage of fhirpy AsyncFHIRClient to create and fetch FHIR resources. + Both Client and Resource APIs are showcased. + """ client = AsyncFHIRClient( FHIR_SERVER_URL, @@ -46,6 +56,7 @@ async def main(): birthDate="1980-01-01", ) + # Create the Patient using fhirpy's client API created_patient = await client.create(patient) print(f"Created patient: {created_patient.id}") @@ -56,7 +67,12 @@ async def main(): active=True ) - organization_resource = await client.resource("Organization", **organization.model_dump(exclude_none=True)).save() + # Save the Organization using fhirpy's resource API + organization_resource = await client.resource( + "Organization", + **organization.model_dump(exclude_none=True) + ).save() + print(f"Created organization: {organization_resource.id}") patients = await client.resources("Patient").fetch() From f1bea2671f97359ef9ed2cb1ac5c7dd1dc90973f Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Mon, 5 Jan 2026 18:08:08 +0000 Subject: [PATCH 12/17] ci: py: added a ci step for fhirpy generator --- .github/workflows/sdk-tests.yml | 45 +++++++++++++++++++++++++++++++-- Makefile | 21 ++++++++++----- 2 files changed, 58 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 87b46829a..a75f124d2 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -115,8 +115,49 @@ jobs: strategy: matrix: - bun-version: [latest] - python-version: ["3.13"] + bun-version: [ latest ] + python-version: [ "3.13" ] + + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: ${{ matrix.bun-version }} + + - uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Test Python SDK + run: | + export AIDBOX_LICENSE_ID="${{ secrets.AIDBOX_LICENSE_ID }}" + make test-python-sdk + + - name: Repository contains actual python-sdk version + run: | + diff_result=$(git diff --exit-code --name-only examples/python/generated || true) + + if [ -z "$diff_result" ]; then + echo "✅ Generated SDK is identical to the one stored in repository." + else + echo "❌ Generated SDK differs from the one stored in repository." + echo "Differences:" + git diff examples/python/generated + exit 1 + fi + + test-python-fhirpy-sdk-test: + runs-on: ubuntu-latest + + strategy: + matrix: + bun-version: [ latest ] + python-version: [ "3.13" ] steps: - uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index fad48a147..10deaf0bf 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,8 @@ test-csharp-sdk: typecheck format prepare-aidbox-runme lint PYTHON=python3.13 PYTHON_SDK_EXAMPLE=./examples/python +PYTHON_GENERAL_EXAMPLE_DIR_NAME = fhir_types +PYTHON_FHIRPY_EXAMPLE_DIR_NAME = fhir_types_with_FhirBaseModel generate-python-sdk: $(TYPECHECK) --project examples/python/tsconfig.json @@ -79,7 +81,7 @@ generate-python-sdk-fhirpy: $(TYPECHECK) --project examples/python/tsconfig.json bun run examples/python/fhirpy_generate.ts -test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk +python-test-setup: @if [ ! -d "$(PYTHON_SDK_EXAMPLE)/venv" ]; then \ cd $(PYTHON_SDK_EXAMPLE) && \ $(PYTHON) -m venv venv && \ @@ -87,14 +89,21 @@ test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk pip install -r fhir_types/requirements.txt; \ fi - # Run mypy in strict mode +test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk python-test-setup + # Run mypy in strict mode cd $(PYTHON_SDK_EXAMPLE) && \ - . venv/bin/activate && \ - mypy --strict . + . venv/bin/activate && \ + mypy --strict $(PYTHON_GENERAL_EXAMPLE_DIR_NAME) cd $(PYTHON_SDK_EXAMPLE) && \ - . venv/bin/activate && \ - python -m pytest test_sdk.py -v + . venv/bin/activate && \ + python -m pytest test_sdk.py -v + +test-python-fhirpy-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk-fhirpy python-test-setup + # Run mypy in strict mode + cd $(PYTHON_SDK_EXAMPLE) && \ + . venv/bin/activate && \ + mypy --strict $(PYTHON_FHIRPY_EXAMPLE_DIR_NAME) release: echo Push tag for $(VERSION) From cd79e9ef7ad333f04b687f6039b3e8fa22b02611 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Mon, 5 Jan 2026 18:11:17 +0000 Subject: [PATCH 13/17] minor format fix --- src/api/writer-generator/python.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index 8106c56e5..28c43685b 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -165,7 +165,10 @@ export class Python extends Writer { private generateRootPackages(groups: TypeSchemaPackageGroups): void { this.generateRootInitFile(groups); if (this.forFhirpyClient) - fs.cpSync(resolvePyAssets("fhirpy_base_model.py"), Path.resolve(this.opts.outputDir, "fhirpy_base_model.py")); + fs.cpSync( + resolvePyAssets("fhirpy_base_model.py"), + Path.resolve(this.opts.outputDir, "fhirpy_base_model.py"), + ); fs.cpSync(resolvePyAssets("requirements.txt"), Path.resolve(this.opts.outputDir, "requirements.txt")); } From b4918518087b6c3f05f652aa7f7638f2aea7a753 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Wed, 14 Jan 2026 18:18:01 +0000 Subject: [PATCH 14/17] py: fixed failing test --- src/api/writer-generator/python.ts | 4 ++-- src/api/writer-generator/writer.ts | 10 ++++++++++ .../write-generator/__snapshots__/python.test.ts.snap | 8 +------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index 45a0eb31d..560395a16 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -165,11 +165,11 @@ export class Python extends Writer { private generateRootPackages(groups: TypeSchemaPackageGroups): void { this.generateRootInitFile(groups); if (this.forFhirpyClient) - fs.cpSync( + this.copyAssets( resolvePyAssets("fhirpy_base_model.py"), Path.resolve(this.opts.outputDir, "fhirpy_base_model.py"), ); - fs.cpSync(resolvePyAssets("requirements.txt"), Path.resolve(this.opts.outputDir, "requirements.txt")); + this.copyAssets(resolvePyAssets("requirements.txt"), Path.resolve(this.opts.outputDir, "requirements.txt")); } private generateSDKPackages(groups: TypeSchemaPackageGroups): void { diff --git a/src/api/writer-generator/writer.ts b/src/api/writer-generator/writer.ts index 4a2243b2c..690bac0e4 100644 --- a/src/api/writer-generator/writer.ts +++ b/src/api/writer-generator/writer.ts @@ -105,6 +105,16 @@ export abstract class FileSystemWriter=2.32.0,<3.0.0 -pytest>=8.3.0,<9.0.0 -pydantic>=2.11.0,<3.0.0 -mypy>=1.9.0,<2.0.0 -types-requests>=2.32.0,<3.0.0" -`; +exports[`Python Writer Generator static files 1`] = `undefined`; From 219e3831b1334438fa61ec45822f9225316cb899 Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Thu, 22 Jan 2026 14:14:07 +0000 Subject: [PATCH 15/17] py: separated simple Python and FHIRPy examples into different directories ci, py: mypy runs on all example files py: updated READMEs --- .github/workflows/sdk-tests.yml | 14 +- Makefile | 35 +++-- README.md | 3 +- .../python/fhirpy_base_model.py | 11 +- examples/README.md | 9 +- examples/python-fhirpy/.gitignore | 4 + examples/python-fhirpy/README.md | 147 ++++++++++++++++++ .../client.py} | 20 +-- examples/python-fhirpy/generate.ts | 24 +++ examples/python-fhirpy/mypy.ini | 13 ++ examples/python-fhirpy/tsconfig.json | 6 + examples/python/README.md | 100 +----------- examples/python/fhirpy_generate.ts | 28 ---- src/api/writer-generator/python.ts | 5 +- 14 files changed, 257 insertions(+), 162 deletions(-) create mode 100644 examples/python-fhirpy/.gitignore create mode 100644 examples/python-fhirpy/README.md rename examples/{python/fhirpy_client.py => python-fhirpy/client.py} (80%) create mode 100644 examples/python-fhirpy/generate.ts create mode 100644 examples/python-fhirpy/mypy.ini create mode 100644 examples/python-fhirpy/tsconfig.json delete mode 100644 examples/python/fhirpy_generate.ts diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 3c93e9da8..8c0ed3ff0 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -140,14 +140,14 @@ jobs: - name: Repository contains actual python-sdk version run: | - diff_result=$(git diff --exit-code --name-only examples/python/generated || true) + diff_result=$(git diff --exit-code --name-only examples/python/fhir_types || true) if [ -z "$diff_result" ]; then echo "✅ Generated SDK is identical to the one stored in repository." else echo "❌ Generated SDK differs from the one stored in repository." echo "Differences:" - git diff examples/python/generated + git diff examples/python/fhir_types exit 1 fi @@ -174,21 +174,21 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Test Python SDK + - name: Test Python fhirpy SDK run: | export AIDBOX_LICENSE_ID="${{ secrets.AIDBOX_LICENSE_ID }}" - make test-python-sdk + make test-python-fhirpy-sdk - - name: Repository contains actual python-sdk version + - name: Repository contains actual python-fhirpy-sdk version run: | - diff_result=$(git diff --exit-code --name-only examples/python/generated || true) + diff_result=$(git diff --exit-code --name-only examples/python-fhirpy/fhir_types || true) if [ -z "$diff_result" ]; then echo "✅ Generated SDK is identical to the one stored in repository." else echo "❌ Generated SDK differs from the one stored in repository." echo "Differences:" - git diff examples/python/generated + git diff examples/python-fhirpy/fhir_types exit 1 fi diff --git a/Makefile b/Makefile index e7aa05cfa..05d8e5526 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,7 @@ test-all-example-generation: bun run examples/local-package-folder/generate.ts bun run examples/mustache/mustache-java-r4-gen.ts bun run examples/python/generate.ts + bun run examples/python-fhirpy/generate.ts bun run examples/typescript-ccda/generate.ts bun run examples/typescript-r4/generate.ts bun run examples/typescript-sql-on-fhir/generate.ts @@ -81,41 +82,49 @@ test-csharp-sdk: typecheck format prepare-aidbox-runme lint cd examples/csharp && dotnet test PYTHON=python3.13 -PYTHON_SDK_EXAMPLE=./examples/python -PYTHON_GENERAL_EXAMPLE_DIR_NAME = fhir_types -PYTHON_FHIRPY_EXAMPLE_DIR_NAME = fhir_types_with_FhirBaseModel +PYTHON_EXAMPLE=./examples/python +PYTHON_FHIRPY_EXAMPLE=./examples/python-fhirpy generate-python-sdk: $(TYPECHECK) --project examples/python/tsconfig.json bun run examples/python/generate.ts generate-python-sdk-fhirpy: - $(TYPECHECK) --project examples/python/tsconfig.json - bun run examples/python/fhirpy_generate.ts + $(TYPECHECK) --project examples/python-fhirpy/tsconfig.json + bun run examples/python-fhirpy/generate.ts python-test-setup: - @if [ ! -d "$(PYTHON_SDK_EXAMPLE)/venv" ]; then \ - cd $(PYTHON_SDK_EXAMPLE) && \ + @if [ ! -d "$(PYTHON_EXAMPLE)/venv" ]; then \ + cd $(PYTHON_EXAMPLE) && \ $(PYTHON) -m venv venv && \ . venv/bin/activate && \ pip install -r fhir_types/requirements.txt; \ fi +python-fhirpy-test-setup: + @if [ ! -d "$(PYTHON_FHIRPY_EXAMPLE)/venv" ]; then \ + cd $(PYTHON_FHIRPY_EXAMPLE) && \ + $(PYTHON) -m venv venv && \ + . venv/bin/activate && \ + pip install -r fhir_types/requirements.txt && \ + pip install fhirpy; \ + fi + test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk python-test-setup # Run mypy in strict mode - cd $(PYTHON_SDK_EXAMPLE) && \ + cd $(PYTHON_EXAMPLE) && \ . venv/bin/activate && \ - mypy --strict $(PYTHON_GENERAL_EXAMPLE_DIR_NAME) + mypy --strict . - cd $(PYTHON_SDK_EXAMPLE) && \ + cd $(PYTHON_EXAMPLE) && \ . venv/bin/activate && \ python -m pytest test_sdk.py -v -test-python-fhirpy-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk-fhirpy python-test-setup +test-python-fhirpy-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk-fhirpy python-fhirpy-test-setup # Run mypy in strict mode - cd $(PYTHON_SDK_EXAMPLE) && \ + cd $(PYTHON_FHIRPY_EXAMPLE) && \ . venv/bin/activate && \ - mypy --strict $(PYTHON_FHIRPY_EXAMPLE_DIR_NAME) + mypy --strict . release: echo Push tag for $(VERSION) diff --git a/README.md b/README.md index 7353c8d53..9055b9861 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,8 @@ See the [examples/](examples/) directory for working demonstrations: - **[typescript-r4/](examples/typescript-r4/)** - FHIR R4 type generation with resource creation demo and profile usage - **[typescript-ccda/](examples/typescript-ccda/)** - C-CDA on FHIR type generation - **[typescript-sql-on-fhir/](examples/typescript-sql-on-fhir/)** - SQL on FHIR ViewDefinition with tree shaking -- **[python/](examples/python/)** - Python/Pydantic model generation with configurable field formats +- **[python/](examples/python/)** - Python/Pydantic model generation with simple requests-based client +- **[python-fhirpy/](examples/python-fhirpy/)** - Python/Pydantic model generation with fhirpy async client - **[csharp/](examples/csharp/)** - C# class generation with namespace configuration - **[mustache/](examples/mustache/)** - Java generation with Mustache templates and post-generation hooks - **[local-package-folder/](examples/local-package-folder/)** - Loading unpublished local FHIR packages diff --git a/assets/api/writer-generator/python/fhirpy_base_model.py b/assets/api/writer-generator/python/fhirpy_base_model.py index 2635a726c..e14be7fbc 100644 --- a/assets/api/writer-generator/python/fhirpy_base_model.py +++ b/assets/api/writer-generator/python/fhirpy_base_model.py @@ -1,7 +1,8 @@ -from typing import Any, Union, Optional, Iterator, Tuple +from typing import Any, Union, Optional, Iterator, Tuple, Dict from pydantic import BaseModel, Field from typing import Protocol + class ResourceProtocol(Protocol): resourceType: Any id: Union[str, None] @@ -19,13 +20,13 @@ def resourceType(self) -> str: return self.resource_type @resourceType.setter - def resourceType(self, value: str): + def resourceType(self, value: str) -> None: self.resource_type = value - def __iter__(self) -> Iterator[Tuple[str, Any]]: + def __iter__(self) -> Iterator[Tuple[str, Any]]: # type: ignore[override] data = self.model_dump(mode='json', by_alias=True, exclude_none=True) return iter(data.items()) - def serialize(self) -> dict: + def serialize(self) -> Dict[str, Any]: """Serialize to dict (compatible with fhirpy's serialize method)""" - return self.model_dump(mode='json', by_alias=True, exclude_none=True) \ No newline at end of file + return self.model_dump(mode='json', by_alias=True, exclude_none=True) diff --git a/examples/README.md b/examples/README.md index 1bbebcf0a..cdcb42a68 100644 --- a/examples/README.md +++ b/examples/README.md @@ -21,11 +21,16 @@ This directory contains working examples demonstrating the capabilities of Atomi ### Multi-Language Generation -- **[python/](python/)** - Python/Pydantic model generation +- **[python/](python/)** - Python/Pydantic model generation with simple requests-based client - `generate.ts` - Generates Python models with configurable field formats - Supports `snake_case` or `camelCase` field naming - Configurable extra field validation - - Client implementation example: [examples/python/client.py](examples/python/client.py). + - Client implementation example: [python/client.py](python/client.py) + +- **[python-fhirpy/](python-fhirpy/)** - Python/Pydantic models with fhirpy async client + - `generate.ts` - Generates Python models with fhirpy integration + - Uses `fhirpyClient: true` for async FHIR client support + - Client implementation example: [python-fhirpy/client.py](python-fhirpy/client.py) - **[csharp/](csharp/)** - C# class generation diff --git a/examples/python-fhirpy/.gitignore b/examples/python-fhirpy/.gitignore new file mode 100644 index 000000000..d9bd8be76 --- /dev/null +++ b/examples/python-fhirpy/.gitignore @@ -0,0 +1,4 @@ +.pytest_cache +__pycache__ +.mypy_cache +venv diff --git a/examples/python-fhirpy/README.md b/examples/python-fhirpy/README.md new file mode 100644 index 000000000..4d74da943 --- /dev/null +++ b/examples/python-fhirpy/README.md @@ -0,0 +1,147 @@ +# Python fhirpy Example + +FHIR R4 type generation with Pydantic models integrated with the [fhirpy](https://github.com/beda-software/fhir-py) async client library. + +## Overview + +This example demonstrates how to use generated Python/Pydantic models with the `fhirpy` async FHIR client. It includes: + +- Full FHIR R4 resource type definitions as Pydantic models +- Integration with `fhirpy` AsyncFHIRClient +- Automatic validation and serialization +- Async/await patterns for FHIR operations + +For a simpler example using `requests`, see [python-simple/](../python-simple/). + +## Setup + +### Python Environment + +1. Create virtual environment: + +```bash +cd examples/python-fhirpy +python3 -m venv venv + +# On macOS/Linux: +source venv/bin/activate +# On Windows: +venv\Scripts\activate +``` + +2. Install Python dependencies: + +```bash +pip install -r fhir_types/requirements.txt +pip install fhirpy +``` + +3. Check Python version: + +```bash +python --version # Should be 3.10 or higher +``` + +## Generating Types + +To generate Python/Pydantic types for FHIR R4 with fhirpy support: + +```bash +bun run examples/python-fhirpy/generate.ts +``` + +This will output to `./examples/python-fhirpy/fhir_types/` + +## Configuration + +Edit `generate.ts` to customize: + +```typescript +.python({ + allowExtraFields: false, // Reject unknown fields in models + fieldFormat: "snake_case", // or "camelCase" + fhirpyClient: true // Enable fhirpy integration +}) +``` + +The `fhirpyClient: true` option generates models that inherit from a base class compatible with fhirpy's client API. + +## Using with fhirpy + +### Basic Usage + +```python +import asyncio +from fhirpy import AsyncFHIRClient +from fhir_types.hl7_fhir_r4_core import HumanName +from fhir_types.hl7_fhir_r4_core.patient import Patient + +async def main(): + client = AsyncFHIRClient( + "http://localhost:8080/fhir", + authorization="Basic ", + ) + + # Create a patient using typed models + patient = Patient( + name=[HumanName(given=["John"], family="Doe")], + gender="male", + birthDate="1980-01-01", + ) + + # Use fhirpy's client API with the typed model + created = await client.create(patient) + print(f"Created patient: {created.id}") + + # Search for patients + patients = await client.resources("Patient").fetch() + for pat in patients: + print(f"Found: {pat.get('name', [{}])[0].get('family', 'N/A')}") + +asyncio.run(main()) +``` + +### Resource API + +```python +from fhir_types.hl7_fhir_r4_core.organization import Organization + +organization = Organization( + name="My Organization", + active=True +) + +# Use fhirpy's resource API +org_resource = await client.resource( + "Organization", + **organization.model_dump(exclude_none=True) +).save() + +print(f"Created organization: {org_resource.id}") +``` + +## Type Checking + +### MyPy Integration + +Verify type safety with MyPy: + +```bash +pip install mypy +mypy fhir_types/ +``` + +## Running the Demo + +Start a FHIR server (e.g., using the docker-compose in examples/), then run: + +```bash +python client.py +``` + +## Next Steps + +- See [python-simple/](../python-simple/) for basic requests-based example +- See [examples/](../) overview for other language examples +- Check [../../CLAUDE.md](../../CLAUDE.md) for architecture details +- Learn more about [fhirpy](https://github.com/beda-software/fhir-py) diff --git a/examples/python/fhirpy_client.py b/examples/python-fhirpy/client.py similarity index 80% rename from examples/python/fhirpy_client.py rename to examples/python-fhirpy/client.py index b5cc26084..3bd141382 100644 --- a/examples/python/fhirpy_client.py +++ b/examples/python-fhirpy/client.py @@ -1,13 +1,13 @@ import asyncio import base64 import json -from typing import TypeVar, Dict, Any +from typing import TypeVar, Dict, Any, Tuple from pydantic import BaseModel from fhirpy import AsyncFHIRClient -from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core import HumanName -from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core.patient import Patient -from fhir_types_with_FhirBaseModel.hl7_fhir_r4_core.organization import Organization +from fhir_types.hl7_fhir_r4_core import HumanName +from fhir_types.hl7_fhir_r4_core.patient import Patient +from fhir_types.hl7_fhir_r4_core.organization import Organization T = TypeVar('T', bound=BaseModel) @@ -17,13 +17,13 @@ TOKEN = base64.b64encode(f"{USERNAME}:{PASSWORD}".encode()).decode() -def get_resource_components(model: T): +def get_resource_components(model: T) -> Tuple[str, Dict[str, Any]]: """ Extracts the FHIR resource type and the serialized resource body from a Pydantic FHIR model. """ - resource_dict = model.model_dump( + resource_dict: Dict[str, Any] = model.model_dump( mode='json', by_alias=True, exclude_none=True @@ -39,7 +39,7 @@ def get_resource_components(model: T): return resource_type, resource_dict -async def main(): +async def main() -> None: """ Demonstrates usage of fhirpy AsyncFHIRClient to create and fetch FHIR resources. Both Client and Resource APIs are showcased. @@ -53,7 +53,7 @@ async def main(): patient = Patient( name=[HumanName(given=["Bob"], family="Cool2")], gender="female", - birthDate="1980-01-01", + birth_date="1980-01-01", ) # Create the Patient using fhirpy's client API @@ -77,8 +77,8 @@ async def main(): patients = await client.resources("Patient").fetch() for pat in patients: - print(f"Found: {pat.get('name', [{}])[0].get('family', 'N/A')}") + print(f"Found: {pat.get('name', [{}])[0].get('family', 'N/A')}") # type: ignore[no-untyped-call] if __name__ == "__main__": - asyncio.run(main()) \ No newline at end of file + asyncio.run(main()) diff --git a/examples/python-fhirpy/generate.ts b/examples/python-fhirpy/generate.ts new file mode 100644 index 000000000..8bbd17cff --- /dev/null +++ b/examples/python-fhirpy/generate.ts @@ -0,0 +1,24 @@ +import { APIBuilder, prettyReport } from "../../src"; + +if (require.main === module) { + console.log("📦 Generating FHIR R4 Core Types with fhirpy support..."); + + const builder = new APIBuilder() + .throwException() + .fromPackage("hl7.fhir.r4.core", "4.0.1") + .python({ + allowExtraFields: false, + fieldFormat: "snake_case", + fhirpyClient: true, + }) + .outputTo("./examples/python-fhirpy/fhir_types") + .cleanOutput(true); + + const report = await builder.generate(); + + console.log(prettyReport(report)); + + if (!report.success) { + process.exit(1); + } +} diff --git a/examples/python-fhirpy/mypy.ini b/examples/python-fhirpy/mypy.ini new file mode 100644 index 000000000..4a3426103 --- /dev/null +++ b/examples/python-fhirpy/mypy.ini @@ -0,0 +1,13 @@ +[mypy] +python_version = 3.13 +disallow_untyped_defs = False +disallow_incomplete_defs = False +check_untyped_defs = True +disallow_untyped_decorators = False +no_implicit_optional = True +strict_optional = False +warn_redundant_casts = False +warn_unused_ignores = True +warn_return_any = False +warn_unreachable = True +plugins = pydantic.mypy diff --git a/examples/python-fhirpy/tsconfig.json b/examples/python-fhirpy/tsconfig.json new file mode 100644 index 000000000..27663aaca --- /dev/null +++ b/examples/python-fhirpy/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../tsconfig.json", + "include": [ + "./" + ] +} diff --git a/examples/python/README.md b/examples/python/README.md index 3a0566180..4bc3e991d 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -11,7 +11,9 @@ This example demonstrates how to generate Python/Pydantic models from the FHIR R - Configurable field naming conventions (snake_case or camelCase) - Integration with Python type checking and IDE support - Virtual environment setup -- FHIR server client example +- Simple FHIR server client example using `requests` + +For an example using the `fhirpy` async client library, see [python-fhirpy/](../python-fhirpy/). ## Setup @@ -32,7 +34,7 @@ venv\Scripts\activate 2. Install Python dependencies: ```bash -pip install -r requirements.txt +pip install -r fhir_types/requirements.txt ``` 3. Check Python version: @@ -109,36 +111,6 @@ except ValidationError as e: print(f"Validation error: {e}") ``` -### Working with Observations - -```python -from fhir_types import Observation -from datetime import datetime - -observation = Observation( - resource_type="Observation", - id="obs-1", - status="final", - code={ - "coding": [{ - "system": "http://loinc.org", - "code": "39156-5", - "display": "BMI" - }] - }, - subject={"reference": "Patient/patient-1"}, - effective_date_time=datetime.now(), - value={ - "quantity": { - "value": 25.5, - "unit": "kg/m2" - } - } -) - -print(observation.code.coding[0].display) -``` - ### Serialization and Deserialization ```python @@ -176,72 +148,12 @@ Generated Pydantic models provide: ## Running Tests -Create tests to verify generated types: - ```bash -pytest tests/ -v -``` - -### Example Test - -```python -from fhir_types import Patient, Observation -from pydantic import ValidationError -import pytest - -def test_patient_creation(): - patient = Patient( - resource_type="Patient", - id="patient-1", - name=[{"family": "Smith", "given": ["John"]}] - ) - assert patient.id == "patient-1" - assert patient.name[0].family == "Smith" - -def test_patient_validation(): - with pytest.raises(ValidationError): - Patient( - resource_type="InvalidType", - id="patient-1" - ) - -def test_field_format(): - patient = Patient( - resource_type="Patient", - birth_date="1980-01-15" # snake_case format - ) - assert patient.birth_date is not None -``` - -## Customization - -### Different Field Format - -Regenerate with camelCase: - -```typescript -.python({ - fieldFormat: "camelCase" -}) -``` - -### Lenient Validation - -Allow extra fields: - -```typescript -.python({ - allowExtraFields: true -}) -``` - -### Custom Output Directory - -```typescript -.outputTo("./my_fhir_types") +pytest test_sdk.py -v ``` ## Next Steps +- See [python-fhirpy/](../python-fhirpy/) for fhirpy async client example - See [examples/](../) overview for other language examples - Check [../../CLAUDE.md](../../CLAUDE.md) for architecture details diff --git a/examples/python/fhirpy_generate.ts b/examples/python/fhirpy_generate.ts deleted file mode 100644 index ffe000f5b..000000000 --- a/examples/python/fhirpy_generate.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { APIBuilder } from "../../src"; - -if (require.main === module) { - console.log("📦 Generating FHIR R4 Core Types with FHIR base class..."); - - const builder = new APIBuilder() - .throwException() - .fromPackage("hl7.fhir.r4.core", "4.0.1") - .python({ - allowExtraFields: false, - fieldFormat: "snake_case", - rootPackageName: "fhir_types_with_FhirBaseModel", - fhirpyClient: true, - }) - .outputTo("./examples/python/fhir_types_with_FhirBaseModel") - .cleanOutput(true); - - const report = await builder.generate(); - - console.log(report); - - if (report.success) { - console.log("✅ FHIR R4 types generated successfully!"); - } else { - console.error("❌ FHIR R4 types generation failed."); - process.exit(1); - } -} diff --git a/src/api/writer-generator/python.ts b/src/api/writer-generator/python.ts index 560395a16..b2dead7b8 100644 --- a/src/api/writer-generator/python.ts +++ b/src/api/writer-generator/python.ts @@ -381,7 +381,8 @@ export class Python extends Writer { } private generateFhirBaseModelImport(): void { - if (this.forFhirpyClient) this.pyImportFrom(`${this.opts.rootPackageName}.fhir_base_model`, "FhirBaseModel"); + if (this.forFhirpyClient) + this.pyImportFrom(`${this.opts.rootPackageName}.fhirpy_base_model`, "FhirpyBaseModel"); } private generateType(schema: RegularTypeSchema): void { @@ -698,7 +699,7 @@ export class Python extends Writer { private injectSuperClasses(url: string): string[] { const name = canonicalToName(url); - if (name === "resource") return this.forFhirpyClient ? ["FhirBaseModel"] : ["BaseModel"]; + if (name === "resource") return this.forFhirpyClient ? ["FhirpyBaseModel"] : ["BaseModel"]; if (name === "element") return ["BaseModel"]; return []; } From 7a6208a3631d2fa4086f910b793a042a976b974f Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Thu, 22 Jan 2026 15:21:31 +0000 Subject: [PATCH 16/17] chore: retrigger CI From f6fc413efdadb51dcc70621342e47872f1dbc3ce Mon Sep 17 00:00:00 2001 From: MikhailArtemyev Date: Wed, 28 Jan 2026 15:10:08 +0000 Subject: [PATCH 17/17] py: fixed generate.ts --- examples/python/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/generate.ts b/examples/python/generate.ts index 47f32e00a..51ec6e4ae 100644 --- a/examples/python/generate.ts +++ b/examples/python/generate.ts @@ -7,7 +7,7 @@ const builder = new APIBuilder() .fromPackage("hl7.fhir.r4.core", "4.0.1") .python({ allowExtraFields: false, - staticDir: "./src/api/writer-generator/python/static-files", + fhirpyClient: false, fieldFormat: "snake_case", }) .outputTo("./examples/python/fhir_types")