Skip to content

Commit

Permalink
Merge pull request #20 from imranq2/control_extension_depth
Browse files Browse the repository at this point in the history
Control extension depth
  • Loading branch information
imranq2 authored Jun 16, 2021
2 parents 8e21e05 + 371857b commit e7b7864
Show file tree
Hide file tree
Showing 683 changed files with 20,299 additions and 3 deletions.
14 changes: 14 additions & 0 deletions spark_fhir_schemas/r4/complex_types/account_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
A financial tool for tracking value accrued for a particular purpose. In the
Expand Down Expand Up @@ -74,6 +77,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -92,6 +98,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -104,6 +113,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -116,4 +128,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
14 changes: 14 additions & 0 deletions spark_fhir_schemas/r4/complex_types/account_guarantor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
A financial tool for tracking value accrued for a particular purpose. In the
Expand Down Expand Up @@ -80,6 +83,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -93,6 +99,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -109,6 +118,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -121,4 +133,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
This resource allows for the definition of some activity to be performed,
Expand Down Expand Up @@ -78,6 +81,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -100,6 +106,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -112,4 +121,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
This resource allows for the definition of some activity to be performed,
Expand Down Expand Up @@ -74,6 +77,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -87,6 +93,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -99,6 +108,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -111,4 +123,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
11 changes: 11 additions & 0 deletions spark_fhir_schemas/r4/complex_types/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
An address expressed using postal conventions (as opposed to GPS or other
Expand Down Expand Up @@ -96,6 +99,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand Down Expand Up @@ -134,6 +140,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -146,4 +155,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
17 changes: 17 additions & 0 deletions spark_fhir_schemas/r4/complex_types/adverseevent_causality.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
Actual or potential/avoided event causing unintended physical injury
Expand Down Expand Up @@ -79,6 +82,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -92,6 +98,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -106,6 +115,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -118,6 +130,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -130,4 +145,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
14 changes: 14 additions & 0 deletions spark_fhir_schemas/r4/complex_types/adverseevent_suspectentity.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
Actual or potential/avoided event causing unintended physical injury
Expand Down Expand Up @@ -77,6 +80,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -92,6 +98,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -105,6 +114,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -118,4 +130,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
17 changes: 17 additions & 0 deletions spark_fhir_schemas/r4/complex_types/age.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def get_schema(
nesting_list: List[str] = [],
max_recursion_limit: Optional[int] = 2,
include_extension: Optional[bool] = False,
extension_fields: Optional[List[str]] = None,
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
) -> Union[StructType, DataType]:
"""
A duration of time during which an organism (or a process) has existed.
Expand Down Expand Up @@ -76,6 +79,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth,
max_extension_depth=max_extension_depth,
)
),
True,
Expand All @@ -90,6 +96,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -108,6 +117,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -120,6 +132,9 @@ def get_schema(
nesting_list=my_nesting_list,
max_recursion_limit=max_recursion_limit,
include_extension=include_extension,
extension_fields=extension_fields,
extension_depth=extension_depth + 1,
max_extension_depth=max_extension_depth,
),
True,
),
Expand All @@ -132,4 +147,6 @@ def get_schema(
else StructField("extension", StringType(), True)
for c in schema.fields
]
schema.names = [n for n in schema.names if n != "extension"]

return schema
Loading

0 comments on commit e7b7864

Please sign in to comment.