-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput_schema.py
39 lines (35 loc) · 31.9 KB
/
input_schema.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from pyspark.sql.types import *
schema_dict = {
"concept": StructType([StructField("concept_id",IntegerType(),True),StructField("concept_name",StringType(),True),StructField("domain_id",StringType(),True),StructField("vocabulary_id",StringType(),True),StructField("concept_class_id",StringType(),True),StructField("standard_concept",StringType(),True),StructField("concept_code",StringType(),True),StructField("valid_start_date",DateType(),True),StructField("valid_end_date",DateType(),True),StructField("invalid_reason",StringType(),True)]),
"concept_set_members": StructType([StructField("codeset_id",IntegerType(),True),StructField("concept_id",IntegerType(),True),StructField("concept_set_name",StringType(),True),StructField("is_most_recent_version",BooleanType(),True),StructField("version",IntegerType(),True),StructField("concept_name",StringType(),True),StructField("archived",BooleanType(),True)]),
"condition_occurrence": StructType([StructField("person_id",StringType(),True),StructField("condition_occurrence_id",StringType(),True),StructField("condition_end_date",DateType(),True),StructField("condition_end_datetime",TimestampType(),True),StructField("condition_start_date",DateType(),True),StructField("condition_start_datetime",TimestampType(),True),StructField("data_partner_id",IntegerType(),True),StructField("provider_id",StringType(),True),StructField("stop_reason",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("condition_source_value",StringType(),True),StructField("condition_status_source_value",StringType(),True),StructField("condition_concept_id",IntegerType(),True),StructField("condition_source_concept_id",IntegerType(),True),StructField("condition_status_concept_id",IntegerType(),True),StructField("condition_type_concept_id",IntegerType(),True),StructField("condition_concept_name",StringType(),True),StructField("condition_source_concept_name",StringType(),True),StructField("condition_status_concept_name",StringType(),True),StructField("condition_type_concept_name",StringType(),True)]),
"device_exposure": StructType([StructField("person_id",StringType(),True),StructField("device_exposure_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("device_exposure_end_date",DateType(),True),StructField("device_exposure_end_datetime",TimestampType(),True),StructField("device_exposure_start_date",DateType(),True),StructField("device_exposure_start_datetime",TimestampType(),True),StructField("device_source_value",StringType(),True),StructField("provider_id",StringType(),True),StructField("quantity",IntegerType(),True),StructField("unique_device_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("device_concept_id",IntegerType(),True),StructField("device_source_concept_id",IntegerType(),True),StructField("device_type_concept_id",IntegerType(),True),StructField("device_concept_name",StringType(),True),StructField("device_source_concept_name",StringType(),True),StructField("device_type_concept_name",StringType(),True)]),
"drug_exposure": StructType([StructField("person_id",StringType(),True),StructField("drug_exposure_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("days_supply",IntegerType(),True),StructField("dose_unit_source_value",StringType(),True),StructField("drug_exposure_end_date",DateType(),True),StructField("drug_exposure_end_datetime",TimestampType(),True),StructField("drug_exposure_start_date",DateType(),True),StructField("drug_exposure_start_datetime",TimestampType(),True),StructField("drug_source_value",StringType(),True),StructField("lot_number",StringType(),True),StructField("provider_id",StringType(),True),StructField("quantity",FloatType(),True),StructField("refills",IntegerType(),True),StructField("route_source_value",StringType(),True),StructField("sig",StringType(),True),StructField("stop_reason",StringType(),True),StructField("verbatim_end_date",DateType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("drug_concept_id",IntegerType(),True),StructField("drug_source_concept_id",IntegerType(),True),StructField("drug_type_concept_id",IntegerType(),True),StructField("route_concept_id",IntegerType(),True),StructField("drug_concept_name",StringType(),True),StructField("drug_source_concept_name",StringType(),True),StructField("drug_type_concept_name",StringType(),True),StructField("route_concept_name",StringType(),True)]),
"observation": StructType([StructField("person_id",StringType(),True),StructField("observation_id",StringType(),True),StructField("observation_date",DateType(),True),StructField("observation_datetime",TimestampType(),True),StructField("value_as_number",DoubleType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("unit_source_value",StringType(),True),StructField("qualifier_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("value_as_string",StringType(),True),StructField("observation_source_value",StringType(),True),StructField("observation_concept_id",IntegerType(),True),StructField("observation_type_concept_id",IntegerType(),True),StructField("value_as_concept_id",IntegerType(),True),StructField("qualifier_concept_id",IntegerType(),True),StructField("unit_concept_id",IntegerType(),True),StructField("observation_source_concept_id",IntegerType(),True),StructField("observation_concept_name",StringType(),True),StructField("observation_type_concept_name",StringType(),True),StructField("value_as_concept_name",StringType(),True),StructField("qualifier_concept_name",StringType(),True),StructField("unit_concept_name",StringType(),True),StructField("observation_source_concept_name",StringType(),True)]),
"procedure_occurrence": StructType([StructField("person_id",StringType(),True),StructField("procedure_occurrence_id",StringType(),True),StructField("procedure_date",DateType(),True),StructField("procedure_datetime",TimestampType(),True),StructField("quantity",IntegerType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("modifier_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("procedure_source_value",StringType(),True),StructField("procedure_concept_id",IntegerType(),True),StructField("procedure_type_concept_id",IntegerType(),True),StructField("modifier_concept_id",IntegerType(),True),StructField("procedure_source_concept_id",IntegerType(),True),StructField("procedure_concept_name",StringType(),True),StructField("procedure_type_concept_name",StringType(),True),StructField("modifier_concept_name",StringType(),True),StructField("procedure_source_concept_name",StringType(),True)]),
"note": StructType([StructField("person_id",StringType(),True),StructField("note_id",StringType(),True),StructField("note_date",DateType(),True),StructField("note_datetime",TimestampType(),True),StructField("note_title",StringType(),True),StructField("note_text",StringType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("note_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("note_type_concept_id",IntegerType(),True),StructField("note_class_concept_id",IntegerType(),True),StructField("encoding_concept_id",IntegerType(),True),StructField("language_concept_id",IntegerType(),True),StructField("note_type_concept_name",StringType(),True),StructField("note_class_concept_name",StringType(),True),StructField("encoding_concept_name",StringType(),True),StructField("language_concept_name",StringType(),True)]),
"note_nlp": StructType([StructField("note_nlp_id",StringType(),True),StructField("note_id",StringType(),True),StructField("snippet",StringType(),True),StructField("offset",StringType(),True),StructField("lexical_variant",StringType(),True),StructField("nlp_system",StringType(),True),StructField("nlp_date",DateType(),True),StructField("nlp_datetime",TimestampType(),True),StructField("term_exists",BooleanType(),True),StructField("term_temporal",StringType(),True),StructField("term_modifiers",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("term_modifier_certainty",StringType(),True),StructField("term_modifier_subject",StringType(),True),StructField("term_modifier_status",StringType(),True),StructField("section_concept_id",IntegerType(),True),StructField("note_nlp_concept_id",IntegerType(),True),StructField("note_nlp_source_concept_id",IntegerType(),True),StructField("section_concept_name",StringType(),True),StructField("note_nlp_concept_name",StringType(),True),StructField("note_nlp_source_concept_name",StringType(),True)]),
"visit_occurrence": StructType([StructField("person_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("preceding_visit_occurrence_id",StringType(),True),StructField("provider_id",StringType(),True),StructField("visit_end_date",DateType(),True),StructField("visit_end_datetime",TimestampType(),True),StructField("visit_start_date",DateType(),True),StructField("visit_start_datetime",TimestampType(),True),StructField("visit_source_value",StringType(),True),StructField("admitting_source_value",StringType(),True),StructField("discharge_to_source_value",StringType(),True),StructField("admitting_source_concept_id",IntegerType(),True),StructField("discharge_to_concept_id",IntegerType(),True),StructField("visit_concept_id",IntegerType(),True),StructField("visit_source_concept_id",IntegerType(),True),StructField("visit_type_concept_id",IntegerType(),True),StructField("admitting_source_concept_name",StringType(),True),StructField("discharge_to_concept_name",StringType(),True),StructField("visit_concept_name",StringType(),True),StructField("visit_source_concept_name",StringType(),True),StructField("visit_type_concept_name",StringType(),True)]),
"silver": StructType([StructField("person_id",StringType(),True),StructField("covid_index",DateType(),True),StructField("pasc_code_after_four_weeks",IntegerType(),True),StructField("pasc_code_prior_four_weeks",IntegerType(),True),StructField("time_to_pasc",IntegerType(),True)]),
"manifest_safe_harbor": StructType([StructField("data_partner_id",StringType(),True),StructField("cdm_name",StringType(),True),StructField("cdm_version",StringType(),True),StructField("run_date",DateType(),True),StructField("contribution_date",DateType(),True),StructField("n3c_phenoType()_yn",StringType(),True),StructField("n3c_phenoType()_version",StringType(),True),StructField("vocabulary_version",StringType(),True),StructField("mapped_version",StringType(),True),StructField("datasetbuildversion",StringType(),True),StructField("releasenote",StringType(),True),StructField("shift_date_yn",StringType(),True),StructField("max_num_shift_days",StringType(),True)]),
"measurement": StructType([StructField("person_id",StringType(),True),StructField("measurement_id",StringType(),True),StructField("measurement_date",DateType(),True),StructField("measurement_datetime",TimestampType(),True),StructField("measurement_time",StringType(),True),StructField("value_as_number",DoubleType(),True),StructField("range_low",FloatType(),True),StructField("range_high",FloatType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("unit_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("value_source_value",StringType(),True),StructField("measurement_source_value",StringType(),True),StructField("measurement_concept_id",IntegerType(),True),StructField("measurement_type_concept_id",IntegerType(),True),StructField("operator_concept_id",IntegerType(),True),StructField("value_as_concept_id",IntegerType(),True),StructField("unit_concept_id",IntegerType(),True),StructField("measurement_source_concept_id",IntegerType(),True),StructField("measurement_concept_name",StringType(),True),StructField("measurement_type_concept_name",StringType(),True),StructField("operator_concept_name",StringType(),True),StructField("value_as_concept_name",StringType(),True),StructField("unit_concept_name",StringType(),True),StructField("measurement_source_concept_name",StringType(),True),StructField("unit_concept_id_or_inferred_unit_concept_id",IntegerType(),True),StructField("harmonized_unit_concept_id",IntegerType(),True),StructField("harmonized_value_as_number",DoubleType(),True)]),
"person_table": StructType([StructField("person_id",StringType(),True),StructField("year_of_birth",IntegerType(),True),StructField("month_of_birth",IntegerType(),True),StructField("day_of_birth",IntegerType(),True),StructField("birth_datetime",TimestampType(),True),StructField("location_id",StringType(),True),StructField("provider_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("person_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("gender_source_value",StringType(),True),StructField("race_source_value",StringType(),True),StructField("ethnicity_source_value",StringType(),True),StructField("gender_concept_id",IntegerType(),True),StructField("race_concept_id",IntegerType(),True),StructField("ethnicity_concept_id",IntegerType(),True),StructField("gender_source_concept_id",IntegerType(),True),StructField("race_source_concept_id",IntegerType(),True),StructField("ethnicity_source_concept_id",IntegerType(),True),StructField("gender_concept_name",StringType(),True),StructField("race_concept_name",StringType(),True),StructField("ethnicity_concept_name",StringType(),True),StructField("gender_source_concept_name",StringType(),True),StructField("race_source_concept_name",StringType(),True),StructField("ethnicity_source_concept_name",StringType(),True),StructField("is_age_90_or_older",BooleanType(),True)]),
"microvisits_to_macrovisits": StructType([StructField("person_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("preceding_visit_occurrence_id",LongType(),True),StructField("provider_id",StringType(),True),StructField("visit_end_date",DateType(),True),StructField("visit_end_datetime",TimestampType(),True),StructField("visit_start_date",DateType(),True),StructField("visit_start_datetime",TimestampType(),True),StructField("visit_source_value",StringType(),True),StructField("admitting_source_value",StringType(),True),StructField("discharge_to_source_value",StringType(),True),StructField("admitting_source_concept_id",IntegerType(),True),StructField("discharge_to_concept_id",IntegerType(),True),StructField("visit_concept_id",IntegerType(),True),StructField("visit_source_concept_id",IntegerType(),True),StructField("visit_type_concept_id",IntegerType(),True),StructField("admitting_source_concept_name",StringType(),True),StructField("discharge_to_concept_name",StringType(),True),StructField("visit_concept_name",StringType(),True),StructField("visit_source_concept_name",StringType(),True),StructField("visit_type_concept_name",StringType(),True),StructField("macrovisit_id",StringType(),True),StructField("macrovisit_start_date",DateType(),True),StructField("macrovisit_end_date",DateType(),True)]),
"location": StructType([StructField("location_id",StringType(),True),StructField("address_1",StringType(),True),StructField("address_2",StringType(),True),StructField("city",StringType(),True),StructField("state",StringType(),True),StructField("zip",StringType(),True),StructField("county",StringType(),True),StructField("location_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True)]),
"observation_period": StructType([StructField("person_id",StringType(),True),StructField("observation_period_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("observation_period_end_date",DateType(),True),StructField("observation_period_start_date",DateType(),True),StructField("period_type_concept_id",IntegerType(),True),StructField("period_type_concept_name",StringType(),True)]),
"condition_occurrence_test": StructType([StructField("person_id",StringType(),True),StructField("condition_occurrence_id",StringType(),True),StructField("condition_end_date",DateType(),True),StructField("condition_end_datetime",TimestampType(),True),StructField("condition_start_date",DateType(),True),StructField("condition_start_datetime",TimestampType(),True),StructField("data_partner_id",IntegerType(),True),StructField("provider_id",StringType(),True),StructField("stop_reason",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("condition_source_value",StringType(),True),StructField("condition_status_source_value",StringType(),True),StructField("condition_concept_id",IntegerType(),True),StructField("condition_source_concept_id",IntegerType(),True),StructField("condition_status_concept_id",IntegerType(),True),StructField("condition_type_concept_id",IntegerType(),True),StructField("condition_concept_name",StringType(),True),StructField("condition_source_concept_name",StringType(),True),StructField("condition_status_concept_name",StringType(),True),StructField("condition_type_concept_name",StringType(),True)]),
"device_exposure_test": StructType([StructField("person_id",StringType(),True),StructField("device_exposure_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("device_exposure_end_date",DateType(),True),StructField("device_exposure_end_datetime",TimestampType(),True),StructField("device_exposure_start_date",DateType(),True),StructField("device_exposure_start_datetime",TimestampType(),True),StructField("device_source_value",StringType(),True),StructField("provider_id",StringType(),True),StructField("quantity",IntegerType(),True),StructField("unique_device_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("device_concept_id",IntegerType(),True),StructField("device_source_concept_id",IntegerType(),True),StructField("device_type_concept_id",IntegerType(),True),StructField("device_concept_name",StringType(),True),StructField("device_source_concept_name",StringType(),True),StructField("device_type_concept_name",StringType(),True)]),
"drug_exposure_test": StructType([StructField("person_id",StringType(),True),StructField("drug_exposure_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("days_supply",IntegerType(),True),StructField("dose_unit_source_value",StringType(),True),StructField("drug_exposure_end_date",DateType(),True),StructField("drug_exposure_end_datetime",TimestampType(),True),StructField("drug_exposure_start_date",DateType(),True),StructField("drug_exposure_start_datetime",TimestampType(),True),StructField("drug_source_value",StringType(),True),StructField("lot_number",StringType(),True),StructField("provider_id",StringType(),True),StructField("quantity",FloatType(),True),StructField("refills",IntegerType(),True),StructField("route_source_value",StringType(),True),StructField("sig",StringType(),True),StructField("stop_reason",StringType(),True),StructField("verbatim_end_date",DateType(),True),StructField("visit_detail_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("drug_concept_id",IntegerType(),True),StructField("drug_source_concept_id",IntegerType(),True),StructField("drug_type_concept_id",IntegerType(),True),StructField("route_concept_id",IntegerType(),True),StructField("drug_concept_name",StringType(),True),StructField("drug_source_concept_name",StringType(),True),StructField("drug_type_concept_name",StringType(),True),StructField("route_concept_name",StringType(),True)]),
"observation_test": StructType([StructField("person_id",StringType(),True),StructField("observation_id",StringType(),True),StructField("observation_date",DateType(),True),StructField("observation_datetime",TimestampType(),True),StructField("value_as_number",DoubleType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("unit_source_value",StringType(),True),StructField("qualifier_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("value_as_string",StringType(),True),StructField("observation_source_value",StringType(),True),StructField("observation_concept_id",IntegerType(),True),StructField("observation_type_concept_id",IntegerType(),True),StructField("value_as_concept_id",IntegerType(),True),StructField("qualifier_concept_id",IntegerType(),True),StructField("unit_concept_id",IntegerType(),True),StructField("observation_source_concept_id",IntegerType(),True),StructField("observation_concept_name",StringType(),True),StructField("observation_type_concept_name",StringType(),True),StructField("value_as_concept_name",StringType(),True),StructField("qualifier_concept_name",StringType(),True),StructField("unit_concept_name",StringType(),True),StructField("observation_source_concept_name",StringType(),True)]),
"procedure_occurrence_test": StructType([StructField("person_id",StringType(),True),StructField("procedure_occurrence_id",StringType(),True),StructField("procedure_date",DateType(),True),StructField("procedure_datetime",TimestampType(),True),StructField("quantity",IntegerType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("modifier_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("procedure_source_value",StringType(),True),StructField("procedure_concept_id",IntegerType(),True),StructField("procedure_type_concept_id",IntegerType(),True),StructField("modifier_concept_id",IntegerType(),True),StructField("procedure_source_concept_id",IntegerType(),True),StructField("procedure_concept_name",StringType(),True),StructField("procedure_type_concept_name",StringType(),True),StructField("modifier_concept_name",StringType(),True),StructField("procedure_source_concept_name",StringType(),True)]),
"note_test": StructType([StructField("person_id",StringType(),True),StructField("note_id",StringType(),True),StructField("note_date",DateType(),True),StructField("note_datetime",TimestampType(),True),StructField("note_title",StringType(),True),StructField("note_text",StringType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("note_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("note_type_concept_id",IntegerType(),True),StructField("note_class_concept_id",IntegerType(),True),StructField("encoding_concept_id",IntegerType(),True),StructField("language_concept_id",IntegerType(),True),StructField("note_type_concept_name",StringType(),True),StructField("note_class_concept_name",StringType(),True),StructField("encoding_concept_name",StringType(),True),StructField("language_concept_name",StringType(),True)]),
"note_nlp_test": StructType([StructField("note_nlp_id",StringType(),True),StructField("note_id",StringType(),True),StructField("snippet",StringType(),True),StructField("offset",StringType(),True),StructField("lexical_variant",StringType(),True),StructField("nlp_system",StringType(),True),StructField("nlp_date",DateType(),True),StructField("nlp_datetime",TimestampType(),True),StructField("term_exists",BooleanType(),True),StructField("term_temporal",StringType(),True),StructField("term_modifiers",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("term_modifier_certainty",StringType(),True),StructField("term_modifier_subject",StringType(),True),StructField("term_modifier_status",StringType(),True),StructField("section_concept_id",IntegerType(),True),StructField("note_nlp_concept_id",IntegerType(),True),StructField("note_nlp_source_concept_id",IntegerType(),True),StructField("section_concept_name",StringType(),True),StructField("note_nlp_concept_name",StringType(),True),StructField("note_nlp_source_concept_name",StringType(),True)]),
"visit_occurrence_test": StructType([StructField("person_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("preceding_visit_occurrence_id",StringType(),True),StructField("provider_id",StringType(),True),StructField("visit_end_date",DateType(),True),StructField("visit_end_datetime",TimestampType(),True),StructField("visit_start_date",DateType(),True),StructField("visit_start_datetime",TimestampType(),True),StructField("visit_source_value",StringType(),True),StructField("admitting_source_value",StringType(),True),StructField("discharge_to_source_value",StringType(),True),StructField("admitting_source_concept_id",IntegerType(),True),StructField("discharge_to_concept_id",IntegerType(),True),StructField("visit_concept_id",IntegerType(),True),StructField("visit_source_concept_id",IntegerType(),True),StructField("visit_type_concept_id",IntegerType(),True),StructField("admitting_source_concept_name",StringType(),True),StructField("discharge_to_concept_name",StringType(),True),StructField("visit_concept_name",StringType(),True),StructField("visit_source_concept_name",StringType(),True),StructField("visit_type_concept_name",StringType(),True)]),
"silver_test": StructType([StructField("person_id",StringType(),True),StructField("covid_index",DateType(),True),StructField("pasc_code_after_four_weeks",IntegerType(),True),StructField("pasc_code_prior_four_weeks",IntegerType(),True),StructField("time_to_pasc",IntegerType(),True)]),
"manifest_safe_harbor_test": StructType([StructField("data_partner_id",StringType(),True),StructField("cdm_name",StringType(),True),StructField("cdm_version",StringType(),True),StructField("run_date",DateType(),True),StructField("contribution_date",DateType(),True),StructField("n3c_phenoType()_yn",StringType(),True),StructField("n3c_phenoType()_version",StringType(),True),StructField("vocabulary_version",StringType(),True),StructField("mapped_version",StringType(),True),StructField("datasetbuildversion",StringType(),True),StructField("releasenote",StringType(),True),StructField("shift_date_yn",StringType(),True),StructField("max_num_shift_days",StringType(),True)]),
"measurement_test": StructType([StructField("person_id",StringType(),True),StructField("measurement_id",StringType(),True),StructField("measurement_date",DateType(),True),StructField("measurement_datetime",TimestampType(),True),StructField("measurement_time",StringType(),True),StructField("value_as_number",DoubleType(),True),StructField("range_low",FloatType(),True),StructField("range_high",FloatType(),True),StructField("provider_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("visit_detail_id",StringType(),True),StructField("unit_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("value_source_value",StringType(),True),StructField("measurement_source_value",StringType(),True),StructField("measurement_concept_id",IntegerType(),True),StructField("measurement_type_concept_id",IntegerType(),True),StructField("operator_concept_id",IntegerType(),True),StructField("value_as_concept_id",IntegerType(),True),StructField("unit_concept_id",IntegerType(),True),StructField("measurement_source_concept_id",IntegerType(),True),StructField("measurement_concept_name",StringType(),True),StructField("measurement_type_concept_name",StringType(),True),StructField("operator_concept_name",StringType(),True),StructField("value_as_concept_name",StringType(),True),StructField("unit_concept_name",StringType(),True),StructField("measurement_source_concept_name",StringType(),True),StructField("unit_concept_id_or_inferred_unit_concept_id",IntegerType(),True),StructField("harmonized_unit_concept_id",IntegerType(),True),StructField("harmonized_value_as_number",DoubleType(),True)]),
"person_test": StructType([StructField("person_id",StringType(),True),StructField("year_of_birth",IntegerType(),True),StructField("month_of_birth",IntegerType(),True),StructField("day_of_birth",IntegerType(),True),StructField("birth_datetime",TimestampType(),True),StructField("location_id",StringType(),True),StructField("provider_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("person_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("gender_source_value",StringType(),True),StructField("race_source_value",StringType(),True),StructField("ethnicity_source_value",StringType(),True),StructField("gender_concept_id",IntegerType(),True),StructField("race_concept_id",IntegerType(),True),StructField("ethnicity_concept_id",IntegerType(),True),StructField("gender_source_concept_id",IntegerType(),True),StructField("race_source_concept_id",IntegerType(),True),StructField("ethnicity_source_concept_id",IntegerType(),True),StructField("gender_concept_name",StringType(),True),StructField("race_concept_name",StringType(),True),StructField("ethnicity_concept_name",StringType(),True),StructField("gender_source_concept_name",StringType(),True),StructField("race_source_concept_name",StringType(),True),StructField("ethnicity_source_concept_name",StringType(),True),StructField("is_age_90_or_older",BooleanType(),True)]),
"microvisits_to_macrovisits_test": StructType([StructField("person_id",StringType(),True),StructField("visit_occurrence_id",StringType(),True),StructField("care_site_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("preceding_visit_occurrence_id",LongType(),True),StructField("provider_id",StringType(),True),StructField("visit_end_date",DateType(),True),StructField("visit_end_datetime",TimestampType(),True),StructField("visit_start_date",DateType(),True),StructField("visit_start_datetime",TimestampType(),True),StructField("visit_source_value",StringType(),True),StructField("admitting_source_value",StringType(),True),StructField("discharge_to_source_value",StringType(),True),StructField("admitting_source_concept_id",IntegerType(),True),StructField("discharge_to_concept_id",IntegerType(),True),StructField("visit_concept_id",IntegerType(),True),StructField("visit_source_concept_id",IntegerType(),True),StructField("visit_type_concept_id",IntegerType(),True),StructField("admitting_source_concept_name",StringType(),True),StructField("discharge_to_concept_name",StringType(),True),StructField("visit_concept_name",StringType(),True),StructField("visit_source_concept_name",StringType(),True),StructField("visit_type_concept_name",StringType(),True),StructField("macrovisit_id",StringType(),True),StructField("macrovisit_start_date",DateType(),True),StructField("macrovisit_end_date",DateType(),True)]),
"location_test": StructType([StructField("location_id",StringType(),True),StructField("address_1",StringType(),True),StructField("address_2",StringType(),True),StructField("city",StringType(),True),StructField("state",StringType(),True),StructField("zip",StringType(),True),StructField("county",StringType(),True),StructField("location_source_value",StringType(),True),StructField("data_partner_id",IntegerType(),True)]),
"observation_period_test": StructType([StructField("person_id",StringType(),True),StructField("observation_period_id",StringType(),True),StructField("data_partner_id",IntegerType(),True),StructField("observation_period_end_date",DateType(),True),StructField("observation_period_start_date",DateType(),True),StructField("period_type_concept_id",IntegerType(),True),StructField("period_type_concept_name",StringType(),True)]),
}