Skip to content

Commit

Permalink
Update schema.py
Browse files Browse the repository at this point in the history
flatten_properties
  • Loading branch information
EthanSteinberg authored Jul 6, 2024
1 parent c5527fd commit f24609c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/meds/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
birth_code = "SNOMED/184099003"
death_code = "SNOMED/419620001"

def patient_schema(per_event_properties_schema=pa.null()):
def patient_schema(custom_per_event_properties=[]):
# Return a patient schema with a particular per event metadata subschema
event = pa.struct(
[
Expand All @@ -30,8 +30,7 @@ def patient_schema(per_event_properties_schema=pa.null()):
("text_value", pa.string()),
("numeric_value", pa.float32()),
("datetime_value", pa.timestamp("us")),
("properties", per_event_properties_schema),
]
] + custom_per_event_properties
)

patient = pa.schema(
Expand Down

0 comments on commit f24609c

Please sign in to comment.