Skip to content

Commit

Permalink
Merge pull request #30 from imranq2/ar-hdeus-900
Browse files Browse the repository at this point in the history
HDEUS-900 Fix datatype and order of STU3 extension properties
  • Loading branch information
amin010 authored Jul 23, 2021
2 parents 1b198d1 + 1cf35af commit 6703063
Show file tree
Hide file tree
Showing 493 changed files with 1,121 additions and 873 deletions.
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/account_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/account_guarantor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
10 changes: 6 additions & 4 deletions spark_fhir_schemas/stu3/complex_types/activitydefinition.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
StructField,
StringType,
ArrayType,
DateType,
BooleanType,
DataType,
TimestampType,
)


Expand Down Expand Up @@ -40,7 +42,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down Expand Up @@ -414,10 +416,10 @@ def get_schema(
StructField("usage", StringType(), True),
# The date on which the resource content was approved by the publisher. Approval
# happens once when the content is officially approved for usage.
StructField("approvalDate", StringType(), True),
StructField("approvalDate", DateType(), True),
# The date on which the resource content was last reviewed. Review happens
# periodically after approval, but doesn't change the original approval date.
StructField("lastReviewDate", StringType(), True),
StructField("lastReviewDate", DateType(), True),
# The period during which the activity definition content was or is planned to
# be in active use.
StructField(
Expand Down Expand Up @@ -602,7 +604,7 @@ def get_schema(
True,
),
# The period, timing or frequency upon which the described activity is to occur.
StructField("timingDateTime", StringType(), True),
StructField("timingDateTime", TimestampType(), True),
# The period, timing or frequency upon which the described activity is to occur.
StructField(
"timingPeriod",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/adverseevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
6 changes: 3 additions & 3 deletions spark_fhir_schemas/stu3/complex_types/age.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
StructField,
StringType,
ArrayType,
IntegerType,
DataType,
FloatType,
)


Expand Down Expand Up @@ -38,7 +38,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down Expand Up @@ -108,7 +108,7 @@ def get_schema(
),
# The value of the measured amount. The value includes an implicit precision in
# the presentation of the value.
StructField("value", IntegerType(), True),
StructField("value", FloatType(), True),
# How the value should be understood and represented - whether the actual value
# is greater or less than the stated value due to measurement issues; e.g. if
# the comparator is "<" , then the real value is < stated value.
Expand Down
16 changes: 12 additions & 4 deletions spark_fhir_schemas/stu3/complex_types/allergyintolerance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
from typing import Union, List, Optional

from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
from pyspark.sql.types import (
StructType,
StructField,
StringType,
ArrayType,
DateType,
DataType,
TimestampType,
)


# This file is auto-generated by generate_schema so do not edit manually
Expand Down Expand Up @@ -32,7 +40,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down Expand Up @@ -318,7 +326,7 @@ def get_schema(
),
# Estimated or actual date, date-time, or age when allergy or intolerance was
# identified.
StructField("onsetDateTime", StringType(), True),
StructField("onsetDateTime", TimestampType(), True),
# Estimated or actual date, date-time, or age when allergy or intolerance was
# identified.
StructField(
Expand Down Expand Up @@ -372,7 +380,7 @@ def get_schema(
StructField("onsetString", StringType(), True),
# The date on which the existance of the AllergyIntolerance was first asserted
# or acknowledged.
StructField("assertedDate", StringType(), True),
StructField("assertedDate", DateType(), True),
# Individual who recorded the record and takes responsibility for its content.
StructField(
"recorder",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/appointment.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/auditevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/auditevent_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/auditevent_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/auditevent_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/auditevent_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/backboneelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bodysite.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bundle_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bundle_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bundle_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
2 changes: 1 addition & 1 deletion spark_fhir_schemas/stu3/complex_types/bundle_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_schema(
"valueTime",
"valueUnsignedInt",
"valueUri",
"valueUrl",
"valueQuantity",
],
extension_depth: int = 0,
max_extension_depth: Optional[int] = 2,
Expand Down
Loading

0 comments on commit 6703063

Please sign in to comment.