From 1095139414695420d67dc4bd51a9e5b3e83b9ce4 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:24:03 +0000 Subject: [PATCH] Release 8.0.4-beta --- .github/workflows/ci.yml | 6 +- poetry.lock | 424 ++++----- pyproject.toml | 9 +- src/metriport/__init__.py | 7 +- src/metriport/client.py | 47 + src/metriport/commons/types/address.py | 4 +- src/metriport/core/__init__.py | 5 + src/metriport/core/client_wrapper.py | 2 +- src/metriport/core/file.py | 38 + src/metriport/core/request_options.py | 29 + src/metriport/fhir/types/access_policy.py | 23 +- .../types/access_policy_ip_access_rule.py | 3 +- .../fhir/types/access_policy_resource.py | 12 +- .../access_policy_resource_write_criteria.py | 5 +- src/metriport/fhir/types/account.py | 33 +- src/metriport/fhir/types/account_coverage.py | 9 +- src/metriport/fhir/types/account_guarantor.py | 10 +- .../fhir/types/activity_definition.py | 118 ++- .../activity_definition_dynamic_value.py | 10 +- .../types/activity_definition_participant.py | 11 +- src/metriport/fhir/types/address.py | 36 +- src/metriport/fhir/types/adverse_event.py | 51 +- .../fhir/types/adverse_event_causality.py | 17 +- .../types/adverse_event_suspect_entity.py | 9 +- src/metriport/fhir/types/age.py | 18 +- src/metriport/fhir/types/agent.py | 25 +- src/metriport/fhir/types/agent_channel.py | 6 +- src/metriport/fhir/types/agent_setting.py | 16 +- .../fhir/types/allergy_intolerance.py | 39 +- .../types/allergy_intolerance_reaction.py | 21 +- src/metriport/fhir/types/annotation.py | 18 +- src/metriport/fhir/types/appointment.py | 50 +- .../fhir/types/appointment_participant.py | 19 +- .../fhir/types/appointment_response.py | 22 +- src/metriport/fhir/types/async_job.py | 16 +- src/metriport/fhir/types/attachment.py | 27 +- src/metriport/fhir/types/audit_event.py | 28 +- src/metriport/fhir/types/audit_event_agent.py | 31 +- .../fhir/types/audit_event_detail.py | 15 +- .../fhir/types/audit_event_entity.py | 30 +- .../fhir/types/audit_event_network.py | 11 +- .../fhir/types/audit_event_source.py | 12 +- src/metriport/fhir/types/base_resource.py | 18 +- src/metriport/fhir/types/basic.py | 16 +- src/metriport/fhir/types/binary.py | 24 +- .../types/biologically_derived_product.py | 32 +- ...biologically_derived_product_collection.py | 16 +- ...ologically_derived_product_manipulation.py | 17 +- ...biologically_derived_product_processing.py | 23 +- .../biologically_derived_product_storage.py | 15 +- src/metriport/fhir/types/body_structure.py | 18 +- src/metriport/fhir/types/bot.py | 42 +- src/metriport/fhir/types/bulk_data_export.py | 24 +- src/metriport/fhir/types/bundle.py | 33 +- src/metriport/fhir/types/bundle_entry.py | 18 +- src/metriport/fhir/types/bundle_link.py | 12 +- src/metriport/fhir/types/bundle_request.py | 17 +- src/metriport/fhir/types/bundle_response.py | 18 +- src/metriport/fhir/types/bundle_search.py | 12 +- .../fhir/types/capability_statement.py | 67 +- .../types/capability_statement_document.py | 13 +- .../types/capability_statement_endpoint.py | 10 +- .../capability_statement_implementation.py | 16 +- .../types/capability_statement_interaction.py | 12 +- .../capability_statement_interaction_1.py | 12 +- .../types/capability_statement_messaging.py | 15 +- .../types/capability_statement_operation.py | 13 +- .../types/capability_statement_resource.py | 52 +- .../fhir/types/capability_statement_rest.py | 28 +- .../capability_statement_search_param.py | 19 +- .../types/capability_statement_security.py | 16 +- .../types/capability_statement_software.py | 13 +- .../capability_statement_supported_message.py | 9 +- src/metriport/fhir/types/care_plan.py | 60 +- .../fhir/types/care_plan_activity.py | 16 +- src/metriport/fhir/types/care_plan_detail.py | 42 +- src/metriport/fhir/types/care_team.py | 37 +- .../fhir/types/care_team_participant.py | 18 +- src/metriport/fhir/types/catalog_entry.py | 36 +- .../fhir/types/catalog_entry_related_entry.py | 10 +- src/metriport/fhir/types/charge_item.py | 63 +- .../fhir/types/charge_item_definition.py | 57 +- .../charge_item_definition_applicability.py | 16 +- .../charge_item_definition_price_component.py | 20 +- .../charge_item_definition_property_group.py | 10 +- .../fhir/types/charge_item_performer.py | 10 +- src/metriport/fhir/types/claim.py | 57 +- src/metriport/fhir/types/claim_accident.py | 17 +- src/metriport/fhir/types/claim_care_team.py | 16 +- src/metriport/fhir/types/claim_detail.py | 32 +- src/metriport/fhir/types/claim_diagnosis.py | 18 +- src/metriport/fhir/types/claim_insurance.py | 19 +- src/metriport/fhir/types/claim_item.py | 58 +- src/metriport/fhir/types/claim_payee.py | 9 +- src/metriport/fhir/types/claim_procedure.py | 17 +- src/metriport/fhir/types/claim_related.py | 14 +- src/metriport/fhir/types/claim_response.py | 59 +- .../fhir/types/claim_response_add_item.py | 43 +- .../fhir/types/claim_response_adjudication.py | 17 +- .../fhir/types/claim_response_detail.py | 12 +- .../fhir/types/claim_response_detail_1.py | 21 +- .../fhir/types/claim_response_error.py | 10 +- .../fhir/types/claim_response_insurance.py | 15 +- .../fhir/types/claim_response_item.py | 13 +- .../fhir/types/claim_response_payment.py | 16 +- .../fhir/types/claim_response_process_note.py | 17 +- .../fhir/types/claim_response_sub_detail.py | 14 +- .../fhir/types/claim_response_sub_detail_1.py | 19 +- .../fhir/types/claim_response_total.py | 7 +- src/metriport/fhir/types/claim_sub_detail.py | 31 +- .../fhir/types/claim_supporting_info.py | 24 +- .../fhir/types/client_application.py | 32 +- .../fhir/types/clinical_impression.py | 62 +- .../fhir/types/clinical_impression_finding.py | 13 +- .../clinical_impression_investigation.py | 9 +- src/metriport/fhir/types/code_system.py | 69 +- .../fhir/types/code_system_concept.py | 24 +- .../fhir/types/code_system_designation.py | 17 +- .../fhir/types/code_system_filter.py | 18 +- .../fhir/types/code_system_property.py | 18 +- .../fhir/types/code_system_property_1.py | 29 +- src/metriport/fhir/types/codeable_concept.py | 11 +- src/metriport/fhir/types/coding.py | 19 +- src/metriport/fhir/types/communication.py | 64 +- .../fhir/types/communication_payload.py | 10 +- .../fhir/types/communication_request.py | 64 +- .../types/communication_request_payload.py | 10 +- .../fhir/types/compartment_definition.py | 40 +- .../types/compartment_definition_resource.py | 16 +- src/metriport/fhir/types/composition.py | 38 +- .../fhir/types/composition_attester.py | 17 +- src/metriport/fhir/types/composition_event.py | 16 +- .../fhir/types/composition_relates_to.py | 14 +- .../fhir/types/composition_section.py | 33 +- src/metriport/fhir/types/concept_map.py | 48 +- .../fhir/types/concept_map_depends_on.py | 19 +- .../fhir/types/concept_map_element.py | 14 +- src/metriport/fhir/types/concept_map_group.py | 18 +- .../fhir/types/concept_map_target.py | 22 +- .../fhir/types/concept_map_unmapped.py | 19 +- src/metriport/fhir/types/condition.py | 45 +- .../fhir/types/condition_evidence.py | 11 +- src/metriport/fhir/types/condition_stage.py | 15 +- src/metriport/fhir/types/consent.py | 35 +- src/metriport/fhir/types/consent_actor.py | 7 +- src/metriport/fhir/types/consent_data.py | 9 +- src/metriport/fhir/types/consent_policy.py | 13 +- src/metriport/fhir/types/consent_provision.py | 29 +- .../fhir/types/consent_verification.py | 15 +- src/metriport/fhir/types/contact_detail.py | 10 +- src/metriport/fhir/types/contact_point.py | 23 +- src/metriport/fhir/types/contract.py | 75 +- src/metriport/fhir/types/contract_action.py | 41 +- src/metriport/fhir/types/contract_answer.py | 19 +- src/metriport/fhir/types/contract_asset.py | 47 +- .../fhir/types/contract_content_definition.py | 16 +- src/metriport/fhir/types/contract_context.py | 15 +- src/metriport/fhir/types/contract_friendly.py | 9 +- src/metriport/fhir/types/contract_legal.py | 11 +- src/metriport/fhir/types/contract_offer.py | 31 +- src/metriport/fhir/types/contract_party.py | 7 +- src/metriport/fhir/types/contract_rule.py | 9 +- .../fhir/types/contract_security_label.py | 15 +- src/metriport/fhir/types/contract_signer.py | 7 +- src/metriport/fhir/types/contract_subject.py | 9 +- src/metriport/fhir/types/contract_term.py | 40 +- .../fhir/types/contract_valued_item.py | 44 +- src/metriport/fhir/types/contributor.py | 12 +- src/metriport/fhir/types/count.py | 18 +- src/metriport/fhir/types/coverage.py | 39 +- src/metriport/fhir/types/coverage_class.py | 11 +- .../types/coverage_cost_to_beneficiary.py | 16 +- .../types/coverage_eligibility_request.py | 31 +- .../coverage_eligibility_request_diagnosis.py | 9 +- .../coverage_eligibility_request_insurance.py | 11 +- .../coverage_eligibility_request_item.py | 32 +- ...age_eligibility_request_supporting_info.py | 10 +- .../types/coverage_eligibility_response.py | 28 +- .../coverage_eligibility_response_benefit.py | 27 +- .../coverage_eligibility_response_error.py | 7 +- ...coverage_eligibility_response_insurance.py | 15 +- .../coverage_eligibility_response_item.py | 36 +- .../fhir/types/coverage_exception.py | 11 +- src/metriport/fhir/types/data_requirement.py | 21 +- .../types/data_requirement_code_filter.py | 15 +- .../types/data_requirement_date_filter.py | 14 +- .../fhir/types/data_requirement_sort.py | 12 +- src/metriport/fhir/types/detected_issue.py | 44 +- .../fhir/types/detected_issue_evidence.py | 12 +- .../fhir/types/detected_issue_mitigation.py | 14 +- src/metriport/fhir/types/device.py | 64 +- src/metriport/fhir/types/device_definition.py | 59 +- .../types/device_definition_capability.py | 9 +- .../types/device_definition_classification.py | 11 +- .../types/device_definition_device_name.py | 12 +- .../fhir/types/device_definition_material.py | 13 +- .../fhir/types/device_definition_property.py | 11 +- .../types/device_definition_specialization.py | 11 +- ...device_definition_udi_device_identifier.py | 14 +- .../fhir/types/device_device_name.py | 12 +- src/metriport/fhir/types/device_metric.py | 27 +- .../fhir/types/device_metric_calibration.py | 13 +- src/metriport/fhir/types/device_property.py | 11 +- src/metriport/fhir/types/device_request.py | 52 +- .../fhir/types/device_request_parameter.py | 17 +- .../fhir/types/device_specialization.py | 9 +- .../fhir/types/device_udi_carrier.py | 18 +- .../fhir/types/device_use_statement.py | 28 +- src/metriport/fhir/types/device_version.py | 15 +- src/metriport/fhir/types/diagnostic_report.py | 42 +- .../fhir/types/diagnostic_report_media.py | 10 +- src/metriport/fhir/types/distance.py | 18 +- src/metriport/fhir/types/document_manifest.py | 33 +- .../fhir/types/document_manifest_related.py | 13 +- .../fhir/types/document_reference.py | 40 +- .../fhir/types/document_reference_content.py | 10 +- .../fhir/types/document_reference_context.py | 22 +- .../types/document_reference_relates_to.py | 9 +- .../fhir/types/domain_configuration.py | 19 +- src/metriport/fhir/types/dosage.py | 39 +- .../fhir/types/dosage_dose_and_rate.py | 21 +- src/metriport/fhir/types/duration.py | 18 +- .../fhir/types/effect_evidence_synthesis.py | 73 +- .../effect_evidence_synthesis_certainty.py | 15 +- ...idence_synthesis_certainty_subcomponent.py | 15 +- ...fect_evidence_synthesis_effect_estimate.py | 25 +- ...t_evidence_synthesis_precision_estimate.py | 17 +- ..._evidence_synthesis_results_by_exposure.py | 12 +- .../effect_evidence_synthesis_sample_size.py | 17 +- src/metriport/fhir/types/element.py | 6 +- .../fhir/types/element_definition.py | 237 +++++- .../fhir/types/element_definition_base.py | 14 +- .../fhir/types/element_definition_binding.py | 16 +- .../types/element_definition_constraint.py | 25 +- .../types/element_definition_discriminator.py | 12 +- .../fhir/types/element_definition_example.py | 59 +- .../fhir/types/element_definition_mapping.py | 17 +- .../fhir/types/element_definition_slicing.py | 18 +- .../fhir/types/element_definition_type.py | 20 +- src/metriport/fhir/types/encounter.py | 51 +- .../fhir/types/encounter_class_history.py | 7 +- .../fhir/types/encounter_diagnosis.py | 14 +- .../fhir/types/encounter_hospitalization.py | 24 +- .../fhir/types/encounter_location.py | 13 +- .../fhir/types/encounter_participant.py | 14 +- .../fhir/types/encounter_status_history.py | 10 +- src/metriport/fhir/types/endpoint.py | 22 +- .../fhir/types/enrollment_request.py | 22 +- .../fhir/types/enrollment_response.py | 23 +- src/metriport/fhir/types/episode_of_care.py | 29 +- .../fhir/types/episode_of_care_diagnosis.py | 14 +- .../types/episode_of_care_status_history.py | 9 +- src/metriport/fhir/types/event_definition.py | 69 +- src/metriport/fhir/types/evidence.py | 65 +- src/metriport/fhir/types/evidence_variable.py | 64 +- .../types/evidence_variable_characteristic.py | 41 +- src/metriport/fhir/types/example_scenario.py | 47 +- .../fhir/types/example_scenario_actor.py | 17 +- .../types/example_scenario_alternative.py | 15 +- .../example_scenario_contained_instance.py | 11 +- .../fhir/types/example_scenario_instance.py | 20 +- .../fhir/types/example_scenario_operation.py | 35 +- .../fhir/types/example_scenario_process.py | 21 +- .../fhir/types/example_scenario_step.py | 20 +- .../fhir/types/example_scenario_version.py | 13 +- .../fhir/types/explanation_of_benefit.py | 86 +- .../types/explanation_of_benefit_accident.py | 17 +- .../types/explanation_of_benefit_add_item.py | 45 +- .../explanation_of_benefit_adjudication.py | 17 +- .../explanation_of_benefit_benefit_balance.py | 24 +- .../types/explanation_of_benefit_care_team.py | 16 +- .../types/explanation_of_benefit_detail.py | 35 +- .../types/explanation_of_benefit_detail_1.py | 23 +- .../types/explanation_of_benefit_diagnosis.py | 18 +- .../types/explanation_of_benefit_financial.py | 25 +- .../types/explanation_of_benefit_insurance.py | 11 +- .../fhir/types/explanation_of_benefit_item.py | 60 +- .../types/explanation_of_benefit_payee.py | 11 +- .../types/explanation_of_benefit_payment.py | 22 +- .../types/explanation_of_benefit_procedure.py | 17 +- .../explanation_of_benefit_process_note.py | 17 +- .../types/explanation_of_benefit_related.py | 14 +- .../explanation_of_benefit_sub_detail.py | 33 +- .../explanation_of_benefit_sub_detail_1.py | 21 +- .../explanation_of_benefit_supporting_info.py | 24 +- .../types/explanation_of_benefit_total.py | 7 +- src/metriport/fhir/types/expression.py | 20 +- src/metriport/fhir/types/extension.py | 58 +- .../fhir/types/family_member_history.py | 64 +- .../types/family_member_history_condition.py | 17 +- src/metriport/fhir/types/flag.py | 19 +- src/metriport/fhir/types/goal.py | 42 +- src/metriport/fhir/types/goal_target.py | 19 +- src/metriport/fhir/types/graph_definition.py | 40 +- .../types/graph_definition_compartment.py | 22 +- .../fhir/types/graph_definition_link.py | 21 +- .../fhir/types/graph_definition_target.py | 17 +- src/metriport/fhir/types/group.py | 25 +- .../fhir/types/group_characteristic.py | 18 +- src/metriport/fhir/types/group_member.py | 12 +- src/metriport/fhir/types/guidance_response.py | 36 +- .../fhir/types/healthcare_service.py | 56 +- .../healthcare_service_available_time.py | 14 +- .../types/healthcare_service_eligibility.py | 13 +- .../types/healthcare_service_not_available.py | 11 +- src/metriport/fhir/types/human_name.py | 26 +- src/metriport/fhir/types/identifier.py | 21 +- src/metriport/fhir/types/identity_provider.py | 4 +- src/metriport/fhir/types/imaging_study.py | 50 +- .../fhir/types/imaging_study_instance.py | 15 +- .../fhir/types/imaging_study_performer.py | 9 +- .../fhir/types/imaging_study_series.py | 31 +- src/metriport/fhir/types/immunization.py | 59 +- .../fhir/types/immunization_education.py | 16 +- .../fhir/types/immunization_evaluation.py | 29 +- .../fhir/types/immunization_performer.py | 10 +- .../types/immunization_protocol_applied.py | 25 +- .../fhir/types/immunization_reaction.py | 13 +- .../fhir/types/immunization_recommendation.py | 10 +- ...unization_recommendation_date_criterion.py | 9 +- ...unization_recommendation_recommendation.py | 29 +- .../fhir/types/implementation_guide.py | 51 +- .../types/implementation_guide_definition.py | 16 +- .../types/implementation_guide_depends_on.py | 14 +- .../fhir/types/implementation_guide_global.py | 11 +- .../types/implementation_guide_grouping.py | 14 +- .../types/implementation_guide_manifest.py | 16 +- .../fhir/types/implementation_guide_page.py | 20 +- .../fhir/types/implementation_guide_page_1.py | 15 +- .../types/implementation_guide_parameter.py | 12 +- .../types/implementation_guide_resource.py | 18 +- .../types/implementation_guide_resource_1.py | 13 +- .../types/implementation_guide_template.py | 13 +- src/metriport/fhir/types/insurance_plan.py | 34 +- .../fhir/types/insurance_plan_benefit.py | 11 +- .../fhir/types/insurance_plan_benefit_1.py | 9 +- .../fhir/types/insurance_plan_contact.py | 18 +- .../fhir/types/insurance_plan_cost.py | 16 +- .../fhir/types/insurance_plan_coverage.py | 9 +- .../fhir/types/insurance_plan_general_cost.py | 15 +- .../fhir/types/insurance_plan_limit.py | 14 +- .../fhir/types/insurance_plan_plan.py | 22 +- .../types/insurance_plan_specific_cost.py | 9 +- src/metriport/fhir/types/invoice.py | 45 +- src/metriport/fhir/types/invoice_line_item.py | 12 +- .../fhir/types/invoice_participant.py | 10 +- .../fhir/types/invoice_price_component.py | 18 +- src/metriport/fhir/types/json_web_key.py | 50 +- src/metriport/fhir/types/library.py | 73 +- src/metriport/fhir/types/linkage.py | 9 +- src/metriport/fhir/types/linkage_item.py | 10 +- src/metriport/fhir/types/list.py | 37 +- src/metriport/fhir/types/list_entry.py | 16 +- src/metriport/fhir/types/location.py | 44 +- .../fhir/types/location_hours_of_operation.py | 16 +- src/metriport/fhir/types/location_position.py | 16 +- src/metriport/fhir/types/login.py | 63 +- src/metriport/fhir/types/marketing_status.py | 11 +- src/metriport/fhir/types/measure.py | 94 +- src/metriport/fhir/types/measure_component.py | 12 +- src/metriport/fhir/types/measure_group.py | 17 +- .../fhir/types/measure_population.py | 13 +- src/metriport/fhir/types/measure_report.py | 25 +- .../fhir/types/measure_report_component.py | 7 +- .../fhir/types/measure_report_group.py | 16 +- .../fhir/types/measure_report_population.py | 12 +- .../fhir/types/measure_report_population_1.py | 14 +- .../fhir/types/measure_report_stratifier.py | 12 +- .../fhir/types/measure_report_stratum.py | 16 +- .../fhir/types/measure_stratifier.py | 18 +- .../fhir/types/measure_supplemental_data.py | 15 +- src/metriport/fhir/types/media.py | 63 +- src/metriport/fhir/types/medication.py | 25 +- .../fhir/types/medication_administration.py | 47 +- .../types/medication_administration_dosage.py | 24 +- .../medication_administration_performer.py | 10 +- src/metriport/fhir/types/medication_batch.py | 11 +- .../fhir/types/medication_dispense.py | 66 +- .../types/medication_dispense_performer.py | 10 +- .../types/medication_dispense_substitution.py | 14 +- .../fhir/types/medication_ingredient.py | 13 +- .../fhir/types/medication_knowledge.py | 55 +- ...ion_knowledge_administration_guidelines.py | 12 +- .../fhir/types/medication_knowledge_cost.py | 9 +- .../fhir/types/medication_knowledge_dosage.py | 7 +- ...edication_knowledge_drug_characteristic.py | 18 +- .../types/medication_knowledge_ingredient.py | 13 +- .../types/medication_knowledge_kinetics.py | 14 +- .../medication_knowledge_max_dispense.py | 9 +- ...ation_knowledge_medicine_classification.py | 10 +- ...medication_knowledge_monitoring_program.py | 11 +- .../types/medication_knowledge_monograph.py | 14 +- .../types/medication_knowledge_packaging.py | 12 +- ...ation_knowledge_patient_characteristics.py | 11 +- .../types/medication_knowledge_regulatory.py | 13 +- ..._knowledge_related_medication_knowledge.py | 7 +- .../types/medication_knowledge_schedule.py | 7 +- .../medication_knowledge_substitution.py | 9 +- .../fhir/types/medication_request.py | 75 +- .../medication_request_dispense_request.py | 21 +- .../types/medication_request_initial_fill.py | 11 +- .../types/medication_request_substitution.py | 12 +- .../fhir/types/medication_statement.py | 42 +- src/metriport/fhir/types/medicinal_product.py | 37 +- .../types/medicinal_product_authorization.py | 37 +- ...horization_jurisdictional_authorization.py | 17 +- ...dicinal_product_authorization_procedure.py | 19 +- .../medicinal_product_contraindication.py | 18 +- ..._product_contraindication_other_therapy.py | 9 +- .../medicinal_product_country_language.py | 9 +- .../types/medicinal_product_indication.py | 26 +- ...icinal_product_indication_other_therapy.py | 9 +- .../types/medicinal_product_ingredient.py | 15 +- ...l_product_ingredient_reference_strength.py | 19 +- ..._product_ingredient_specified_substance.py | 12 +- .../medicinal_product_ingredient_strength.py | 21 +- .../medicinal_product_ingredient_substance.py | 10 +- .../types/medicinal_product_interaction.py | 22 +- ...dicinal_product_interaction_interactant.py | 15 +- .../types/medicinal_product_manufactured.py | 14 +- ...roduct_manufacturing_business_operation.py | 23 +- .../fhir/types/medicinal_product_name.py | 15 +- .../fhir/types/medicinal_product_name_part.py | 9 +- .../fhir/types/medicinal_product_packaged.py | 21 +- ...cinal_product_packaged_batch_identifier.py | 8 +- ...medicinal_product_packaged_package_item.py | 29 +- .../types/medicinal_product_pharmaceutical.py | 14 +- ..._product_pharmaceutical_characteristics.py | 9 +- ..._pharmaceutical_route_of_administration.py | 14 +- ...l_product_pharmaceutical_target_species.py | 8 +- ...roduct_pharmaceutical_withdrawal_period.py | 9 +- .../medicinal_product_special_designation.py | 25 +- .../medicinal_product_undesirable_effect.py | 16 +- .../fhir/types/message_definition.py | 63 +- .../message_definition_allowed_response.py | 10 +- .../fhir/types/message_definition_focus.py | 18 +- src/metriport/fhir/types/message_header.py | 29 +- .../fhir/types/message_header_destination.py | 19 +- .../fhir/types/message_header_response.py | 16 +- .../fhir/types/message_header_source.py | 19 +- src/metriport/fhir/types/meta.py | 30 +- .../fhir/types/molecular_sequence.py | 36 +- .../fhir/types/molecular_sequence_inner.py | 13 +- .../fhir/types/molecular_sequence_outer.py | 13 +- .../fhir/types/molecular_sequence_quality.py | 37 +- .../types/molecular_sequence_reference_seq.py | 26 +- .../types/molecular_sequence_repository.py | 20 +- .../fhir/types/molecular_sequence_roc.py | 20 +- .../molecular_sequence_structure_variant.py | 23 +- .../fhir/types/molecular_sequence_variant.py | 20 +- src/metriport/fhir/types/money.py | 12 +- src/metriport/fhir/types/naming_system.py | 33 +- .../fhir/types/naming_system_unique_id.py | 19 +- src/metriport/fhir/types/narrative.py | 9 +- src/metriport/fhir/types/nutrition_order.py | 38 +- .../types/nutrition_order_administration.py | 15 +- .../types/nutrition_order_enteral_formula.py | 18 +- .../fhir/types/nutrition_order_nutrient.py | 11 +- .../fhir/types/nutrition_order_oral_diet.py | 22 +- .../fhir/types/nutrition_order_supplement.py | 19 +- .../fhir/types/nutrition_order_texture.py | 11 +- src/metriport/fhir/types/observation.py | 63 +- .../fhir/types/observation_component.py | 22 +- .../fhir/types/observation_definition.py | 24 +- ...servation_definition_qualified_interval.py | 27 +- ...rvation_definition_quantitative_details.py | 13 +- .../fhir/types/observation_reference_range.py | 23 +- .../fhir/types/operation_definition.py | 65 +- .../types/operation_definition_binding.py | 10 +- .../types/operation_definition_overload.py | 11 +- .../types/operation_definition_parameter.py | 31 +- .../operation_definition_referenced_from.py | 11 +- src/metriport/fhir/types/operation_outcome.py | 8 +- .../fhir/types/operation_outcome_issue.py | 25 +- src/metriport/fhir/types/organization.py | 28 +- .../fhir/types/organization_affiliation.py | 29 +- .../fhir/types/organization_contact.py | 18 +- .../fhir/types/parameter_definition.py | 25 +- src/metriport/fhir/types/parameters.py | 17 +- .../fhir/types/parameters_parameter.py | 129 +-- .../fhir/types/password_change_request.py | 23 +- src/metriport/fhir/types/patient.py | 52 +- .../fhir/types/patient_communication.py | 10 +- src/metriport/fhir/types/patient_contact.py | 26 +- src/metriport/fhir/types/patient_link.py | 9 +- src/metriport/fhir/types/payment_notice.py | 25 +- .../fhir/types/payment_reconciliation.py | 39 +- .../types/payment_reconciliation_detail.py | 28 +- .../payment_reconciliation_process_note.py | 11 +- src/metriport/fhir/types/period.py | 13 +- src/metriport/fhir/types/person.py | 33 +- src/metriport/fhir/types/person_link.py | 9 +- src/metriport/fhir/types/plan_definition.py | 80 +- .../fhir/types/plan_definition_action.py | 90 +- .../fhir/types/plan_definition_condition.py | 14 +- .../types/plan_definition_dynamic_value.py | 12 +- .../fhir/types/plan_definition_goal.py | 22 +- .../fhir/types/plan_definition_participant.py | 11 +- .../types/plan_definition_related_action.py | 13 +- .../fhir/types/plan_definition_target.py | 15 +- src/metriport/fhir/types/population.py | 20 +- src/metriport/fhir/types/practitioner.py | 29 +- .../fhir/types/practitioner_qualification.py | 15 +- src/metriport/fhir/types/practitioner_role.py | 30 +- .../types/practitioner_role_available_time.py | 14 +- .../types/practitioner_role_not_available.py | 11 +- src/metriport/fhir/types/procedure.py | 62 +- .../fhir/types/procedure_focal_device.py | 9 +- .../fhir/types/procedure_performer.py | 14 +- .../fhir/types/prod_characteristic.py | 35 +- .../fhir/types/product_shelf_life.py | 10 +- src/metriport/fhir/types/project.py | 32 +- .../fhir/types/project_membership.py | 27 +- .../fhir/types/project_membership_access.py | 2 +- .../project_membership_access_parameter.py | 2 + src/metriport/fhir/types/project_secret.py | 16 +- src/metriport/fhir/types/project_site.py | 4 + src/metriport/fhir/types/provenance.py | 27 +- src/metriport/fhir/types/provenance_agent.py | 16 +- src/metriport/fhir/types/provenance_entity.py | 12 +- src/metriport/fhir/types/quantity.py | 18 +- src/metriport/fhir/types/questionnaire.py | 54 +- .../fhir/types/questionnaire_answer_option.py | 28 +- .../fhir/types/questionnaire_enable_when.py | 22 +- .../fhir/types/questionnaire_initial.py | 31 +- .../fhir/types/questionnaire_item.py | 42 +- .../fhir/types/questionnaire_response.py | 30 +- .../types/questionnaire_response_answer.py | 30 +- .../fhir/types/questionnaire_response_item.py | 17 +- src/metriport/fhir/types/range.py | 14 +- src/metriport/fhir/types/ratio.py | 10 +- src/metriport/fhir/types/reference.py | 18 +- src/metriport/fhir/types/related_artifact.py | 25 +- src/metriport/fhir/types/related_person.py | 32 +- .../types/related_person_communication.py | 10 +- src/metriport/fhir/types/request_group.py | 46 +- .../fhir/types/request_group_action.py | 74 +- .../fhir/types/request_group_condition.py | 12 +- .../types/request_group_related_action.py | 13 +- .../fhir/types/research_definition.py | 84 +- .../fhir/types/research_element_definition.py | 84 +- ...earch_element_definition_characteristic.py | 53 +- src/metriport/fhir/types/research_study.py | 64 +- .../fhir/types/research_study_arm.py | 17 +- .../fhir/types/research_study_objective.py | 11 +- src/metriport/fhir/types/research_subject.py | 16 +- src/metriport/fhir/types/risk_assessment.py | 50 +- .../fhir/types/risk_assessment_prediction.py | 24 +- .../fhir/types/risk_evidence_synthesis.py | 75 +- .../risk_evidence_synthesis_certainty.py | 15 +- ...idence_synthesis_certainty_subcomponent.py | 15 +- ...k_evidence_synthesis_precision_estimate.py | 17 +- .../risk_evidence_synthesis_risk_estimate.py | 31 +- .../risk_evidence_synthesis_sample_size.py | 17 +- src/metriport/fhir/types/sampled_data.py | 19 +- src/metriport/fhir/types/schedule.py | 23 +- src/metriport/fhir/types/search_parameter.py | 60 +- .../fhir/types/search_parameter_component.py | 10 +- src/metriport/fhir/types/service_request.py | 76 +- src/metriport/fhir/types/signature.py | 14 +- src/metriport/fhir/types/slot.py | 27 +- src/metriport/fhir/types/smart_app_launch.py | 19 +- src/metriport/fhir/types/specimen.py | 37 +- .../fhir/types/specimen_collection.py | 23 +- .../fhir/types/specimen_container.py | 21 +- .../fhir/types/specimen_definition.py | 18 +- .../types/specimen_definition_additive.py | 9 +- .../types/specimen_definition_container.py | 33 +- .../types/specimen_definition_handling.py | 16 +- .../types/specimen_definition_type_tested.py | 26 +- .../fhir/types/specimen_processing.py | 15 +- .../fhir/types/structure_definition.py | 71 +- .../types/structure_definition_context.py | 12 +- .../structure_definition_differential.py | 7 +- .../types/structure_definition_mapping.py | 19 +- .../types/structure_definition_snapshot.py | 7 +- src/metriport/fhir/types/structure_map.py | 47 +- .../fhir/types/structure_map_dependent.py | 13 +- .../fhir/types/structure_map_group.py | 17 +- .../fhir/types/structure_map_input.py | 19 +- .../fhir/types/structure_map_parameter.py | 17 +- .../fhir/types/structure_map_rule.py | 21 +- .../fhir/types/structure_map_source.py | 193 +++-- .../fhir/types/structure_map_structure.py | 13 +- .../fhir/types/structure_map_target.py | 23 +- src/metriport/fhir/types/subscription.py | 23 +- .../fhir/types/subscription_channel.py | 16 +- src/metriport/fhir/types/substance.py | 19 +- src/metriport/fhir/types/substance_amount.py | 15 +- .../types/substance_amount_reference_range.py | 11 +- .../fhir/types/substance_ingredient.py | 15 +- .../fhir/types/substance_instance.py | 14 +- .../fhir/types/substance_nucleic_acid.py | 12 +- .../types/substance_nucleic_acid_linkage.py | 17 +- .../types/substance_nucleic_acid_subunit.py | 27 +- .../types/substance_nucleic_acid_sugar.py | 12 +- src/metriport/fhir/types/substance_polymer.py | 16 +- ...stance_polymer_degree_of_polymerisation.py | 11 +- .../types/substance_polymer_monomer_set.py | 11 +- .../fhir/types/substance_polymer_repeat.py | 15 +- .../types/substance_polymer_repeat_unit.py | 17 +- .../substance_polymer_starting_material.py | 15 +- ...tance_polymer_structural_representation.py | 13 +- src/metriport/fhir/types/substance_protein.py | 10 +- .../fhir/types/substance_protein_subunit.py | 23 +- .../types/substance_reference_information.py | 18 +- ...ce_reference_information_classification.py | 15 +- .../substance_reference_information_gene.py | 13 +- ...ance_reference_information_gene_element.py | 13 +- .../substance_reference_information_target.py | 33 +- .../fhir/types/substance_source_material.py | 24 +- .../types/substance_source_material_author.py | 9 +- ...ce_source_material_fraction_description.py | 11 +- .../types/substance_source_material_hybrid.py | 13 +- .../substance_source_material_organism.py | 24 +- ...stance_source_material_organism_general.py | 15 +- ...stance_source_material_part_description.py | 10 +- .../fhir/types/substance_specification.py | 50 +- .../types/substance_specification_code.py | 18 +- .../types/substance_specification_isotope.py | 16 +- .../types/substance_specification_moiety.py | 29 +- ...ubstance_specification_molecular_weight.py | 15 +- .../types/substance_specification_name.py | 34 +- .../types/substance_specification_official.py | 17 +- .../types/substance_specification_property.py | 20 +- .../substance_specification_relationship.py | 21 +- .../substance_specification_representation.py | 14 +- .../substance_specification_structure.py | 26 +- src/metriport/fhir/types/supply_delivery.py | 37 +- .../types/supply_delivery_supplied_item.py | 11 +- src/metriport/fhir/types/supply_request.py | 42 +- .../fhir/types/supply_request_parameter.py | 17 +- src/metriport/fhir/types/task.py | 71 +- src/metriport/fhir/types/task_input.py | 107 +-- src/metriport/fhir/types/task_output.py | 107 +-- src/metriport/fhir/types/task_restriction.py | 16 +- .../fhir/types/terminology_capabilities.py | 63 +- .../types/terminology_capabilities_closure.py | 11 +- .../terminology_capabilities_code_system.py | 13 +- .../terminology_capabilities_expansion.py | 23 +- .../types/terminology_capabilities_filter.py | 13 +- ...terminology_capabilities_implementation.py | 12 +- .../terminology_capabilities_parameter.py | 13 +- .../terminology_capabilities_software.py | 11 +- .../terminology_capabilities_translation.py | 9 +- .../terminology_capabilities_validate_code.py | 11 +- .../types/terminology_capabilities_version.py | 23 +- src/metriport/fhir/types/test_report.py | 33 +- .../fhir/types/test_report_action.py | 13 +- .../fhir/types/test_report_action_1.py | 11 +- .../fhir/types/test_report_action_2.py | 7 +- .../fhir/types/test_report_assert.py | 15 +- .../fhir/types/test_report_operation.py | 15 +- .../fhir/types/test_report_participant.py | 17 +- src/metriport/fhir/types/test_report_setup.py | 7 +- .../fhir/types/test_report_teardown.py | 7 +- src/metriport/fhir/types/test_report_test.py | 12 +- src/metriport/fhir/types/test_script.py | 67 +- .../fhir/types/test_script_action.py | 12 +- .../fhir/types/test_script_action_1.py | 10 +- .../fhir/types/test_script_action_2.py | 7 +- .../fhir/types/test_script_assert.py | 51 +- .../fhir/types/test_script_capability.py | 25 +- .../fhir/types/test_script_destination.py | 10 +- .../fhir/types/test_script_fixture.py | 16 +- src/metriport/fhir/types/test_script_link.py | 11 +- .../fhir/types/test_script_metadata.py | 9 +- .../fhir/types/test_script_operation.py | 47 +- .../fhir/types/test_script_origin.py | 10 +- .../fhir/types/test_script_request_header.py | 13 +- src/metriport/fhir/types/test_script_setup.py | 7 +- .../fhir/types/test_script_teardown.py | 7 +- src/metriport/fhir/types/test_script_test.py | 12 +- .../fhir/types/test_script_variable.py | 26 +- src/metriport/fhir/types/timing.py | 14 +- src/metriport/fhir/types/timing_repeat.py | 39 +- .../fhir/types/trigger_definition.py | 27 +- src/metriport/fhir/types/usage_context.py | 10 +- src/metriport/fhir/types/user.py | 33 +- .../fhir/types/user_configuration.py | 25 +- .../fhir/types/user_configuration_menu.py | 2 +- .../fhir/types/user_configuration_option.py | 5 + src/metriport/fhir/types/value_set.py | 51 +- src/metriport/fhir/types/value_set_compose.py | 14 +- src/metriport/fhir/types/value_set_concept.py | 15 +- .../fhir/types/value_set_contains.py | 29 +- .../fhir/types/value_set_designation.py | 17 +- .../fhir/types/value_set_expansion.py | 23 +- src/metriport/fhir/types/value_set_filter.py | 14 +- src/metriport/fhir/types/value_set_include.py | 18 +- .../fhir/types/value_set_parameter.py | 30 +- .../fhir/types/verification_result.py | 41 +- .../types/verification_result_attestation.py | 22 +- .../verification_result_primary_source.py | 21 +- .../types/verification_result_validator.py | 12 +- .../fhir/types/vision_prescription.py | 15 +- .../vision_prescription_lens_specification.py | 39 +- .../fhir/types/vision_prescription_prism.py | 11 +- src/metriport/medical/__init__.py | 53 +- src/metriport/medical/client.py | 10 +- .../{resources => }/document/__init__.py | 0 .../{resources => }/document/client.py | 465 ++++++++-- .../document/types/__init__.py | 0 .../types/bulk_get_document_url_query.py | 11 +- .../document/types/conversion_type.py | 0 .../document/types/document_query.py | 16 +- .../document/types/document_query_status.py | 0 .../document/types/document_url.py | 6 +- .../types/list_document_references.py | 4 +- .../document/types/progress.py | 16 +- .../types/upload_document_response.py | 4 +- .../{resources => }/facility/__init__.py | 0 .../{resources => }/facility/client.py | 214 ++++- .../facility/types/__init__.py | 0 .../facility/types/base_facility.py | 10 +- .../facility/types/facility.py | 4 +- .../types/list_facilities_response.py | 2 +- .../medical/{resources => }/fhir/__init__.py | 0 .../medical/{resources => }/fhir/client.py | 255 +++++- .../{resources => }/fhir/types/__init__.py | 0 .../fhir/types/consolidated_bundle_upload.py | 4 +- .../fhir/types/consolidated_count_response.py | 2 +- .../{resources => }/fhir/types/filter.py | 4 +- .../get_consolidated_query_status_response.py | 8 +- .../types/patient_consolidated_data_status.py | 0 .../start_consolidated_query_response.py | 2 +- .../{resources => }/organization/__init__.py | 0 .../{resources => }/organization/client.py | 187 +++- .../organization/types/__init__.py | 0 .../organization/types/org_type.py | 0 .../organization/types/organization.py | 4 +- .../organization/types/organization_create.py | 4 +- .../{resources => }/patient/__init__.py | 0 src/metriport/medical/patient/client.py | 801 ++++++++++++++++++ .../{resources => }/patient/types/__init__.py | 0 .../patient/types/base_patient.py | 9 +- .../{resources => }/patient/types/contact.py | 8 +- .../patient/types/drivers_license.py | 10 +- .../patient/types/facility_id.py | 0 .../patient/types/list_patients_response.py | 2 +- .../patient/types/medical_record_status.py | 2 +- .../{resources => }/patient/types/patient.py | 7 +- .../patient/types/personal_identifier.py | 6 +- .../patient/types/record_status.py | 6 +- src/metriport/medical/resources/__init__.py | 94 -- .../medical/resources/patient/client.py | 468 ---------- .../{resources => }/webhooks/__init__.py | 0 .../webhooks/types/__init__.py | 0 .../types/consolidated_webhook_status.py | 0 .../{resources => }/webhooks/types/filters.py | 0 .../webhooks/types/mapi_webhook_status.py | 0 .../webhooks/types/payload_patient.py | 12 +- .../types/webhook_document_data_payload.py | 22 +- .../types/webhook_metadata_payload.py | 6 +- ...bhook_patient_consolidated_data_payload.py | 2 +- .../webhook_patient_document_data_payload.py | 2 +- .../webhooks/types/webhook_patient_payload.py | 6 +- 757 files changed, 12967 insertions(+), 6752 deletions(-) create mode 100644 src/metriport/core/file.py create mode 100644 src/metriport/core/request_options.py rename src/metriport/medical/{resources => }/document/__init__.py (100%) rename src/metriport/medical/{resources => }/document/client.py (56%) rename src/metriport/medical/{resources => }/document/types/__init__.py (100%) rename src/metriport/medical/{resources => }/document/types/bulk_get_document_url_query.py (81%) rename src/metriport/medical/{resources => }/document/types/conversion_type.py (100%) rename src/metriport/medical/{resources => }/document/types/document_query.py (76%) rename src/metriport/medical/{resources => }/document/types/document_query_status.py (100%) rename src/metriport/medical/{resources => }/document/types/document_url.py (82%) rename src/metriport/medical/{resources => }/document/types/list_document_references.py (89%) rename src/metriport/medical/{resources => }/document/types/progress.py (66%) rename src/metriport/medical/{resources => }/document/types/upload_document_response.py (91%) rename src/metriport/medical/{resources => }/facility/__init__.py (100%) rename src/metriport/medical/{resources => }/facility/client.py (54%) rename src/metriport/medical/{resources => }/facility/types/__init__.py (100%) rename src/metriport/medical/{resources => }/facility/types/base_facility.py (77%) rename src/metriport/medical/{resources => }/facility/types/facility.py (93%) rename src/metriport/medical/{resources => }/facility/types/list_facilities_response.py (94%) rename src/metriport/medical/{resources => }/fhir/__init__.py (100%) rename src/metriport/medical/{resources => }/fhir/client.py (60%) rename src/metriport/medical/{resources => }/fhir/types/__init__.py (100%) rename src/metriport/medical/{resources => }/fhir/types/consolidated_bundle_upload.py (94%) rename src/metriport/medical/{resources => }/fhir/types/consolidated_count_response.py (96%) rename src/metriport/medical/{resources => }/fhir/types/filter.py (94%) rename src/metriport/medical/{resources => }/fhir/types/get_consolidated_query_status_response.py (86%) rename src/metriport/medical/{resources => }/fhir/types/patient_consolidated_data_status.py (100%) rename src/metriport/medical/{resources => }/fhir/types/start_consolidated_query_response.py (94%) rename src/metriport/medical/{resources => }/organization/__init__.py (100%) rename src/metriport/medical/{resources => }/organization/client.py (53%) rename src/metriport/medical/{resources => }/organization/types/__init__.py (100%) rename src/metriport/medical/{resources => }/organization/types/org_type.py (100%) rename src/metriport/medical/{resources => }/organization/types/organization.py (92%) rename src/metriport/medical/{resources => }/organization/types/organization_create.py (91%) rename src/metriport/medical/{resources => }/patient/__init__.py (100%) create mode 100644 src/metriport/medical/patient/client.py rename src/metriport/medical/{resources => }/patient/types/__init__.py (100%) rename src/metriport/medical/{resources => }/patient/types/base_patient.py (87%) rename src/metriport/medical/{resources => }/patient/types/contact.py (76%) rename src/metriport/medical/{resources => }/patient/types/drivers_license.py (81%) rename src/metriport/medical/{resources => }/patient/types/facility_id.py (100%) rename src/metriport/medical/{resources => }/patient/types/list_patients_response.py (93%) rename src/metriport/medical/{resources => }/patient/types/medical_record_status.py (94%) rename src/metriport/medical/{resources => }/patient/types/patient.py (92%) rename src/metriport/medical/{resources => }/patient/types/personal_identifier.py (78%) rename src/metriport/medical/{resources => }/patient/types/record_status.py (82%) delete mode 100644 src/metriport/medical/resources/__init__.py delete mode 100644 src/metriport/medical/resources/patient/client.py rename src/metriport/medical/{resources => }/webhooks/__init__.py (100%) rename src/metriport/medical/{resources => }/webhooks/types/__init__.py (100%) rename src/metriport/medical/{resources => }/webhooks/types/consolidated_webhook_status.py (100%) rename src/metriport/medical/{resources => }/webhooks/types/filters.py (100%) rename src/metriport/medical/{resources => }/webhooks/types/mapi_webhook_status.py (100%) rename src/metriport/medical/{resources => }/webhooks/types/payload_patient.py (75%) rename src/metriport/medical/{resources => }/webhooks/types/webhook_document_data_payload.py (51%) rename src/metriport/medical/{resources => }/webhooks/types/webhook_metadata_payload.py (84%) rename src/metriport/medical/{resources => }/webhooks/types/webhook_patient_consolidated_data_payload.py (95%) rename src/metriport/medical/{resources => }/webhooks/types/webhook_patient_document_data_payload.py (95%) rename src/metriport/medical/{resources => }/webhooks/types/webhook_patient_payload.py (85%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a5b56e..0b26bf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -26,7 +26,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -45,7 +45,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 diff --git a/poetry.lock b/poetry.lock index c23d386..bdeefd8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "annotated-types" -version = "0.5.0" +version = "0.6.0" description = "Reusable constraint types to use with typing.Annotated" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, - {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] [package.dependencies] @@ -16,25 +16,25 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} [[package]] name = "anyio" -version = "3.7.1" +version = "4.3.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, + {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, ] [package.dependencies] -exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = "*", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] -test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (<0.22)"] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "certifi" @@ -83,44 +83,42 @@ files = [ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] -[package.dependencies] -typing-extensions = {version = "*", markers = "python_version < \"3.8\""} - [[package]] name = "httpcore" -version = "0.17.3" +version = "1.0.4" description = "A minimal low-level HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"}, - {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"}, + {file = "httpcore-1.0.4-py3-none-any.whl", hash = "sha256:ac418c1db41bade2ad53ae2f3834a3a0f5ae76b56cf5aa497d2d033384fc7d73"}, + {file = "httpcore-1.0.4.tar.gz", hash = "sha256:cb2839ccfcba0d2d3c1131d3c3e26dfc327326fbe7a5dc0dbfe9f6c9151bb022"}, ] [package.dependencies] -anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = "==1.*" [package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<0.25.0)"] [[package]] name = "httpx" -version = "0.24.1" +version = "0.27.0" description = "The next generation HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"}, - {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] +anyio = "*" certifi = "*" -httpcore = ">=0.15.0,<0.18.0" +httpcore = "==1.*" idna = "*" sniffio = "*" @@ -141,26 +139,6 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] -[[package]] -name = "importlib-metadata" -version = "6.7.0" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, - {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, -] - -[package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] - [[package]] name = "iniconfig" version = "2.0.0" @@ -174,45 +152,49 @@ files = [ [[package]] name = "mypy" -version = "0.971" +version = "1.8.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"}, - {file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"}, - {file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"}, - {file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"}, - {file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"}, - {file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"}, - {file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"}, - {file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"}, - {file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"}, - {file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"}, - {file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"}, - {file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"}, - {file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"}, - {file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"}, - {file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"}, - {file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"}, - {file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"}, - {file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"}, - {file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, + {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, + {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, + {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, + {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, + {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, + {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, + {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, + {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, + {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, + {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, + {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, + {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, + {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, + {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, + {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, + {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, + {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, ] [package.dependencies] -mypy-extensions = ">=0.4.3" +mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} -typing-extensions = ">=3.10" +typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] +install-types = ["pip"] +mypyc = ["setuptools (>=50)"] reports = ["lxml"] [[package]] @@ -239,36 +221,33 @@ files = [ [[package]] name = "pluggy" -version = "1.2.0" +version = "1.4.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, ] -[package.dependencies] -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} - [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.4.2" +version = "2.6.1" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"}, - {file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7"}, + {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, + {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.10.1" +pydantic-core = "2.16.2" typing-extensions = ">=4.6.1" [package.extras] @@ -276,117 +255,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.10.1" +version = "2.16.2" description = "" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63"}, - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6"}, - {file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b"}, - {file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f"}, - {file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6"}, - {file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27"}, - {file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c"}, - {file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f"}, - {file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430"}, - {file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f"}, - {file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c"}, - {file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de"}, - {file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee"}, - {file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595"}, - {file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a"}, - {file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776"}, - {file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82"}, + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, + {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, + {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, + {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, + {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, + {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, + {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, + {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, + {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, + {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, + {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, + {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, + {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, + {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, ] [package.dependencies] @@ -406,7 +358,6 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" @@ -437,83 +388,18 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "typed-ast" -version = "1.5.5" -description = "a fork of Python 2 and 3 ast modules with type comment support" -optional = false -python-versions = ">=3.6" -files = [ - {file = "typed_ast-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4bc1efe0ce3ffb74784e06460f01a223ac1f6ab31c6bc0376a21184bf5aabe3b"}, - {file = "typed_ast-1.5.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5f7a8c46a8b333f71abd61d7ab9255440d4a588f34a21f126bbfc95f6049e686"}, - {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597fc66b4162f959ee6a96b978c0435bd63791e31e4f410622d19f1686d5e769"}, - {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d41b7a686ce653e06c2609075d397ebd5b969d821b9797d029fccd71fdec8e04"}, - {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5fe83a9a44c4ce67c796a1b466c270c1272e176603d5e06f6afbc101a572859d"}, - {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d5c0c112a74c0e5db2c75882a0adf3133adedcdbfd8cf7c9d6ed77365ab90a1d"}, - {file = "typed_ast-1.5.5-cp310-cp310-win_amd64.whl", hash = "sha256:e1a976ed4cc2d71bb073e1b2a250892a6e968ff02aa14c1f40eba4f365ffec02"}, - {file = "typed_ast-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c631da9710271cb67b08bd3f3813b7af7f4c69c319b75475436fcab8c3d21bee"}, - {file = "typed_ast-1.5.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b445c2abfecab89a932b20bd8261488d574591173d07827c1eda32c457358b18"}, - {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc95ffaaab2be3b25eb938779e43f513e0e538a84dd14a5d844b8f2932593d88"}, - {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61443214d9b4c660dcf4b5307f15c12cb30bdfe9588ce6158f4a005baeb167b2"}, - {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6eb936d107e4d474940469e8ec5b380c9b329b5f08b78282d46baeebd3692dc9"}, - {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e48bf27022897577d8479eaed64701ecaf0467182448bd95759883300ca818c8"}, - {file = "typed_ast-1.5.5-cp311-cp311-win_amd64.whl", hash = "sha256:83509f9324011c9a39faaef0922c6f720f9623afe3fe220b6d0b15638247206b"}, - {file = "typed_ast-1.5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:44f214394fc1af23ca6d4e9e744804d890045d1643dd7e8229951e0ef39429b5"}, - {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:118c1ce46ce58fda78503eae14b7664163aa735b620b64b5b725453696f2a35c"}, - {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be4919b808efa61101456e87f2d4c75b228f4e52618621c77f1ddcaae15904fa"}, - {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fc2b8c4e1bc5cd96c1a823a885e6b158f8451cf6f5530e1829390b4d27d0807f"}, - {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:16f7313e0a08c7de57f2998c85e2a69a642e97cb32f87eb65fbfe88381a5e44d"}, - {file = "typed_ast-1.5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:2b946ef8c04f77230489f75b4b5a4a6f24c078be4aed241cfabe9cbf4156e7e5"}, - {file = "typed_ast-1.5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2188bc33d85951ea4ddad55d2b35598b2709d122c11c75cffd529fbc9965508e"}, - {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0635900d16ae133cab3b26c607586131269f88266954eb04ec31535c9a12ef1e"}, - {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57bfc3cf35a0f2fdf0a88a3044aafaec1d2f24d8ae8cd87c4f58d615fb5b6311"}, - {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fe58ef6a764de7b4b36edfc8592641f56e69b7163bba9f9c8089838ee596bfb2"}, - {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d09d930c2d1d621f717bb217bf1fe2584616febb5138d9b3e8cdd26506c3f6d4"}, - {file = "typed_ast-1.5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:d40c10326893ecab8a80a53039164a224984339b2c32a6baf55ecbd5b1df6431"}, - {file = "typed_ast-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fd946abf3c31fb50eee07451a6aedbfff912fcd13cf357363f5b4e834cc5e71a"}, - {file = "typed_ast-1.5.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ed4a1a42df8a3dfb6b40c3d2de109e935949f2f66b19703eafade03173f8f437"}, - {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:045f9930a1550d9352464e5149710d56a2aed23a2ffe78946478f7b5416f1ede"}, - {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:381eed9c95484ceef5ced626355fdc0765ab51d8553fec08661dce654a935db4"}, - {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bfd39a41c0ef6f31684daff53befddae608f9daf6957140228a08e51f312d7e6"}, - {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8c524eb3024edcc04e288db9541fe1f438f82d281e591c548903d5b77ad1ddd4"}, - {file = "typed_ast-1.5.5-cp38-cp38-win_amd64.whl", hash = "sha256:7f58fabdde8dcbe764cef5e1a7fcb440f2463c1bbbec1cf2a86ca7bc1f95184b"}, - {file = "typed_ast-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:042eb665ff6bf020dd2243307d11ed626306b82812aba21836096d229fdc6a10"}, - {file = "typed_ast-1.5.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:622e4a006472b05cf6ef7f9f2636edc51bda670b7bbffa18d26b255269d3d814"}, - {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1efebbbf4604ad1283e963e8915daa240cb4bf5067053cf2f0baadc4d4fb51b8"}, - {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0aefdd66f1784c58f65b502b6cf8b121544680456d1cebbd300c2c813899274"}, - {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:48074261a842acf825af1968cd912f6f21357316080ebaca5f19abbb11690c8a"}, - {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:429ae404f69dc94b9361bb62291885894b7c6fb4640d561179548c849f8492ba"}, - {file = "typed_ast-1.5.5-cp39-cp39-win_amd64.whl", hash = "sha256:335f22ccb244da2b5c296e6f96b06ee9bed46526db0de38d2f0e5a6597b81155"}, - {file = "typed_ast-1.5.5.tar.gz", hash = "sha256:94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd"}, -] - [[package]] name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] -[[package]] -name = "zipp" -version = "3.15.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.7" -files = [ - {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, - {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - [metadata] lock-version = "2.0" -python-versions = "^3.7" -content-hash = "4ac84aae6b05a415337279868d39fe7ce44104dffcd6b159af9e12dcea350ba1" +python-versions = "^3.8" +content-hash = "3c8fae8de68e5484c48073bf191e51acbe3b9a32fd98e6b5e4d165e42a7fc7aa" diff --git a/pyproject.toml b/pyproject.toml index 776baf1..9349684 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metriport" -version = "8.0.3-beta" +version = "8.0.4-beta" description = "" readme = "README.md" authors = [] @@ -9,12 +9,13 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" httpx = ">=0.21.2" -pydantic = ">= 1.9.2, < 2.5.0" +pydantic = ">= 1.9.2" +typing_extensions = ">= 4.0.0" [tool.poetry.dev-dependencies] -mypy = "0.971" +mypy = "^1.8.0" pytest = "^7.4.0" [build-system] diff --git a/src/metriport/__init__.py b/src/metriport/__init__.py index 60514b1..44084bc 100644 --- a/src/metriport/__init__.py +++ b/src/metriport/__init__.py @@ -1,8 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from . import commons -from . import fhir -from . import medical +from . import commons, fhir, medical +from .commons import Address, UsState from .environment import MetriportEnvironment -__all__ = ["MetriportEnvironment", "commons", "fhir", "medical"] +__all__ = ["Address", "MetriportEnvironment", "UsState", "commons", "fhir", "medical"] diff --git a/src/metriport/client.py b/src/metriport/client.py index ed9a2f8..ef65705 100644 --- a/src/metriport/client.py +++ b/src/metriport/client.py @@ -8,7 +8,31 @@ from .environment import MetriportEnvironment from .medical.client import AsyncMedicalClient, MedicalClient + class Metriport: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions. + + Parameters: + - base_url: typing.Optional[str]. The base url to use for requests from the client. + + - environment: MetriportEnvironment. The environment to use for requests from the client. from .environment import MetriportEnvironment + + Defaults to MetriportEnvironment.PRODUCTION + + - api_key: str. + + - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds. + + - httpx_client: typing.Optional[httpx.Client]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + --- + from metriport.client import Metriport + + client = Metriport( + api_key="YOUR_API_KEY", + ) + """ + def __init__( self, *, @@ -27,6 +51,29 @@ def __init__( class AsyncMetriport: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions. + + Parameters: + - base_url: typing.Optional[str]. The base url to use for requests from the client. + + - environment: MetriportEnvironment. The environment to use for requests from the client. from .environment import MetriportEnvironment + + Defaults to MetriportEnvironment.PRODUCTION + + - api_key: str. + + - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds. + + - httpx_client: typing.Optional[httpx.AsyncClient]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + --- + from metriport.client import AsyncMetriport + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + """ + def __init__( self, *, diff --git a/src/metriport/commons/types/address.py b/src/metriport/commons/types/address.py index 56029cc..f9b30c8 100644 --- a/src/metriport/commons/types/address.py +++ b/src/metriport/commons/types/address.py @@ -28,12 +28,12 @@ class Address(pydantic.BaseModel): address_line_1: str = pydantic.Field(alias="addressLine1", description="The address.") address_line_2: typing.Optional[str] = pydantic.Field( - alias="addressLine2", description="The address details, for example `#4451`" + alias="addressLine2", default=None, description="The address details, for example `#4451`" ) city: str = pydantic.Field(description="The city.") state: UsState = pydantic.Field(description="The 2 letter state acronym, for example `CA`") zip: str = pydantic.Field(description="Zip must be a string consisting of 5 numbers.") - country: typing.Optional[str] = pydantic.Field(description="Defaults to “USA”") + country: typing.Optional[str] = pydantic.Field(default=None, description="Defaults to “USA”") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/core/__init__.py b/src/metriport/core/__init__.py index 2414955..4c53b36 100644 --- a/src/metriport/core/__init__.py +++ b/src/metriport/core/__init__.py @@ -3,14 +3,19 @@ from .api_error import ApiError from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper from .datetime_utils import serialize_datetime +from .file import File, convert_file_dict_to_httpx_tuples from .jsonable_encoder import jsonable_encoder from .remove_none_from_dict import remove_none_from_dict +from .request_options import RequestOptions __all__ = [ "ApiError", "AsyncClientWrapper", "BaseClientWrapper", + "File", + "RequestOptions", "SyncClientWrapper", + "convert_file_dict_to_httpx_tuples", "jsonable_encoder", "remove_none_from_dict", "serialize_datetime", diff --git a/src/metriport/core/client_wrapper.py b/src/metriport/core/client_wrapper.py index 7195a47..dc10526 100644 --- a/src/metriport/core/client_wrapper.py +++ b/src/metriport/core/client_wrapper.py @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "metriport", - "X-Fern-SDK-Version": "8.0.2-beta", + "X-Fern-SDK-Version": "8.0.4-beta", } headers["X-API-Key"] = self.api_key return headers diff --git a/src/metriport/core/file.py b/src/metriport/core/file.py new file mode 100644 index 0000000..cb0d40b --- /dev/null +++ b/src/metriport/core/file.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +# File typing inspired by the flexibility of types within the httpx library +# https://github.com/encode/httpx/blob/master/httpx/_types.py +FileContent = typing.Union[typing.IO[bytes], bytes, str] +File = typing.Union[ + # file (or bytes) + FileContent, + # (filename, file (or bytes)) + typing.Tuple[typing.Optional[str], FileContent], + # (filename, file (or bytes), content_type) + typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str]], + # (filename, file (or bytes), content_type, headers) + typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str], typing.Mapping[str, str]], +] + + +def convert_file_dict_to_httpx_tuples( + d: typing.Dict[str, typing.Union[File, typing.List[File]]] +) -> typing.List[typing.Tuple[str, File]]: + """ + The format we use is a list of tuples, where the first element is the + name of the file and the second is the file object. Typically HTTPX wants + a dict, but to be able to send lists of files, you have to use the list + approach (which also works for non-lists) + https://github.com/encode/httpx/pull/1032 + """ + + httpx_tuples = [] + for key, file_like in d.items(): + if isinstance(file_like, list): + for file_like_item in file_like: + httpx_tuples.append((key, file_like_item)) + else: + httpx_tuples.append((key, file_like)) + return httpx_tuples diff --git a/src/metriport/core/request_options.py b/src/metriport/core/request_options.py new file mode 100644 index 0000000..32e86b0 --- /dev/null +++ b/src/metriport/core/request_options.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +try: + from typing import NotRequired # type: ignore +except ImportError: + from typing_extensions import NotRequired # type: ignore + + +class RequestOptions(typing.TypedDict): + """ + Additional options for request-specific configuration when calling APIs via the SDK. + This is used primarily as an optional final parameter for service functions. + + Attributes: + - timeout_in_seconds: int. The number of seconds to await an API call before timing out. + + - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict + + - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict + + - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict + """ + + timeout_in_seconds: NotRequired[int] + additional_headers: NotRequired[typing.Dict[str, typing.Any]] + additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] + additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] diff --git a/src/metriport/fhir/types/access_policy.py b/src/metriport/fhir/types/access_policy.py index 75576b1..c02b87c 100644 --- a/src/metriport/fhir/types/access_policy.py +++ b/src/metriport/fhir/types/access_policy.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .access_policy_ip_access_rule import AccessPolicyIpAccessRule from .access_policy_resource import AccessPolicyResource @@ -25,27 +23,34 @@ class AccessPolicy(pydantic.BaseModel): Access Policy for user or user group that defines how entities can or cannot access resources. """ - resource_type: typing_extensions.Literal["AccessPolicy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AccessPolicy"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - name: typing.Optional[str] = pydantic.Field(description="A name associated with the AccessPolicy.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="A name associated with the AccessPolicy.") compartment: typing.Optional[Reference] = pydantic.Field( - description="Optional compartment for newly created resources. If this field is set, any resources created by a user with this access policy will automatically be included in the specified compartment." + default=None, + description="Optional compartment for newly created resources. If this field is set, any resources created by a user with this access policy will automatically be included in the specified compartment.", ) resource: typing.Optional[typing.List[AccessPolicyResource]] = pydantic.Field( - description="Access details for a resource type." + default=None, description="Access details for a resource type." ) ip_access_rule: typing.Optional[typing.List[AccessPolicyIpAccessRule]] = pydantic.Field( alias="ipAccessRule", + default=None, description="Use IP Access Rules to allowlist, block, and challenge traffic based on the visitor IP address.", ) diff --git a/src/metriport/fhir/types/access_policy_ip_access_rule.py b/src/metriport/fhir/types/access_policy_ip_access_rule.py index ddda220..7323ffb 100644 --- a/src/metriport/fhir/types/access_policy_ip_access_rule.py +++ b/src/metriport/fhir/types/access_policy_ip_access_rule.py @@ -18,7 +18,8 @@ class AccessPolicyIpAccessRule(pydantic.BaseModel): """ name: typing.Optional[str] = pydantic.Field( - description="Friendly name that will make it easy for you to identify the IP Access Rule in the future." + default=None, + description="Friendly name that will make it easy for you to identify the IP Access Rule in the future.", ) value: str = pydantic.Field( description="An IP Access rule will apply a certain action to incoming traffic based on the visitor IP address or IP range." diff --git a/src/metriport/fhir/types/access_policy_resource.py b/src/metriport/fhir/types/access_policy_resource.py index e776261..c99875a 100644 --- a/src/metriport/fhir/types/access_policy_resource.py +++ b/src/metriport/fhir/types/access_policy_resource.py @@ -19,23 +19,27 @@ class AccessPolicyResource(pydantic.BaseModel): """ compartment: typing.Optional[Reference] = pydantic.Field( - description="DEPRECATED Optional compartment restriction for the resource type." + default=None, description="DEPRECATED Optional compartment restriction for the resource type." ) criteria: typing.Optional[str] = pydantic.Field( - description="The rules that the server should use to determine which resources to allow." + default=None, description="The rules that the server should use to determine which resources to allow." ) readonly: typing.Optional[bool] = pydantic.Field( - description="Optional flag to indicate that the resource type is read-only." + default=None, description="Optional flag to indicate that the resource type is read-only." ) hidden_fields: typing.Optional[typing.List[str]] = pydantic.Field( - alias="hiddenFields", description="Optional list of hidden fields. Hidden fields are not readable or writeable." + alias="hiddenFields", + default=None, + description="Optional list of hidden fields. Hidden fields are not readable or writeable.", ) readonly_fields: typing.Optional[typing.List[str]] = pydantic.Field( alias="readonlyFields", + default=None, description="Optional list of read-only fields. Read-only fields are readable but not writeable.", ) write_constraint: typing.Optional[typing.List[Expression]] = pydantic.Field( alias="writeConstraint", + default=None, description="Invariants that must be satisfied for the resource to be written. Can include %before and %after placeholders to refer to the resource before and after the updates are applied.", ) diff --git a/src/metriport/fhir/types/access_policy_resource_write_criteria.py b/src/metriport/fhir/types/access_policy_resource_write_criteria.py index 5440246..918e7cf 100644 --- a/src/metriport/fhir/types/access_policy_resource_write_criteria.py +++ b/src/metriport/fhir/types/access_policy_resource_write_criteria.py @@ -17,10 +17,11 @@ class AccessPolicyResourceWriteCriteria(pydantic.BaseModel): """ pre: typing.Optional[str] = pydantic.Field( - description="Invariant to check against the state of the resource before modification." + default=None, description="Invariant to check against the state of the resource before modification." ) post: typing.Optional[str] = pydantic.Field( - description="Invariant to check against the state of the resource with modifications tentatively applied." + default=None, + description="Invariant to check against the state of the resource with modifications tentatively applied.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/account.py b/src/metriport/fhir/types/account.py index 6455d88..9a9f33c 100644 --- a/src/metriport/fhir/types/account.py +++ b/src/metriport/fhir/types/account.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .account_coverage import AccountCoverage from .account_guarantor import AccountGuarantor @@ -26,38 +24,45 @@ class Account(BaseResource): A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. """ - resource_type: typing_extensions.Literal["Account"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Account"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number)." + default=None, + description="Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", ) status: typing.Optional[AccountStatus] = pydantic.Field( - description="Indicates whether the account is presently used/usable or not." + default=None, description="Indicates whether the account is presently used/usable or not." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Categorizes the account for reporting and searching purposes." + default=None, description="Categorizes the account for reporting and searching purposes." ) name: typing.Optional[str] = pydantic.Field( - description="Name used for the account when displaying it to humans in reports, etc." + default=None, description="Name used for the account when displaying it to humans in reports, etc." ) subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account." + default=None, + description="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", ) service_period: typing.Optional[Period] = pydantic.Field( - alias="servicePeriod", description="The date range of services associated with this account." + alias="servicePeriod", default=None, description="The date range of services associated with this account." ) coverage: typing.Optional[typing.List[AccountCoverage]] = pydantic.Field( - description="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account." + default=None, + description="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", ) owner: typing.Optional[Reference] = pydantic.Field( - description="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." + default=None, + description="Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", ) description: typing.Optional[str] = pydantic.Field( - description="Provides additional information about what the account tracks and how it is used." + default=None, description="Provides additional information about what the account tracks and how it is used." ) guarantor: typing.Optional[typing.List[AccountGuarantor]] = pydantic.Field( - description="The parties responsible for balancing the account if other payment options fall short." + default=None, + description="The parties responsible for balancing the account if other payment options fall short.", + ) + part_of: typing.Optional[Reference] = pydantic.Field( + alias="partOf", default=None, description="Reference to a parent Account." ) - part_of: typing.Optional[Reference] = pydantic.Field(alias="partOf", description="Reference to a parent Account.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/account_coverage.py b/src/metriport/fhir/types/account_coverage.py index 629d077..77fb62c 100644 --- a/src/metriport/fhir/types/account_coverage.py +++ b/src/metriport/fhir/types/account_coverage.py @@ -20,20 +20,23 @@ class AccountCoverage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) coverage: Reference = pydantic.Field( description="The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing." ) priority: typing.Optional[PositiveInt] = pydantic.Field( - description="The priority of the coverage in the context of this account." + default=None, description="The priority of the coverage in the context of this account." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/account_guarantor.py b/src/metriport/fhir/types/account_guarantor.py index a4b8501..0cc9a9e 100644 --- a/src/metriport/fhir/types/account_guarantor.py +++ b/src/metriport/fhir/types/account_guarantor.py @@ -20,22 +20,26 @@ class AccountGuarantor(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) party: Reference = pydantic.Field(description="The entity who is responsible.") on_hold: typing.Optional[bool] = pydantic.Field( alias="onHold", + default=None, description="A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", ) period: typing.Optional[Period] = pydantic.Field( - description="The timeframe during which the guarantor accepts responsibility for the account." + default=None, description="The timeframe during which the guarantor accepts responsibility for the account." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/activity_definition.py b/src/metriport/fhir/types/activity_definition.py index 331d4c5..28dace1 100644 --- a/src/metriport/fhir/types/activity_definition.py +++ b/src/metriport/fhir/types/activity_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .activity_definition_dynamic_value import ActivityDefinitionDynamicValue from .activity_definition_participant import ActivityDefinitionParticipant @@ -40,184 +38,232 @@ class ActivityDefinition(BaseResource): This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context. """ - resource_type: typing_extensions.Literal["ActivityDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ActivityDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets." + default=None, + description="The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the activity definition." + default=None, description="A short, descriptive, user-friendly title for the activity definition." ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the activity definition giving additional information about its content." + default=None, + description="An explanatory or alternate title for the activity definition giving additional information about its content.", ) status: typing.Optional[ActivityDefinitionStatus] = pydantic.Field( - description="The status of this activity definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this activity definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="A code or group definition that describes the intended subject of the activity being defined.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="A code or group definition that describes the intended subject of the activity being defined.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes." + default=None, + description="The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the activity definition." + default=None, description="The name of the organization or individual that published the activity definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the activity definition from a consumer's perspective." + default=None, + description="A free text natural language description of the activity definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the activity definition is intended to be used." + default=None, + description="A legal or geographic region in which the activity definition is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this activity definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this activity definition is needed and why it has been designed as it has.", ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description of how the activity definition is used from a clinical perspective." + default=None, + description="A detailed description of how the activity definition is used from a clinical perspective.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition." + default=None, + description="A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the activity definition content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) library: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A reference to a Library resource containing any formal logic used by the activity definition." + default=None, + description="A reference to a Library resource containing any formal logic used by the activity definition.", ) kind: typing.Optional[Code] = pydantic.Field( - description="A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource." + default=None, + description="A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.", ) profile: typing.Optional[Canonical] = pydantic.Field( - description="A profile to which the target of the activity definition is expected to conform." + default=None, description="A profile to which the target of the activity definition is expected to conform." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter." + default=None, + description="Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.", ) intent: typing.Optional[Code] = pydantic.Field( - description="Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain." + default=None, + description="Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the activity should be addressed with respect to other requests." + default=None, + description="Indicates how quickly the activity should be addressed with respect to other requests.", ) do_not_perform: typing.Optional[bool] = pydantic.Field( alias="doNotPerform", + default=None, description="Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.", ) timing_timing: typing.Optional[Timing] = pydantic.Field( alias="timingTiming", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) timing_date_time: typing.Optional[str] = pydantic.Field( alias="timingDateTime", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) timing_age: typing.Optional[Age] = pydantic.Field( - alias="timingAge", description="The period, timing or frequency upon which the described activity is to occur." + alias="timingAge", + default=None, + description="The period, timing or frequency upon which the described activity is to occur.", ) timing_period: typing.Optional[Period] = pydantic.Field( alias="timingPeriod", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) timing_range: typing.Optional[Range] = pydantic.Field( alias="timingRange", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) timing_duration: typing.Optional[Duration] = pydantic.Field( alias="timingDuration", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) location: typing.Optional[Reference] = pydantic.Field( - description="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." + default=None, + description="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", ) participant: typing.Optional[typing.List[ActivityDefinitionParticipant]] = pydantic.Field( - description="Indicates who should participate in performing the action described." + default=None, description="Indicates who should participate in performing the action described." ) product_reference: typing.Optional[Reference] = pydantic.Field( alias="productReference", + default=None, description="Identifies the food, drug or other product being consumed or supplied in the activity.", ) product_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="productCodeableConcept", + default=None, description="Identifies the food, drug or other product being consumed or supplied in the activity.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="Identifies the quantity expected to be consumed at once (per dose, per meal, etc.)." + default=None, description="Identifies the quantity expected to be consumed at once (per dose, per meal, etc.)." ) dosage: typing.Optional[typing.List[Dosage]] = pydantic.Field( - description="Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources." + default=None, + description="Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.", ) body_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="bodySite", + default=None, description="Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", ) specimen_requirement: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="specimenRequirement", + default=None, description="Defines specimen requirements for the action to be performed, such as required specimens for a lab test.", ) observation_requirement: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="observationRequirement", + default=None, description="Defines observation requirements for the action to be performed, such as body weight or surface area.", ) observation_result_requirement: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="observationResultRequirement", + default=None, description="Defines the observations that are expected to be produced by the action.", ) transform: typing.Optional[Canonical] = pydantic.Field( - description="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input." + default=None, + description="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", ) dynamic_value: typing.Optional[typing.List[ActivityDefinitionDynamicValue]] = pydantic.Field( alias="dynamicValue", + default=None, description="Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.", ) diff --git a/src/metriport/fhir/types/activity_definition_dynamic_value.py b/src/metriport/fhir/types/activity_definition_dynamic_value.py index c235628..695f19f 100644 --- a/src/metriport/fhir/types/activity_definition_dynamic_value.py +++ b/src/metriport/fhir/types/activity_definition_dynamic_value.py @@ -19,17 +19,21 @@ class ActivityDefinitionDynamicValue(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)." + default=None, + description="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).", ) expression: Expression = pydantic.Field(description="An expression specifying the value of the customized element.") diff --git a/src/metriport/fhir/types/activity_definition_participant.py b/src/metriport/fhir/types/activity_definition_participant.py index fd97739..62289aa 100644 --- a/src/metriport/fhir/types/activity_definition_participant.py +++ b/src/metriport/fhir/types/activity_definition_participant.py @@ -20,18 +20,21 @@ class ActivityDefinitionParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Code] = pydantic.Field(description="The type of participant in the action.") + type: typing.Optional[Code] = pydantic.Field(default=None, description="The type of participant in the action.") role: typing.Optional[CodeableConcept] = pydantic.Field( - description="The role the participant should play in performing the described action." + default=None, description="The role the participant should play in performing the described action." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/address.py b/src/metriport/fhir/types/address.py index 0c74805..d1737e8 100644 --- a/src/metriport/fhir/types/address.py +++ b/src/metriport/fhir/types/address.py @@ -21,35 +21,47 @@ class Address(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - use: typing.Optional[AddressUse] = pydantic.Field(description="The purpose of this address.") + use: typing.Optional[AddressUse] = pydantic.Field(default=None, description="The purpose of this address.") type: typing.Optional[AddressType] = pydantic.Field( - description="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both." + default=None, + description="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.", ) text: typing.Optional[str] = pydantic.Field( - description="Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts." + default=None, + description="Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.", ) line: typing.Optional[typing.List[str]] = pydantic.Field( - description="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information." + default=None, + description="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.", ) city: typing.Optional[str] = pydantic.Field( - description="The name of the city, town, suburb, village or other community or delivery center." + default=None, description="The name of the city, town, suburb, village or other community or delivery center." + ) + district: typing.Optional[str] = pydantic.Field( + default=None, description="The name of the administrative area (county)." ) - district: typing.Optional[str] = pydantic.Field(description="The name of the administrative area (county).") state: typing.Optional[str] = pydantic.Field( - description="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)." + default=None, + description="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).", ) postal_code: typing.Optional[str] = pydantic.Field( - alias="postalCode", description="A postal code designating a region defined by the postal service." + alias="postalCode", + default=None, + description="A postal code designating a region defined by the postal service.", ) country: typing.Optional[str] = pydantic.Field( - description="Country - a nation as commonly understood or generally accepted." + default=None, description="Country - a nation as commonly understood or generally accepted." + ) + period: typing.Optional[Period] = pydantic.Field( + default=None, description="Time period when address was/is in use." ) - period: typing.Optional[Period] = pydantic.Field(description="Time period when address was/is in use.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/adverse_event.py b/src/metriport/fhir/types/adverse_event.py index 9b90770..b7bc825 100644 --- a/src/metriport/fhir/types/adverse_event.py +++ b/src/metriport/fhir/types/adverse_event.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .adverse_event_actuality import AdverseEventActuality from .adverse_event_suspect_entity import AdverseEventSuspectEntity @@ -25,64 +23,75 @@ class AdverseEvent(BaseResource): Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death. """ - resource_type: typing_extensions.Literal["AdverseEvent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AdverseEvent"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) actuality: typing.Optional[AdverseEventActuality] = pydantic.Field( - description="Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely." + default=None, + description="Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The overall type of event, intended for search and filtering purposes." + default=None, description="The overall type of event, intended for search and filtering purposes." ) event: typing.Optional[CodeableConcept] = pydantic.Field( - description="This element defines the specific type of event that occurred or that was prevented from occurring." + default=None, + description="This element defines the specific type of event that occurred or that was prevented from occurring.", ) subject: Reference = pydantic.Field(description="This subject or group impacted by the event.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and perhaps time) when the adverse event occurred." + default=None, description="The date (and perhaps time) when the adverse event occurred." ) detected: typing.Optional[DateTime] = pydantic.Field( - description="Estimated or actual date the AdverseEvent began, in the opinion of the reporter." + default=None, description="Estimated or actual date the AdverseEvent began, in the opinion of the reporter." ) recorded_date: typing.Optional[DateTime] = pydantic.Field( - alias="recordedDate", description="The date on which the existence of the AdverseEvent was first recorded." + alias="recordedDate", + default=None, + description="The date on which the existence of the AdverseEvent was first recorded.", ) resulting_condition: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="resultingCondition", + default=None, description="Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).", ) location: typing.Optional[Reference] = pydantic.Field( - description="The information about where the adverse event occurred." + default=None, description="The information about where the adverse event occurred." ) seriousness: typing.Optional[CodeableConcept] = pydantic.Field( - description="Assessment whether this event was of real importance." + default=None, description="Assessment whether this event was of real importance." ) severity: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the severity of the adverse event, in relation to the subject. Contrast to AdverseEvent.seriousness - a severe rash might not be serious, but a mild heart problem is." + default=None, + description="Describes the severity of the adverse event, in relation to the subject. Contrast to AdverseEvent.seriousness - a severe rash might not be serious, but a mild heart problem is.", ) outcome: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the type of outcome from the adverse event." + default=None, description="Describes the type of outcome from the adverse event." ) recorder: typing.Optional[Reference] = pydantic.Field( - description="Information on who recorded the adverse event. May be the patient or a practitioner." + default=None, description="Information on who recorded the adverse event. May be the patient or a practitioner." ) contributor: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities. Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness)." + default=None, + description="Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities. Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness).", ) suspect_entity: typing.Optional[typing.List[AdverseEventSuspectEntity]] = pydantic.Field( - alias="suspectEntity", description="Describes the entity that is suspected to have caused the adverse event." + alias="suspectEntity", + default=None, + description="Describes the entity that is suspected to have caused the adverse event.", ) subject_medical_history: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="subjectMedicalHistory", description="AdverseEvent.subjectMedicalHistory." + alias="subjectMedicalHistory", default=None, description="AdverseEvent.subjectMedicalHistory." ) reference_document: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="referenceDocument", description="AdverseEvent.referenceDocument." + alias="referenceDocument", default=None, description="AdverseEvent.referenceDocument." ) - study: typing.Optional[typing.List[Reference]] = pydantic.Field(description="AdverseEvent.study.") + study: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="AdverseEvent.study.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/adverse_event_causality.py b/src/metriport/fhir/types/adverse_event_causality.py index cce6414..2a93301 100644 --- a/src/metriport/fhir/types/adverse_event_causality.py +++ b/src/metriport/fhir/types/adverse_event_causality.py @@ -20,24 +20,29 @@ class AdverseEventCausality(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) assessment: typing.Optional[CodeableConcept] = pydantic.Field( - description="Assessment of if the entity caused the event." + default=None, description="Assessment of if the entity caused the event." ) product_relatedness: typing.Optional[str] = pydantic.Field( - alias="productRelatedness", description="AdverseEvent.suspectEntity.causalityProductRelatedness." + alias="productRelatedness", default=None, description="AdverseEvent.suspectEntity.causalityProductRelatedness." + ) + author: typing.Optional[Reference] = pydantic.Field( + default=None, description="AdverseEvent.suspectEntity.causalityAuthor." ) - author: typing.Optional[Reference] = pydantic.Field(description="AdverseEvent.suspectEntity.causalityAuthor.") method: typing.Optional[CodeableConcept] = pydantic.Field( - description=("ProbabilityScale \n" " Bayesian \n" " Checklist.\n") + default=None, description=("ProbabilityScale \n" " Bayesian \n" " Checklist.\n") ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/adverse_event_suspect_entity.py b/src/metriport/fhir/types/adverse_event_suspect_entity.py index 38ed507..15fe211 100644 --- a/src/metriport/fhir/types/adverse_event_suspect_entity.py +++ b/src/metriport/fhir/types/adverse_event_suspect_entity.py @@ -20,20 +20,23 @@ class AdverseEventSuspectEntity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) instance: Reference = pydantic.Field( description="Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device." ) causality: typing.Optional[typing.List[AdverseEventCausality]] = pydantic.Field( - description="Information on the possible cause of the event." + default=None, description="Information on the possible cause of the event." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/age.py b/src/metriport/fhir/types/age.py index 54302f3..1084c1b 100644 --- a/src/metriport/fhir/types/age.py +++ b/src/metriport/fhir/types/age.py @@ -23,23 +23,27 @@ class Age(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) value: typing.Optional[Decimal] = pydantic.Field( - description="The value of the measured amount. The value includes an implicit precision in the presentation of the value." + default=None, + description="The value of the measured amount. The value includes an implicit precision in the presentation of the value.", ) comparator: typing.Optional[AgeComparator] = pydantic.Field( - description='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.' + default=None, + description='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.', ) - unit: typing.Optional[str] = pydantic.Field(description="A human-readable form of the unit.") + unit: typing.Optional[str] = pydantic.Field(default=None, description="A human-readable form of the unit.") system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the system that provides the coded form of the unit." + default=None, description="The identification of the system that provides the coded form of the unit." ) code: typing.Optional[Code] = pydantic.Field( - description="A computer processable form of the unit in some unit representation system." + default=None, description="A computer processable form of the unit in some unit representation system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/agent.py b/src/metriport/fhir/types/agent.py index 4c0853c..99ee3c9 100644 --- a/src/metriport/fhir/types/agent.py +++ b/src/metriport/fhir/types/agent.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .agent_channel import AgentChannel from .agent_setting import AgentSetting @@ -27,25 +25,34 @@ class Agent(pydantic.BaseModel): Configuration details for an instance of the Medplum agent application. """ - resource_type: typing_extensions.Literal["Agent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Agent"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="An identifier for this agent.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="An identifier for this agent." + ) name: str = pydantic.Field(description="The human readable friendly name of the agent.") status: AgentStatus = pydantic.Field(description="The status of the agent.") device: typing.Optional[Reference] = pydantic.Field( - description="Optional device resource representing the device running the agent." + default=None, description="Optional device resource representing the device running the agent." + ) + setting: typing.Optional[typing.List[AgentSetting]] = pydantic.Field( + default=None, description="The settings for the agent." ) - setting: typing.Optional[typing.List[AgentSetting]] = pydantic.Field(description="The settings for the agent.") channel: typing.List[AgentChannel] = pydantic.Field( description="Details where to send notifications when resources are received that meet the criteria." ) diff --git a/src/metriport/fhir/types/agent_channel.py b/src/metriport/fhir/types/agent_channel.py index 8bd3106..23db8b0 100644 --- a/src/metriport/fhir/types/agent_channel.py +++ b/src/metriport/fhir/types/agent_channel.py @@ -22,10 +22,12 @@ class AgentChannel(pydantic.BaseModel): description="The channel endpoint definition including protocol and network binding details." ) target_reference: typing.Optional[Reference] = pydantic.Field( - alias="targetReference", description="The target resource where channel messages will be delivered." + alias="targetReference", + default=None, + description="The target resource where channel messages will be delivered.", ) target_url: typing.Optional[Url] = pydantic.Field( - alias="targetUrl", description="The target resource where channel messages will be delivered." + alias="targetUrl", default=None, description="The target resource where channel messages will be delivered." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/agent_setting.py b/src/metriport/fhir/types/agent_setting.py index 3c24bae..354854d 100644 --- a/src/metriport/fhir/types/agent_setting.py +++ b/src/metriport/fhir/types/agent_setting.py @@ -18,10 +18,18 @@ class AgentSetting(pydantic.BaseModel): """ name: str = pydantic.Field(description="The setting name.") - value_string: typing.Optional[str] = pydantic.Field(alias="valueString", description="The setting value.") - value_boolean: typing.Optional[bool] = pydantic.Field(alias="valueBoolean", description="The setting value.") - value_decimal: typing.Optional[Decimal] = pydantic.Field(alias="valueDecimal", description="The setting value.") - value_integer: typing.Optional[int] = pydantic.Field(alias="valueInteger", description="The setting value.") + value_string: typing.Optional[str] = pydantic.Field( + alias="valueString", default=None, description="The setting value." + ) + value_boolean: typing.Optional[bool] = pydantic.Field( + alias="valueBoolean", default=None, description="The setting value." + ) + value_decimal: typing.Optional[Decimal] = pydantic.Field( + alias="valueDecimal", default=None, description="The setting value." + ) + value_integer: typing.Optional[int] = pydantic.Field( + alias="valueInteger", default=None, description="The setting value." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/allergy_intolerance.py b/src/metriport/fhir/types/allergy_intolerance.py index 555664d..2a1f54e 100644 --- a/src/metriport/fhir/types/allergy_intolerance.py +++ b/src/metriport/fhir/types/allergy_intolerance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .allergy_intolerance_category_item import AllergyIntoleranceCategoryItem @@ -31,72 +29,85 @@ class AllergyIntolerance(BaseResource): Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. """ - resource_type: typing_extensions.Literal["AllergyIntolerance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AllergyIntolerance"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) clinical_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="clinicalStatus", description="The clinical status of the allergy or intolerance." + alias="clinicalStatus", default=None, description="The clinical status of the allergy or intolerance." ) verification_status: typing.Optional[CodeableConcept] = pydantic.Field( alias="verificationStatus", + default=None, description="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).", ) type: typing.Optional[AllergyIntoleranceType] = pydantic.Field( - description="Identification of the underlying physiological mechanism for the reaction risk." + default=None, description="Identification of the underlying physiological mechanism for the reaction risk." ) category: typing.Optional[typing.List[AllergyIntoleranceCategoryItem]] = pydantic.Field( - description="Category of the identified substance." + default=None, description="Category of the identified substance." ) criticality: typing.Optional[AllergyIntoleranceCriticality] = pydantic.Field( - description="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance." + default=None, + description="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description='Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g., "No known allergy", "No known drug allergies"). Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the \'code\' and ignore the \'reaction.substance\'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.' + default=None, + description='Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g., "No known allergy", "No known drug allergies"). Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the \'code\' and ignore the \'reaction.substance\'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.', ) patient: Reference = pydantic.Field(description="The patient who has the allergy or intolerance.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The encounter when the allergy or intolerance was asserted." + default=None, description="The encounter when the allergy or intolerance was asserted." ) onset_date_time: typing.Optional[str] = pydantic.Field( alias="onsetDateTime", + default=None, description="Estimated or actual date, date-time, or age when allergy or intolerance was identified.", ) onset_age: typing.Optional[Age] = pydantic.Field( alias="onsetAge", + default=None, description="Estimated or actual date, date-time, or age when allergy or intolerance was identified.", ) onset_period: typing.Optional[Period] = pydantic.Field( alias="onsetPeriod", + default=None, description="Estimated or actual date, date-time, or age when allergy or intolerance was identified.", ) onset_range: typing.Optional[Range] = pydantic.Field( alias="onsetRange", + default=None, description="Estimated or actual date, date-time, or age when allergy or intolerance was identified.", ) onset_string: typing.Optional[str] = pydantic.Field( alias="onsetString", + default=None, description="Estimated or actual date, date-time, or age when allergy or intolerance was identified.", ) recorded_date: typing.Optional[DateTime] = pydantic.Field( alias="recordedDate", + default=None, description="The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.", ) recorder: typing.Optional[Reference] = pydantic.Field( - description="Individual who recorded the record and takes responsibility for its content." + default=None, description="Individual who recorded the record and takes responsibility for its content." ) asserter: typing.Optional[Reference] = pydantic.Field( - description="The source of the information about the allergy that is recorded." + default=None, description="The source of the information about the allergy that is recorded." ) last_occurrence: typing.Optional[DateTime] = pydantic.Field( alias="lastOccurrence", + default=None, description="Represents the date and/or time of the last known occurrence of a reaction event.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." + default=None, + description="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", ) reaction: typing.Optional[typing.List[AllergyIntoleranceReaction]] = pydantic.Field( - description="Details about each adverse reaction event linked to exposure to the identified substance." + default=None, + description="Details about each adverse reaction event linked to exposure to the identified substance.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/allergy_intolerance_reaction.py b/src/metriport/fhir/types/allergy_intolerance_reaction.py index 7ab2ee7..27e5e2d 100644 --- a/src/metriport/fhir/types/allergy_intolerance_reaction.py +++ b/src/metriport/fhir/types/allergy_intolerance_reaction.py @@ -22,36 +22,43 @@ class AllergyIntoleranceReaction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) substance: typing.Optional[CodeableConcept] = pydantic.Field( - description="Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." + default=None, + description="Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", ) manifestation: typing.List[CodeableConcept] = pydantic.Field( description="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event." ) description: typing.Optional[str] = pydantic.Field( - description="Text description about the reaction as a whole, including details of the manifestation if required." + default=None, + description="Text description about the reaction as a whole, including details of the manifestation if required.", ) onset: typing.Optional[DateTime] = pydantic.Field( - description="Record of the date and/or time of the onset of the Reaction." + default=None, description="Record of the date and/or time of the onset of the Reaction." ) severity: typing.Optional[AllergyIntoleranceReactionSeverity] = pydantic.Field( - description="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations." + default=None, + description="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.", ) exposure_route: typing.Optional[CodeableConcept] = pydantic.Field( alias="exposureRoute", + default=None, description="Identification of the route by which the subject was exposed to the substance.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Additional text about the adverse reaction event not captured in other fields." + default=None, description="Additional text about the adverse reaction event not captured in other fields." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/annotation.py b/src/metriport/fhir/types/annotation.py index 8647513..076c0aa 100644 --- a/src/metriport/fhir/types/annotation.py +++ b/src/metriport/fhir/types/annotation.py @@ -21,19 +21,25 @@ class Annotation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) author_reference: typing.Optional[Reference] = pydantic.Field( - alias="authorReference", description="The individual responsible for making the annotation." + alias="authorReference", default=None, description="The individual responsible for making the annotation." ) author_string: typing.Optional[str] = pydantic.Field( - alias="authorString", description="The individual responsible for making the annotation." + alias="authorString", default=None, description="The individual responsible for making the annotation." + ) + time: typing.Optional[DateTime] = pydantic.Field( + default=None, description="Indicates when this particular annotation was made." + ) + text: typing.Optional[Markdown] = pydantic.Field( + default=None, description="The text of the annotation in markdown format." ) - time: typing.Optional[DateTime] = pydantic.Field(description="Indicates when this particular annotation was made.") - text: typing.Optional[Markdown] = pydantic.Field(description="The text of the annotation in markdown format.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/appointment.py b/src/metriport/fhir/types/appointment.py index f663e2a..0fbfcb1 100644 --- a/src/metriport/fhir/types/appointment.py +++ b/src/metriport/fhir/types/appointment.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .appointment_participant import AppointmentParticipant from .appointment_status import AppointmentStatus @@ -29,68 +27,91 @@ class Appointment(BaseResource): A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). """ - resource_type: typing_extensions.Literal["Appointment"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Appointment"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." + default=None, + description="This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", ) status: typing.Optional[AppointmentStatus] = pydantic.Field( - description="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." + default=None, + description="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.", ) cancelation_reason: typing.Optional[CodeableConcept] = pydantic.Field( alias="cancelationReason", + default=None, description="The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", ) service_category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceCategory", + default=None, description="A broad categorization of the service that is to be performed during this appointment.", ) service_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="serviceType", description="The specific service that is to be performed during this appointment." + alias="serviceType", + default=None, + description="The specific service that is to be performed during this appointment.", ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The specialty of a practitioner that would be required to perform the service requested in this appointment." + default=None, + description="The specialty of a practitioner that would be required to perform the service requested in this appointment.", ) appointment_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="appointmentType", + default=None, description="The style of appointment or patient that has been booked in the slot (not service type).", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="The coded reason that this appointment is being scheduled. This is more clinical than administrative.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", ) priority: typing.Optional[UnsignedInt] = pydantic.Field( - description="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)." + default=None, + description="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", ) description: typing.Optional[str] = pydantic.Field( - description="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." + default=None, + description="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.", ) supporting_information: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInformation", + default=None, description="Additional information to support the appointment provided when making the appointment.", ) - start: typing.Optional[Instant] = pydantic.Field(description="Date/Time that the appointment is to take place.") - end: typing.Optional[Instant] = pydantic.Field(description="Date/Time that the appointment is to conclude.") + start: typing.Optional[Instant] = pydantic.Field( + default=None, description="Date/Time that the appointment is to take place." + ) + end: typing.Optional[Instant] = pydantic.Field( + default=None, description="Date/Time that the appointment is to conclude." + ) minutes_duration: typing.Optional[PositiveInt] = pydantic.Field( alias="minutesDuration", + default=None, description="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", ) slot: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The slots from the participants' schedules that will be filled by the appointment." + default=None, description="The slots from the participants' schedules that will be filled by the appointment." ) created: typing.Optional[DateTime] = pydantic.Field( - description="The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment." + default=None, + description="The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.", + ) + comment: typing.Optional[str] = pydantic.Field( + default=None, description="Additional comments about the appointment." ) - comment: typing.Optional[str] = pydantic.Field(description="Additional comments about the appointment.") patient_instruction: typing.Optional[str] = pydantic.Field( alias="patientInstruction", + default=None, description="While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).", ) participant: typing.List[AppointmentParticipant] = pydantic.Field( @@ -98,6 +119,7 @@ class Appointment(BaseResource): ) requested_period: typing.Optional[typing.List[Period]] = pydantic.Field( alias="requestedPeriod", + default=None, description="A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", ) diff --git a/src/metriport/fhir/types/appointment_participant.py b/src/metriport/fhir/types/appointment_participant.py index d5700e4..b19f3c1 100644 --- a/src/metriport/fhir/types/appointment_participant.py +++ b/src/metriport/fhir/types/appointment_participant.py @@ -23,28 +23,33 @@ class AppointmentParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Role of participant in the appointment." + default=None, description="Role of participant in the appointment." ) actor: typing.Optional[Reference] = pydantic.Field( - description="A Person, Location/HealthcareService or Device that is participating in the appointment." + default=None, + description="A Person, Location/HealthcareService or Device that is participating in the appointment.", ) required: typing.Optional[AppointmentParticipantRequired] = pydantic.Field( - description="Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present." + default=None, + description="Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.", ) status: typing.Optional[AppointmentParticipantStatus] = pydantic.Field( - description="Participation status of the actor." + default=None, description="Participation status of the actor." ) - period: typing.Optional[Period] = pydantic.Field(description="Participation period of the actor.") + period: typing.Optional[Period] = pydantic.Field(default=None, description="Participation period of the actor.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/appointment_response.py b/src/metriport/fhir/types/appointment_response.py index 4422f52..7d78c54 100644 --- a/src/metriport/fhir/types/appointment_response.py +++ b/src/metriport/fhir/types/appointment_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,28 +22,34 @@ class AppointmentResponse(BaseResource): A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. """ - resource_type: typing_extensions.Literal["AppointmentResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AppointmentResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate." + default=None, + description="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.", ) appointment: Reference = pydantic.Field(description="Appointment that this response is replying to.") start: typing.Optional[Instant] = pydantic.Field( - description="Date/Time that the appointment is to take place, or requested new start time." + default=None, description="Date/Time that the appointment is to take place, or requested new start time." ) end: typing.Optional[Instant] = pydantic.Field( - description="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time." + default=None, + description="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.", ) participant_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="participantType", description="Role of participant in the appointment." + alias="participantType", default=None, description="Role of participant in the appointment." ) actor: typing.Optional[Reference] = pydantic.Field( - description="A Person, Location, HealthcareService, or Device that is participating in the appointment." + default=None, + description="A Person, Location, HealthcareService, or Device that is participating in the appointment.", ) participant_status: typing.Optional[Code] = pydantic.Field( alias="participantStatus", + default=None, description="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.", ) - comment: typing.Optional[str] = pydantic.Field(description="Additional comments about the appointment.") + comment: typing.Optional[str] = pydantic.Field( + default=None, description="Additional comments about the appointment." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/async_job.py b/src/metriport/fhir/types/async_job.py index 52329ba..42c5ff6 100644 --- a/src/metriport/fhir/types/async_job.py +++ b/src/metriport/fhir/types/async_job.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .async_job_status import AsyncJobStatus from .code import Code @@ -24,24 +22,30 @@ class AsyncJob(pydantic.BaseModel): Contains details of long running asynchronous/background jobs. """ - resource_type: typing_extensions.Literal["AsyncJob"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AsyncJob"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) status: AsyncJobStatus = pydantic.Field(description="The status of the request.") request_time: Instant = pydantic.Field( alias="requestTime", description="Indicates the server's time when the query is requested." ) transaction_time: typing.Optional[Instant] = pydantic.Field( alias="transactionTime", + default=None, description="Indicates the server's time when the query is run. The response SHOULD NOT include any resources modified after this instant, and SHALL include any matching resources modified up to and including this instant.", ) request: Uri = pydantic.Field( diff --git a/src/metriport/fhir/types/attachment.py b/src/metriport/fhir/types/attachment.py index 9477448..e79ce1e 100644 --- a/src/metriport/fhir/types/attachment.py +++ b/src/metriport/fhir/types/attachment.py @@ -24,30 +24,39 @@ class Attachment(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) content_type: typing.Optional[Code] = pydantic.Field( alias="contentType", + default=None, description="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", ) language: typing.Optional[Code] = pydantic.Field( - description="The human language of the content. The value can be any valid value according to BCP 47." + default=None, + description="The human language of the content. The value can be any valid value according to BCP 47.", ) data: typing.Optional[Base64Binary] = pydantic.Field( - description="The actual data of the attachment - a sequence of bytes, base64 encoded." + default=None, description="The actual data of the attachment - a sequence of bytes, base64 encoded." ) - url: typing.Optional[Url] = pydantic.Field(description="A location where the data can be accessed.") + url: typing.Optional[Url] = pydantic.Field(default=None, description="A location where the data can be accessed.") size: typing.Optional[UnsignedInt] = pydantic.Field( - description="The number of bytes of data that make up this attachment (before base64 encoding, if that is done)." + default=None, + description="The number of bytes of data that make up this attachment (before base64 encoding, if that is done).", ) hash: typing.Optional[Base64Binary] = pydantic.Field( - description="The calculated hash of the data using SHA-1. Represented using base64." + default=None, description="The calculated hash of the data using SHA-1. Represented using base64." + ) + title: typing.Optional[str] = pydantic.Field( + default=None, description="A label or set of text to display in place of the data." + ) + creation: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date that the attachment was first created." ) - title: typing.Optional[str] = pydantic.Field(description="A label or set of text to display in place of the data.") - creation: typing.Optional[DateTime] = pydantic.Field(description="The date that the attachment was first created.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/audit_event.py b/src/metriport/fhir/types/audit_event.py index ee31560..cb3222e 100644 --- a/src/metriport/fhir/types/audit_event.py +++ b/src/metriport/fhir/types/audit_event.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .audit_event_action import AuditEventAction from .audit_event_agent import AuditEventAgent @@ -28,31 +26,39 @@ class AuditEvent(BaseResource): A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. """ - resource_type: typing_extensions.Literal["AuditEvent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AuditEvent"] = pydantic.Field(alias="resourceType") type: Coding = pydantic.Field( description="Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function." ) - subtype: typing.Optional[typing.List[Coding]] = pydantic.Field(description="Identifier for the category of event.") + subtype: typing.Optional[typing.List[Coding]] = pydantic.Field( + default=None, description="Identifier for the category of event." + ) action: typing.Optional[AuditEventAction] = pydantic.Field( - description="Indicator for type of action performed during the event that generated the audit." + default=None, description="Indicator for type of action performed during the event that generated the audit." + ) + period: typing.Optional[Period] = pydantic.Field( + default=None, description="The period during which the activity occurred." + ) + recorded: typing.Optional[Instant] = pydantic.Field( + default=None, description="The time when the event was recorded." ) - period: typing.Optional[Period] = pydantic.Field(description="The period during which the activity occurred.") - recorded: typing.Optional[Instant] = pydantic.Field(description="The time when the event was recorded.") outcome: typing.Optional[AuditEventOutcome] = pydantic.Field( - description="Indicates whether the event succeeded or failed." + default=None, description="Indicates whether the event succeeded or failed." ) outcome_desc: typing.Optional[str] = pydantic.Field( - alias="outcomeDesc", description="A free text description of the outcome of the event." + alias="outcomeDesc", default=None, description="A free text description of the outcome of the event." ) purpose_of_event: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="purposeOfEvent", description="The purposeOfUse (reason) that was used during the event being recorded." + alias="purposeOfEvent", + default=None, + description="The purposeOfUse (reason) that was used during the event being recorded.", ) agent: typing.List[AuditEventAgent] = pydantic.Field( description="An actor taking an active role in the event or activity that is logged." ) source: AuditEventSource = pydantic.Field(description="The system that is reporting the event.") entity: typing.Optional[typing.List[AuditEventEntity]] = pydantic.Field( - description="Specific instances of data or objects that have been accessed." + default=None, description="Specific instances of data or objects that have been accessed." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/audit_event_agent.py b/src/metriport/fhir/types/audit_event_agent.py index 435d225..e71cd1b 100644 --- a/src/metriport/fhir/types/audit_event_agent.py +++ b/src/metriport/fhir/types/audit_event_agent.py @@ -23,44 +23,53 @@ class AuditEventAgent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Specification of the participation type the user plays when performing the event." + default=None, description="Specification of the participation type the user plays when performing the event." ) role: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context." + default=None, + description="The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", ) who: typing.Optional[Reference] = pydantic.Field( - description="Reference to who this agent is that was involved in the event." + default=None, description="Reference to who this agent is that was involved in the event." ) alt_id: typing.Optional[str] = pydantic.Field( alias="altId", + default=None, description="Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", ) - name: typing.Optional[str] = pydantic.Field(description="Human-meaningful name for the agent.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Human-meaningful name for the agent.") requestor: typing.Optional[bool] = pydantic.Field( - description="Indicator that the user is or is not the requestor, or initiator, for the event being audited." + default=None, + description="Indicator that the user is or is not the requestor, or initiator, for the event being audited.", ) - location: typing.Optional[Reference] = pydantic.Field(description="Where the event occurred.") + location: typing.Optional[Reference] = pydantic.Field(default=None, description="Where the event occurred.") policy: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used." + default=None, + description="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", ) media: typing.Optional[Coding] = pydantic.Field( - description="Type of media involved. Used when the event is about exporting/importing onto media." + default=None, description="Type of media involved. Used when the event is about exporting/importing onto media." ) network: typing.Optional[AuditEventNetwork] = pydantic.Field( - description="Logical network location for application activity, if the activity has a network location." + default=None, + description="Logical network location for application activity, if the activity has a network location.", ) purpose_of_use: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="purposeOfUse", + default=None, description="The reason (purpose of use), specific to this agent, that was used during the event being recorded.", ) diff --git a/src/metriport/fhir/types/audit_event_detail.py b/src/metriport/fhir/types/audit_event_detail.py index 1628e8c..f47a5aa 100644 --- a/src/metriport/fhir/types/audit_event_detail.py +++ b/src/metriport/fhir/types/audit_event_detail.py @@ -18,21 +18,26 @@ class AuditEventDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[str] = pydantic.Field(description="The type of extra detail provided in the value.") + type: typing.Optional[str] = pydantic.Field( + default=None, description="The type of extra detail provided in the value." + ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="The value of the extra detail." + alias="valueString", default=None, description="The value of the extra detail." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( - alias="valueBase64Binary", description="The value of the extra detail." + alias="valueBase64Binary", default=None, description="The value of the extra detail." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/audit_event_entity.py b/src/metriport/fhir/types/audit_event_entity.py index 935cc3b..ecfecfc 100644 --- a/src/metriport/fhir/types/audit_event_entity.py +++ b/src/metriport/fhir/types/audit_event_entity.py @@ -22,35 +22,43 @@ class AuditEventEntity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) what: typing.Optional[Reference] = pydantic.Field( - description="Identifies a specific instance of the entity. The reference should be version specific." + default=None, + description="Identifies a specific instance of the entity. The reference should be version specific.", ) type: typing.Optional[Coding] = pydantic.Field( - description="The type of the object that was involved in this audit event." + default=None, description="The type of the object that was involved in this audit event." ) role: typing.Optional[Coding] = pydantic.Field( - description="Code representing the role the entity played in the event being audited." + default=None, description="Code representing the role the entity played in the event being audited." ) lifecycle: typing.Optional[Coding] = pydantic.Field( - description="Identifier for the data life-cycle stage for the entity." + default=None, description="Identifier for the data life-cycle stage for the entity." ) security_label: typing.Optional[typing.List[Coding]] = pydantic.Field( - alias="securityLabel", description="Security labels for the identified entity." + alias="securityLabel", default=None, description="Security labels for the identified entity." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="A name of the entity in the audit event.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Text that describes the entity in more detail." + ) + query: typing.Optional[Base64Binary] = pydantic.Field( + default=None, description="The query parameters for a query-type entities." ) - name: typing.Optional[str] = pydantic.Field(description="A name of the entity in the audit event.") - description: typing.Optional[str] = pydantic.Field(description="Text that describes the entity in more detail.") - query: typing.Optional[Base64Binary] = pydantic.Field(description="The query parameters for a query-type entities.") detail: typing.Optional[typing.List[AuditEventDetail]] = pydantic.Field( - description="Tagged value pairs for conveying additional information about the entity." + default=None, description="Tagged value pairs for conveying additional information about the entity." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/audit_event_network.py b/src/metriport/fhir/types/audit_event_network.py index 2f074c7..801b1ff 100644 --- a/src/metriport/fhir/types/audit_event_network.py +++ b/src/metriport/fhir/types/audit_event_network.py @@ -19,20 +19,23 @@ class AuditEventNetwork(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) address: typing.Optional[str] = pydantic.Field( - description="An identifier for the network access point of the user device for the audit event." + default=None, description="An identifier for the network access point of the user device for the audit event." ) type: typing.Optional[AuditEventNetworkType] = pydantic.Field( - description="An identifier for the type of network access point that originated the audit event." + default=None, description="An identifier for the type of network access point that originated the audit event." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/audit_event_source.py b/src/metriport/fhir/types/audit_event_source.py index a85627b..c2ededb 100644 --- a/src/metriport/fhir/types/audit_event_source.py +++ b/src/metriport/fhir/types/audit_event_source.py @@ -20,21 +20,25 @@ class AuditEventSource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) site: typing.Optional[str] = pydantic.Field( - description="Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group." + default=None, + description="Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.", ) observer: Reference = pydantic.Field(description="Identifier of the source where the event was detected.") type: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="Code specifying the type of source where event originated." + default=None, description="Code specifying the type of source where event originated." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/base_resource.py b/src/metriport/fhir/types/base_resource.py index d74cab1..bc38e92 100644 --- a/src/metriport/fhir/types/base_resource.py +++ b/src/metriport/fhir/types/base_resource.py @@ -19,27 +19,35 @@ class BaseResource(pydantic.BaseModel): id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) text: typing.Optional[Narrative] = pydantic.Field( - description='A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.' + default=None, + description='A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.', ) contained: typing.Any = pydantic.Field( description="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) diff --git a/src/metriport/fhir/types/basic.py b/src/metriport/fhir/types/basic.py index 8478cb1..88f576e 100644 --- a/src/metriport/fhir/types/basic.py +++ b/src/metriport/fhir/types/basic.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,19 +20,23 @@ class Basic(BaseResource): Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. """ - resource_type: typing_extensions.Literal["Basic"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Basic"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier assigned to the resource for business purposes, outside the context of FHIR." + default=None, + description="Identifier assigned to the resource for business purposes, outside the context of FHIR.", ) code: CodeableConcept = pydantic.Field( description="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) subject: typing.Optional[Reference] = pydantic.Field( - description='Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.' + default=None, + description='Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.', + ) + created: typing.Optional[dt.date] = pydantic.Field( + default=None, description="Identifies when the resource was first created." ) - created: typing.Optional[dt.date] = pydantic.Field(description="Identifies when the resource was first created.") author: typing.Optional[Reference] = pydantic.Field( - description="Indicates who was responsible for creating the resource instance." + default=None, description="Indicates who was responsible for creating the resource instance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/binary.py b/src/metriport/fhir/types/binary.py index 2078291..c25d7b3 100644 --- a/src/metriport/fhir/types/binary.py +++ b/src/metriport/fhir/types/binary.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_64_binary import Base64Binary from .code import Code @@ -24,26 +22,36 @@ class Binary(pydantic.BaseModel): A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc. """ - resource_type: typing_extensions.Literal["Binary"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Binary"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) content_type: typing.Optional[Code] = pydantic.Field( - alias="contentType", description="MimeType of the binary content represented as a standard MimeType (BCP 13)." + alias="contentType", + default=None, + description="MimeType of the binary content represented as a standard MimeType (BCP 13).", ) security_context: typing.Optional[Reference] = pydantic.Field( alias="securityContext", + default=None, description="This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.", ) - data: typing.Optional[Base64Binary] = pydantic.Field(description="The actual content, base64 encoded.") + data: typing.Optional[Base64Binary] = pydantic.Field( + default=None, description="The actual content, base64 encoded." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/biologically_derived_product.py b/src/metriport/fhir/types/biologically_derived_product.py index 97e40b4..e41a2b1 100644 --- a/src/metriport/fhir/types/biologically_derived_product.py +++ b/src/metriport/fhir/types/biologically_derived_product.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .biologically_derived_product_collection import BiologicallyDerivedProductCollection @@ -28,36 +26,44 @@ class BiologicallyDerivedProduct(BaseResource): A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity. """ - resource_type: typing_extensions.Literal["BiologicallyDerivedProduct"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BiologicallyDerivedProduct"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." + default=None, + description="This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", ) product_category: typing.Optional[BiologicallyDerivedProductProductCategory] = pydantic.Field( - alias="productCategory", description="Broad category of this product." + alias="productCategory", default=None, description="Broad category of this product." ) product_code: typing.Optional[CodeableConcept] = pydantic.Field( alias="productCode", + default=None, description="A code that identifies the kind of this biologically derived product (SNOMED Ctcode).", ) status: typing.Optional[BiologicallyDerivedProductStatus] = pydantic.Field( - description="Whether the product is currently available." + default=None, description="Whether the product is currently available." ) request: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Procedure request to obtain this biologically derived product." + default=None, description="Procedure request to obtain this biologically derived product." + ) + quantity: typing.Optional[int] = pydantic.Field( + default=None, description="Number of discrete units within this product." + ) + parent: typing.Optional[typing.List[Reference]] = pydantic.Field( + default=None, description="Parent product (if any)." ) - quantity: typing.Optional[int] = pydantic.Field(description="Number of discrete units within this product.") - parent: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Parent product (if any).") collection: typing.Optional[BiologicallyDerivedProductCollection] = pydantic.Field( - description="How this product was collected." + default=None, description="How this product was collected." ) processing: typing.Optional[typing.List[BiologicallyDerivedProductProcessing]] = pydantic.Field( - description="Any processing of the product during collection that does not change the fundamental nature of the product. For example adding anti-coagulants during the collection of Peripheral Blood Stem Cells." + default=None, + description="Any processing of the product during collection that does not change the fundamental nature of the product. For example adding anti-coagulants during the collection of Peripheral Blood Stem Cells.", ) manipulation: typing.Optional[BiologicallyDerivedProductManipulation] = pydantic.Field( - description="Any manipulation of product post-collection that is intended to alter the product. For example a buffy-coat enrichment or CD8 reduction of Peripheral Blood Stem Cells to make it more suitable for infusion." + default=None, + description="Any manipulation of product post-collection that is intended to alter the product. For example a buffy-coat enrichment or CD8 reduction of Peripheral Blood Stem Cells to make it more suitable for infusion.", ) storage: typing.Optional[typing.List[BiologicallyDerivedProductStorage]] = pydantic.Field( - description="Product storage." + default=None, description="Product storage." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/biologically_derived_product_collection.py b/src/metriport/fhir/types/biologically_derived_product_collection.py index 5fbab9f..74675d9 100644 --- a/src/metriport/fhir/types/biologically_derived_product_collection.py +++ b/src/metriport/fhir/types/biologically_derived_product_collection.py @@ -20,26 +20,30 @@ class BiologicallyDerivedProductCollection(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) collector: typing.Optional[Reference] = pydantic.Field( - description="Healthcare professional who is performing the collection." + default=None, description="Healthcare professional who is performing the collection." ) source: typing.Optional[Reference] = pydantic.Field( - description="The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product." + default=None, + description="The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.", ) collected_date_time: typing.Optional[str] = pydantic.Field( - alias="collectedDateTime", description="Time of product collection." + alias="collectedDateTime", default=None, description="Time of product collection." ) collected_period: typing.Optional[Period] = pydantic.Field( - alias="collectedPeriod", description="Time of product collection." + alias="collectedPeriod", default=None, description="Time of product collection." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/biologically_derived_product_manipulation.py b/src/metriport/fhir/types/biologically_derived_product_manipulation.py index d9d68d5..e4abdea 100644 --- a/src/metriport/fhir/types/biologically_derived_product_manipulation.py +++ b/src/metriport/fhir/types/biologically_derived_product_manipulation.py @@ -19,18 +19,25 @@ class BiologicallyDerivedProductManipulation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Description of manipulation.") - time_date_time: typing.Optional[str] = pydantic.Field(alias="timeDateTime", description="Time of manipulation.") - time_period: typing.Optional[Period] = pydantic.Field(alias="timePeriod", description="Time of manipulation.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Description of manipulation.") + time_date_time: typing.Optional[str] = pydantic.Field( + alias="timeDateTime", default=None, description="Time of manipulation." + ) + time_period: typing.Optional[Period] = pydantic.Field( + alias="timePeriod", default=None, description="Time of manipulation." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/biologically_derived_product_processing.py b/src/metriport/fhir/types/biologically_derived_product_processing.py index 7af098a..b3e496f 100644 --- a/src/metriport/fhir/types/biologically_derived_product_processing.py +++ b/src/metriport/fhir/types/biologically_derived_product_processing.py @@ -21,20 +21,29 @@ class BiologicallyDerivedProductProcessing(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Description of of processing.") - procedure: typing.Optional[CodeableConcept] = pydantic.Field(description="Procesing code.") - additive: typing.Optional[Reference] = pydantic.Field(description="Substance added during processing.") - time_date_time: typing.Optional[str] = pydantic.Field(alias="timeDateTime", description="Time of processing.") - time_period: typing.Optional[Period] = pydantic.Field(alias="timePeriod", description="Time of processing.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Description of of processing.") + procedure: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Procesing code.") + additive: typing.Optional[Reference] = pydantic.Field( + default=None, description="Substance added during processing." + ) + time_date_time: typing.Optional[str] = pydantic.Field( + alias="timeDateTime", default=None, description="Time of processing." + ) + time_period: typing.Optional[Period] = pydantic.Field( + alias="timePeriod", default=None, description="Time of processing." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/biologically_derived_product_storage.py b/src/metriport/fhir/types/biologically_derived_product_storage.py index 4c8f4c4..9751616 100644 --- a/src/metriport/fhir/types/biologically_derived_product_storage.py +++ b/src/metriport/fhir/types/biologically_derived_product_storage.py @@ -21,21 +21,24 @@ class BiologicallyDerivedProductStorage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Description of storage.") - temperature: typing.Optional[Decimal] = pydantic.Field(description="Storage temperature.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Description of storage.") + temperature: typing.Optional[Decimal] = pydantic.Field(default=None, description="Storage temperature.") scale: typing.Optional[BiologicallyDerivedProductStorageScale] = pydantic.Field( - description="Temperature scale used." + default=None, description="Temperature scale used." ) - duration: typing.Optional[Period] = pydantic.Field(description="Storage timeperiod.") + duration: typing.Optional[Period] = pydantic.Field(default=None, description="Storage timeperiod.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/body_structure.py b/src/metriport/fhir/types/body_structure.py index a9a542a..f300a68 100644 --- a/src/metriport/fhir/types/body_structure.py +++ b/src/metriport/fhir/types/body_structure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -23,26 +21,28 @@ class BodyStructure(BaseResource): Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. """ - resource_type: typing_extensions.Literal["BodyStructure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BodyStructure"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for this instance of the anatomical structure." + default=None, description="Identifier for this instance of the anatomical structure." ) - active: typing.Optional[bool] = pydantic.Field(description="Whether this body site is in active use.") + active: typing.Optional[bool] = pydantic.Field(default=None, description="Whether this body site is in active use.") morphology: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of structure being represented by the body structure at `BodyStructure.location`. This can define both normal and abnormal morphologies." + default=None, + description="The kind of structure being represented by the body structure at `BodyStructure.location`. This can define both normal and abnormal morphologies.", ) location: typing.Optional[CodeableConcept] = pydantic.Field( - description="The anatomical location or region of the specimen, lesion, or body structure." + default=None, description="The anatomical location or region of the specimen, lesion, or body structure." ) location_qualifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="locationQualifier", + default=None, description="Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.", ) description: typing.Optional[str] = pydantic.Field( - description="A summary, characterization or explanation of the body structure." + default=None, description="A summary, characterization or explanation of the body structure." ) image: typing.Optional[typing.List[Attachment]] = pydantic.Field( - description="Image or images used to identify a location." + default=None, description="Image or images used to identify a location." ) patient: Reference = pydantic.Field(description="The person to which the body site belongs.") diff --git a/src/metriport/fhir/types/bot.py b/src/metriport/fhir/types/bot.py index 2b865a1..9c323ec 100644 --- a/src/metriport/fhir/types/bot.py +++ b/src/metriport/fhir/types/bot.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .bot_audit_event_destination_item import BotAuditEventDestinationItem @@ -29,57 +27,69 @@ class Bot(pydantic.BaseModel): Bot account for automated actions. """ - resource_type: typing_extensions.Literal["Bot"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Bot"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="An identifier for this bot.") - name: typing.Optional[str] = pydantic.Field(description="A name associated with the Bot.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="An identifier for this bot." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="A name associated with the Bot.") description: typing.Optional[str] = pydantic.Field( - description="A summary, characterization or explanation of the Bot." + default=None, description="A summary, characterization or explanation of the Bot." ) runtime_version: typing.Optional[BotRuntimeVersion] = pydantic.Field( alias="runtimeVersion", + default=None, description="The identifier of the bot runtime environment (i.e., vmcontext, awslambda, etc).", ) - photo: typing.Optional[Attachment] = pydantic.Field(description="Image of the bot.") + photo: typing.Optional[Attachment] = pydantic.Field(default=None, description="Image of the bot.") cron_timing: typing.Optional[Timing] = pydantic.Field( - alias="cronTiming", description="A schedule for the bot to be executed." + alias="cronTiming", default=None, description="A schedule for the bot to be executed." ) cron_string: typing.Optional[str] = pydantic.Field( - alias="cronString", description="A schedule for the bot to be executed." + alias="cronString", default=None, description="A schedule for the bot to be executed." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").' + default=None, + description='A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").', ) run_as_user: typing.Optional[bool] = pydantic.Field( - alias="runAsUser", description="Optional flag to indicate that the bot should be run as the user." + alias="runAsUser", default=None, description="Optional flag to indicate that the bot should be run as the user." ) audit_event_trigger: typing.Optional[BotAuditEventTrigger] = pydantic.Field( alias="auditEventTrigger", + default=None, description="Criteria for creating an AuditEvent as a result of the bot invocation. Possible values are 'always', 'never', 'on-error', or 'on-output'. Default value is 'always'.", ) audit_event_destination: typing.Optional[typing.List[BotAuditEventDestinationItem]] = pydantic.Field( alias="auditEventDestination", + default=None, description="The destination system in which the AuditEvent is to be sent. Possible values are 'log' or 'resource'. Default value is 'resource'.", ) source_code: typing.Optional[Attachment] = pydantic.Field( - alias="sourceCode", description="Bot logic in original source code form written by developers." + alias="sourceCode", default=None, description="Bot logic in original source code form written by developers." ) executable_code: typing.Optional[Attachment] = pydantic.Field( alias="executableCode", + default=None, description="Bot logic in executable form as a result of compiling and bundling source code.", ) code: typing.Optional[str] = pydantic.Field( - description="DEPRECATED Bot logic script. Use Bot.sourceCode or Bot.executableCode instead." + default=None, description="DEPRECATED Bot logic script. Use Bot.sourceCode or Bot.executableCode instead." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/bulk_data_export.py b/src/metriport/fhir/types/bulk_data_export.py index 7bed10f..2b98206 100644 --- a/src/metriport/fhir/types/bulk_data_export.py +++ b/src/metriport/fhir/types/bulk_data_export.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .bulk_data_export_deleted import BulkDataExportDeleted from .bulk_data_export_error import BulkDataExportError @@ -27,24 +25,30 @@ class BulkDataExport(pydantic.BaseModel): User specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["BulkDataExport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BulkDataExport"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) status: BulkDataExportStatus = pydantic.Field(description="The status of the request.") request_time: Instant = pydantic.Field( alias="requestTime", description="Indicates the server's time when the query is requested." ) transaction_time: typing.Optional[Instant] = pydantic.Field( alias="transactionTime", + default=None, description="Indicates the server's time when the query is run. The response SHOULD NOT include any resources modified after this instant, and SHALL include any matching resources modified up to and including this instant.", ) request: Uri = pydantic.Field( @@ -52,16 +56,18 @@ class BulkDataExport(pydantic.BaseModel): ) requires_access_token: typing.Optional[bool] = pydantic.Field( alias="requiresAccessToken", + default=None, description="Indicates whether downloading the generated files requires the same authorization mechanism as the $export operation itself.", ) output: typing.Optional[typing.List[BulkDataExportOutput]] = pydantic.Field( - description="An array of file items with one entry for each generated file. If no resources are returned from the kick-off request, the server SHOULD return an empty array." + default=None, + description="An array of file items with one entry for each generated file. If no resources are returned from the kick-off request, the server SHOULD return an empty array.", ) deleted: typing.Optional[typing.List[BulkDataExportDeleted]] = pydantic.Field( - description="An array of deleted file items following the same structure as the output array." + default=None, description="An array of deleted file items following the same structure as the output array." ) error: typing.Optional[typing.List[BulkDataExportError]] = pydantic.Field( - description="Array of message file items following the same structure as the output array." + default=None, description="Array of message file items following the same structure as the output array." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/bundle.py b/src/metriport/fhir/types/bundle.py index ff36682..d901785 100644 --- a/src/metriport/fhir/types/bundle.py +++ b/src/metriport/fhir/types/bundle.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .bundle_entry import BundleEntry from .bundle_link import BundleLink @@ -29,38 +27,47 @@ class Bundle(pydantic.BaseModel): A container for a collection of resources. """ - resource_type: typing_extensions.Literal["Bundle"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Bundle"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="A persistent identifier for the bundle that won't change as a bundle is copied from server to server." + default=None, + description="A persistent identifier for the bundle that won't change as a bundle is copied from server to server.", ) type: typing.Optional[BundleType] = pydantic.Field( - description="Indicates the purpose of this bundle - how it is intended to be used." + default=None, description="Indicates the purpose of this bundle - how it is intended to be used." ) timestamp: typing.Optional[Instant] = pydantic.Field( - description="The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle." + default=None, + description="The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.", ) total: typing.Optional[UnsignedInt] = pydantic.Field( - description="If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle." + default=None, + description="If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", ) link: typing.Optional[typing.List[BundleLink]] = pydantic.Field( - description="A series of links that provide context to this bundle." + default=None, description="A series of links that provide context to this bundle." ) entry: typing.Optional[typing.List[BundleEntry]] = pydantic.Field( - description="An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)." + default=None, + description="An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).", ) signature: typing.Optional[Signature] = pydantic.Field( - description="Digital Signature - base64 encoded. XML-DSig or a JWT." + default=None, description="Digital Signature - base64 encoded. XML-DSig or a JWT." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/bundle_entry.py b/src/metriport/fhir/types/bundle_entry.py index 3d58e94..52ab5a5 100644 --- a/src/metriport/fhir/types/bundle_entry.py +++ b/src/metriport/fhir/types/bundle_entry.py @@ -23,33 +23,39 @@ class BundleEntry(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) link: typing.Optional[typing.List[BundleLink]] = pydantic.Field( - description="A series of links that provide context to this entry." + default=None, description="A series of links that provide context to this entry." ) full_url: typing.Optional[Uri] = pydantic.Field( alias="fullUrl", + default=None, description="The Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: _ fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) _ Results from operations might involve resources that are not identified.", ) resource: typing.Any = pydantic.Field( description="The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type." ) search: typing.Optional[BundleSearch] = pydantic.Field( - description="Information about the search process that lead to the creation of this entry." + default=None, description="Information about the search process that lead to the creation of this entry." ) request: typing.Optional[BundleRequest] = pydantic.Field( - description="Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry." + default=None, + description="Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.", ) response: typing.Optional[BundleResponse] = pydantic.Field( - description="Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history." + default=None, + description="Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/bundle_link.py b/src/metriport/fhir/types/bundle_link.py index fcd5df4..b137f02 100644 --- a/src/metriport/fhir/types/bundle_link.py +++ b/src/metriport/fhir/types/bundle_link.py @@ -19,19 +19,23 @@ class BundleLink(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) relation: typing.Optional[str] = pydantic.Field( - description="A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)." + default=None, + description="A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).", ) - url: typing.Optional[Uri] = pydantic.Field(description="The reference details for the link.") + url: typing.Optional[Uri] = pydantic.Field(default=None, description="The reference details for the link.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/bundle_request.py b/src/metriport/fhir/types/bundle_request.py index 43a6858..c94c05d 100644 --- a/src/metriport/fhir/types/bundle_request.py +++ b/src/metriport/fhir/types/bundle_request.py @@ -21,35 +21,44 @@ class BundleRequest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) method: typing.Optional[BundleRequestMethod] = pydantic.Field( - description="In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred." + default=None, + description="In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.", ) url: typing.Optional[Uri] = pydantic.Field( - description="The URL for this entry, relative to the root (the address to which the request is posted)." + default=None, + description="The URL for this entry, relative to the root (the address to which the request is posted).", ) if_none_match: typing.Optional[str] = pydantic.Field( alias="ifNoneMatch", + default=None, description='If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread).', ) if_modified_since: typing.Optional[Instant] = pydantic.Field( alias="ifModifiedSince", + default=None, description='Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).', ) if_match: typing.Optional[str] = pydantic.Field( alias="ifMatch", + default=None, description='Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).', ) if_none_exist: typing.Optional[str] = pydantic.Field( alias="ifNoneExist", + default=None, description='Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").', ) diff --git a/src/metriport/fhir/types/bundle_response.py b/src/metriport/fhir/types/bundle_response.py index 52e4d02..08403cf 100644 --- a/src/metriport/fhir/types/bundle_response.py +++ b/src/metriport/fhir/types/bundle_response.py @@ -20,26 +20,32 @@ class BundleResponse(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) status: typing.Optional[str] = pydantic.Field( - description="The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code." + default=None, + description="The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.", ) location: typing.Optional[Uri] = pydantic.Field( - description="The location header created by processing this operation, populated if the operation returns a location." + default=None, + description="The location header created by processing this operation, populated if the operation returns a location.", ) etag: typing.Optional[str] = pydantic.Field( - description="The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency))." + default=None, + description="The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).", ) last_modified: typing.Optional[Instant] = pydantic.Field( - alias="lastModified", description="The date/time that the resource was modified on the server." + alias="lastModified", default=None, description="The date/time that the resource was modified on the server." ) outcome: typing.Any = pydantic.Field( description="An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction." diff --git a/src/metriport/fhir/types/bundle_search.py b/src/metriport/fhir/types/bundle_search.py index 990dacc..573565f 100644 --- a/src/metriport/fhir/types/bundle_search.py +++ b/src/metriport/fhir/types/bundle_search.py @@ -20,20 +20,24 @@ class BundleSearch(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[BundleSearchMode] = pydantic.Field( - description="Why this entry is in the result set - whether it's included as a match or because of an \_include requirement, or to convey information or warning information about the search process." + default=None, + description="Why this entry is in the result set - whether it's included as a match or because of an \_include requirement, or to convey information or warning information about the search process.", ) score: typing.Optional[Decimal] = pydantic.Field( - description="When searching, the server's search ranking score for the entry." + default=None, description="When searching, the server's search ranking score for the entry." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement.py b/src/metriport/fhir/types/capability_statement.py index 634922c..3f4fbf5 100644 --- a/src/metriport/fhir/types/capability_statement.py +++ b/src/metriport/fhir/types/capability_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -35,88 +33,107 @@ class CapabilityStatement(BaseResource): A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation. """ - resource_type: typing_extensions.Literal["CapabilityStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CapabilityStatement"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers." + default=None, + description="An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the capability statement." + default=None, description="A short, descriptive, user-friendly title for the capability statement." ) status: typing.Optional[CapabilityStatementStatus] = pydantic.Field( - description="The status of this capability statement. Enables tracking the life-cycle of the content." + default=None, + description="The status of this capability statement. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes." + default=None, + description="The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the capability statement." + default=None, description="The name of the organization or individual that published the capability statement." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." + default=None, + description="A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the capability statement is intended to be used." + default=None, + description="A legal or geographic region in which the capability statement is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this capability statement is needed and why it has been designed as it has." + default=None, + description="Explanation of why this capability statement is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement." + default=None, + description="A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.", ) kind: typing.Optional[CapabilityStatementKind] = pydantic.Field( - description="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase)." + default=None, + description="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).", ) instantiates: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details." + default=None, + description="Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.", ) imports: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them." + default=None, + description="Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.", ) software: typing.Optional[CapabilityStatementSoftware] = pydantic.Field( - description="Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation." + default=None, + description="Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.", ) implementation: typing.Optional[CapabilityStatementImplementation] = pydantic.Field( - description="Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program." + default=None, + description="Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.", ) fhir_version: typing.Optional[CapabilityStatementFhirVersion] = pydantic.Field( alias="fhirVersion", + default=None, description="The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.", ) format: typing.Optional[typing.List[Code]] = pydantic.Field( - description="A list of the formats supported by this implementation using their content types." + default=None, description="A list of the formats supported by this implementation using their content types." ) patch_format: typing.Optional[typing.List[Code]] = pydantic.Field( alias="patchFormat", + default=None, description="A list of the patch formats supported by this implementation using their content types.", ) implementation_guide: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="implementationGuide", + default=None, description="A list of implementation guides that the server does (or should) support in their entirety.", ) rest: typing.Optional[typing.List[CapabilityStatementRest]] = pydantic.Field( - description="A definition of the restful capabilities of the solution, if any." + default=None, description="A definition of the restful capabilities of the solution, if any." ) messaging: typing.Optional[typing.List[CapabilityStatementMessaging]] = pydantic.Field( - description="A description of the messaging capabilities of the solution." + default=None, description="A description of the messaging capabilities of the solution." ) document: typing.Optional[typing.List[CapabilityStatementDocument]] = pydantic.Field( - description="A document definition." + default=None, description="A document definition." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_document.py b/src/metriport/fhir/types/capability_statement_document.py index 0a7b3ad..afe7939 100644 --- a/src/metriport/fhir/types/capability_statement_document.py +++ b/src/metriport/fhir/types/capability_statement_document.py @@ -21,20 +21,25 @@ class CapabilityStatementDocument(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[CapabilityStatementDocumentMode] = pydantic.Field( - description="Mode of this document declaration - whether an application is a producer or consumer." + default=None, + description="Mode of this document declaration - whether an application is a producer or consumer.", ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc." + default=None, + description="A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.", ) profile: Canonical = pydantic.Field( description="A profile on the document Bundle that constrains which resources are present, and their contents." diff --git a/src/metriport/fhir/types/capability_statement_endpoint.py b/src/metriport/fhir/types/capability_statement_endpoint.py index 575e847..13e12a1 100644 --- a/src/metriport/fhir/types/capability_statement_endpoint.py +++ b/src/metriport/fhir/types/capability_statement_endpoint.py @@ -20,20 +20,24 @@ class CapabilityStatementEndpoint(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) protocol: Coding = pydantic.Field( description="A list of the messaging transport protocol(s) identifiers, supported by this endpoint." ) address: typing.Optional[Url] = pydantic.Field( - description="The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier." + default=None, + description="The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_implementation.py b/src/metriport/fhir/types/capability_statement_implementation.py index 43169c6..4af7467 100644 --- a/src/metriport/fhir/types/capability_statement_implementation.py +++ b/src/metriport/fhir/types/capability_statement_implementation.py @@ -20,23 +20,29 @@ class CapabilityStatementImplementation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="Information about the specific installation that this capability statement relates to." + default=None, + description="Information about the specific installation that this capability statement relates to.", ) url: typing.Optional[Url] = pydantic.Field( - description="An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." + default=None, + description="An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.", ) custodian: typing.Optional[Reference] = pydantic.Field( - description="The organization responsible for the management of the instance and oversight of the data on the server at the specified URL." + default=None, + description="The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_interaction.py b/src/metriport/fhir/types/capability_statement_interaction.py index f2bd2e9..b028311 100644 --- a/src/metriport/fhir/types/capability_statement_interaction.py +++ b/src/metriport/fhir/types/capability_statement_interaction.py @@ -20,20 +20,24 @@ class CapabilityStatementInteraction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CapabilityStatementInteractionCode] = pydantic.Field( - description="Coded identifier of the operation, supported by the system resource." + default=None, description="Coded identifier of the operation, supported by the system resource." ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'." + default=None, + description="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_interaction_1.py b/src/metriport/fhir/types/capability_statement_interaction_1.py index ed0335d..61d069c 100644 --- a/src/metriport/fhir/types/capability_statement_interaction_1.py +++ b/src/metriport/fhir/types/capability_statement_interaction_1.py @@ -20,20 +20,24 @@ class CapabilityStatementInteraction1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CapabilityStatementInteraction1Code] = pydantic.Field( - description="A coded identifier of the operation, supported by the system." + default=None, description="A coded identifier of the operation, supported by the system." ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented." + default=None, + description="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_messaging.py b/src/metriport/fhir/types/capability_statement_messaging.py index 8aa47bd..2a0b8d4 100644 --- a/src/metriport/fhir/types/capability_statement_messaging.py +++ b/src/metriport/fhir/types/capability_statement_messaging.py @@ -22,27 +22,34 @@ class CapabilityStatementMessaging(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) endpoint: typing.Optional[typing.List[CapabilityStatementEndpoint]] = pydantic.Field( - description="An endpoint (network accessible address) to which messages and/or replies are to be sent." + default=None, + description="An endpoint (network accessible address) to which messages and/or replies are to be sent.", ) reliable_cache: typing.Optional[UnsignedInt] = pydantic.Field( alias="reliableCache", + default=None, description="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner." + default=None, + description="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", ) supported_message: typing.Optional[typing.List[CapabilityStatementSupportedMessage]] = pydantic.Field( alias="supportedMessage", + default=None, description="References to message definitions for messages this system can send or receive.", ) diff --git a/src/metriport/fhir/types/capability_statement_operation.py b/src/metriport/fhir/types/capability_statement_operation.py index 6591188..fce0964 100644 --- a/src/metriport/fhir/types/capability_statement_operation.py +++ b/src/metriport/fhir/types/capability_statement_operation.py @@ -20,23 +20,28 @@ class CapabilityStatementOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the \_query parameter when the query is called." + default=None, + description="The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the \_query parameter when the query is called.", ) definition: Canonical = pydantic.Field( description="Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as `http://hl7.org/fhir/OperationDefinition/ValueSet-expand`), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation. If it only supports a subset, it must define its own custom [[[OperationDefinition]]] with a 'base' of the original OperationDefinition. The custom definition would describe the specific subset of functionality supported." ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation." + default=None, + description="Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_resource.py b/src/metriport/fhir/types/capability_statement_resource.py index d79c7eb..7ab486d 100644 --- a/src/metriport/fhir/types/capability_statement_resource.py +++ b/src/metriport/fhir/types/capability_statement_resource.py @@ -28,67 +28,89 @@ class CapabilityStatementResource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Code] = pydantic.Field(description="A type of resource exposed via the restful interface.") + type: typing.Optional[Code] = pydantic.Field( + default=None, description="A type of resource exposed via the restful interface." + ) profile: typing.Optional[Canonical] = pydantic.Field( - description="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses)." + default=None, + description="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", ) supported_profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="supportedProfile", + default=None, description='A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).', ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Additional information about the resource type used by the system." + default=None, description="Additional information about the resource type used by the system." ) interaction: typing.Optional[typing.List[CapabilityStatementInteraction]] = pydantic.Field( - description="Identifies a restful operation supported by the solution." + default=None, description="Identifies a restful operation supported by the solution." ) versioning: typing.Optional[CapabilityStatementResourceVersioning] = pydantic.Field( - description="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API." + default=None, + description="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", ) read_history: typing.Optional[bool] = pydantic.Field( alias="readHistory", + default=None, description="A flag for whether the server is able to return past versions as part of the vRead operation.", ) update_create: typing.Optional[bool] = pydantic.Field( alias="updateCreate", + default=None, description="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", ) conditional_create: typing.Optional[bool] = pydantic.Field( - alias="conditionalCreate", description="A flag that indicates that the server supports conditional create." + alias="conditionalCreate", + default=None, + description="A flag that indicates that the server supports conditional create.", ) conditional_read: typing.Optional[CapabilityStatementResourceConditionalRead] = pydantic.Field( - alias="conditionalRead", description="A code that indicates how the server supports conditional read." + alias="conditionalRead", + default=None, + description="A code that indicates how the server supports conditional read.", ) conditional_update: typing.Optional[bool] = pydantic.Field( - alias="conditionalUpdate", description="A flag that indicates that the server supports conditional update." + alias="conditionalUpdate", + default=None, + description="A flag that indicates that the server supports conditional update.", ) conditional_delete: typing.Optional[CapabilityStatementResourceConditionalDelete] = pydantic.Field( - alias="conditionalDelete", description="A code that indicates how the server supports conditional delete." + alias="conditionalDelete", + default=None, + description="A code that indicates how the server supports conditional delete.", ) reference_policy: typing.Optional[typing.List[CapabilityStatementResourceReferencePolicyItem]] = pydantic.Field( - alias="referencePolicy", description="A set of flags that defines how references are supported." + alias="referencePolicy", default=None, description="A set of flags that defines how references are supported." ) search_include: typing.Optional[typing.List[str]] = pydantic.Field( - alias="searchInclude", description="A list of \_include values supported by the server." + alias="searchInclude", default=None, description="A list of \_include values supported by the server." ) search_rev_include: typing.Optional[typing.List[str]] = pydantic.Field( - alias="searchRevInclude", description="A list of \_revinclude (reverse include) values supported by the server." + alias="searchRevInclude", + default=None, + description="A list of \_revinclude (reverse include) values supported by the server.", ) search_param: typing.Optional[typing.List[CapabilityStatementSearchParam]] = pydantic.Field( alias="searchParam", + default=None, description="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", ) operation: typing.Optional[typing.List[CapabilityStatementOperation]] = pydantic.Field( - description="Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters." + default=None, + description="Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_rest.py b/src/metriport/fhir/types/capability_statement_rest.py index a1d7d2d..bdf045c 100644 --- a/src/metriport/fhir/types/capability_statement_rest.py +++ b/src/metriport/fhir/types/capability_statement_rest.py @@ -26,39 +26,49 @@ class CapabilityStatementRest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[CapabilityStatementRestMode] = pydantic.Field( - description="Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations." + default=None, + description="Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.", ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="Information about the system's restful capabilities that apply across all applications, such as security." + default=None, + description="Information about the system's restful capabilities that apply across all applications, such as security.", ) security: typing.Optional[CapabilityStatementSecurity] = pydantic.Field( - description="Information about security implementation from an interface perspective - what a client needs to know." + default=None, + description="Information about security implementation from an interface perspective - what a client needs to know.", ) resource: typing.Optional[typing.List[CapabilityStatementResource]] = pydantic.Field( - description="A specification of the restful capabilities of the solution for a specific resource type." + default=None, + description="A specification of the restful capabilities of the solution for a specific resource type.", ) interaction: typing.Optional[typing.List[CapabilityStatementInteraction1]] = pydantic.Field( - description="A specification of restful operations supported by the system." + default=None, description="A specification of restful operations supported by the system." ) search_param: typing.Optional[typing.List[CapabilityStatementSearchParam]] = pydantic.Field( alias="searchParam", + default=None, description="Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", ) operation: typing.Optional[typing.List[CapabilityStatementOperation]] = pydantic.Field( - description="Definition of an operation or a named query together with its parameters and their meaning and type." + default=None, + description="Definition of an operation or a named query together with its parameters and their meaning and type.", ) compartment: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL ." + default=None, + description="An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_search_param.py b/src/metriport/fhir/types/capability_statement_search_param.py index 29c43e7..b9d9357 100644 --- a/src/metriport/fhir/types/capability_statement_search_param.py +++ b/src/metriport/fhir/types/capability_statement_search_param.py @@ -21,24 +21,31 @@ class CapabilityStatementSearchParam(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="The name of the search parameter used in the interface.") + name: typing.Optional[str] = pydantic.Field( + default=None, description="The name of the search parameter used in the interface." + ) definition: typing.Optional[Canonical] = pydantic.Field( - description="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs." + default=None, + description="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.", ) type: typing.Optional[CapabilityStatementSearchParamType] = pydantic.Field( - description="The type of value a search parameter refers to, and how the content is interpreted." + default=None, description="The type of value a search parameter refers to, and how the content is interpreted." ) documentation: typing.Optional[Markdown] = pydantic.Field( - description="This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms." + default=None, + description="This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_security.py b/src/metriport/fhir/types/capability_statement_security.py index 343c812..e1cf4b1 100644 --- a/src/metriport/fhir/types/capability_statement_security.py +++ b/src/metriport/fhir/types/capability_statement_security.py @@ -20,22 +20,28 @@ class CapabilityStatementSecurity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) cors: typing.Optional[bool] = pydantic.Field( - description="Server adds CORS headers when responding to requests - this enables Javascript applications to use the server." + default=None, + description="Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.", ) service: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Types of security services that are supported/required by the system." + default=None, description="Types of security services that are supported/required by the system." + ) + description: typing.Optional[Markdown] = pydantic.Field( + default=None, description="General description of how security works." ) - description: typing.Optional[Markdown] = pydantic.Field(description="General description of how security works.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/capability_statement_software.py b/src/metriport/fhir/types/capability_statement_software.py index 077b201..5bfce98 100644 --- a/src/metriport/fhir/types/capability_statement_software.py +++ b/src/metriport/fhir/types/capability_statement_software.py @@ -19,21 +19,24 @@ class CapabilityStatementSoftware(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Name the software is known by.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Name the software is known by.") version: typing.Optional[str] = pydantic.Field( - description="The version identifier for the software covered by this statement." + default=None, description="The version identifier for the software covered by this statement." ) release_date: typing.Optional[DateTime] = pydantic.Field( - alias="releaseDate", description="Date this version of the software was released." + alias="releaseDate", default=None, description="Date this version of the software was released." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/capability_statement_supported_message.py b/src/metriport/fhir/types/capability_statement_supported_message.py index e28ac77..dc0c2ee 100644 --- a/src/metriport/fhir/types/capability_statement_supported_message.py +++ b/src/metriport/fhir/types/capability_statement_supported_message.py @@ -20,17 +20,20 @@ class CapabilityStatementSupportedMessage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[CapabilityStatementSupportedMessageMode] = pydantic.Field( - description="The mode of this event declaration - whether application is sender or receiver." + default=None, description="The mode of this event declaration - whether application is sender or receiver." ) definition: Canonical = pydantic.Field( description="Points to a message definition that identifies the messaging event, message structure, allowed responses, etc." diff --git a/src/metriport/fhir/types/care_plan.py b/src/metriport/fhir/types/care_plan.py index c5a2f10..de4a691 100644 --- a/src/metriport/fhir/types/care_plan.py +++ b/src/metriport/fhir/types/care_plan.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,75 +27,95 @@ class CarePlan(BaseResource): Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. """ - resource_type: typing_extensions.Literal["CarePlan"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CarePlan"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A care plan that is fulfilled in whole or in part by this care plan." + alias="basedOn", + default=None, + description="A care plan that is fulfilled in whole or in part by this care plan.", ) replaces: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Completed or terminated care plan whose function is taken by this new care plan." + default=None, description="Completed or terminated care plan whose function is taken by this new care plan." ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger care plan of which this particular care plan is a component or step." + alias="partOf", + default=None, + description="A larger care plan of which this particular care plan is a component or step.", ) status: typing.Optional[Code] = pydantic.Field( - description="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record." + default=None, + description="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", ) intent: typing.Optional[Code] = pydantic.Field( - description="Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain." + default=None, + description="Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.' + default=None, + description='Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.', + ) + title: typing.Optional[str] = pydantic.Field(default=None, description="Human-friendly name for the care plan.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="A description of the scope and nature of the plan." ) - title: typing.Optional[str] = pydantic.Field(description="Human-friendly name for the care plan.") - description: typing.Optional[str] = pydantic.Field(description="A description of the scope and nature of the plan.") subject: Reference = pydantic.Field( description="Identifies the patient or group whose intended care is described by the plan." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", ) period: typing.Optional[Period] = pydantic.Field( - description="Indicates when the plan did (or is intended to) come into effect and end." + default=None, description="Indicates when the plan did (or is intended to) come into effect and end." ) created: typing.Optional[DateTime] = pydantic.Field( - description="Represents when this particular CarePlan record was created in the system, which is often a system-generated date." + default=None, + description="Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", ) author: typing.Optional[Reference] = pydantic.Field( - description="When populated, the author is responsible for the care plan. The care plan is attributed to the author." + default=None, + description="When populated, the author is responsible for the care plan. The care plan is attributed to the author.", ) contributor: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies the individual(s) or organization who provided the contents of the care plan." + default=None, + description="Identifies the individual(s) or organization who provided the contents of the care plan.", ) care_team: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="careTeam", + default=None, description="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", ) addresses: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." + default=None, + description="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", ) supporting_info: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInfo", + default=None, description="Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", ) goal: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Describes the intended objective(s) of carrying out the care plan." + default=None, description="Describes the intended objective(s) of carrying out the care plan." ) activity: typing.Optional[typing.List[CarePlanActivity]] = pydantic.Field( - description="Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." + default=None, + description="Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="General notes about the care plan not covered elsewhere." + default=None, description="General notes about the care plan not covered elsewhere." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/care_plan_activity.py b/src/metriport/fhir/types/care_plan_activity.py index fe3461f..e8d2e76 100644 --- a/src/metriport/fhir/types/care_plan_activity.py +++ b/src/metriport/fhir/types/care_plan_activity.py @@ -22,31 +22,37 @@ class CarePlanActivity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) outcome_codeable_concept: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="outcomeCodeableConcept", + default=None, description="Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).", ) outcome_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="outcomeReference", + default=None, description='Details of the outcome or action resulting from the activity. The reference to an "event" resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).', ) progress: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Notes about the adherence/status/progress of the activity." + default=None, description="Notes about the adherence/status/progress of the activity." ) reference: typing.Optional[Reference] = pydantic.Field( - description="The details of the proposed activity represented in a specific resource." + default=None, description="The details of the proposed activity represented in a specific resource." ) detail: typing.Optional[CarePlanDetail] = pydantic.Field( - description="A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc." + default=None, + description="A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/care_plan_detail.py b/src/metriport/fhir/types/care_plan_detail.py index 01da461..ed875e4 100644 --- a/src/metriport/fhir/types/care_plan_detail.py +++ b/src/metriport/fhir/types/care_plan_detail.py @@ -27,85 +27,105 @@ class CarePlanDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) kind: typing.Optional[Code] = pydantic.Field( - description="A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest." + default=None, + description="A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter." + default=None, + description="Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.", ) goal: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Internal reference that identifies the goals that this activity is intended to contribute towards meeting." + default=None, + description="Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", ) status: typing.Optional[CarePlanDetailStatus] = pydantic.Field( - description="Identifies what progress is being made for the specific activity." + default=None, description="Identifies what progress is being made for the specific activity." ) status_reason: typing.Optional[CodeableConcept] = pydantic.Field( alias="statusReason", + default=None, description="Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", ) do_not_perform: typing.Optional[bool] = pydantic.Field( alias="doNotPerform", + default=None, description="If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.", ) scheduled_timing: typing.Optional[Timing] = pydantic.Field( alias="scheduledTiming", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) scheduled_period: typing.Optional[Period] = pydantic.Field( alias="scheduledPeriod", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) scheduled_string: typing.Optional[str] = pydantic.Field( alias="scheduledString", + default=None, description="The period, timing or frequency upon which the described activity is to occur.", ) location: typing.Optional[Reference] = pydantic.Field( - description="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." + default=None, + description="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", ) performer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies who's expected to be involved in the activity." + default=None, description="Identifies who's expected to be involved in the activity." ) product_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="productCodeableConcept", + default=None, description="Identifies the food, drug or other product to be consumed or supplied in the activity.", ) product_reference: typing.Optional[Reference] = pydantic.Field( alias="productReference", + default=None, description="Identifies the food, drug or other product to be consumed or supplied in the activity.", ) daily_amount: typing.Optional[Quantity] = pydantic.Field( - alias="dailyAmount", description="Identifies the quantity expected to be consumed in a given day." + alias="dailyAmount", default=None, description="Identifies the quantity expected to be consumed in a given day." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="Identifies the quantity expected to be supplied, administered or consumed by the subject." + default=None, + description="Identifies the quantity expected to be supplied, administered or consumed by the subject.", ) description: typing.Optional[str] = pydantic.Field( - description="This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc." + default=None, + description="This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/care_team.py b/src/metriport/fhir/types/care_team.py index 3037466..d398963 100644 --- a/src/metriport/fhir/types/care_team.py +++ b/src/metriport/fhir/types/care_team.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,44 +25,51 @@ class CareTeam(BaseResource): The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. """ - resource_type: typing_extensions.Literal["CareTeam"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CareTeam"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) status: typing.Optional[CareTeamStatus] = pydantic.Field( - description="Indicates the current state of the care team." + default=None, description="Indicates the current state of the care team." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team." + default=None, + description="Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.", ) name: typing.Optional[str] = pydantic.Field( - description='A label for human use intended to distinguish like teams. E.g. the "red" vs. "green" trauma teams.' + default=None, + description='A label for human use intended to distinguish like teams. E.g. the "red" vs. "green" trauma teams.', ) subject: typing.Optional[Reference] = pydantic.Field( - description="Identifies the patient or group whose intended care is handled by the team." + default=None, description="Identifies the patient or group whose intended care is handled by the team." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.", ) period: typing.Optional[Period] = pydantic.Field( - description="Indicates when the team did (or is intended to) come into effect and end." + default=None, description="Indicates when the team did (or is intended to) come into effect and end." ) participant: typing.Optional[typing.List[CareTeamParticipant]] = pydantic.Field( - description="Identifies all people and organizations who are expected to be involved in the care team." + default=None, + description="Identifies all people and organizations who are expected to be involved in the care team.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes why the care team exists." + alias="reasonCode", default=None, description="Describes why the care team exists." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Condition(s) that this care team addresses." + alias="reasonReference", default=None, description="Condition(s) that this care team addresses." ) managing_organization: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="managingOrganization", description="The organization responsible for the care team." + alias="managingOrganization", default=None, description="The organization responsible for the care team." ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A central contact detail for the care team (that applies to all members)." + default=None, description="A central contact detail for the care team (that applies to all members)." + ) + note: typing.Optional[typing.List[Annotation]] = pydantic.Field( + default=None, description="Comments made about the CareTeam." ) - note: typing.Optional[typing.List[Annotation]] = pydantic.Field(description="Comments made about the CareTeam.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/care_team_participant.py b/src/metriport/fhir/types/care_team_participant.py index 5e26a80..b21d084 100644 --- a/src/metriport/fhir/types/care_team_participant.py +++ b/src/metriport/fhir/types/care_team_participant.py @@ -21,26 +21,32 @@ class CareTeamParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) role: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.' + default=None, + description='Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.', ) member: typing.Optional[Reference] = pydantic.Field( - description="The specific person or organization who is participating/expected to participate in the care team." + default=None, + description="The specific person or organization who is participating/expected to participate in the care team.", ) on_behalf_of: typing.Optional[Reference] = pydantic.Field( - alias="onBehalfOf", description="The organization of the practitioner." + alias="onBehalfOf", default=None, description="The organization of the practitioner." ) period: typing.Optional[Period] = pydantic.Field( - description="Indicates when the specific member or organization did (or is intended to) come into effect and end." + default=None, + description="Indicates when the specific member or organization did (or is intended to) come into effect and end.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/catalog_entry.py b/src/metriport/fhir/types/catalog_entry.py index e5d4b00..38aba3d 100644 --- a/src/metriport/fhir/types/catalog_entry.py +++ b/src/metriport/fhir/types/catalog_entry.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .catalog_entry_related_entry import CatalogEntryRelatedEntry @@ -26,44 +24,56 @@ class CatalogEntry(BaseResource): Catalog entries are wrappers that contextualize items included in a catalog. """ - resource_type: typing_extensions.Literal["CatalogEntry"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CatalogEntry"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code." + default=None, + description="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of item - medication, device, service, protocol or other." + default=None, description="The type of item - medication, device, service, protocol or other." + ) + orderable: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether the entry represents an orderable item." ) - orderable: typing.Optional[bool] = pydantic.Field(description="Whether the entry represents an orderable item.") referenced_item: Reference = pydantic.Field( alias="referencedItem", description="The item in a catalog or definition." ) additional_identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - alias="additionalIdentifier", description="Used in supporting related concepts, e.g. NDC to RxNorm." + alias="additionalIdentifier", + default=None, + description="Used in supporting related concepts, e.g. NDC to RxNorm.", ) classification: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Classes of devices, or ATC for medication." + default=None, description="Classes of devices, or ATC for medication." ) status: typing.Optional[CatalogEntryStatus] = pydantic.Field( - description="Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable." + default=None, + description="Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.", ) validity_period: typing.Optional[Period] = pydantic.Field( - alias="validityPeriod", description="The time period in which this catalog entry is expected to be active." + alias="validityPeriod", + default=None, + description="The time period in which this catalog entry is expected to be active.", ) valid_to: typing.Optional[DateTime] = pydantic.Field( - alias="validTo", description="The date until which this catalog entry is expected to be active." + alias="validTo", default=None, description="The date until which this catalog entry is expected to be active." ) last_updated: typing.Optional[DateTime] = pydantic.Field( alias="lastUpdated", + default=None, description="Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.", ) additional_characteristic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="additionalCharacteristic", description="Used for examplefor Out of Formulary, or any specifics." + alias="additionalCharacteristic", + default=None, + description="Used for examplefor Out of Formulary, or any specifics.", ) additional_classification: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="additionalClassification", description="User for example for ATC classification, or." + alias="additionalClassification", default=None, description="User for example for ATC classification, or." ) related_entry: typing.Optional[typing.List[CatalogEntryRelatedEntry]] = pydantic.Field( alias="relatedEntry", + default=None, description="Used for example, to point to a substance, or to a device used to administer a medication.", ) diff --git a/src/metriport/fhir/types/catalog_entry_related_entry.py b/src/metriport/fhir/types/catalog_entry_related_entry.py index 49edd7d..6d9a07f 100644 --- a/src/metriport/fhir/types/catalog_entry_related_entry.py +++ b/src/metriport/fhir/types/catalog_entry_related_entry.py @@ -20,17 +20,21 @@ class CatalogEntryRelatedEntry(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) relationtype: typing.Optional[CatalogEntryRelatedEntryRelationtype] = pydantic.Field( - description="The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc." + default=None, + description="The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.", ) item: Reference = pydantic.Field(description="The reference to the related item.") diff --git a/src/metriport/fhir/types/charge_item.py b/src/metriport/fhir/types/charge_item.py index cda32c3..a2ba3c4 100644 --- a/src/metriport/fhir/types/charge_item.py +++ b/src/metriport/fhir/types/charge_item.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,96 +31,115 @@ class ChargeItem(BaseResource): The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. """ - resource_type: typing_extensions.Literal["ChargeItem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ChargeItem"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this event performer or other systems." + default=None, description="Identifiers assigned to this event performer or other systems." ) definition_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="definitionUri", + default=None, description="References the (external) source of pricing information, rules of application for the code this ChargeItem uses.", ) definition_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="definitionCanonical", + default=None, description="References the source of pricing information, rules of application for the code this ChargeItem uses.", ) - status: typing.Optional[ChargeItemStatus] = pydantic.Field(description="The current state of the ChargeItem.") + status: typing.Optional[ChargeItemStatus] = pydantic.Field( + default=None, description="The current state of the ChargeItem." + ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="ChargeItems can be grouped to larger ChargeItems covering the whole set." + alias="partOf", + default=None, + description="ChargeItems can be grouped to larger ChargeItems covering the whole set.", ) code: CodeableConcept = pydantic.Field(description="A code that identifies the charge, like a billing code.") subject: Reference = pydantic.Field( description="The individual or set of individuals the action is being or was performed on." ) context: typing.Optional[Reference] = pydantic.Field( - description="The encounter or episode of care that establishes the context for this event." + default=None, description="The encounter or episode of care that establishes the context for this event." ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="Date/time(s) or duration when the charged service was applied." + alias="occurrenceDateTime", + default=None, + description="Date/time(s) or duration when the charged service was applied.", ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="Date/time(s) or duration when the charged service was applied." + alias="occurrencePeriod", + default=None, + description="Date/time(s) or duration when the charged service was applied.", ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( - alias="occurrenceTiming", description="Date/time(s) or duration when the charged service was applied." + alias="occurrenceTiming", + default=None, + description="Date/time(s) or duration when the charged service was applied.", ) performer: typing.Optional[typing.List[ChargeItemPerformer]] = pydantic.Field( - description="Indicates who or what performed or participated in the charged service." + default=None, description="Indicates who or what performed or participated in the charged service." ) performing_organization: typing.Optional[Reference] = pydantic.Field( - alias="performingOrganization", description="The organization requesting the service." + alias="performingOrganization", default=None, description="The organization requesting the service." ) requesting_organization: typing.Optional[Reference] = pydantic.Field( - alias="requestingOrganization", description="The organization performing the service." + alias="requestingOrganization", default=None, description="The organization performing the service." ) cost_center: typing.Optional[Reference] = pydantic.Field( - alias="costCenter", description="The financial cost center permits the tracking of charge attribution." + alias="costCenter", + default=None, + description="The financial cost center permits the tracking of charge attribution.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="Quantity of which the charge item has been serviced." + default=None, description="Quantity of which the charge item has been serviced." ) bodysite: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The anatomical location where the related service has been applied." + default=None, description="The anatomical location where the related service has been applied." ) factor_override: typing.Optional[Decimal] = pydantic.Field( alias="factorOverride", + default=None, description="Factor overriding the factor determined by the rules associated with the code.", ) price_override: typing.Optional[Money] = pydantic.Field( alias="priceOverride", + default=None, description="Total price of the charge overriding the list price associated with the code.", ) override_reason: typing.Optional[str] = pydantic.Field( alias="overrideReason", + default=None, description="If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.", ) enterer: typing.Optional[Reference] = pydantic.Field( - description="The device, practitioner, etc. who entered the charge item." + default=None, description="The device, practitioner, etc. who entered the charge item." ) entered_date: typing.Optional[DateTime] = pydantic.Field( - alias="enteredDate", description="Date the charge item was entered." + alias="enteredDate", default=None, description="Date the charge item was entered." ) reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Describes why the event occurred in coded or textual form." + default=None, description="Describes why the event occurred in coded or textual form." ) service: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Indicated the rendered service that caused this charge." + default=None, description="Indicated the rendered service that caused this charge." ) product_reference: typing.Optional[Reference] = pydantic.Field( alias="productReference", + default=None, description="Identifies the device, food, drug or other product being charged either by type code or reference to an instance.", ) product_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="productCodeableConcept", + default=None, description="Identifies the device, food, drug or other product being charged either by type code or reference to an instance.", ) account: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Account into which this ChargeItems belongs." + default=None, description="Account into which this ChargeItems belongs." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the event by the performer, subject or other participants." + default=None, description="Comments made about the event by the performer, subject or other participants." ) supporting_information: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="supportingInformation", description="Further information supporting this charge." + alias="supportingInformation", default=None, description="Further information supporting this charge." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/charge_item_definition.py b/src/metriport/fhir/types/charge_item_definition.py index 7c9b540..280b0b6 100644 --- a/src/metriport/fhir/types/charge_item_definition.py +++ b/src/metriport/fhir/types/charge_item_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -32,80 +30,99 @@ class ChargeItemDefinition(BaseResource): The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system. """ - resource_type: typing_extensions.Literal["ChargeItemDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ChargeItemDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets." + default=None, + description="The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the charge item definition." + default=None, description="A short, descriptive, user-friendly title for the charge item definition." ) derived_from_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="derivedFromUri", + default=None, description="The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.", ) part_of: typing.Optional[typing.List[Canonical]] = pydantic.Field( - alias="partOf", description="A larger definition of which this particular definition is a component or step." + alias="partOf", + default=None, + description="A larger definition of which this particular definition is a component or step.", ) replaces: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance." + default=None, + description="As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.", ) status: typing.Optional[ChargeItemDefinitionStatus] = pydantic.Field( - description="The current state of the ChargeItemDefinition." + default=None, description="The current state of the ChargeItemDefinition." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes." + default=None, + description="The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the charge item definition." + default=None, + description="The name of the organization or individual that published the charge item definition.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the charge item definition from a consumer's perspective." + default=None, + description="A free text natural language description of the charge item definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate charge item definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the charge item definition is intended to be used." + default=None, + description="A legal or geographic region in which the charge item definition is intended to be used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition." + default=None, + description="A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the charge item definition content was or is planned to be in active use.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="The defined billing details in this resource pertain to the given billing code." + default=None, description="The defined billing details in this resource pertain to the given billing code." ) instance: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The defined billing details in this resource pertain to the given product instance(s)." + default=None, + description="The defined billing details in this resource pertain to the given product instance(s).", ) applicability: typing.Optional[typing.List[ChargeItemDefinitionApplicability]] = pydantic.Field( - description="Expressions that describe applicability criteria for the billing code." + default=None, description="Expressions that describe applicability criteria for the billing code." ) property_group: typing.Optional[typing.List[ChargeItemDefinitionPropertyGroup]] = pydantic.Field( alias="propertyGroup", + default=None, description="Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.", ) diff --git a/src/metriport/fhir/types/charge_item_definition_applicability.py b/src/metriport/fhir/types/charge_item_definition_applicability.py index 9cf77e2..97077ca 100644 --- a/src/metriport/fhir/types/charge_item_definition_applicability.py +++ b/src/metriport/fhir/types/charge_item_definition_applicability.py @@ -18,23 +18,29 @@ class ChargeItemDefinitionApplicability(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="A brief, natural language description of the condition that effectively communicates the intended semantics." + default=None, + description="A brief, natural language description of the condition that effectively communicates the intended semantics.", ) language: typing.Optional[str] = pydantic.Field( - description='The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.' + default=None, + description='The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.', ) expression: typing.Optional[str] = pydantic.Field( - description="An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied." + default=None, + description="An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/charge_item_definition_price_component.py b/src/metriport/fhir/types/charge_item_definition_price_component.py index 8a6a10f..a85c3a2 100644 --- a/src/metriport/fhir/types/charge_item_definition_price_component.py +++ b/src/metriport/fhir/types/charge_item_definition_price_component.py @@ -22,23 +22,31 @@ class ChargeItemDefinitionPriceComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Code] = pydantic.Field(description="This code identifies the type of the component.") + type: typing.Optional[Code] = pydantic.Field( + default=None, description="This code identifies the type of the component." + ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc." + default=None, + description="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="The factor that has been applied on the base price for calculating this component." + default=None, description="The factor that has been applied on the base price for calculating this component." + ) + amount: typing.Optional[Money] = pydantic.Field( + default=None, description="The amount calculated for this component." ) - amount: typing.Optional[Money] = pydantic.Field(description="The amount calculated for this component.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/charge_item_definition_property_group.py b/src/metriport/fhir/types/charge_item_definition_property_group.py index 93cc6c7..f59b632 100644 --- a/src/metriport/fhir/types/charge_item_definition_property_group.py +++ b/src/metriport/fhir/types/charge_item_definition_property_group.py @@ -20,20 +20,24 @@ class ChargeItemDefinitionPropertyGroup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) applicability: typing.Optional[typing.List[ChargeItemDefinitionApplicability]] = pydantic.Field( - description="Expressions that describe applicability criteria for the priceComponent." + default=None, description="Expressions that describe applicability criteria for the priceComponent." ) price_component: typing.Optional[typing.List[ChargeItemDefinitionPriceComponent]] = pydantic.Field( alias="priceComponent", + default=None, description="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.", ) diff --git a/src/metriport/fhir/types/charge_item_performer.py b/src/metriport/fhir/types/charge_item_performer.py index 5121112..c4cfe83 100644 --- a/src/metriport/fhir/types/charge_item_performer.py +++ b/src/metriport/fhir/types/charge_item_performer.py @@ -20,17 +20,21 @@ class ChargeItemPerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.)." + default=None, + description="Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).", ) actor: Reference = pydantic.Field( description="The device, practitioner, etc. who performed or participated in the service." diff --git a/src/metriport/fhir/types/claim.py b/src/metriport/fhir/types/claim.py index 7034674..b159add 100644 --- a/src/metriport/fhir/types/claim.py +++ b/src/metriport/fhir/types/claim.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .claim_accident import ClaimAccident @@ -36,32 +34,36 @@ class Claim(BaseResource): A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement. """ - resource_type: typing_extensions.Literal["Claim"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Claim"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this claim." + default=None, description="A unique identifier assigned to this claim." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") type: CodeableConcept = pydantic.Field( description="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." ) sub_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="subType", + default=None, description="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", ) use: typing.Optional[ClaimUse] = pydantic.Field( - description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future." + default=None, + description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.", ) patient: Reference = pydantic.Field( description="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought." ) billable_period: typing.Optional[Period] = pydantic.Field( - alias="billablePeriod", description="The period for which charges are being submitted." + alias="billablePeriod", default=None, description="The period for which charges are being submitted." ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date this resource was created.") + created: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date this resource was created.") enterer: typing.Optional[Reference] = pydantic.Field( - description="Individual who created the claim, predetermination or preauthorization." + default=None, description="Individual who created the claim, predetermination or preauthorization." + ) + insurer: typing.Optional[Reference] = pydantic.Field( + default=None, description="The Insurer who is target of the request." ) - insurer: typing.Optional[Reference] = pydantic.Field(description="The Insurer who is target of the request.") provider: Reference = pydantic.Field( description="The provider which is responsible for the claim, predetermination or preauthorization." ) @@ -70,46 +72,59 @@ class Claim(BaseResource): ) funds_reserve: typing.Optional[CodeableConcept] = pydantic.Field( alias="fundsReserve", + default=None, description="A code to indicate whether and for whom funds are to be reserved for future claims.", ) related: typing.Optional[typing.List[ClaimRelated]] = pydantic.Field( - description="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event." + default=None, + description="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.", ) prescription: typing.Optional[Reference] = pydantic.Field( - description="Prescription to support the dispensing of pharmacy, device or vision products." + default=None, description="Prescription to support the dispensing of pharmacy, device or vision products." ) original_prescription: typing.Optional[Reference] = pydantic.Field( alias="originalPrescription", + default=None, description="Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.", ) payee: typing.Optional[ClaimPayee] = pydantic.Field( - description="The party to be reimbursed for cost of the products and services according to the terms of the policy." + default=None, + description="The party to be reimbursed for cost of the products and services according to the terms of the policy.", + ) + referral: typing.Optional[Reference] = pydantic.Field( + default=None, description="A reference to a referral resource." + ) + facility: typing.Optional[Reference] = pydantic.Field( + default=None, description="Facility where the services were provided." ) - referral: typing.Optional[Reference] = pydantic.Field(description="A reference to a referral resource.") - facility: typing.Optional[Reference] = pydantic.Field(description="Facility where the services were provided.") care_team: typing.Optional[typing.List[ClaimCareTeam]] = pydantic.Field( - alias="careTeam", description="The members of the team who provided the products and services." + alias="careTeam", default=None, description="The members of the team who provided the products and services." ) supporting_info: typing.Optional[typing.List[ClaimSupportingInfo]] = pydantic.Field( alias="supportingInfo", + default=None, description="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", ) diagnosis: typing.Optional[typing.List[ClaimDiagnosis]] = pydantic.Field( - description="Information about diagnoses relevant to the claim items." + default=None, description="Information about diagnoses relevant to the claim items." ) procedure: typing.Optional[typing.List[ClaimProcedure]] = pydantic.Field( - description="Procedures performed on the patient relevant to the billing items with the claim." + default=None, description="Procedures performed on the patient relevant to the billing items with the claim." ) insurance: typing.List[ClaimInsurance] = pydantic.Field( description="Financial instruments for reimbursement for the health care products and services specified on the claim." ) accident: typing.Optional[ClaimAccident] = pydantic.Field( - description="Details of an accident which resulted in injuries which required the products and services listed in the claim." + default=None, + description="Details of an accident which resulted in injuries which required the products and services listed in the claim.", ) item: typing.Optional[typing.List[ClaimItem]] = pydantic.Field( - description="A claim line. Either a simple product or service or a 'group' of details which can each be a simple items or groups of sub-details." + default=None, + description="A claim line. Either a simple product or service or a 'group' of details which can each be a simple items or groups of sub-details.", + ) + total: typing.Optional[Money] = pydantic.Field( + default=None, description="The total value of the all the items in the claim." ) - total: typing.Optional[Money] = pydantic.Field(description="The total value of the all the items in the claim.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/claim_accident.py b/src/metriport/fhir/types/claim_accident.py index 745e73c..9dfb64d 100644 --- a/src/metriport/fhir/types/claim_accident.py +++ b/src/metriport/fhir/types/claim_accident.py @@ -21,26 +21,31 @@ class ClaimAccident(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) date: typing.Optional[dt.date] = pydantic.Field( - description="Date of an accident event related to the products and services contained in the claim." + default=None, + description="Date of an accident event related to the products and services contained in the claim.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." + default=None, + description="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="The physical location of the accident event." + alias="locationAddress", default=None, description="The physical location of the accident event." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="The physical location of the accident event." + alias="locationReference", default=None, description="The physical location of the accident event." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_care_team.py b/src/metriport/fhir/types/claim_care_team.py index ef20882..a2677b0 100644 --- a/src/metriport/fhir/types/claim_care_team.py +++ b/src/metriport/fhir/types/claim_care_team.py @@ -21,27 +21,31 @@ class ClaimCareTeam(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify care team entries." + default=None, description="A number to uniquely identify care team entries." ) provider: Reference = pydantic.Field(description="Member of the team who provided the product or service.") responsible: typing.Optional[bool] = pydantic.Field( - description="The party who is billing and/or responsible for the claimed products or services." + default=None, description="The party who is billing and/or responsible for the claimed products or services." ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." + default=None, + description="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", ) qualification: typing.Optional[CodeableConcept] = pydantic.Field( - description="The qualification of the practitioner which is applicable for this service." + default=None, description="The qualification of the practitioner which is applicable for this service." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_detail.py b/src/metriport/fhir/types/claim_detail.py index 9081d24..27a19fc 100644 --- a/src/metriport/fhir/types/claim_detail.py +++ b/src/metriport/fhir/types/claim_detail.py @@ -25,50 +25,60 @@ class ClaimDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - sequence: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify item entries.") + sequence: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify item entries." + ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) sub_detail: typing.Optional[typing.List[ClaimSubDetail]] = pydantic.Field( alias="subDetail", + default=None, description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", ) diff --git a/src/metriport/fhir/types/claim_diagnosis.py b/src/metriport/fhir/types/claim_diagnosis.py index a3d0d49..07a3cc1 100644 --- a/src/metriport/fhir/types/claim_diagnosis.py +++ b/src/metriport/fhir/types/claim_diagnosis.py @@ -21,34 +21,42 @@ class ClaimDiagnosis(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify diagnosis entries." + default=None, description="A number to uniquely identify diagnosis entries." ) diagnosis_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="diagnosisCodeableConcept", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) diagnosis_reference: typing.Optional[Reference] = pydantic.Field( alias="diagnosisReference", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="When the condition was observed or the relative ranking." + default=None, description="When the condition was observed or the relative ranking." ) on_admission: typing.Optional[CodeableConcept] = pydantic.Field( - alias="onAdmission", description="Indication of whether the diagnosis was present on admission to a facility." + alias="onAdmission", + default=None, + description="Indication of whether the diagnosis was present on admission to a facility.", ) package_code: typing.Optional[CodeableConcept] = pydantic.Field( alias="packageCode", + default=None, description="A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", ) diff --git a/src/metriport/fhir/types/claim_insurance.py b/src/metriport/fhir/types/claim_insurance.py index 5bed3d7..d1cd4d0 100644 --- a/src/metriport/fhir/types/claim_insurance.py +++ b/src/metriport/fhir/types/claim_insurance.py @@ -21,37 +21,46 @@ class ClaimInsurance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order." + default=None, + description="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", ) focal: typing.Optional[bool] = pydantic.Field( - description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true." + default=None, + description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="The business identifier to be used when the claim is sent for adjudication against this insurance policy." + default=None, + description="The business identifier to be used when the claim is sent for adjudication against this insurance policy.", ) coverage: Reference = pydantic.Field( description="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) business_arrangement: typing.Optional[str] = pydantic.Field( alias="businessArrangement", + default=None, description="A business agreement number established between the provider and the insurer for special business processing purposes.", ) pre_auth_ref: typing.Optional[typing.List[str]] = pydantic.Field( alias="preAuthRef", + default=None, description="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", ) claim_response: typing.Optional[Reference] = pydantic.Field( alias="claimResponse", + default=None, description="The result of the adjudication of the line items for the Coverage specified in this insurance.", ) diff --git a/src/metriport/fhir/types/claim_item.py b/src/metriport/fhir/types/claim_item.py index 7ac938f..038b4ae 100644 --- a/src/metriport/fhir/types/claim_item.py +++ b/src/metriport/fhir/types/claim_item.py @@ -27,89 +27,105 @@ class ClaimItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - sequence: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify item entries.") + sequence: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify item entries." + ) care_team_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="careTeamSequence", description="CareTeam members related to this service or product." + alias="careTeamSequence", default=None, description="CareTeam members related to this service or product." ) diagnosis_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="diagnosisSequence", description="Diagnosis applicable for this service or product." + alias="diagnosisSequence", default=None, description="Diagnosis applicable for this service or product." ) procedure_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="procedureSequence", description="Procedures applicable for this service or product." + alias="procedureSequence", default=None, description="Procedures applicable for this service or product." ) information_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="informationSequence", + default=None, description="Exceptions, special conditions and supporting information applicable for this service or product.", ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) location_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="locationCodeableConcept", description="Where the product or service was provided." + alias="locationCodeableConcept", default=None, description="Where the product or service was provided." ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="Where the product or service was provided." + alias="locationAddress", default=None, description="Where the product or service was provided." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="Where the product or service was provided." + alias="locationReference", default=None, description="Where the product or service was provided." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( - alias="bodySite", description="Physical service site on the patient (limb, tooth, etc.)." + alias="bodySite", default=None, description="Physical service site on the patient (limb, tooth, etc.)." ) sub_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="subSite", description="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." + alias="subSite", + default=None, + description="A region or surface of the bodySite, e.g. limb region or tooth surface(s).", ) encounter: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The Encounters during which this Claim was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", ) detail: typing.Optional[typing.List[ClaimDetail]] = pydantic.Field( - description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." + default=None, + description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_payee.py b/src/metriport/fhir/types/claim_payee.py index 48e001f..c9294a2 100644 --- a/src/metriport/fhir/types/claim_payee.py +++ b/src/metriport/fhir/types/claim_payee.py @@ -20,18 +20,21 @@ class ClaimPayee(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="Type of Party to be reimbursed: subscriber, provider, other.") party: typing.Optional[Reference] = pydantic.Field( - description="Reference to the individual or organization to whom any payment will be made." + default=None, description="Reference to the individual or organization to whom any payment will be made." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_procedure.py b/src/metriport/fhir/types/claim_procedure.py index 6d99972..ca57206 100644 --- a/src/metriport/fhir/types/claim_procedure.py +++ b/src/metriport/fhir/types/claim_procedure.py @@ -22,34 +22,39 @@ class ClaimProcedure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify procedure entries." + default=None, description="A number to uniquely identify procedure entries." ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="When the condition was observed or the relative ranking." + default=None, description="When the condition was observed or the relative ranking." ) date: typing.Optional[DateTime] = pydantic.Field( - description="Date and optionally time the procedure was performed." + default=None, description="Date and optionally time the procedure was performed." ) procedure_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="procedureCodeableConcept", + default=None, description="The code or reference to a Procedure resource which identifies the clinical intervention performed.", ) procedure_reference: typing.Optional[Reference] = pydantic.Field( alias="procedureReference", + default=None, description="The code or reference to a Procedure resource which identifies the clinical intervention performed.", ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_related.py b/src/metriport/fhir/types/claim_related.py index 440f720..19ad456 100644 --- a/src/metriport/fhir/types/claim_related.py +++ b/src/metriport/fhir/types/claim_related.py @@ -21,21 +21,25 @@ class ClaimRelated(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - claim: typing.Optional[Reference] = pydantic.Field(description="Reference to a related claim.") + claim: typing.Optional[Reference] = pydantic.Field(default=None, description="Reference to a related claim.") relationship: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code to convey how the claims are related." + default=None, description="A code to convey how the claims are related." ) reference: typing.Optional[Identifier] = pydantic.Field( - description="An alternate organizational reference to the case or file to which this particular claim pertains." + default=None, + description="An alternate organizational reference to the case or file to which this particular claim pertains.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response.py b/src/metriport/fhir/types/claim_response.py index cfdad56..94a3a48 100644 --- a/src/metriport/fhir/types/claim_response.py +++ b/src/metriport/fhir/types/claim_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -34,85 +32,100 @@ class ClaimResponse(BaseResource): This resource provides the adjudication details from the processing of a Claim resource. """ - resource_type: typing_extensions.Literal["ClaimResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClaimResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this claim response." + default=None, description="A unique identifier assigned to this claim response." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") type: CodeableConcept = pydantic.Field( description="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." ) sub_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="subType", + default=None, description="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", ) use: typing.Optional[Code] = pydantic.Field( - description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future." + default=None, + description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.", ) patient: Reference = pydantic.Field( description="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought." ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date this resource was created.") + created: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date this resource was created.") insurer: Reference = pydantic.Field( description="The party responsible for authorization, adjudication and reimbursement." ) requestor: typing.Optional[Reference] = pydantic.Field( - description="The provider which is responsible for the claim, predetermination or preauthorization." + default=None, + description="The provider which is responsible for the claim, predetermination or preauthorization.", + ) + request: typing.Optional[Reference] = pydantic.Field( + default=None, description="Original request resource reference." ) - request: typing.Optional[Reference] = pydantic.Field(description="Original request resource reference.") outcome: typing.Optional[Code] = pydantic.Field( - description="The outcome of the claim, predetermination, or preauthorization processing." + default=None, description="The outcome of the claim, predetermination, or preauthorization processing." ) disposition: typing.Optional[str] = pydantic.Field( - description="A human readable description of the status of the adjudication." + default=None, description="A human readable description of the status of the adjudication." ) pre_auth_ref: typing.Optional[str] = pydantic.Field( alias="preAuthRef", + default=None, description="Reference from the Insurer which is used in later communications which refers to this adjudication.", ) pre_auth_period: typing.Optional[Period] = pydantic.Field( - alias="preAuthPeriod", description="The time frame during which this authorization is effective." + alias="preAuthPeriod", default=None, description="The time frame during which this authorization is effective." ) payee_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="payeeType", description="Type of Party to be reimbursed: subscriber, provider, other." + alias="payeeType", default=None, description="Type of Party to be reimbursed: subscriber, provider, other." ) item: typing.Optional[typing.List[ClaimResponseItem]] = pydantic.Field( - description="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details." + default=None, + description="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", ) add_item: typing.Optional[typing.List[ClaimResponseAddItem]] = pydantic.Field( - alias="addItem", description="The first-tier service adjudications for payor added product or service lines." + alias="addItem", + default=None, + description="The first-tier service adjudications for payor added product or service lines.", ) adjudication: typing.Optional[typing.List[ClaimResponseAdjudication]] = pydantic.Field( - description="The adjudication results which are presented at the header level rather than at the line-item or add-item levels." + default=None, + description="The adjudication results which are presented at the header level rather than at the line-item or add-item levels.", ) total: typing.Optional[typing.List[ClaimResponseTotal]] = pydantic.Field( - description="Categorized monetary totals for the adjudication." + default=None, description="Categorized monetary totals for the adjudication." ) payment: typing.Optional[ClaimResponsePayment] = pydantic.Field( - description="Payment details for the adjudication of the claim." + default=None, description="Payment details for the adjudication of the claim." ) funds_reserve: typing.Optional[CodeableConcept] = pydantic.Field( alias="fundsReserve", + default=None, description="A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.", ) form_code: typing.Optional[CodeableConcept] = pydantic.Field( - alias="formCode", description="A code for the form to be used for printing the content." + alias="formCode", default=None, description="A code for the form to be used for printing the content." ) form: typing.Optional[Attachment] = pydantic.Field( - description="The actual form, by reference or inclusion, for printing the content or an EOB." + default=None, description="The actual form, by reference or inclusion, for printing the content or an EOB." ) process_note: typing.Optional[typing.List[ClaimResponseProcessNote]] = pydantic.Field( alias="processNote", + default=None, description="A note that describes or explains adjudication results in a human readable form.", ) communication_request: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="communicationRequest", description="Request for additional supporting or authorizing information." + alias="communicationRequest", + default=None, + description="Request for additional supporting or authorizing information.", ) insurance: typing.Optional[typing.List[ClaimResponseInsurance]] = pydantic.Field( - description="Financial instruments for reimbursement for the health care products and services specified on the claim." + default=None, + description="Financial instruments for reimbursement for the health care products and services specified on the claim.", ) error: typing.Optional[typing.List[ClaimResponseError]] = pydantic.Field( - description="Errors encountered during the processing of the adjudication." + default=None, description="Errors encountered during the processing of the adjudication." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_add_item.py b/src/metriport/fhir/types/claim_response_add_item.py index f3b0515..b358aa9 100644 --- a/src/metriport/fhir/types/claim_response_add_item.py +++ b/src/metriport/fhir/types/claim_response_add_item.py @@ -28,82 +28,95 @@ class ClaimResponseAddItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="itemSequence", description="Claim items which this service line is intended to replace." + alias="itemSequence", default=None, description="Claim items which this service line is intended to replace." ) detail_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="detailSequence", + default=None, description="The sequence number of the details within the claim item which this line is intended to replace.", ) subdetail_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="subdetailSequence", + default=None, description="The sequence number of the sub-details within the details within the claim item which this line is intended to replace.", ) provider: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The providers who are authorized for the services rendered to the patient." + default=None, description="The providers who are authorized for the services rendered to the patient." ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) location_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="locationCodeableConcept", description="Where the product or service was provided." + alias="locationCodeableConcept", default=None, description="Where the product or service was provided." ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="Where the product or service was provided." + alias="locationAddress", default=None, description="Where the product or service was provided." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="Where the product or service was provided." + alias="locationReference", default=None, description="Where the product or service was provided." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( - alias="bodySite", description="Physical service site on the patient (limb, tooth, etc.)." + alias="bodySite", default=None, description="Physical service site on the patient (limb, tooth, etc.)." ) sub_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="subSite", description="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." + alias="subSite", + default=None, + description="A region or surface of the bodySite, e.g. limb region or tooth surface(s).", ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.List[ClaimResponseAdjudication] = pydantic.Field(description="The adjudication results.") detail: typing.Optional[typing.List[ClaimResponseDetail1]] = pydantic.Field( - description="The second-tier service adjudications for payor added services." + default=None, description="The second-tier service adjudications for payor added services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_adjudication.py b/src/metriport/fhir/types/claim_response_adjudication.py index 139cc10..d3bb53f 100644 --- a/src/metriport/fhir/types/claim_response_adjudication.py +++ b/src/metriport/fhir/types/claim_response_adjudication.py @@ -21,24 +21,31 @@ class ClaimResponseAdjudication(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( description="A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item." ) reason: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code supporting the understanding of the adjudication result and explaining variance from expected amount." + default=None, + description="A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + ) + amount: typing.Optional[Money] = pydantic.Field( + default=None, description="Monetary amount associated with the category." ) - amount: typing.Optional[Money] = pydantic.Field(description="Monetary amount associated with the category.") value: typing.Optional[Decimal] = pydantic.Field( - description="A non-monetary value associated with the category. Mutually exclusive to the amount element above." + default=None, + description="A non-monetary value associated with the category. Mutually exclusive to the amount element above.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_detail.py b/src/metriport/fhir/types/claim_response_detail.py index 00c787b..40dd025 100644 --- a/src/metriport/fhir/types/claim_response_detail.py +++ b/src/metriport/fhir/types/claim_response_detail.py @@ -21,25 +21,29 @@ class ClaimResponseDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) detail_sequence: typing.Optional[PositiveInt] = pydantic.Field( - alias="detailSequence", description="A number to uniquely reference the claim detail entry." + alias="detailSequence", default=None, description="A number to uniquely reference the claim detail entry." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.List[ClaimResponseAdjudication] = pydantic.Field(description="The adjudication results.") sub_detail: typing.Optional[typing.List[ClaimResponseSubDetail]] = pydantic.Field( - alias="subDetail", description="A sub-detail adjudication of a simple product or service." + alias="subDetail", default=None, description="A sub-detail adjudication of a simple product or service." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_detail_1.py b/src/metriport/fhir/types/claim_response_detail_1.py index 91eb546..637d249 100644 --- a/src/metriport/fhir/types/claim_response_detail_1.py +++ b/src/metriport/fhir/types/claim_response_detail_1.py @@ -25,13 +25,16 @@ class ClaimResponseDetail1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) product_or_service: CodeableConcept = pydantic.Field( @@ -39,28 +42,32 @@ class ClaimResponseDetail1(pydantic.BaseModel): description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.List[ClaimResponseAdjudication] = pydantic.Field(description="The adjudication results.") sub_detail: typing.Optional[typing.List[ClaimResponseSubDetail1]] = pydantic.Field( - alias="subDetail", description="The third-tier service adjudications for payor added services." + alias="subDetail", default=None, description="The third-tier service adjudications for payor added services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_error.py b/src/metriport/fhir/types/claim_response_error.py index 79f6705..1b38c59 100644 --- a/src/metriport/fhir/types/claim_response_error.py +++ b/src/metriport/fhir/types/claim_response_error.py @@ -20,25 +20,31 @@ class ClaimResponseError(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_sequence: typing.Optional[PositiveInt] = pydantic.Field( alias="itemSequence", + default=None, description="The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", ) detail_sequence: typing.Optional[PositiveInt] = pydantic.Field( alias="detailSequence", + default=None, description="The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", ) sub_detail_sequence: typing.Optional[PositiveInt] = pydantic.Field( alias="subDetailSequence", + default=None, description="The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", ) code: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/claim_response_insurance.py b/src/metriport/fhir/types/claim_response_insurance.py index d6ced87..008d8ff 100644 --- a/src/metriport/fhir/types/claim_response_insurance.py +++ b/src/metriport/fhir/types/claim_response_insurance.py @@ -20,30 +20,37 @@ class ClaimResponseInsurance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order." + default=None, + description="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", ) focal: typing.Optional[bool] = pydantic.Field( - description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true." + default=None, + description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", ) coverage: Reference = pydantic.Field( description="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) business_arrangement: typing.Optional[str] = pydantic.Field( alias="businessArrangement", + default=None, description="A business agreement number established between the provider and the insurer for special business processing purposes.", ) claim_response: typing.Optional[Reference] = pydantic.Field( alias="claimResponse", + default=None, description="The result of the adjudication of the line items for the Coverage specified in this insurance.", ) diff --git a/src/metriport/fhir/types/claim_response_item.py b/src/metriport/fhir/types/claim_response_item.py index f618d80..50d9c0d 100644 --- a/src/metriport/fhir/types/claim_response_item.py +++ b/src/metriport/fhir/types/claim_response_item.py @@ -21,27 +21,32 @@ class ClaimResponseItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_sequence: typing.Optional[PositiveInt] = pydantic.Field( - alias="itemSequence", description="A number to uniquely reference the claim item entries." + alias="itemSequence", default=None, description="A number to uniquely reference the claim item entries." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.List[ClaimResponseAdjudication] = pydantic.Field( description="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item." ) detail: typing.Optional[typing.List[ClaimResponseDetail]] = pydantic.Field( - description="A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items." + default=None, + description="A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_payment.py b/src/metriport/fhir/types/claim_response_payment.py index 96619f9..2d165dd 100644 --- a/src/metriport/fhir/types/claim_response_payment.py +++ b/src/metriport/fhir/types/claim_response_payment.py @@ -21,30 +21,34 @@ class ClaimResponsePayment(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Whether this represents partial or complete payment of the benefits payable." ) adjustment: typing.Optional[Money] = pydantic.Field( - description="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication." + default=None, + description="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", ) adjustment_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="adjustmentReason", description="Reason for the payment adjustment." + alias="adjustmentReason", default=None, description="Reason for the payment adjustment." ) date: typing.Optional[dt.date] = pydantic.Field( - description="Estimated date the payment will be issued or the actual issue date of payment." + default=None, description="Estimated date the payment will be issued or the actual issue date of payment." ) amount: Money = pydantic.Field(description="Benefits payable less any payment adjustment.") identifier: typing.Optional[Identifier] = pydantic.Field( - description="Issuer's unique identifier for the payment instrument." + default=None, description="Issuer's unique identifier for the payment instrument." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_process_note.py b/src/metriport/fhir/types/claim_response_process_note.py index 0cded45..8bae2d1 100644 --- a/src/metriport/fhir/types/claim_response_process_note.py +++ b/src/metriport/fhir/types/claim_response_process_note.py @@ -21,24 +21,29 @@ class ClaimResponseProcessNote(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - number: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify a note entry.") + number: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify a note entry." + ) type: typing.Optional[ClaimResponseProcessNoteType] = pydantic.Field( - description="The business purpose of the note text." + default=None, description="The business purpose of the note text." ) text: typing.Optional[str] = pydantic.Field( - description="The explanation or description associated with the processing." + default=None, description="The explanation or description associated with the processing." ) language: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code to define the language used in the text of the note." + default=None, description="A code to define the language used in the text of the note." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_sub_detail.py b/src/metriport/fhir/types/claim_response_sub_detail.py index 9bab783..654dcf5 100644 --- a/src/metriport/fhir/types/claim_response_sub_detail.py +++ b/src/metriport/fhir/types/claim_response_sub_detail.py @@ -20,24 +20,30 @@ class ClaimResponseSubDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sub_detail_sequence: typing.Optional[PositiveInt] = pydantic.Field( - alias="subDetailSequence", description="A number to uniquely reference the claim sub-detail entry." + alias="subDetailSequence", + default=None, + description="A number to uniquely reference the claim sub-detail entry.", ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ClaimResponseAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_response_sub_detail_1.py b/src/metriport/fhir/types/claim_response_sub_detail_1.py index d905ab4..9ef1d41 100644 --- a/src/metriport/fhir/types/claim_response_sub_detail_1.py +++ b/src/metriport/fhir/types/claim_response_sub_detail_1.py @@ -24,13 +24,16 @@ class ClaimResponseSubDetail1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) product_or_service: CodeableConcept = pydantic.Field( @@ -38,23 +41,27 @@ class ClaimResponseSubDetail1(pydantic.BaseModel): description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.List[ClaimResponseAdjudication] = pydantic.Field(description="The adjudication results.") diff --git a/src/metriport/fhir/types/claim_response_total.py b/src/metriport/fhir/types/claim_response_total.py index e4efef9..863f0e2 100644 --- a/src/metriport/fhir/types/claim_response_total.py +++ b/src/metriport/fhir/types/claim_response_total.py @@ -20,13 +20,16 @@ class ClaimResponseTotal(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/claim_sub_detail.py b/src/metriport/fhir/types/claim_sub_detail.py index e10be2c..339f759 100644 --- a/src/metriport/fhir/types/claim_sub_detail.py +++ b/src/metriport/fhir/types/claim_sub_detail.py @@ -24,47 +24,56 @@ class ClaimSubDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - sequence: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify item entries.") + sequence: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify item entries." + ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/claim_supporting_info.py b/src/metriport/fhir/types/claim_supporting_info.py index e192a73..bdfca73 100644 --- a/src/metriport/fhir/types/claim_supporting_info.py +++ b/src/metriport/fhir/types/claim_supporting_info.py @@ -24,52 +24,62 @@ class ClaimSupportingInfo(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify supporting information entries." + default=None, description="A number to uniquely identify supporting information entries." ) category: CodeableConcept = pydantic.Field( description="The general class of the information supplied: information; exception; accident, employment; onset, etc." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought." + default=None, + description="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", ) timing_date: typing.Optional[str] = pydantic.Field( - alias="timingDate", description="The date when or period to which this information refers." + alias="timingDate", default=None, description="The date when or period to which this information refers." ) timing_period: typing.Optional[Period] = pydantic.Field( - alias="timingPeriod", description="The date when or period to which this information refers." + alias="timingPeriod", default=None, description="The date when or period to which this information refers." ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) reason: typing.Optional[CodeableConcept] = pydantic.Field( - description="Provides the reason in the situation where a reason code is required in addition to the content." + default=None, + description="Provides the reason in the situation where a reason code is required in addition to the content.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/client_application.py b/src/metriport/fhir/types/client_application.py index 10221dd..aed0812 100644 --- a/src/metriport/fhir/types/client_application.py +++ b/src/metriport/fhir/types/client_application.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,42 +21,54 @@ class ClientApplication(pydantic.BaseModel): Medplum client application for automated access. """ - resource_type: typing_extensions.Literal["ClientApplication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClientApplication"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - name: typing.Optional[str] = pydantic.Field(description="A name associated with the ClientApplication.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + name: typing.Optional[str] = pydantic.Field( + default=None, description="A name associated with the ClientApplication." + ) description: typing.Optional[str] = pydantic.Field( - description="A summary, characterization or explanation of the ClientApplication." + default=None, description="A summary, characterization or explanation of the ClientApplication." ) secret: typing.Optional[str] = pydantic.Field( - description="Client secret string used to verify the identity of a client." + default=None, description="Client secret string used to verify the identity of a client." ) jwks_uri: typing.Optional[Uri] = pydantic.Field( alias="jwksUri", + default=None, description="Optional JWKS URI for public key verification of JWTs issued by the authorization server (client_secret_jwt).", ) redirect_uri: typing.Optional[Uri] = pydantic.Field( alias="redirectUri", + default=None, description="Optional redirect URI used when redirecting a client back to the client application.", ) launch_uri: typing.Optional[Uri] = pydantic.Field( - alias="launchUri", description="Optional launch URI for SMART EHR launch sequence." + alias="launchUri", default=None, description="Optional launch URI for SMART EHR launch sequence." ) pkce_optional: typing.Optional[bool] = pydantic.Field( alias="pkceOptional", + default=None, description="Flag to make PKCE optional for this client application. PKCE is required by default for compliance with Smart App Launch. It can be disabled for compatibility with legacy client applications.", ) identity_provider: typing.Optional[IdentityProvider] = pydantic.Field( - alias="identityProvider", description="Optional external Identity Provider (IdP) for the client application." + alias="identityProvider", + default=None, + description="Optional external Identity Provider (IdP) for the client application.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/clinical_impression.py b/src/metriport/fhir/types/clinical_impression.py index c1de0db..33edcba 100644 --- a/src/metriport/fhir/types/clinical_impression.py +++ b/src/metriport/fhir/types/clinical_impression.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,65 +27,83 @@ class ClinicalImpression(BaseResource): A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. """ - resource_type: typing_extensions.Literal["ClinicalImpression"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClinicalImpression"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", + ) + status: typing.Optional[Code] = pydantic.Field( + default=None, description="Identifies the workflow status of the assessment." ) - status: typing.Optional[Code] = pydantic.Field(description="Identifies the workflow status of the assessment.") status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the ClinicalImpression." + alias="statusReason", + default=None, + description="Captures the reason for the current state of the ClinicalImpression.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Categorizes the type of clinical assessment performed." + default=None, description="Categorizes the type of clinical assessment performed." ) description: typing.Optional[str] = pydantic.Field( - description="A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it." + default=None, + description="A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.", ) subject: Reference = pydantic.Field( description="The patient or group of individuals assessed as part of this record." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.", ) effective_date_time: typing.Optional[str] = pydantic.Field( - alias="effectiveDateTime", description="The point in time or period over which the subject was assessed." + alias="effectiveDateTime", + default=None, + description="The point in time or period over which the subject was assessed.", ) effective_period: typing.Optional[Period] = pydantic.Field( - alias="effectivePeriod", description="The point in time or period over which the subject was assessed." + alias="effectivePeriod", + default=None, + description="The point in time or period over which the subject was assessed.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="Indicates when the documentation of the assessment was complete." + default=None, description="Indicates when the documentation of the assessment was complete." + ) + assessor: typing.Optional[Reference] = pydantic.Field( + default=None, description="The clinician performing the assessment." ) - assessor: typing.Optional[Reference] = pydantic.Field(description="The clinician performing the assessment.") previous: typing.Optional[Reference] = pydantic.Field( - description="A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." + default=None, + description="A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", ) problem: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A list of the relevant problems/conditions for a patient." + default=None, description="A list of the relevant problems/conditions for a patient." ) investigation: typing.Optional[typing.List[ClinicalImpressionInvestigation]] = pydantic.Field( - description="One or more sets of investigations (signs, symptoms, etc.). The actual grouping of investigations varies greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." + default=None, + description="One or more sets of investigations (signs, symptoms, etc.). The actual grouping of investigations varies greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.", ) protocol: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." + default=None, + description="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.", ) summary: typing.Optional[str] = pydantic.Field( - description="A text summary of the investigations and the diagnosis." + default=None, description="A text summary of the investigations and the diagnosis." ) finding: typing.Optional[typing.List[ClinicalImpressionFinding]] = pydantic.Field( - description="Specific findings or diagnoses that were considered likely or relevant to ongoing treatment." + default=None, + description="Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.", ) prognosis_codeable_concept: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="prognosisCodeableConcept", description="Estimate of likely outcome." + alias="prognosisCodeableConcept", default=None, description="Estimate of likely outcome." ) prognosis_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="prognosisReference", description="RiskAssessment expressing likely outcome." + alias="prognosisReference", default=None, description="RiskAssessment expressing likely outcome." ) supporting_info: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="supportingInfo", description="Information supporting the clinical impression." + alias="supportingInfo", default=None, description="Information supporting the clinical impression." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear." + default=None, + description="Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/clinical_impression_finding.py b/src/metriport/fhir/types/clinical_impression_finding.py index 1f7fadd..9722f34 100644 --- a/src/metriport/fhir/types/clinical_impression_finding.py +++ b/src/metriport/fhir/types/clinical_impression_finding.py @@ -20,24 +20,31 @@ class ClinicalImpressionFinding(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="itemCodeableConcept", + default=None, description="Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.", ) item_reference: typing.Optional[Reference] = pydantic.Field( alias="itemReference", + default=None, description="Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.", ) - basis: typing.Optional[str] = pydantic.Field(description="Which investigations support finding or diagnosis.") + basis: typing.Optional[str] = pydantic.Field( + default=None, description="Which investigations support finding or diagnosis." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/clinical_impression_investigation.py b/src/metriport/fhir/types/clinical_impression_investigation.py index cb8d721..414ea0a 100644 --- a/src/metriport/fhir/types/clinical_impression_investigation.py +++ b/src/metriport/fhir/types/clinical_impression_investigation.py @@ -20,13 +20,16 @@ class ClinicalImpressionInvestigation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field( @@ -38,7 +41,7 @@ class ClinicalImpressionInvestigation(pydantic.BaseModel): ) ) item: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A record of a specific investigation that was undertaken." + default=None, description="A record of a specific investigation that was undertaken." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/code_system.py b/src/metriport/fhir/types/code_system.py index 93a32f0..08441d4 100644 --- a/src/metriport/fhir/types/code_system.py +++ b/src/metriport/fhir/types/code_system.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -34,88 +32,109 @@ class CodeSystem(BaseResource): The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content. """ - resource_type: typing_extensions.Literal["CodeSystem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CodeSystem"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system." + default=None, + description="An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version." + default=None, + description="The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the code system." + default=None, description="A short, descriptive, user-friendly title for the code system." ) status: typing.Optional[CodeSystemStatus] = pydantic.Field( - description="The date (and optionally time) when the code system resource was created or revised." + default=None, description="The date (and optionally time) when the code system resource was created or revised." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes." + default=None, + description="The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the code system." + default=None, description="The name of the organization or individual that published the code system." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the code system from a consumer's perspective." + default=None, + description="A free text natural language description of the code system from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the code system is intended to be used." + default=None, description="A legal or geographic region in which the code system is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this code system is needed and why it has been designed as it has." + default=None, + description="Explanation of why this code system is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system." + default=None, + description="A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", ) case_sensitive: typing.Optional[bool] = pydantic.Field( alias="caseSensitive", + default=None, description="If code comparison is case sensitive when codes within this system are compared to each other.", ) value_set: typing.Optional[Canonical] = pydantic.Field( - alias="valueSet", description="Canonical reference to the value set that contains the entire code system." + alias="valueSet", + default=None, + description="Canonical reference to the value set that contains the entire code system.", ) hierarchy_meaning: typing.Optional[CodeSystemHierarchyMeaning] = pydantic.Field( alias="hierarchyMeaning", + default=None, description="The meaning of the hierarchy of concepts as represented in this resource.", ) compositional: typing.Optional[bool] = pydantic.Field( - description="The code system defines a compositional (post-coordination) grammar." + default=None, description="The code system defines a compositional (post-coordination) grammar." ) version_needed: typing.Optional[bool] = pydantic.Field( alias="versionNeeded", + default=None, description="This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.", ) content: typing.Optional[CodeSystemContent] = pydantic.Field( - description="The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance." + default=None, + description="The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.", ) supplements: typing.Optional[Canonical] = pydantic.Field( - description="The canonical URL of the code system that this code system supplement is adding designations and properties to." + default=None, + description="The canonical URL of the code system that this code system supplement is adding designations and properties to.", ) count: typing.Optional[UnsignedInt] = pydantic.Field( - description="The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward." + default=None, + description="The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.", ) filter: typing.Optional[typing.List[CodeSystemFilter]] = pydantic.Field( - description="A filter that can be used in a value set compose statement when selecting concepts using a filter." + default=None, + description="A filter that can be used in a value set compose statement when selecting concepts using a filter.", ) property: typing.Optional[typing.List[CodeSystemProperty]] = pydantic.Field( - description="A property defines an additional slot through which additional information can be provided about a concept." + default=None, + description="A property defines an additional slot through which additional information can be provided about a concept.", ) concept: typing.Optional[typing.List[CodeSystemConcept]] = pydantic.Field( - description="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are." + default=None, + description="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/code_system_concept.py b/src/metriport/fhir/types/code_system_concept.py index ae61a09..e01da98 100644 --- a/src/metriport/fhir/types/code_system_concept.py +++ b/src/metriport/fhir/types/code_system_concept.py @@ -23,32 +23,40 @@ class CodeSystemConcept(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="A code - a text symbol - that uniquely identifies the concept within the code system." + default=None, + description="A code - a text symbol - that uniquely identifies the concept within the code system.", ) display: typing.Optional[str] = pydantic.Field( - description="A human readable string that is the recommended default way to present this concept to a user." + default=None, + description="A human readable string that is the recommended default way to present this concept to a user.", ) definition: typing.Optional[str] = pydantic.Field( - description="The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept." + default=None, + description="The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.", ) designation: typing.Optional[typing.List[CodeSystemDesignation]] = pydantic.Field( - description="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc." + default=None, + description="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.", ) property: typing.Optional[typing.List[CodeSystemProperty1]] = pydantic.Field( - description="A property value for this concept." + default=None, description="A property value for this concept." ) concept: typing.Optional[typing.List[CodeSystemConcept]] = pydantic.Field( - description="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning." + default=None, + description="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/code_system_designation.py b/src/metriport/fhir/types/code_system_designation.py index 3f20f34..3d93248 100644 --- a/src/metriport/fhir/types/code_system_designation.py +++ b/src/metriport/fhir/types/code_system_designation.py @@ -20,18 +20,25 @@ class CodeSystemDesignation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - language: typing.Optional[Code] = pydantic.Field(description="The language this designation is defined for.") - use: typing.Optional[Coding] = pydantic.Field(description="A code that details how this designation would be used.") - value: typing.Optional[str] = pydantic.Field(description="The text value for this designation.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The language this designation is defined for." + ) + use: typing.Optional[Coding] = pydantic.Field( + default=None, description="A code that details how this designation would be used." + ) + value: typing.Optional[str] = pydantic.Field(default=None, description="The text value for this designation.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/code_system_filter.py b/src/metriport/fhir/types/code_system_filter.py index 8fe3705..02e16fe 100644 --- a/src/metriport/fhir/types/code_system_filter.py +++ b/src/metriport/fhir/types/code_system_filter.py @@ -19,24 +19,30 @@ class CodeSystemFilter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter." + default=None, + description="The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter.", + ) + description: typing.Optional[str] = pydantic.Field( + default=None, description="A description of how or why the filter is used." ) - description: typing.Optional[str] = pydantic.Field(description="A description of how or why the filter is used.") operator: typing.Optional[typing.List[Code]] = pydantic.Field( - description="A list of operators that can be used with the filter." + default=None, description="A list of operators that can be used with the filter." ) value: typing.Optional[str] = pydantic.Field( - description="A description of what the value for the filter should be." + default=None, description="A description of what the value for the filter should be." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/code_system_property.py b/src/metriport/fhir/types/code_system_property.py index df7b0e4..699a651 100644 --- a/src/metriport/fhir/types/code_system_property.py +++ b/src/metriport/fhir/types/code_system_property.py @@ -21,26 +21,32 @@ class CodeSystemProperty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters." + default=None, + description="A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.", ) uri: typing.Optional[Uri] = pydantic.Field( - description="Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system." + default=None, + description="Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.", ) description: typing.Optional[str] = pydantic.Field( - description="A description of the property- why it is defined, and how its value might be used." + default=None, description="A description of the property- why it is defined, and how its value might be used." ) type: typing.Optional[CodeSystemPropertyType] = pydantic.Field( - description='The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept).' + default=None, + description='The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept).', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/code_system_property_1.py b/src/metriport/fhir/types/code_system_property_1.py index c860e66..c987c3a 100644 --- a/src/metriport/fhir/types/code_system_property_1.py +++ b/src/metriport/fhir/types/code_system_property_1.py @@ -20,32 +20,41 @@ class CodeSystemProperty1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[Code] = pydantic.Field(description="A code that is a reference to CodeSystem.property.code.") - value_code: typing.Optional[str] = pydantic.Field(alias="valueCode", description="The value of this property.") + code: typing.Optional[Code] = pydantic.Field( + default=None, description="A code that is a reference to CodeSystem.property.code." + ) + value_code: typing.Optional[str] = pydantic.Field( + alias="valueCode", default=None, description="The value of this property." + ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="The value of this property." + alias="valueCoding", default=None, description="The value of this property." + ) + value_string: typing.Optional[str] = pydantic.Field( + alias="valueString", default=None, description="The value of this property." ) - value_string: typing.Optional[str] = pydantic.Field(alias="valueString", description="The value of this property.") value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="The value of this property." + alias="valueInteger", default=None, description="The value of this property." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of this property." + alias="valueBoolean", default=None, description="The value of this property." ) value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="The value of this property." + alias="valueDateTime", default=None, description="The value of this property." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="The value of this property." + alias="valueDecimal", default=None, description="The value of this property." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/codeable_concept.py b/src/metriport/fhir/types/codeable_concept.py index d202983..7bcf9d8 100644 --- a/src/metriport/fhir/types/codeable_concept.py +++ b/src/metriport/fhir/types/codeable_concept.py @@ -19,16 +19,19 @@ class CodeableConcept(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) coding: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="A reference to a code defined by a terminology system." + default=None, description="A reference to a code defined by a terminology system." ) text: typing.Optional[str] = pydantic.Field( - description="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." + default=None, + description="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coding.py b/src/metriport/fhir/types/coding.py index 133e058..0e65539 100644 --- a/src/metriport/fhir/types/coding.py +++ b/src/metriport/fhir/types/coding.py @@ -21,25 +21,32 @@ class Coding(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the code system that defines the meaning of the symbol in the code." + default=None, + description="The identification of the code system that defines the meaning of the symbol in the code.", ) version: typing.Optional[str] = pydantic.Field( - description="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." + default=None, + description="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", ) code: typing.Optional[Code] = pydantic.Field( - description="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." + default=None, + description="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", ) display: typing.Optional[str] = pydantic.Field( - description="A representation of the meaning of the code in the system, following the rules of the system." + default=None, + description="A representation of the meaning of the code in the system, following the rules of the system.", ) user_selected: typing.Optional[bool] = pydantic.Field( alias="userSelected", + default=None, description="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", ) diff --git a/src/metriport/fhir/types/communication.py b/src/metriport/fhir/types/communication.py index 199e1b6..44d0f83 100644 --- a/src/metriport/fhir/types/communication.py +++ b/src/metriport/fhir/types/communication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,73 +26,91 @@ class Communication(BaseResource): An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition. """ - resource_type: typing_extensions.Literal["Communication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Communication"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="An order, proposal or plan fulfilled in whole or in part by this Communication." + alias="basedOn", + default=None, + description="An order, proposal or plan fulfilled in whole or in part by this Communication.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="Part of this action." + alias="partOf", default=None, description="Part of this action." ) in_response_to: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="inResponseTo", description="Prior communication that this communication is in response to." + alias="inResponseTo", default=None, description="Prior communication that this communication is in response to." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the transmission.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the transmission.") status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the Communication." + alias="statusReason", + default=None, + description="Captures the reason for the current state of the Communication.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The type of message conveyed such as alert, notification, reminder, instruction, etc." + default=None, + description="The type of message conveyed such as alert, notification, reminder, instruction, etc.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine." + default=None, + description="Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.", ) medium: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A channel that was used for this communication (e.g. email, fax)." + default=None, description="A channel that was used for this communication (e.g. email, fax)." ) subject: typing.Optional[Reference] = pydantic.Field( - description="The patient or group that was the focus of this communication." + default=None, description="The patient or group that was the focus of this communication." ) topic: typing.Optional[CodeableConcept] = pydantic.Field( - description="Description of the purpose/content, similar to a subject line in an email." + default=None, description="Description of the purpose/content, similar to a subject line in an email." ) about: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Other resources that pertain to this communication and to which this communication should be associated." + default=None, + description="Other resources that pertain to this communication and to which this communication should be associated.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this Communication was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this Communication was created or to which the creation of this record is tightly associated.", + ) + sent: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The time when this communication was sent." ) - sent: typing.Optional[DateTime] = pydantic.Field(description="The time when this communication was sent.") received: typing.Optional[DateTime] = pydantic.Field( - description="The time when this communication arrived at the destination." + default=None, description="The time when this communication arrived at the destination." ) recipient: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient. Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time)." + default=None, + description="The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient. Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).", ) sender: typing.Optional[Reference] = pydantic.Field( - description="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication." + default=None, + description="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="The reason or justification for the communication." + alias="reasonCode", default=None, description="The reason or justification for the communication." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Indicates another resource whose existence justifies this communication." + alias="reasonReference", + default=None, + description="Indicates another resource whose existence justifies this communication.", ) payload: typing.Optional[typing.List[CommunicationPayload]] = pydantic.Field( - description="Text, attachment(s), or resource(s) that was communicated to the recipient." + default=None, description="Text, attachment(s), or resource(s) that was communicated to the recipient." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Additional notes or commentary about the communication by the sender, receiver or other interested parties." + default=None, + description="Additional notes or commentary about the communication by the sender, receiver or other interested parties.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/communication_payload.py b/src/metriport/fhir/types/communication_payload.py index f9bc4b2..33891db 100644 --- a/src/metriport/fhir/types/communication_payload.py +++ b/src/metriport/fhir/types/communication_payload.py @@ -20,25 +20,31 @@ class CommunicationPayload(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) content_string: typing.Optional[str] = pydantic.Field( alias="contentString", + default=None, description="A communicated content (or for multi-part communications, one portion of the communication).", ) content_attachment: typing.Optional[Attachment] = pydantic.Field( alias="contentAttachment", + default=None, description="A communicated content (or for multi-part communications, one portion of the communication).", ) content_reference: typing.Optional[Reference] = pydantic.Field( alias="contentReference", + default=None, description="A communicated content (or for multi-part communications, one portion of the communication).", ) diff --git a/src/metriport/fhir/types/communication_request.py b/src/metriport/fhir/types/communication_request.py index 08dd6a2..fcacf33 100644 --- a/src/metriport/fhir/types/communication_request.py +++ b/src/metriport/fhir/types/communication_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,76 +25,96 @@ class CommunicationRequest(BaseResource): A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. """ - resource_type: typing_extensions.Literal["CommunicationRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CommunicationRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A plan or proposal that is fulfilled in whole or in part by this request." + alias="basedOn", + default=None, + description="A plan or proposal that is fulfilled in whole or in part by this request.", ) replaces: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Completed or terminated request(s) whose function is taken by this new request." + default=None, description="Completed or terminated request(s) whose function is taken by this new request." ) group_identifier: typing.Optional[Identifier] = pydantic.Field( alias="groupIdentifier", + default=None, description="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the proposal or order.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the proposal or order.") status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the CommunicationRequest." + alias="statusReason", + default=None, + description="Captures the reason for the current state of the CommunicationRequest.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The type of message to be sent such as alert, notification, reminder, instruction, etc." + default=None, + description="The type of message to be sent such as alert, notification, reminder, instruction, etc.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." + default=None, + description="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", ) do_not_perform: typing.Optional[bool] = pydantic.Field( alias="doNotPerform", + default=None, description="If true indicates that the CommunicationRequest is asking for the specified action to _not_ occur.", ) medium: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A channel that was used for this communication (e.g. email, fax)." + default=None, description="A channel that was used for this communication (e.g. email, fax)." ) subject: typing.Optional[Reference] = pydantic.Field( - description="The patient or group that is the focus of this communication request." + default=None, description="The patient or group that is the focus of this communication request." ) about: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Other resources that pertain to this communication request and to which this communication request should be associated." + default=None, + description="Other resources that pertain to this communication request and to which this communication request should be associated.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.", ) payload: typing.Optional[typing.List[CommunicationRequestPayload]] = pydantic.Field( - description="Text, attachment(s), or resource(s) to be communicated to the recipient." + default=None, description="Text, attachment(s), or resource(s) to be communicated to the recipient." ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="The time when this communication is to occur." + alias="occurrenceDateTime", default=None, description="The time when this communication is to occur." ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="The time when this communication is to occur." + alias="occurrencePeriod", default=None, description="The time when this communication is to occur." ) authored_on: typing.Optional[DateTime] = pydantic.Field( alias="authoredOn", + default=None, description="For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.", ) requester: typing.Optional[Reference] = pydantic.Field( - description="The device, individual, or organization who initiated the request and has responsibility for its activation." + default=None, + description="The device, individual, or organization who initiated the request and has responsibility for its activation.", ) recipient: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication." + default=None, + description="The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.", ) sender: typing.Optional[Reference] = pydantic.Field( - description="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication." + default=None, + description="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes why the request is being made in coded or textual form." + alias="reasonCode", + default=None, + description="Describes why the request is being made in coded or textual form.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Indicates another resource whose existence justifies this request." + alias="reasonReference", + default=None, + description="Indicates another resource whose existence justifies this request.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the request by the requester, sender, recipient, subject or other participants." + default=None, + description="Comments made about the request by the requester, sender, recipient, subject or other participants.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/communication_request_payload.py b/src/metriport/fhir/types/communication_request_payload.py index de4473f..2097639 100644 --- a/src/metriport/fhir/types/communication_request_payload.py +++ b/src/metriport/fhir/types/communication_request_payload.py @@ -20,25 +20,31 @@ class CommunicationRequestPayload(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) content_string: typing.Optional[str] = pydantic.Field( alias="contentString", + default=None, description="The communicated content (or for multi-part communications, one portion of the communication).", ) content_attachment: typing.Optional[Attachment] = pydantic.Field( alias="contentAttachment", + default=None, description="The communicated content (or for multi-part communications, one portion of the communication).", ) content_reference: typing.Optional[Reference] = pydantic.Field( alias="contentReference", + default=None, description="The communicated content (or for multi-part communications, one portion of the communication).", ) diff --git a/src/metriport/fhir/types/compartment_definition.py b/src/metriport/fhir/types/compartment_definition.py index 5c9194f..be9553f 100644 --- a/src/metriport/fhir/types/compartment_definition.py +++ b/src/metriport/fhir/types/compartment_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .compartment_definition_code import CompartmentDefinitionCode @@ -27,47 +25,57 @@ class CompartmentDefinition(BaseResource): A compartment definition that defines how resources are accessed on a server. """ - resource_type: typing_extensions.Literal["CompartmentDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CompartmentDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) status: typing.Optional[CompartmentDefinitionStatus] = pydantic.Field( - description="The status of this compartment definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this compartment definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes." + default=None, + description="The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the compartment definition." + default=None, + description="The name of the organization or individual that published the compartment definition.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the compartment definition from a consumer's perspective." + default=None, + description="A free text natural language description of the compartment definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this compartment definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this compartment definition is needed and why it has been designed as it has.", ) code: typing.Optional[CompartmentDefinitionCode] = pydantic.Field( - description="Which compartment this definition describes." + default=None, description="Which compartment this definition describes." ) - search: typing.Optional[bool] = pydantic.Field(description="Whether the search syntax is supported,.") + search: typing.Optional[bool] = pydantic.Field(default=None, description="Whether the search syntax is supported,.") resource: typing.Optional[typing.List[CompartmentDefinitionResource]] = pydantic.Field( - description="Information about how a resource is related to the compartment." + default=None, description="Information about how a resource is related to the compartment." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/compartment_definition_resource.py b/src/metriport/fhir/types/compartment_definition_resource.py index 72a2d46..3b79789 100644 --- a/src/metriport/fhir/types/compartment_definition_resource.py +++ b/src/metriport/fhir/types/compartment_definition_resource.py @@ -19,21 +19,27 @@ class CompartmentDefinitionResource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[Code] = pydantic.Field(description="The name of a resource supported by the server.") + code: typing.Optional[Code] = pydantic.Field( + default=None, description="The name of a resource supported by the server." + ) param: typing.Optional[typing.List[str]] = pydantic.Field( - description="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,." + default=None, + description="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.", ) documentation: typing.Optional[str] = pydantic.Field( - description="Additional documentation about the resource and compartment." + default=None, description="Additional documentation about the resource and compartment." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/composition.py b/src/metriport/fhir/types/composition.py index 701d775..c8e182b 100644 --- a/src/metriport/fhir/types/composition.py +++ b/src/metriport/fhir/types/composition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,50 +27,60 @@ class Composition(BaseResource): A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.). """ - resource_type: typing_extensions.Literal["Composition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Composition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time." + default=None, + description="A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.", ) status: typing.Optional[CompositionStatus] = pydantic.Field( - description="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." + default=None, + description="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", ) type: CodeableConcept = pydantic.Field( description="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." + default=None, + description="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", ) subject: typing.Optional[Reference] = pydantic.Field( - description="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." + default=None, + description="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="Describes the clinical encounter or type of care this documentation is associated with." + default=None, + description="Describes the clinical encounter or type of care this documentation is associated with.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The composition editing time, when the composition was last logically changed by the author." + default=None, + description="The composition editing time, when the composition was last logically changed by the author.", ) author: typing.List[Reference] = pydantic.Field( description="Identifies who is responsible for the information in the composition, not necessarily who typed it in." ) - title: typing.Optional[str] = pydantic.Field(description="Official human-readable label for the composition.") + title: typing.Optional[str] = pydantic.Field( + default=None, description="Official human-readable label for the composition." + ) confidentiality: typing.Optional[Code] = pydantic.Field( - description="The code specifying the level of confidentiality of the Composition." + default=None, description="The code specifying the level of confidentiality of the Composition." ) attester: typing.Optional[typing.List[CompositionAttester]] = pydantic.Field( - description="A participant who has attested to the accuracy of the composition/document." + default=None, description="A participant who has attested to the accuracy of the composition/document." ) custodian: typing.Optional[Reference] = pydantic.Field( - description="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." + default=None, + description="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", ) relates_to: typing.Optional[typing.List[CompositionRelatesTo]] = pydantic.Field( alias="relatesTo", + default=None, description="Relationships that this composition has with other compositions or documents that already exist.", ) event: typing.Optional[typing.List[CompositionEvent]] = pydantic.Field( - description="The clinical service, such as a colonoscopy or an appendectomy, being documented." + default=None, description="The clinical service, such as a colonoscopy or an appendectomy, being documented." ) section: typing.Optional[typing.List[CompositionSection]] = pydantic.Field( - description="The root of the sections that make up the composition." + default=None, description="The root of the sections that make up the composition." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/composition_attester.py b/src/metriport/fhir/types/composition_attester.py index f6b557a..f561c83 100644 --- a/src/metriport/fhir/types/composition_attester.py +++ b/src/metriport/fhir/types/composition_attester.py @@ -21,20 +21,27 @@ class CompositionAttester(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[CompositionAttesterMode] = pydantic.Field( - description="The type of attestation the authenticator offers." + default=None, description="The type of attestation the authenticator offers." + ) + time: typing.Optional[DateTime] = pydantic.Field( + default=None, description="When the composition was attested by the party." + ) + party: typing.Optional[Reference] = pydantic.Field( + default=None, description="Who attested the composition in the specified way." ) - time: typing.Optional[DateTime] = pydantic.Field(description="When the composition was attested by the party.") - party: typing.Optional[Reference] = pydantic.Field(description="Who attested the composition in the specified way.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/composition_event.py b/src/metriport/fhir/types/composition_event.py index 51bb796..3a544b0 100644 --- a/src/metriport/fhir/types/composition_event.py +++ b/src/metriport/fhir/types/composition_event.py @@ -21,23 +21,29 @@ class CompositionEvent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.' + default=None, + description='This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.', ) period: typing.Optional[Period] = pydantic.Field( - description="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time." + default=None, + description="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", ) detail: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy." + default=None, + description="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/composition_relates_to.py b/src/metriport/fhir/types/composition_relates_to.py index 1c5b94f..131937d 100644 --- a/src/metriport/fhir/types/composition_relates_to.py +++ b/src/metriport/fhir/types/composition_relates_to.py @@ -21,23 +21,27 @@ class CompositionRelatesTo(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="The type of relationship that this composition has with anther composition or document." + default=None, + description="The type of relationship that this composition has with anther composition or document.", ) target_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="targetIdentifier", description="The target composition/document of this relationship." + alias="targetIdentifier", default=None, description="The target composition/document of this relationship." ) target_reference: typing.Optional[Reference] = pydantic.Field( - alias="targetReference", description="The target composition/document of this relationship." + alias="targetReference", default=None, description="The target composition/document of this relationship." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/composition_section.py b/src/metriport/fhir/types/composition_section.py index d2b067c..f6b575e 100644 --- a/src/metriport/fhir/types/composition_section.py +++ b/src/metriport/fhir/types/composition_section.py @@ -24,45 +24,56 @@ class CompositionSection(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) title: typing.Optional[str] = pydantic.Field( - description="The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents." + default=None, + description="The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code identifying the kind of content contained within the section. This must be consistent with the section title." + default=None, + description="A code identifying the kind of content contained within the section. This must be consistent with the section title.", ) author: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies who is responsible for the information in this section, not necessarily who typed it in." + default=None, + description="Identifies who is responsible for the information in this section, not necessarily who typed it in.", ) focus: typing.Optional[Reference] = pydantic.Field( - description="The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources)." + default=None, + description="The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).", ) text: typing.Optional[Narrative] = pydantic.Field( - description='A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.' + default=None, + description='A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.', ) mode: typing.Optional[Code] = pydantic.Field( - description="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." + default=None, + description="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", ) ordered_by: typing.Optional[CodeableConcept] = pydantic.Field( - alias="orderedBy", description="Specifies the order applied to the items in the section entries." + alias="orderedBy", default=None, description="Specifies the order applied to the items in the section entries." ) entry: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A reference to the actual resource from which the narrative in the section is derived." + default=None, + description="A reference to the actual resource from which the narrative in the section is derived.", ) empty_reason: typing.Optional[CodeableConcept] = pydantic.Field( alias="emptyReason", + default=None, description="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", ) section: typing.Optional[typing.List[CompositionSection]] = pydantic.Field( - description="A nested sub-section within this section." + default=None, description="A nested sub-section within this section." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map.py b/src/metriport/fhir/types/concept_map.py index 5fb7146..a90fa92 100644 --- a/src/metriport/fhir/types/concept_map.py +++ b/src/metriport/fhir/types/concept_map.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -28,71 +26,85 @@ class ConceptMap(BaseResource): A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models. """ - resource_type: typing_extensions.Literal["ConceptMap"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ConceptMap"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers." + default=None, + description="An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the concept map." + default=None, description="A short, descriptive, user-friendly title for the concept map." ) status: typing.Optional[ConceptMapStatus] = pydantic.Field( - description="The status of this concept map. Enables tracking the life-cycle of the content." + default=None, description="The status of this concept map. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes." + default=None, + description="The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the concept map." + default=None, description="The name of the organization or individual that published the concept map." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the concept map from a consumer's perspective." + default=None, + description="A free text natural language description of the concept map from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the concept map is intended to be used." + default=None, description="A legal or geographic region in which the concept map is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this concept map is needed and why it has been designed as it has." + default=None, + description="Explanation of why this concept map is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map." + default=None, + description="A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.", ) source_uri: typing.Optional[str] = pydantic.Field( alias="sourceUri", + default=None, description="Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", ) source_canonical: typing.Optional[str] = pydantic.Field( alias="sourceCanonical", + default=None, description="Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", ) target_uri: typing.Optional[str] = pydantic.Field( alias="targetUri", + default=None, description="The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", ) target_canonical: typing.Optional[str] = pydantic.Field( alias="targetCanonical", + default=None, description="The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", ) group: typing.Optional[typing.List[ConceptMapGroup]] = pydantic.Field( - description="A group of mappings that all have the same source and target system." + default=None, description="A group of mappings that all have the same source and target system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map_depends_on.py b/src/metriport/fhir/types/concept_map_depends_on.py index cec76da..037fe44 100644 --- a/src/metriport/fhir/types/concept_map_depends_on.py +++ b/src/metriport/fhir/types/concept_map_depends_on.py @@ -20,26 +20,33 @@ class ConceptMapDependsOn(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) property: typing.Optional[Uri] = pydantic.Field( - description="A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property." + default=None, + description="A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.", ) system: typing.Optional[Canonical] = pydantic.Field( - description="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)." + default=None, + description="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", ) value: typing.Optional[str] = pydantic.Field( - description="Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to." + default=None, + description="Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.", ) display: typing.Optional[str] = pydantic.Field( - description="The display for the code. The display is only provided to help editors when editing the concept map." + default=None, + description="The display for the code. The display is only provided to help editors when editing the concept map.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map_element.py b/src/metriport/fhir/types/concept_map_element.py index b112739..63c109b 100644 --- a/src/metriport/fhir/types/concept_map_element.py +++ b/src/metriport/fhir/types/concept_map_element.py @@ -20,23 +20,27 @@ class ConceptMapElement(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="Identity (code or path) or the element/item being mapped." + default=None, description="Identity (code or path) or the element/item being mapped." ) display: typing.Optional[str] = pydantic.Field( - description="The display for the code. The display is only provided to help editors when editing the concept map." + default=None, + description="The display for the code. The display is only provided to help editors when editing the concept map.", ) target: typing.Optional[typing.List[ConceptMapTarget]] = pydantic.Field( - description="A concept from the target value set that this concept maps to." + default=None, description="A concept from the target value set that this concept maps to." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map_group.py b/src/metriport/fhir/types/concept_map_group.py index a3a5ac5..2d33f83 100644 --- a/src/metriport/fhir/types/concept_map_group.py +++ b/src/metriport/fhir/types/concept_map_group.py @@ -21,34 +21,42 @@ class ConceptMapGroup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) source: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that identifies the source system where the concepts to be mapped are defined." + default=None, + description="An absolute URI that identifies the source system where the concepts to be mapped are defined.", ) source_version: typing.Optional[str] = pydantic.Field( alias="sourceVersion", + default=None, description="The specific version of the code system, as determined by the code system authority.", ) target: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that identifies the target system that the concepts will be mapped to." + default=None, + description="An absolute URI that identifies the target system that the concepts will be mapped to.", ) target_version: typing.Optional[str] = pydantic.Field( alias="targetVersion", + default=None, description="The specific version of the code system, as determined by the code system authority.", ) element: typing.List[ConceptMapElement] = pydantic.Field( description="Mappings for an individual concept in the source to one or more concepts in the target." ) unmapped: typing.Optional[ConceptMapUnmapped] = pydantic.Field( - description='What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.' + default=None, + description='What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map_target.py b/src/metriport/fhir/types/concept_map_target.py index 1ec44ce..ebe0f67 100644 --- a/src/metriport/fhir/types/concept_map_target.py +++ b/src/metriport/fhir/types/concept_map_target.py @@ -21,33 +21,41 @@ class ConceptMapTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="Identity (code or path) or the element/item that the map refers to." + default=None, description="Identity (code or path) or the element/item that the map refers to." ) display: typing.Optional[str] = pydantic.Field( - description="The display for the code. The display is only provided to help editors when editing the concept map." + default=None, + description="The display for the code. The display is only provided to help editors when editing the concept map.", ) equivalence: typing.Optional[ConceptMapTargetEquivalence] = pydantic.Field( - description="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." + default=None, + description="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", ) comment: typing.Optional[str] = pydantic.Field( - description="A description of status/issues in mapping that conveys additional information not represented in the structured data." + default=None, + description="A description of status/issues in mapping that conveys additional information not represented in the structured data.", ) depends_on: typing.Optional[typing.List[ConceptMapDependsOn]] = pydantic.Field( alias="dependsOn", + default=None, description="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", ) product: typing.Optional[typing.List[ConceptMapDependsOn]] = pydantic.Field( - description="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." + default=None, + description="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/concept_map_unmapped.py b/src/metriport/fhir/types/concept_map_unmapped.py index a3ffd95..39e1799 100644 --- a/src/metriport/fhir/types/concept_map_unmapped.py +++ b/src/metriport/fhir/types/concept_map_unmapped.py @@ -21,26 +21,33 @@ class ConceptMapUnmapped(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) mode: typing.Optional[ConceptMapUnmappedMode] = pydantic.Field( - description="Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL)." + default=None, + description="Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).", ) code: typing.Optional[Code] = pydantic.Field( - description="The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code." + default=None, + description="The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", ) display: typing.Optional[str] = pydantic.Field( - description="The display for the code. The display is only provided to help editors when editing the concept map." + default=None, + description="The display for the code. The display is only provided to help editors when editing the concept map.", ) url: typing.Optional[Canonical] = pydantic.Field( - description="The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept." + default=None, + description="The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/condition.py b/src/metriport/fhir/types/condition.py index 849c071..600a0af 100644 --- a/src/metriport/fhir/types/condition.py +++ b/src/metriport/fhir/types/condition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -29,93 +27,110 @@ class Condition(BaseResource): A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. """ - resource_type: typing_extensions.Literal["Condition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Condition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) clinical_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="clinicalStatus", description="The clinical status of the condition." + alias="clinicalStatus", default=None, description="The clinical status of the condition." ) verification_status: typing.Optional[CodeableConcept] = pydantic.Field( alias="verificationStatus", + default=None, description="The verification status to support the clinical status of the condition.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A category assigned to the condition." + default=None, description="A category assigned to the condition." ) severity: typing.Optional[CodeableConcept] = pydantic.Field( - description="A subjective assessment of the severity of the condition as evaluated by the clinician." + default=None, + description="A subjective assessment of the severity of the condition as evaluated by the clinician.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Identification of the condition, problem or diagnosis." + default=None, description="Identification of the condition, problem or diagnosis." ) body_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="bodySite", description="The anatomical location where this condition manifests itself." + alias="bodySite", default=None, description="The anatomical location where this condition manifests itself." ) subject: Reference = pydantic.Field( description="Indicates the patient or group who the condition record is associated with." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this Condition was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this Condition was created or to which the creation of this record is tightly associated.", ) onset_date_time: typing.Optional[str] = pydantic.Field( alias="onsetDateTime", + default=None, description="Estimated or actual date or date-time the condition began, in the opinion of the clinician.", ) onset_age: typing.Optional[Age] = pydantic.Field( alias="onsetAge", + default=None, description="Estimated or actual date or date-time the condition began, in the opinion of the clinician.", ) onset_period: typing.Optional[Period] = pydantic.Field( alias="onsetPeriod", + default=None, description="Estimated or actual date or date-time the condition began, in the opinion of the clinician.", ) onset_range: typing.Optional[Range] = pydantic.Field( alias="onsetRange", + default=None, description="Estimated or actual date or date-time the condition began, in the opinion of the clinician.", ) onset_string: typing.Optional[str] = pydantic.Field( alias="onsetString", + default=None, description="Estimated or actual date or date-time the condition began, in the opinion of the clinician.", ) abatement_date_time: typing.Optional[str] = pydantic.Field( alias="abatementDateTime", + default=None, description='The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.', ) abatement_age: typing.Optional[Age] = pydantic.Field( alias="abatementAge", + default=None, description='The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.', ) abatement_period: typing.Optional[Period] = pydantic.Field( alias="abatementPeriod", + default=None, description='The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.', ) abatement_range: typing.Optional[Range] = pydantic.Field( alias="abatementRange", + default=None, description='The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.', ) abatement_string: typing.Optional[str] = pydantic.Field( alias="abatementString", + default=None, description='The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.', ) recorded_date: typing.Optional[DateTime] = pydantic.Field( alias="recordedDate", + default=None, description="The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.", ) recorder: typing.Optional[Reference] = pydantic.Field( - description="Individual who recorded the record and takes responsibility for its content." + default=None, description="Individual who recorded the record and takes responsibility for its content." ) asserter: typing.Optional[Reference] = pydantic.Field( - description="Individual who is making the condition statement." + default=None, description="Individual who is making the condition statement." ) stage: typing.Optional[typing.List[ConditionStage]] = pydantic.Field( - description="Clinical stage or grade of a condition. May include formal severity assessments." + default=None, description="Clinical stage or grade of a condition. May include formal severity assessments." ) evidence: typing.Optional[typing.List[ConditionEvidence]] = pydantic.Field( - description="Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition." + default=None, + description="Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." + default=None, + description="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/condition_evidence.py b/src/metriport/fhir/types/condition_evidence.py index 66505d0..d32be6d 100644 --- a/src/metriport/fhir/types/condition_evidence.py +++ b/src/metriport/fhir/types/condition_evidence.py @@ -20,20 +20,23 @@ class ConditionEvidence(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A manifestation or symptom that led to the recording of this condition." + default=None, description="A manifestation or symptom that led to the recording of this condition." ) detail: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Links to other relevant information, including pathology reports." + default=None, description="Links to other relevant information, including pathology reports." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/condition_stage.py b/src/metriport/fhir/types/condition_stage.py index 98c21f1..c862fec 100644 --- a/src/metriport/fhir/types/condition_stage.py +++ b/src/metriport/fhir/types/condition_stage.py @@ -20,23 +20,28 @@ class ConditionStage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) summary: typing.Optional[CodeableConcept] = pydantic.Field( - description='A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.' + default=None, + description='A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.', ) assessment: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to a formal record of the evidence on which the staging assessment is based." + default=None, + description="Reference to a formal record of the evidence on which the staging assessment is based.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of staging, such as pathological or clinical staging." + default=None, description="The kind of staging, such as pathological or clinical staging." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/consent.py b/src/metriport/fhir/types/consent.py index 603ea9b..855f57d 100644 --- a/src/metriport/fhir/types/consent.py +++ b/src/metriport/fhir/types/consent.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -28,11 +26,13 @@ class Consent(BaseResource): A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. """ - resource_type: typing_extensions.Literal["Consent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Consent"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique identifier for this copy of the Consent Statement." + default=None, description="Unique identifier for this copy of the Consent Statement." + ) + status: typing.Optional[ConsentStatus] = pydantic.Field( + default=None, description="Indicates the current state of this consent." ) - status: typing.Optional[ConsentStatus] = pydantic.Field(description="Indicates the current state of this consent.") scope: CodeableConcept = pydantic.Field( description="A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible." ) @@ -40,36 +40,45 @@ class Consent(BaseResource): description="A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements." ) patient: typing.Optional[Reference] = pydantic.Field( - description="The patient/healthcare consumer to whom this consent applies." + default=None, description="The patient/healthcare consumer to whom this consent applies." ) date_time: typing.Optional[DateTime] = pydantic.Field( - alias="dateTime", description="When this Consent was issued / created / indexed." + alias="dateTime", default=None, description="When this Consent was issued / created / indexed." ) performer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions." + default=None, + description="Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.", ) organization: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The organization that manages the consent, and the framework within which it is executed." + default=None, + description="The organization that manages the consent, and the framework within which it is executed.", ) source_attachment: typing.Optional[Attachment] = pydantic.Field( alias="sourceAttachment", + default=None, description="The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", ) source_reference: typing.Optional[Reference] = pydantic.Field( alias="sourceReference", + default=None, description="The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", ) policy: typing.Optional[typing.List[ConsentPolicy]] = pydantic.Field( - description="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." + default=None, + description="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", ) policy_rule: typing.Optional[CodeableConcept] = pydantic.Field( - alias="policyRule", description="A reference to the specific base computable regulation or policy." + alias="policyRule", + default=None, + description="A reference to the specific base computable regulation or policy.", ) verification: typing.Optional[typing.List[ConsentVerification]] = pydantic.Field( - description="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person." + default=None, + description="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.", ) provision: typing.Optional[ConsentProvision] = pydantic.Field( - description="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." + default=None, + description="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/consent_actor.py b/src/metriport/fhir/types/consent_actor.py index b59f68a..c3c1a72 100644 --- a/src/metriport/fhir/types/consent_actor.py +++ b/src/metriport/fhir/types/consent_actor.py @@ -20,13 +20,16 @@ class ConsentActor(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) role: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/consent_data.py b/src/metriport/fhir/types/consent_data.py index ed00604..be87acd 100644 --- a/src/metriport/fhir/types/consent_data.py +++ b/src/metriport/fhir/types/consent_data.py @@ -20,17 +20,20 @@ class ConsentData(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) meaning: typing.Optional[ConsentDataMeaning] = pydantic.Field( - description="How the resource reference is interpreted when testing consent restrictions." + default=None, description="How the resource reference is interpreted when testing consent restrictions." ) reference: Reference = pydantic.Field( description="A reference to a specific resource that defines which resources are covered by this consent." diff --git a/src/metriport/fhir/types/consent_policy.py b/src/metriport/fhir/types/consent_policy.py index 406df6f..5de8d77 100644 --- a/src/metriport/fhir/types/consent_policy.py +++ b/src/metriport/fhir/types/consent_policy.py @@ -19,20 +19,25 @@ class ConsentPolicy(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) authority: typing.Optional[Uri] = pydantic.Field( - description="Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives." + default=None, + description="Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.", ) uri: typing.Optional[Uri] = pydantic.Field( - description="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." + default=None, + description="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/consent_provision.py b/src/metriport/fhir/types/consent_provision.py index 8e7dcb1..1e618f3 100644 --- a/src/metriport/fhir/types/consent_provision.py +++ b/src/metriport/fhir/types/consent_provision.py @@ -26,48 +26,57 @@ class ConsentProvision(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[ConsentProvisionType] = pydantic.Field( - description="Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules." + default=None, + description="Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.", ) - period: typing.Optional[Period] = pydantic.Field(description="The timeframe in this rule is valid.") + period: typing.Optional[Period] = pydantic.Field(default=None, description="The timeframe in this rule is valid.") actor: typing.Optional[typing.List[ConsentActor]] = pydantic.Field( - description="Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')." + default=None, + description="Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", ) action: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Actions controlled by this Rule." + default=None, description="Actions controlled by this Rule." ) security_label: typing.Optional[typing.List[Coding]] = pydantic.Field( alias="securityLabel", + default=None, description="A security label, comprised of 0..\* security label fields (Privacy tags), which define which resources are controlled by this exception.", ) purpose: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule." + default=None, + description="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", ) class_: typing.Optional[typing.List[Coding]] = pydantic.Field( alias="class", + default=None, description="The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="If this code is found in an instance, then the rule applies." + default=None, description="If this code is found in an instance, then the rule applies." ) data_period: typing.Optional[Period] = pydantic.Field( alias="dataPeriod", + default=None, description="Clinical or Operational Relevant period of time that bounds the data controlled by this rule.", ) data: typing.Optional[typing.List[ConsentData]] = pydantic.Field( - description="The resources controlled by this rule if specific resources are referenced." + default=None, description="The resources controlled by this rule if specific resources are referenced." ) provision: typing.Optional[typing.List[ConsentProvision]] = pydantic.Field( - description="Rules which provide exceptions to the base rule or subrules." + default=None, description="Rules which provide exceptions to the base rule or subrules." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/consent_verification.py b/src/metriport/fhir/types/consent_verification.py index e63507d..79ad376 100644 --- a/src/metriport/fhir/types/consent_verification.py +++ b/src/metriport/fhir/types/consent_verification.py @@ -20,21 +20,26 @@ class ConsentVerification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - verified: typing.Optional[bool] = pydantic.Field(description="Has the instruction been verified.") + verified: typing.Optional[bool] = pydantic.Field(default=None, description="Has the instruction been verified.") verified_with: typing.Optional[Reference] = pydantic.Field( - alias="verifiedWith", description="Who verified the instruction (Patient, Relative or other Authorized Person)." + alias="verifiedWith", + default=None, + description="Who verified the instruction (Patient, Relative or other Authorized Person).", ) verification_date: typing.Optional[DateTime] = pydantic.Field( - alias="verificationDate", description="Date verification was collected." + alias="verificationDate", default=None, description="Date verification was collected." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contact_detail.py b/src/metriport/fhir/types/contact_detail.py index aaca5c7..7c16c23 100644 --- a/src/metriport/fhir/types/contact_detail.py +++ b/src/metriport/fhir/types/contact_detail.py @@ -19,14 +19,16 @@ class ContactDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - name: typing.Optional[str] = pydantic.Field(description="The name of an individual to contact.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The name of an individual to contact.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="The contact details for the individual (if a name was provided) or the organization." + default=None, description="The contact details for the individual (if a name was provided) or the organization." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contact_point.py b/src/metriport/fhir/types/contact_point.py index 3f24bec..76aa331 100644 --- a/src/metriport/fhir/types/contact_point.py +++ b/src/metriport/fhir/types/contact_point.py @@ -22,22 +22,31 @@ class ContactPoint(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) system: typing.Optional[ContactPointSystem] = pydantic.Field( - description="Telecommunications form for contact point - what communications system is required to make use of the contact." + default=None, + description="Telecommunications form for contact point - what communications system is required to make use of the contact.", ) value: typing.Optional[str] = pydantic.Field( - description="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." + default=None, + description="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).", + ) + use: typing.Optional[ContactPointUse] = pydantic.Field( + default=None, description="Identifies the purpose for the contact point." ) - use: typing.Optional[ContactPointUse] = pydantic.Field(description="Identifies the purpose for the contact point.") rank: typing.Optional[PositiveInt] = pydantic.Field( - description="Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values." + default=None, + description="Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.", + ) + period: typing.Optional[Period] = pydantic.Field( + default=None, description="Time period when the contact point was/is in use." ) - period: typing.Optional[Period] = pydantic.Field(description="Time period when the contact point was/is in use.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/contract.py b/src/metriport/fhir/types/contract.py index 9929cd8..69b337a 100644 --- a/src/metriport/fhir/types/contract.py +++ b/src/metriport/fhir/types/contract.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -33,119 +31,146 @@ class Contract(BaseResource): Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement. """ - resource_type: typing_extensions.Literal["Contract"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Contract"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique identifier for this Contract or a derivative that references a Source Contract." + default=None, + description="Unique identifier for this Contract or a derivative that references a Source Contract.", ) url: typing.Optional[Uri] = pydantic.Field( - description="Canonical identifier for this contract, represented as a URI (globally unique)." + default=None, description="Canonical identifier for this contract, represented as a URI (globally unique)." ) version: typing.Optional[str] = pydantic.Field( - description="An edition identifier used for business purposes to label business significant variants." + default=None, + description="An edition identifier used for business purposes to label business significant variants.", ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") legal_state: typing.Optional[CodeableConcept] = pydantic.Field( alias="legalState", + default=None, description="Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.", ) instantiates_canonical: typing.Optional[Reference] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.", ) instantiates_uri: typing.Optional[Uri] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.", ) content_derivative: typing.Optional[CodeableConcept] = pydantic.Field( alias="contentDerivative", + default=None, description="The minimal content derived from the basal information source at a specific stage in its lifecycle.", ) - issued: typing.Optional[DateTime] = pydantic.Field(description="When this Contract was issued.") + issued: typing.Optional[DateTime] = pydantic.Field(default=None, description="When this Contract was issued.") applies: typing.Optional[Period] = pydantic.Field( - description="Relevant time or time-period when this Contract is applicable." + default=None, description="Relevant time or time-period when this Contract is applicable." ) expiration_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="expirationType", + default=None, description="Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.", ) subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The target entity impacted by or of interest to parties to the agreement." + default=None, description="The target entity impacted by or of interest to parties to the agreement." ) authority: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies." + default=None, + description="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", ) domain: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources." + default=None, + description="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", ) site: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Sites in which the contract is complied with, exercised, or in force." + default=None, description="Sites in which the contract is complied with, exercised, or in force." ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content." + default=None, + description="A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content." + default=None, + description="An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", ) alias: typing.Optional[typing.List[str]] = pydantic.Field( - description="Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation." + default=None, + description="Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.", ) author: typing.Optional[Reference] = pydantic.Field( - description="The individual or organization that authored the Contract definition, derivative, or instance in any legal state." + default=None, + description="The individual or organization that authored the Contract definition, derivative, or instance in any legal state.", ) scope: typing.Optional[CodeableConcept] = pydantic.Field( - description="A selector of legal concerns for this Contract definition, derivative, or instance in any legal state." + default=None, + description="A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.", ) topic_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="topicCodeableConcept", + default=None, description="Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", ) topic_reference: typing.Optional[Reference] = pydantic.Field( alias="topicReference", + default=None, description="Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract." + default=None, + description="A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.", ) sub_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="subType", + default=None, description="Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.", ) content_definition: typing.Optional[ContractContentDefinition] = pydantic.Field( alias="contentDefinition", + default=None, description="Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.", ) term: typing.Optional[typing.List[ContractTerm]] = pydantic.Field( - description="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups." + default=None, + description="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", ) supporting_info: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInfo", + default=None, description="Information that may be needed by/relevant to the performer in their execution of this term action.", ) relevant_history: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="relevantHistory", + default=None, description="Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.", ) signer: typing.Optional[typing.List[ContractSigner]] = pydantic.Field( - description="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness." + default=None, + description="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.", ) friendly: typing.Optional[typing.List[ContractFriendly]] = pydantic.Field( - description='The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.' + default=None, + description='The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.', ) legal: typing.Optional[typing.List[ContractLegal]] = pydantic.Field( - description="List of Legal expressions or representations of this Contract." + default=None, description="List of Legal expressions or representations of this Contract." ) rule: typing.Optional[typing.List[ContractRule]] = pydantic.Field( - description="List of Computable Policy Rule Language Representations of this Contract." + default=None, description="List of Computable Policy Rule Language Representations of this Contract." ) legally_binding_attachment: typing.Optional[Attachment] = pydantic.Field( alias="legallyBindingAttachment", + default=None, description='Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.', ) legally_binding_reference: typing.Optional[Reference] = pydantic.Field( alias="legallyBindingReference", + default=None, description='Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.', ) diff --git a/src/metriport/fhir/types/contract_action.py b/src/metriport/fhir/types/contract_action.py index 8d74ac4..ae2624e 100644 --- a/src/metriport/fhir/types/contract_action.py +++ b/src/metriport/fhir/types/contract_action.py @@ -25,88 +25,103 @@ class ContractAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) do_not_perform: typing.Optional[bool] = pydantic.Field( - alias="doNotPerform", description="True if the term prohibits the action." + alias="doNotPerform", default=None, description="True if the term prohibits the action." ) type: CodeableConcept = pydantic.Field( description="Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term." ) - subject: typing.Optional[typing.List[ContractSubject]] = pydantic.Field(description="Entity of the action.") + subject: typing.Optional[typing.List[ContractSubject]] = pydantic.Field( + default=None, description="Entity of the action." + ) intent: CodeableConcept = pydantic.Field( description="Reason or purpose for the action stipulated by this Contract Provision." ) link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="linkId", + default=None, description="Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.", ) status: CodeableConcept = pydantic.Field(description="Current state of the term action.") context: typing.Optional[Reference] = pydantic.Field( - description="Encounter or Episode with primary association to specified term activity." + default=None, description="Encounter or Episode with primary association to specified term activity." ) context_link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="contextLinkId", + default=None, description="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="When action happens." + alias="occurrenceDateTime", default=None, description="When action happens." ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="When action happens." + alias="occurrencePeriod", default=None, description="When action happens." ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( - alias="occurrenceTiming", description="When action happens." + alias="occurrenceTiming", default=None, description="When action happens." ) requester: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Who or what initiated the action and has responsibility for its activation." + default=None, description="Who or what initiated the action and has responsibility for its activation." ) requester_link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="requesterLinkId", + default=None, description="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", ) performer_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="performerType", + default=None, description="The type of individual that is desired or required to perform or not perform the action.", ) performer_role: typing.Optional[CodeableConcept] = pydantic.Field( alias="performerRole", + default=None, description="The type of role or competency of an individual desired or required to perform or not perform the action.", ) performer: typing.Optional[Reference] = pydantic.Field( - description="Indicates who or what is being asked to perform (or not perform) the ction." + default=None, description="Indicates who or what is being asked to perform (or not perform) the ction." ) performer_link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="performerLinkId", + default=None, description="Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates another resource whose existence justifies permitting or not permitting this action.", ) reason: typing.Optional[typing.List[str]] = pydantic.Field( - description="Describes why the action is to be performed or not performed in textual form." + default=None, description="Describes why the action is to be performed or not performed in textual form." ) reason_link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="reasonLinkId", + default=None, description="Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the term action made by the requester, performer, subject or other participants." + default=None, + description="Comments made about the term action made by the requester, performer, subject or other participants.", ) security_label_number: typing.Optional[typing.List[UnsignedInt]] = pydantic.Field( - alias="securityLabelNumber", description="Security labels that protects the action." + alias="securityLabelNumber", default=None, description="Security labels that protects the action." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_answer.py b/src/metriport/fhir/types/contract_answer.py index bf4134e..65c805a 100644 --- a/src/metriport/fhir/types/contract_answer.py +++ b/src/metriport/fhir/types/contract_answer.py @@ -22,61 +22,76 @@ class ContractAnswer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_decimal: typing.Optional[float] = pydantic.Field( alias="valueDecimal", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_date: typing.Optional[str] = pydantic.Field( alias="valueDate", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_time: typing.Optional[str] = pydantic.Field( alias="valueTime", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_uri: typing.Optional[str] = pydantic.Field( alias="valueUri", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_coding: typing.Optional[Coding] = pydantic.Field( alias="valueCoding", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", ) diff --git a/src/metriport/fhir/types/contract_asset.py b/src/metriport/fhir/types/contract_asset.py index 95a8819..9f75bf0 100644 --- a/src/metriport/fhir/types/contract_asset.py +++ b/src/metriport/fhir/types/contract_asset.py @@ -26,52 +26,67 @@ class ContractAsset(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - scope: typing.Optional[CodeableConcept] = pydantic.Field(description="Differentiates the kind of the asset .") + scope: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Differentiates the kind of the asset ." + ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Target entity type about which the term may be concerned." + default=None, description="Target entity type about which the term may be concerned." ) type_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="typeReference", description="Associated entities." + alias="typeReference", default=None, description="Associated entities." ) subtype: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="May be a subtype or part of an offered asset." + default=None, description="May be a subtype or part of an offered asset." ) relationship: typing.Optional[Coding] = pydantic.Field( - description="Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree." + default=None, + description="Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.", + ) + context: typing.Optional[typing.List[ContractContext]] = pydantic.Field( + default=None, description="Circumstance of the asset." ) - context: typing.Optional[typing.List[ContractContext]] = pydantic.Field(description="Circumstance of the asset.") condition: typing.Optional[str] = pydantic.Field( - description="Description of the quality and completeness of the asset that imay be a factor in its valuation." + default=None, + description="Description of the quality and completeness of the asset that imay be a factor in its valuation.", ) period_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="periodType", description="Type of Asset availability for use or ownership." + alias="periodType", default=None, description="Type of Asset availability for use or ownership." + ) + period: typing.Optional[typing.List[Period]] = pydantic.Field( + default=None, description="Asset relevant contractual time period." ) - period: typing.Optional[typing.List[Period]] = pydantic.Field(description="Asset relevant contractual time period.") use_period: typing.Optional[typing.List[Period]] = pydantic.Field( - alias="usePeriod", description="Time period of asset use." + alias="usePeriod", default=None, description="Time period of asset use." ) text: typing.Optional[str] = pydantic.Field( - description="Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract." + default=None, + description="Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.", ) link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="linkId", + default=None, description="Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.", ) - answer: typing.Optional[typing.List[ContractAnswer]] = pydantic.Field(description="Response to assets.") + answer: typing.Optional[typing.List[ContractAnswer]] = pydantic.Field( + default=None, description="Response to assets." + ) security_label_number: typing.Optional[typing.List[UnsignedInt]] = pydantic.Field( - alias="securityLabelNumber", description="Security labels that protects the asset." + alias="securityLabelNumber", default=None, description="Security labels that protects the asset." ) valued_item: typing.Optional[typing.List[ContractValuedItem]] = pydantic.Field( - alias="valuedItem", description="Contract Valued Item List." + alias="valuedItem", default=None, description="Contract Valued Item List." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_content_definition.py b/src/metriport/fhir/types/contract_content_definition.py index 870cdc5..9ff776d 100644 --- a/src/metriport/fhir/types/contract_content_definition.py +++ b/src/metriport/fhir/types/contract_content_definition.py @@ -23,30 +23,35 @@ class ContractContentDefinition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation." ) sub_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="subType", description="Detailed Precusory content type." + alias="subType", default=None, description="Detailed Precusory content type." ) publisher: typing.Optional[Reference] = pydantic.Field( - description="The individual or organization that published the Contract precursor content." + default=None, description="The individual or organization that published the Contract precursor content." ) publication_date: typing.Optional[DateTime] = pydantic.Field( alias="publicationDate", + default=None, description="The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.", ) publication_status: typing.Optional[Code] = pydantic.Field( alias="publicationStatus", + default=None, description=( "amended \n" " appended \n" @@ -66,7 +71,8 @@ class ContractContentDefinition(pydantic.BaseModel): ), ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content." + default=None, + description="A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_context.py b/src/metriport/fhir/types/contract_context.py index 613cd8e..034b2e4 100644 --- a/src/metriport/fhir/types/contract_context.py +++ b/src/metriport/fhir/types/contract_context.py @@ -20,22 +20,27 @@ class ContractContext(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) reference: typing.Optional[Reference] = pydantic.Field( - description="Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction." + default=None, + description="Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location." + default=None, + description="Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.", ) - text: typing.Optional[str] = pydantic.Field(description="Context description.") + text: typing.Optional[str] = pydantic.Field(default=None, description="Context description.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/contract_friendly.py b/src/metriport/fhir/types/contract_friendly.py index e54b68a..4304b29 100644 --- a/src/metriport/fhir/types/contract_friendly.py +++ b/src/metriport/fhir/types/contract_friendly.py @@ -20,21 +20,26 @@ class ContractFriendly(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) content_attachment: typing.Optional[Attachment] = pydantic.Field( alias="contentAttachment", + default=None, description="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", ) content_reference: typing.Optional[Reference] = pydantic.Field( alias="contentReference", + default=None, description="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", ) diff --git a/src/metriport/fhir/types/contract_legal.py b/src/metriport/fhir/types/contract_legal.py index 774d18c..8d542aa 100644 --- a/src/metriport/fhir/types/contract_legal.py +++ b/src/metriport/fhir/types/contract_legal.py @@ -20,20 +20,23 @@ class ContractLegal(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) content_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="contentAttachment", description="Contract legal text in human renderable form." + alias="contentAttachment", default=None, description="Contract legal text in human renderable form." ) content_reference: typing.Optional[Reference] = pydantic.Field( - alias="contentReference", description="Contract legal text in human renderable form." + alias="contentReference", default=None, description="Contract legal text in human renderable form." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_offer.py b/src/metriport/fhir/types/contract_offer.py index 0c12777..3ff2d71 100644 --- a/src/metriport/fhir/types/contract_offer.py +++ b/src/metriport/fhir/types/contract_offer.py @@ -24,39 +24,48 @@ class ContractOffer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique identifier for this particular Contract Provision." + default=None, description="Unique identifier for this particular Contract Provision." ) - party: typing.Optional[typing.List[ContractParty]] = pydantic.Field(description="Offer Recipient.") + party: typing.Optional[typing.List[ContractParty]] = pydantic.Field(default=None, description="Offer Recipient.") topic: typing.Optional[Reference] = pydantic.Field( - description="The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30)." + default=None, + description="The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit." + default=None, + description="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", ) decision: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of choice made by accepting party with respect to an offer made by an offeror/ grantee." + default=None, + description="Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.", ) decision_mode: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="decisionMode", description="How the decision about a Contract was conveyed." + alias="decisionMode", default=None, description="How the decision about a Contract was conveyed." ) - answer: typing.Optional[typing.List[ContractAnswer]] = pydantic.Field(description="Response to offer text.") - text: typing.Optional[str] = pydantic.Field(description="Human readable form of this Contract Offer.") + answer: typing.Optional[typing.List[ContractAnswer]] = pydantic.Field( + default=None, description="Response to offer text." + ) + text: typing.Optional[str] = pydantic.Field(default=None, description="Human readable form of this Contract Offer.") link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="linkId", + default=None, description="The id of the clause or question text of the offer in the referenced questionnaire/response.", ) security_label_number: typing.Optional[typing.List[UnsignedInt]] = pydantic.Field( - alias="securityLabelNumber", description="Security labels that protects the offer." + alias="securityLabelNumber", default=None, description="Security labels that protects the offer." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_party.py b/src/metriport/fhir/types/contract_party.py index 43fde24..2921a38 100644 --- a/src/metriport/fhir/types/contract_party.py +++ b/src/metriport/fhir/types/contract_party.py @@ -20,13 +20,16 @@ class ContractParty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) reference: typing.List[Reference] = pydantic.Field(description="Participant in the offer.") diff --git a/src/metriport/fhir/types/contract_rule.py b/src/metriport/fhir/types/contract_rule.py index 3a8674d..2c57012 100644 --- a/src/metriport/fhir/types/contract_rule.py +++ b/src/metriport/fhir/types/contract_rule.py @@ -20,21 +20,26 @@ class ContractRule(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) content_attachment: typing.Optional[Attachment] = pydantic.Field( alias="contentAttachment", + default=None, description="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", ) content_reference: typing.Optional[Reference] = pydantic.Field( alias="contentReference", + default=None, description="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", ) diff --git a/src/metriport/fhir/types/contract_security_label.py b/src/metriport/fhir/types/contract_security_label.py index ae78b3c..8a16486 100644 --- a/src/metriport/fhir/types/contract_security_label.py +++ b/src/metriport/fhir/types/contract_security_label.py @@ -20,26 +20,31 @@ class ContractSecurityLabel(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) number: typing.Optional[typing.List[UnsignedInt]] = pydantic.Field( - description="Number used to link this term or term element to the applicable Security Label." + default=None, description="Number used to link this term or term element to the applicable Security Label." ) classification: Coding = pydantic.Field( description="Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements." ) category: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements." + default=None, + description="Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.", ) control: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="Security label privacy tag that species the manner in which term and/or term elements are to be protected." + default=None, + description="Security label privacy tag that species the manner in which term and/or term elements are to be protected.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_signer.py b/src/metriport/fhir/types/contract_signer.py index 16a4347..7220e57 100644 --- a/src/metriport/fhir/types/contract_signer.py +++ b/src/metriport/fhir/types/contract_signer.py @@ -21,13 +21,16 @@ class ContractSigner(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: Coding = pydantic.Field(description="Role of this Contract signer, e.g. notary, grantee.") diff --git a/src/metriport/fhir/types/contract_subject.py b/src/metriport/fhir/types/contract_subject.py index 3e67c16..cfcb7d9 100644 --- a/src/metriport/fhir/types/contract_subject.py +++ b/src/metriport/fhir/types/contract_subject.py @@ -20,20 +20,23 @@ class ContractSubject(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) reference: typing.List[Reference] = pydantic.Field( description="The entity the action is performed or not performed on or for." ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="Role type of agent assigned roles in this Contract." + default=None, description="Role type of agent assigned roles in this Contract." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_term.py b/src/metriport/fhir/types/contract_term.py index 0a36d47..5c7e752 100644 --- a/src/metriport/fhir/types/contract_term.py +++ b/src/metriport/fhir/types/contract_term.py @@ -29,48 +29,62 @@ class ContractTerm(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Unique identifier for this particular Contract Provision." + default=None, description="Unique identifier for this particular Contract Provision." + ) + issued: typing.Optional[DateTime] = pydantic.Field( + default=None, description="When this Contract Provision was issued." ) - issued: typing.Optional[DateTime] = pydantic.Field(description="When this Contract Provision was issued.") applies: typing.Optional[Period] = pydantic.Field( - description="Relevant time or time-period when this Contract Provision is applicable." + default=None, description="Relevant time or time-period when this Contract Provision is applicable." ) topic_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="topicCodeableConcept", description="The entity that the term applies to." + alias="topicCodeableConcept", default=None, description="The entity that the term applies to." ) topic_reference: typing.Optional[Reference] = pydantic.Field( - alias="topicReference", description="The entity that the term applies to." + alias="topicReference", default=None, description="The entity that the term applies to." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time." + default=None, + description="A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.", ) sub_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="subType", description="A specialized legal clause or condition based on overarching contract type." + alias="subType", + default=None, + description="A specialized legal clause or condition based on overarching contract type.", + ) + text: typing.Optional[str] = pydantic.Field( + default=None, description="Statement of a provision in a policy or a contract." ) - text: typing.Optional[str] = pydantic.Field(description="Statement of a provision in a policy or a contract.") security_label: typing.Optional[typing.List[ContractSecurityLabel]] = pydantic.Field( alias="securityLabel", + default=None, description="Security labels that protect the handling of information about the term and its elements, which may be specifically identified..", ) offer: ContractOffer = pydantic.Field( description="The matter of concern in the context of this provision of the agrement." ) - asset: typing.Optional[typing.List[ContractAsset]] = pydantic.Field(description="Contract Term Asset List.") + asset: typing.Optional[typing.List[ContractAsset]] = pydantic.Field( + default=None, description="Contract Term Asset List." + ) action: typing.Optional[typing.List[ContractAction]] = pydantic.Field( - description="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." + default=None, + description="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", ) group: typing.Optional[typing.List[ContractTerm]] = pydantic.Field( - description="Nested group of Contract Provisions." + default=None, description="Nested group of Contract Provisions." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/contract_valued_item.py b/src/metriport/fhir/types/contract_valued_item.py index 96a81a0..260de17 100644 --- a/src/metriport/fhir/types/contract_valued_item.py +++ b/src/metriport/fhir/types/contract_valued_item.py @@ -26,51 +26,67 @@ class ContractValuedItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) entity_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="entityCodeableConcept", description="Specific type of Contract Valued Item that may be priced." + alias="entityCodeableConcept", + default=None, + description="Specific type of Contract Valued Item that may be priced.", ) entity_reference: typing.Optional[Reference] = pydantic.Field( - alias="entityReference", description="Specific type of Contract Valued Item that may be priced." + alias="entityReference", default=None, description="Specific type of Contract Valued Item that may be priced." + ) + identifier: typing.Optional[Identifier] = pydantic.Field( + default=None, description="Identifies a Contract Valued Item instance." ) - identifier: typing.Optional[Identifier] = pydantic.Field(description="Identifies a Contract Valued Item instance.") effective_time: typing.Optional[DateTime] = pydantic.Field( alias="effectiveTime", + default=None, description="Indicates the time during which this Contract ValuedItem information is effective.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances." + default=None, + description="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.", ) unit_price: typing.Optional[Money] = pydantic.Field( - alias="unitPrice", description="A Contract Valued Item unit valuation measure." + alias="unitPrice", default=None, description="A Contract Valued Item unit valuation measure." ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) points: typing.Optional[Decimal] = pydantic.Field( - description="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point." + default=None, + description="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.", ) net: typing.Optional[Money] = pydantic.Field( - description="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity _ unit Price (Cost per Point) _ factor Number \* points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." + default=None, + description="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity _ unit Price (Cost per Point) _ factor Number \* points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", + ) + payment: typing.Optional[str] = pydantic.Field(default=None, description="Terms of valuation.") + payment_date: typing.Optional[DateTime] = pydantic.Field( + alias="paymentDate", default=None, description="When payment is due." ) - payment: typing.Optional[str] = pydantic.Field(description="Terms of valuation.") - payment_date: typing.Optional[DateTime] = pydantic.Field(alias="paymentDate", description="When payment is due.") - responsible: typing.Optional[Reference] = pydantic.Field(description="Who will make payment.") - recipient: typing.Optional[Reference] = pydantic.Field(description="Who will receive payment.") + responsible: typing.Optional[Reference] = pydantic.Field(default=None, description="Who will make payment.") + recipient: typing.Optional[Reference] = pydantic.Field(default=None, description="Who will receive payment.") link_id: typing.Optional[typing.List[str]] = pydantic.Field( alias="linkId", + default=None, description="Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.", ) security_label_number: typing.Optional[typing.List[UnsignedInt]] = pydantic.Field( alias="securityLabelNumber", + default=None, description="A set of security labels that define which terms are controlled by this condition.", ) diff --git a/src/metriport/fhir/types/contributor.py b/src/metriport/fhir/types/contributor.py index 7d945ab..0c4242b 100644 --- a/src/metriport/fhir/types/contributor.py +++ b/src/metriport/fhir/types/contributor.py @@ -20,17 +20,19 @@ class Contributor(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - type: typing.Optional[ContributorType] = pydantic.Field(description="The type of contributor.") + type: typing.Optional[ContributorType] = pydantic.Field(default=None, description="The type of contributor.") name: typing.Optional[str] = pydantic.Field( - description="The name of the individual or organization responsible for the contribution." + default=None, description="The name of the individual or organization responsible for the contribution." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the contributor." + default=None, description="Contact details to assist a user in finding and communicating with the contributor." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/count.py b/src/metriport/fhir/types/count.py index 766d1e0..d558786 100644 --- a/src/metriport/fhir/types/count.py +++ b/src/metriport/fhir/types/count.py @@ -23,23 +23,27 @@ class Count(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) value: typing.Optional[Decimal] = pydantic.Field( - description="The value of the measured amount. The value includes an implicit precision in the presentation of the value." + default=None, + description="The value of the measured amount. The value includes an implicit precision in the presentation of the value.", ) comparator: typing.Optional[CountComparator] = pydantic.Field( - description='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.' + default=None, + description='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.', ) - unit: typing.Optional[str] = pydantic.Field(description="A human-readable form of the unit.") + unit: typing.Optional[str] = pydantic.Field(default=None, description="A human-readable form of the unit.") system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the system that provides the coded form of the unit." + default=None, description="The identification of the system that provides the coded form of the unit." ) code: typing.Optional[Code] = pydantic.Field( - description="A computer processable form of the unit in some unit representation system." + default=None, description="A computer processable form of the unit in some unit representation system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage.py b/src/metriport/fhir/types/coverage.py index 88b55c5..f927404 100644 --- a/src/metriport/fhir/types/coverage.py +++ b/src/metriport/fhir/types/coverage.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -27,56 +25,63 @@ class Coverage(BaseResource): Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment. """ - resource_type: typing_extensions.Literal["Coverage"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Coverage"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this coverage." + default=None, description="A unique identifier assigned to this coverage." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization." + default=None, + description="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.", ) policy_holder: typing.Optional[Reference] = pydantic.Field( - alias="policyHolder", description="The party who 'owns' the insurance policy." + alias="policyHolder", default=None, description="The party who 'owns' the insurance policy." ) subscriber: typing.Optional[Reference] = pydantic.Field( - description="The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due." + default=None, + description="The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", ) subscriber_id: typing.Optional[str] = pydantic.Field( - alias="subscriberId", description="The insurer assigned ID for the Subscriber." + alias="subscriberId", default=None, description="The insurer assigned ID for the Subscriber." ) beneficiary: Reference = pydantic.Field( description="The party who benefits from the insurance coverage; the patient when products and/or services are provided." ) dependent: typing.Optional[str] = pydantic.Field( - description="A unique identifier for a dependent under the coverage." + default=None, description="A unique identifier for a dependent under the coverage." ) relationship: typing.Optional[CodeableConcept] = pydantic.Field( - description="The relationship of beneficiary (patient) to the subscriber." + default=None, description="The relationship of beneficiary (patient) to the subscriber." ) period: typing.Optional[Period] = pydantic.Field( - description="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." + default=None, + description="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", ) payor: typing.List[Reference] = pydantic.Field( description="The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements." ) class_: typing.Optional[typing.List[CoverageClass]] = pydantic.Field( - alias="class", description="A suite of underwriter specific classifiers." + alias="class", default=None, description="A suite of underwriter specific classifiers." ) order: typing.Optional[PositiveInt] = pydantic.Field( - description="The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care." + default=None, + description="The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.", ) network: typing.Optional[str] = pydantic.Field( - description="The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply." + default=None, + description="The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", ) cost_to_beneficiary: typing.Optional[typing.List[CoverageCostToBeneficiary]] = pydantic.Field( alias="costToBeneficiary", + default=None, description="A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.", ) subrogation: typing.Optional[bool] = pydantic.Field( - description="When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs." + default=None, + description="When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", ) contract: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The policy(s) which constitute this insurance coverage." + default=None, description="The policy(s) which constitute this insurance coverage." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_class.py b/src/metriport/fhir/types/coverage_class.py index 63cf643..57369d2 100644 --- a/src/metriport/fhir/types/coverage_class.py +++ b/src/metriport/fhir/types/coverage_class.py @@ -19,22 +19,25 @@ class CoverageClass(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan." ) value: typing.Optional[str] = pydantic.Field( - description="The alphanumeric string value associated with the insurer issued label." + default=None, description="The alphanumeric string value associated with the insurer issued label." ) - name: typing.Optional[str] = pydantic.Field(description="A short description for the class.") + name: typing.Optional[str] = pydantic.Field(default=None, description="A short description for the class.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/coverage_cost_to_beneficiary.py b/src/metriport/fhir/types/coverage_cost_to_beneficiary.py index aba1b28..2516f28 100644 --- a/src/metriport/fhir/types/coverage_cost_to_beneficiary.py +++ b/src/metriport/fhir/types/coverage_cost_to_beneficiary.py @@ -22,26 +22,30 @@ class CoverageCostToBeneficiary(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The category of patient centric costs associated with treatment." + default=None, description="The category of patient centric costs associated with treatment." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The amount due from the patient for the cost category." + alias="valueQuantity", default=None, description="The amount due from the patient for the cost category." ) value_money: typing.Optional[Money] = pydantic.Field( - alias="valueMoney", description="The amount due from the patient for the cost category." + alias="valueMoney", default=None, description="The amount due from the patient for the cost category." ) exception: typing.Optional[typing.List[CoverageException]] = pydantic.Field( - description="A suite of codes indicating exceptions or reductions to patient costs and their effective periods." + default=None, + description="A suite of codes indicating exceptions or reductions to patient costs and their effective periods.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_request.py b/src/metriport/fhir/types/coverage_eligibility_request.py index a6c827a..0003543 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request.py +++ b/src/metriport/fhir/types/coverage_eligibility_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,48 +27,55 @@ class CoverageEligibilityRequest(BaseResource): The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy. """ - resource_type: typing_extensions.Literal["CoverageEligibilityRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CoverageEligibilityRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this coverage eligiblity request." + default=None, description="A unique identifier assigned to this coverage eligiblity request." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") priority: typing.Optional[CodeableConcept] = pydantic.Field( - description="When the requestor expects the processor to complete processing." + default=None, description="When the requestor expects the processor to complete processing." ) purpose: typing.Optional[typing.List[CoverageEligibilityRequestPurposeItem]] = pydantic.Field( - description="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified." + default=None, + description="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", ) patient: Reference = pydantic.Field( description="The party who is the beneficiary of the supplied coverage and for whom eligibility is sought." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the enclosed suite of services were performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the enclosed suite of services were performed or completed.", ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date when this resource was created.") - enterer: typing.Optional[Reference] = pydantic.Field(description="Person who created the request.") + created: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date when this resource was created." + ) + enterer: typing.Optional[Reference] = pydantic.Field(default=None, description="Person who created the request.") provider: typing.Optional[Reference] = pydantic.Field( - description="The provider which is responsible for the request." + default=None, description="The provider which is responsible for the request." ) insurer: Reference = pydantic.Field( description="The Insurer who issued the coverage in question and is the recipient of the request." ) facility: typing.Optional[Reference] = pydantic.Field( - description="Facility where the services are intended to be provided." + default=None, description="Facility where the services are intended to be provided." ) supporting_info: typing.Optional[typing.List[CoverageEligibilityRequestSupportingInfo]] = pydantic.Field( alias="supportingInfo", + default=None, description="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", ) insurance: typing.Optional[typing.List[CoverageEligibilityRequestInsurance]] = pydantic.Field( - description="Financial instruments for reimbursement for the health care products and services." + default=None, description="Financial instruments for reimbursement for the health care products and services." ) item: typing.Optional[typing.List[CoverageEligibilityRequestItem]] = pydantic.Field( - description="Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor." + default=None, + description="Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_request_diagnosis.py b/src/metriport/fhir/types/coverage_eligibility_request_diagnosis.py index 5e51c96..6ef86f3 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request_diagnosis.py +++ b/src/metriport/fhir/types/coverage_eligibility_request_diagnosis.py @@ -20,21 +20,26 @@ class CoverageEligibilityRequestDiagnosis(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) diagnosis_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="diagnosisCodeableConcept", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) diagnosis_reference: typing.Optional[Reference] = pydantic.Field( alias="diagnosisReference", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) diff --git a/src/metriport/fhir/types/coverage_eligibility_request_insurance.py b/src/metriport/fhir/types/coverage_eligibility_request_insurance.py index 1053eaa..1871988 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request_insurance.py +++ b/src/metriport/fhir/types/coverage_eligibility_request_insurance.py @@ -19,23 +19,28 @@ class CoverageEligibilityRequestInsurance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) focal: typing.Optional[bool] = pydantic.Field( - description="A flag to indicate that this Coverage is to be used for evaluation of this request when set to true." + default=None, + description="A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.", ) coverage: Reference = pydantic.Field( description="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) business_arrangement: typing.Optional[str] = pydantic.Field( alias="businessArrangement", + default=None, description="A business agreement number established between the provider and the insurer for special business processing purposes.", ) diff --git a/src/metriport/fhir/types/coverage_eligibility_request_item.py b/src/metriport/fhir/types/coverage_eligibility_request_item.py index d619b14..a5d7ff8 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request_item.py +++ b/src/metriport/fhir/types/coverage_eligibility_request_item.py @@ -24,44 +24,56 @@ class CoverageEligibilityRequestItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) supporting_info_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="supportingInfoSequence", + default=None, description="Exceptions, special conditions and supporting information applicable for this service or product line.", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: typing.Optional[CodeableConcept] = pydantic.Field( alias="productOrService", + default=None, description="This contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) provider: typing.Optional[Reference] = pydantic.Field( - description="The practitioner who is responsible for the product or service to be rendered to the patient." + default=None, + description="The practitioner who is responsible for the product or service to be rendered to the patient.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( - alias="unitPrice", description="The amount charged to the patient by the provider for a single unit." + alias="unitPrice", + default=None, + description="The amount charged to the patient by the provider for a single unit.", + ) + facility: typing.Optional[Reference] = pydantic.Field( + default=None, description="Facility where the services will be provided." ) - facility: typing.Optional[Reference] = pydantic.Field(description="Facility where the services will be provided.") diagnosis: typing.Optional[typing.List[CoverageEligibilityRequestDiagnosis]] = pydantic.Field( - description="Patient diagnosis for which care is sought." + default=None, description="Patient diagnosis for which care is sought." ) detail: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The plan/proposal/order describing the proposed service in detail." + default=None, description="The plan/proposal/order describing the proposed service in detail." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_request_supporting_info.py b/src/metriport/fhir/types/coverage_eligibility_request_supporting_info.py index b16a932..ae2a10a 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request_supporting_info.py +++ b/src/metriport/fhir/types/coverage_eligibility_request_supporting_info.py @@ -20,23 +20,27 @@ class CoverageEligibilityRequestSupportingInfo(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify supporting information entries." + default=None, description="A number to uniquely identify supporting information entries." ) information: Reference = pydantic.Field( description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." ) applies_to_all: typing.Optional[bool] = pydantic.Field( alias="appliesToAll", + default=None, description="The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.", ) diff --git a/src/metriport/fhir/types/coverage_eligibility_response.py b/src/metriport/fhir/types/coverage_eligibility_response.py index 9ae44c1..26e6711 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response.py +++ b/src/metriport/fhir/types/coverage_eligibility_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,51 +27,55 @@ class CoverageEligibilityResponse(BaseResource): This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource. """ - resource_type: typing_extensions.Literal["CoverageEligibilityResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CoverageEligibilityResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this coverage eligiblity request." + default=None, description="A unique identifier assigned to this coverage eligiblity request." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") purpose: typing.Optional[typing.List[CoverageEligibilityResponsePurposeItem]] = pydantic.Field( - description="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified." + default=None, + description="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", ) patient: Reference = pydantic.Field( description="The party who is the beneficiary of the supplied coverage and for whom eligibility is sought." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the enclosed suite of services were performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the enclosed suite of services were performed or completed.", ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date this resource was created.") + created: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date this resource was created.") requestor: typing.Optional[Reference] = pydantic.Field( - description="The provider which is responsible for the request." + default=None, description="The provider which is responsible for the request." ) request: Reference = pydantic.Field(description="Reference to the original request resource.") outcome: typing.Optional[CoverageEligibilityResponseOutcome] = pydantic.Field( - description="The outcome of the request processing." + default=None, description="The outcome of the request processing." ) disposition: typing.Optional[str] = pydantic.Field( - description="A human readable description of the status of the adjudication." + default=None, description="A human readable description of the status of the adjudication." ) insurer: Reference = pydantic.Field( description="The Insurer who issued the coverage in question and is the author of the response." ) insurance: typing.Optional[typing.List[CoverageEligibilityResponseInsurance]] = pydantic.Field( - description="Financial instruments for reimbursement for the health care products and services." + default=None, description="Financial instruments for reimbursement for the health care products and services." ) pre_auth_ref: typing.Optional[str] = pydantic.Field( alias="preAuthRef", + default=None, description="A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.", ) form: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code for the form to be used for printing the content." + default=None, description="A code for the form to be used for printing the content." ) error: typing.Optional[typing.List[CoverageEligibilityResponseError]] = pydantic.Field( - description="Errors encountered during the processing of the request." + default=None, description="Errors encountered during the processing of the request." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_response_benefit.py b/src/metriport/fhir/types/coverage_eligibility_response_benefit.py index 9ecd6e1..a446899 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response_benefit.py +++ b/src/metriport/fhir/types/coverage_eligibility_response_benefit.py @@ -20,33 +20,44 @@ class CoverageEligibilityResponseBenefit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="Classification of benefit being provided.") allowed_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="allowedUnsignedInt", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedUnsignedInt", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) allowed_string: typing.Optional[str] = pydantic.Field( - alias="allowedString", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedString", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) allowed_money: typing.Optional[Money] = pydantic.Field( - alias="allowedMoney", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedMoney", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) used_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="usedUnsignedInt", description="The quantity of the benefit which have been consumed to date." + alias="usedUnsignedInt", + default=None, + description="The quantity of the benefit which have been consumed to date.", ) used_string: typing.Optional[str] = pydantic.Field( - alias="usedString", description="The quantity of the benefit which have been consumed to date." + alias="usedString", default=None, description="The quantity of the benefit which have been consumed to date." ) used_money: typing.Optional[Money] = pydantic.Field( - alias="usedMoney", description="The quantity of the benefit which have been consumed to date." + alias="usedMoney", default=None, description="The quantity of the benefit which have been consumed to date." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_response_error.py b/src/metriport/fhir/types/coverage_eligibility_response_error.py index c98d65b..c105cf4 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response_error.py +++ b/src/metriport/fhir/types/coverage_eligibility_response_error.py @@ -19,13 +19,16 @@ class CoverageEligibilityResponseError(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/coverage_eligibility_response_insurance.py b/src/metriport/fhir/types/coverage_eligibility_response_insurance.py index 9ad7803..1ba33e6 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response_insurance.py +++ b/src/metriport/fhir/types/coverage_eligibility_response_insurance.py @@ -21,26 +21,31 @@ class CoverageEligibilityResponseInsurance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) coverage: Reference = pydantic.Field( description="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) inforce: typing.Optional[bool] = pydantic.Field( - description="Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates." + default=None, + description="Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.", ) benefit_period: typing.Optional[Period] = pydantic.Field( - alias="benefitPeriod", description="The term of the benefits documented in this response." + alias="benefitPeriod", default=None, description="The term of the benefits documented in this response." ) item: typing.Optional[typing.List[CoverageEligibilityResponseItem]] = pydantic.Field( - description="Benefits and optionally current balances, and authorization details by category or service." + default=None, + description="Benefits and optionally current balances, and authorization details by category or service.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/coverage_eligibility_response_item.py b/src/metriport/fhir/types/coverage_eligibility_response_item.py index fecb91f..a47b613 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response_item.py +++ b/src/metriport/fhir/types/coverage_eligibility_response_item.py @@ -22,57 +22,69 @@ class CoverageEligibilityResponseItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: typing.Optional[CodeableConcept] = pydantic.Field( alias="productOrService", + default=None, description="This contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) provider: typing.Optional[Reference] = pydantic.Field( - description="The practitioner who is eligible for the provision of the product or service." + default=None, description="The practitioner who is eligible for the provision of the product or service." ) excluded: typing.Optional[bool] = pydantic.Field( - description="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." + default=None, + description="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", ) - name: typing.Optional[str] = pydantic.Field(description="A short name or tag for the benefit.") + name: typing.Optional[str] = pydantic.Field(default=None, description="A short name or tag for the benefit.") description: typing.Optional[str] = pydantic.Field( - description="A richer description of the benefit or services covered." + default=None, description="A richer description of the benefit or services covered." ) network: typing.Optional[CodeableConcept] = pydantic.Field( - description="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." + default=None, + description="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", ) unit: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates if the benefits apply to an individual or to the family." + default=None, description="Indicates if the benefits apply to an individual or to the family." ) term: typing.Optional[CodeableConcept] = pydantic.Field( - description="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." + default=None, + description="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", ) benefit: typing.Optional[typing.List[CoverageEligibilityResponseBenefit]] = pydantic.Field( - description="Benefits used to date." + default=None, description="Benefits used to date." ) authorization_required: typing.Optional[bool] = pydantic.Field( alias="authorizationRequired", + default=None, description="A boolean flag indicating whether a preauthorization is required prior to actual service delivery.", ) authorization_supporting: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="authorizationSupporting", + default=None, description="Codes or comments regarding information or actions associated with the preauthorization.", ) authorization_url: typing.Optional[Uri] = pydantic.Field( alias="authorizationUrl", + default=None, description="A web location for obtaining requirements or descriptive information regarding the preauthorization.", ) diff --git a/src/metriport/fhir/types/coverage_exception.py b/src/metriport/fhir/types/coverage_exception.py index 0203a2d..39743d5 100644 --- a/src/metriport/fhir/types/coverage_exception.py +++ b/src/metriport/fhir/types/coverage_exception.py @@ -20,17 +20,22 @@ class CoverageException(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="The code for the specific exception.") - period: typing.Optional[Period] = pydantic.Field(description="The timeframe during when the exception is in force.") + period: typing.Optional[Period] = pydantic.Field( + default=None, description="The timeframe during when the exception is in force." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/data_requirement.py b/src/metriport/fhir/types/data_requirement.py index 34c84a1..580bb6f 100644 --- a/src/metriport/fhir/types/data_requirement.py +++ b/src/metriport/fhir/types/data_requirement.py @@ -22,42 +22,51 @@ class DataRequirement(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) type: typing.Optional[Code] = pydantic.Field( - description="The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile." + default=None, + description="The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.", ) profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="The profile of the required data, specified as the uri of the profile definition." + default=None, description="The profile of the required data, specified as the uri of the profile definition." ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.", ) must_support: typing.Optional[typing.List[str]] = pydantic.Field( alias="mustSupport", + default=None, description="Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. The value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).", ) code_filter: typing.Optional[typing.List[DataRequirementCodeFilter]] = pydantic.Field( alias="codeFilter", + default=None, description="Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.", ) date_filter: typing.Optional[typing.List[DataRequirementDateFilter]] = pydantic.Field( alias="dateFilter", + default=None, description="Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.", ) limit: typing.Optional[PositiveInt] = pydantic.Field( - description="Specifies a maximum number of results that are required (uses the \_count search parameter)." + default=None, + description="Specifies a maximum number of results that are required (uses the \_count search parameter).", ) sort: typing.Optional[typing.List[DataRequirementSort]] = pydantic.Field( - description="Specifies the order of the results to be returned." + default=None, description="Specifies the order of the results to be returned." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/data_requirement_code_filter.py b/src/metriport/fhir/types/data_requirement_code_filter.py index 284f79f..da01628 100644 --- a/src/metriport/fhir/types/data_requirement_code_filter.py +++ b/src/metriport/fhir/types/data_requirement_code_filter.py @@ -20,28 +20,35 @@ class DataRequirementCodeFilter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept." + default=None, + description="The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", ) search_param: typing.Optional[str] = pydantic.Field( alias="searchParam", + default=None, description="A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.", ) value_set: typing.Optional[Canonical] = pydantic.Field( alias="valueSet", + default=None, description="The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", ) code: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes." + default=None, + description="The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/data_requirement_date_filter.py b/src/metriport/fhir/types/data_requirement_date_filter.py index 9dbcee9..d3e1a40 100644 --- a/src/metriport/fhir/types/data_requirement_date_filter.py +++ b/src/metriport/fhir/types/data_requirement_date_filter.py @@ -19,32 +19,40 @@ class DataRequirementDateFilter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing." + default=None, + description="The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.", ) search_param: typing.Optional[str] = pydantic.Field( alias="searchParam", + default=None, description="A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.", ) value_period: typing.Optional[Period] = pydantic.Field( alias="valuePeriod", + default=None, description="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.", ) value_duration: typing.Optional[Duration] = pydantic.Field( alias="valueDuration", + default=None, description="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.", ) diff --git a/src/metriport/fhir/types/data_requirement_sort.py b/src/metriport/fhir/types/data_requirement_sort.py index 28de7b0..063c43e 100644 --- a/src/metriport/fhir/types/data_requirement_sort.py +++ b/src/metriport/fhir/types/data_requirement_sort.py @@ -20,20 +20,24 @@ class DataRequirementSort(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant." + default=None, + description="The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.", ) direction: typing.Optional[DataRequirementSortDirection] = pydantic.Field( - description="The direction of the sort, ascending or descending." + default=None, description="The direction of the sort, ascending or descending." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/detected_issue.py b/src/metriport/fhir/types/detected_issue.py index 128233c..846c025 100644 --- a/src/metriport/fhir/types/detected_issue.py +++ b/src/metriport/fhir/types/detected_issue.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,41 +26,55 @@ class DetectedIssue(BaseResource): Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. """ - resource_type: typing_extensions.Literal["DetectedIssue"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DetectedIssue"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifier associated with the detected issue record." + default=None, description="Business identifier associated with the detected issue record." + ) + status: typing.Optional[Code] = pydantic.Field( + default=None, description="Indicates the status of the detected issue." ) - status: typing.Optional[Code] = pydantic.Field(description="Indicates the status of the detected issue.") code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Identifies the general type of issue identified." + default=None, description="Identifies the general type of issue identified." ) severity: typing.Optional[DetectedIssueSeverity] = pydantic.Field( - description="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." + default=None, + description="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.", ) patient: typing.Optional[Reference] = pydantic.Field( - description="Indicates the patient whose record the detected issue is associated with." + default=None, description="Indicates the patient whose record the detected issue is associated with." ) identified_date_time: typing.Optional[str] = pydantic.Field( - alias="identifiedDateTime", description="The date or period when the detected issue was initially identified." + alias="identifiedDateTime", + default=None, + description="The date or period when the detected issue was initially identified.", ) identified_period: typing.Optional[Period] = pydantic.Field( - alias="identifiedPeriod", description="The date or period when the detected issue was initially identified." + alias="identifiedPeriod", + default=None, + description="The date or period when the detected issue was initially identified.", ) author: typing.Optional[Reference] = pydantic.Field( - description="Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review." + default=None, + description="Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.", ) implicated: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Indicates the resource representing the current activity or proposed activity that is potentially problematic." + default=None, + description="Indicates the resource representing the current activity or proposed activity that is potentially problematic.", ) evidence: typing.Optional[typing.List[DetectedIssueEvidence]] = pydantic.Field( - description="Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport." + default=None, + description="Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.", + ) + detail: typing.Optional[str] = pydantic.Field( + default=None, description="A textual explanation of the detected issue." ) - detail: typing.Optional[str] = pydantic.Field(description="A textual explanation of the detected issue.") reference: typing.Optional[Uri] = pydantic.Field( - description="The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified." + default=None, + description="The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.", ) mitigation: typing.Optional[typing.List[DetectedIssueMitigation]] = pydantic.Field( - description="Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." + default=None, + description="Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/detected_issue_evidence.py b/src/metriport/fhir/types/detected_issue_evidence.py index b229560..e806bd2 100644 --- a/src/metriport/fhir/types/detected_issue_evidence.py +++ b/src/metriport/fhir/types/detected_issue_evidence.py @@ -20,20 +20,24 @@ class DetectedIssueEvidence(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A manifestation that led to the recording of this detected issue." + default=None, description="A manifestation that led to the recording of this detected issue." ) detail: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport." + default=None, + description="Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/detected_issue_mitigation.py b/src/metriport/fhir/types/detected_issue_mitigation.py index 6416d66..49f5ae4 100644 --- a/src/metriport/fhir/types/detected_issue_mitigation.py +++ b/src/metriport/fhir/types/detected_issue_mitigation.py @@ -21,21 +21,27 @@ class DetectedIssueMitigation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: CodeableConcept = pydantic.Field( description="Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue." ) - date: typing.Optional[DateTime] = pydantic.Field(description="Indicates when the mitigating action was documented.") + date: typing.Optional[DateTime] = pydantic.Field( + default=None, description="Indicates when the mitigating action was documented." + ) author: typing.Optional[Reference] = pydantic.Field( - description="Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring." + default=None, + description="Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device.py b/src/metriport/fhir/types/device.py index b41c17a..bb4046a 100644 --- a/src/metriport/fhir/types/device.py +++ b/src/metriport/fhir/types/device.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,78 +30,96 @@ class Device(BaseResource): A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. """ - resource_type: typing_extensions.Literal["Device"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Device"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique instance identifiers assigned to a device by manufacturers other organizations or owners." + default=None, + description="Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", ) definition: typing.Optional[Reference] = pydantic.Field( - description="The reference to the definition for the device." + default=None, description="The reference to the definition for the device." ) udi_carrier: typing.Optional[typing.List[DeviceUdiCarrier]] = pydantic.Field( alias="udiCarrier", + default=None, description="Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.", ) - status: typing.Optional[DeviceStatus] = pydantic.Field(description="Status of the Device availability.") + status: typing.Optional[DeviceStatus] = pydantic.Field( + default=None, description="Status of the Device availability." + ) status_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="statusReason", description="Reason for the dtatus of the Device availability." + alias="statusReason", default=None, description="Reason for the dtatus of the Device availability." ) distinct_identifier: typing.Optional[str] = pydantic.Field( alias="distinctIdentifier", + default=None, description="The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.", ) - manufacturer: typing.Optional[str] = pydantic.Field(description="A name of the manufacturer.") + manufacturer: typing.Optional[str] = pydantic.Field(default=None, description="A name of the manufacturer.") manufacture_date: typing.Optional[DateTime] = pydantic.Field( - alias="manufactureDate", description="The date and time when the device was manufactured." + alias="manufactureDate", default=None, description="The date and time when the device was manufactured." ) expiration_date: typing.Optional[DateTime] = pydantic.Field( alias="expirationDate", + default=None, description="The date and time beyond which this device is no longer valid or should not be used (if applicable).", ) lot_number: typing.Optional[str] = pydantic.Field( - alias="lotNumber", description="Lot number assigned by the manufacturer." + alias="lotNumber", default=None, description="Lot number assigned by the manufacturer." ) serial_number: typing.Optional[str] = pydantic.Field( alias="serialNumber", + default=None, description="The serial number assigned by the organization when the device was manufactured.", ) device_name: typing.Optional[typing.List[DeviceDeviceName]] = pydantic.Field( alias="deviceName", + default=None, description="This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.", ) model_number: typing.Optional[str] = pydantic.Field( - alias="modelNumber", description="The model number for the device." + alias="modelNumber", default=None, description="The model number for the device." ) - part_number: typing.Optional[str] = pydantic.Field(alias="partNumber", description="The part number of the device.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="The kind or type of device.") + part_number: typing.Optional[str] = pydantic.Field( + alias="partNumber", default=None, description="The part number of the device." + ) + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The kind or type of device.") specialization: typing.Optional[typing.List[DeviceSpecialization]] = pydantic.Field( - description="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication." + default=None, + description="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", ) version: typing.Optional[typing.List[DeviceVersion]] = pydantic.Field( - description="The actual design of the device or software version running on the device." + default=None, description="The actual design of the device or software version running on the device." ) property: typing.Optional[typing.List[DeviceProperty]] = pydantic.Field( - description="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties." + default=None, + description="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", ) patient: typing.Optional[Reference] = pydantic.Field( - description="Patient information, If the device is affixed to a person." + default=None, description="Patient information, If the device is affixed to a person." ) owner: typing.Optional[Reference] = pydantic.Field( - description="An organization that is responsible for the provision and ongoing maintenance of the device." + default=None, + description="An organization that is responsible for the provision and ongoing maintenance of the device.", ) contact: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details for an organization or a particular human that is responsible for the device." + default=None, + description="Contact details for an organization or a particular human that is responsible for the device.", + ) + location: typing.Optional[Reference] = pydantic.Field( + default=None, description="The place where the device can be found." ) - location: typing.Optional[Reference] = pydantic.Field(description="The place where the device can be found.") url: typing.Optional[Uri] = pydantic.Field( - description="A network address on which the device may be contacted directly." + default=None, description="A network address on which the device may be contacted directly." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Descriptive information, usage information or implantation information that is not captured in an existing element." + default=None, + description="Descriptive information, usage information or implantation information that is not captured in an existing element.", ) safety: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Provides additional safety characteristics about a medical device. For example devices containing latex." + default=None, + description="Provides additional safety characteristics about a medical device. For example devices containing latex.", ) - parent: typing.Optional[Reference] = pydantic.Field(description="The parent device.") + parent: typing.Optional[Reference] = pydantic.Field(default=None, description="The parent device.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/device_definition.py b/src/metriport/fhir/types/device_definition.py index 2e7966c..dd53de2 100644 --- a/src/metriport/fhir/types/device_definition.py +++ b/src/metriport/fhir/types/device_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -35,78 +33,89 @@ class DeviceDefinition(BaseResource): The characteristics, operational status and capabilities of a medical-related component of a medical device. """ - resource_type: typing_extensions.Literal["DeviceDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceDefinition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID." + default=None, + description="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.", ) udi_device_identifier: typing.Optional[typing.List[DeviceDefinitionUdiDeviceIdentifier]] = pydantic.Field( alias="udiDeviceIdentifier", + default=None, description="Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.", ) manufacturer_string: typing.Optional[str] = pydantic.Field( - alias="manufacturerString", description="A name of the manufacturer." + alias="manufacturerString", default=None, description="A name of the manufacturer." ) manufacturer_reference: typing.Optional[Reference] = pydantic.Field( - alias="manufacturerReference", description="A name of the manufacturer." + alias="manufacturerReference", default=None, description="A name of the manufacturer." ) device_name: typing.Optional[typing.List[DeviceDefinitionDeviceName]] = pydantic.Field( - alias="deviceName", description="A name given to the device to identify it." + alias="deviceName", default=None, description="A name given to the device to identify it." ) model_number: typing.Optional[str] = pydantic.Field( - alias="modelNumber", description="The model number for the device." + alias="modelNumber", default=None, description="The model number for the device." + ) + type: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="What kind of device or device system this is." ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="What kind of device or device system this is.") specialization: typing.Optional[typing.List[DeviceDefinitionSpecialization]] = pydantic.Field( - description="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication." + default=None, + description="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", ) version: typing.Optional[typing.List[str]] = pydantic.Field( - description="The available versions of the device, e.g., software versions." + default=None, description="The available versions of the device, e.g., software versions." ) safety: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Safety characteristics of the device." + default=None, description="Safety characteristics of the device." ) shelf_life_storage: typing.Optional[typing.List[ProductShelfLife]] = pydantic.Field( - alias="shelfLifeStorage", description="Shelf Life and storage information." + alias="shelfLifeStorage", default=None, description="Shelf Life and storage information." ) physical_characteristics: typing.Optional[ProdCharacteristic] = pydantic.Field( - alias="physicalCharacteristics", description="Dimensions, color etc." + alias="physicalCharacteristics", default=None, description="Dimensions, color etc." ) language_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="languageCode", + default=None, description="Language code for the human-readable text strings produced by the device (all supported).", ) capability: typing.Optional[typing.List[DeviceDefinitionCapability]] = pydantic.Field( - description="Device capabilities." + default=None, description="Device capabilities." ) property: typing.Optional[typing.List[DeviceDefinitionProperty]] = pydantic.Field( - description="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties." + default=None, + description="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", ) owner: typing.Optional[Reference] = pydantic.Field( - description="An organization that is responsible for the provision and ongoing maintenance of the device." + default=None, + description="An organization that is responsible for the provision and ongoing maintenance of the device.", ) contact: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details for an organization or a particular human that is responsible for the device." + default=None, + description="Contact details for an organization or a particular human that is responsible for the device.", ) url: typing.Optional[Uri] = pydantic.Field( - description="A network address on which the device may be contacted directly." + default=None, description="A network address on which the device may be contacted directly." ) online_information: typing.Optional[Uri] = pydantic.Field( - alias="onlineInformation", description="Access to on-line information about the device." + alias="onlineInformation", default=None, description="Access to on-line information about the device." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Descriptive information, usage information or implantation information that is not captured in an existing element." + default=None, + description="Descriptive information, usage information or implantation information that is not captured in an existing element.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product)." + default=None, + description="The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).", ) parent_device: typing.Optional[Reference] = pydantic.Field( - alias="parentDevice", description="The parent device it can be part of." + alias="parentDevice", default=None, description="The parent device it can be part of." ) material: typing.Optional[typing.List[DeviceDefinitionMaterial]] = pydantic.Field( - description="A substance used to create the material(s) of which the device is made." + default=None, description="A substance used to create the material(s) of which the device is made." ) classification: typing.Optional[typing.List[DeviceDefinitionClassification]] = pydantic.Field( - description="What kind of device or device system this is." + default=None, description="What kind of device or device system this is." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_capability.py b/src/metriport/fhir/types/device_definition_capability.py index 4551818..22c6037 100644 --- a/src/metriport/fhir/types/device_definition_capability.py +++ b/src/metriport/fhir/types/device_definition_capability.py @@ -19,18 +19,21 @@ class DeviceDefinitionCapability(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="Type of capability.") description: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Description of capability." + default=None, description="Description of capability." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_classification.py b/src/metriport/fhir/types/device_definition_classification.py index 4e81246..08b4dbe 100644 --- a/src/metriport/fhir/types/device_definition_classification.py +++ b/src/metriport/fhir/types/device_definition_classification.py @@ -20,20 +20,23 @@ class DeviceDefinitionClassification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A classification or risk class of the device model." + default=None, description="A classification or risk class of the device model." ) justification: typing.Optional[RelatedArtifact] = pydantic.Field( - description="Further information qualifying this classification of the device model." + default=None, description="Further information qualifying this classification of the device model." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_device_name.py b/src/metriport/fhir/types/device_definition_device_name.py index f4ac32f..646bf70 100644 --- a/src/metriport/fhir/types/device_definition_device_name.py +++ b/src/metriport/fhir/types/device_definition_device_name.py @@ -19,24 +19,28 @@ class DeviceDefinitionDeviceName(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="The name of the device.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The name of the device.") type: typing.Optional[DeviceDefinitionDeviceNameType] = pydantic.Field( + default=None, description=( "The type of deviceName. UDILabelName \n" " UserFriendlyName \n" " PatientReportedName \n" " ManufactureDeviceName \n" " ModelName.\n" - ) + ), ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_material.py b/src/metriport/fhir/types/device_definition_material.py index 2c18ec3..df1dbd0 100644 --- a/src/metriport/fhir/types/device_definition_material.py +++ b/src/metriport/fhir/types/device_definition_material.py @@ -19,19 +19,24 @@ class DeviceDefinitionMaterial(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) substance: CodeableConcept = pydantic.Field(description="The substance.") - alternate: typing.Optional[bool] = pydantic.Field(description="Indicates an alternative material of the device.") + alternate: typing.Optional[bool] = pydantic.Field( + default=None, description="Indicates an alternative material of the device." + ) allergenic_indicator: typing.Optional[bool] = pydantic.Field( - alias="allergenicIndicator", description="Whether the substance is a known or suspected allergen." + alias="allergenicIndicator", default=None, description="Whether the substance is a known or suspected allergen." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_property.py b/src/metriport/fhir/types/device_definition_property.py index 57e1972..9018e94 100644 --- a/src/metriport/fhir/types/device_definition_property.py +++ b/src/metriport/fhir/types/device_definition_property.py @@ -20,23 +20,26 @@ class DeviceDefinitionProperty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)." ) value_quantity: typing.Optional[typing.List[Quantity]] = pydantic.Field( - alias="valueQuantity", description="Property value as a quantity." + alias="valueQuantity", default=None, description="Property value as a quantity." ) value_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="valueCode", description="Property value as a code, e.g., NTP4 (synced to NTP)." + alias="valueCode", default=None, description="Property value as a code, e.g., NTP4 (synced to NTP)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_specialization.py b/src/metriport/fhir/types/device_definition_specialization.py index 6945c29..0c30920 100644 --- a/src/metriport/fhir/types/device_definition_specialization.py +++ b/src/metriport/fhir/types/device_definition_specialization.py @@ -18,20 +18,23 @@ class DeviceDefinitionSpecialization(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) system_type: typing.Optional[str] = pydantic.Field( - alias="systemType", description="The standard that is used to operate and communicate." + alias="systemType", default=None, description="The standard that is used to operate and communicate." ) version: typing.Optional[str] = pydantic.Field( - description="The version of the standard that is used to operate and communicate." + default=None, description="The version of the standard that is used to operate and communicate." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_definition_udi_device_identifier.py b/src/metriport/fhir/types/device_definition_udi_device_identifier.py index 915d615..645beac 100644 --- a/src/metriport/fhir/types/device_definition_udi_device_identifier.py +++ b/src/metriport/fhir/types/device_definition_udi_device_identifier.py @@ -19,22 +19,28 @@ class DeviceDefinitionUdiDeviceIdentifier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) device_identifier: typing.Optional[str] = pydantic.Field( alias="deviceIdentifier", + default=None, description="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.", ) - issuer: typing.Optional[Uri] = pydantic.Field(description="The organization that assigns the identifier algorithm.") + issuer: typing.Optional[Uri] = pydantic.Field( + default=None, description="The organization that assigns the identifier algorithm." + ) jurisdiction: typing.Optional[Uri] = pydantic.Field( - description="The jurisdiction to which the deviceIdentifier applies." + default=None, description="The jurisdiction to which the deviceIdentifier applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_device_name.py b/src/metriport/fhir/types/device_device_name.py index 5183bff..30f3792 100644 --- a/src/metriport/fhir/types/device_device_name.py +++ b/src/metriport/fhir/types/device_device_name.py @@ -19,24 +19,28 @@ class DeviceDeviceName(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="The name of the device.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The name of the device.") type: typing.Optional[DeviceDeviceNameType] = pydantic.Field( + default=None, description=( "The type of deviceName. UDILabelName \n" " UserFriendlyName \n" " PatientReportedName \n" " ManufactureDeviceName \n" " ModelName.\n" - ) + ), ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_metric.py b/src/metriport/fhir/types/device_metric.py index 1fdea77..9734f1c 100644 --- a/src/metriport/fhir/types/device_metric.py +++ b/src/metriport/fhir/types/device_metric.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,38 +25,47 @@ class DeviceMetric(BaseResource): Describes a measurement, calculation or setting capability of a medical device. """ - resource_type: typing_extensions.Literal["DeviceMetric"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceMetric"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID." + default=None, + description="Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.", ) type: CodeableConcept = pydantic.Field( description="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." ) unit: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." + default=None, + description="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", ) source: typing.Optional[Reference] = pydantic.Field( - description="Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc." + default=None, + description="Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.", ) parent: typing.Optional[Reference] = pydantic.Field( - description="Describes the link to the Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location." + default=None, + description="Describes the link to the Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.", ) operational_status: typing.Optional[DeviceMetricOperationalStatus] = pydantic.Field( alias="operationalStatus", + default=None, description="Indicates current operational state of the device. For example: On, Off, Standby, etc.", ) color: typing.Optional[DeviceMetricColor] = pydantic.Field( - description="Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta." + default=None, + description="Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.", ) category: typing.Optional[DeviceMetricCategory] = pydantic.Field( - description="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." + default=None, + description="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.", ) measurement_period: typing.Optional[Timing] = pydantic.Field( alias="measurementPeriod", + default=None, description="Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.", ) calibration: typing.Optional[typing.List[DeviceMetricCalibration]] = pydantic.Field( - description="Describes the calibrations that have been performed or that are required to be performed." + default=None, + description="Describes the calibrations that have been performed or that are required to be performed.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_metric_calibration.py b/src/metriport/fhir/types/device_metric_calibration.py index 7d2307b..85d0e9b 100644 --- a/src/metriport/fhir/types/device_metric_calibration.py +++ b/src/metriport/fhir/types/device_metric_calibration.py @@ -21,23 +21,26 @@ class DeviceMetricCalibration(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[DeviceMetricCalibrationType] = pydantic.Field( - description="Describes the type of the calibration method." + default=None, description="Describes the type of the calibration method." ) state: typing.Optional[DeviceMetricCalibrationState] = pydantic.Field( - description="Describes the state of the calibration." + default=None, description="Describes the state of the calibration." ) time: typing.Optional[Instant] = pydantic.Field( - description="Describes the time last calibration has been performed." + default=None, description="Describes the time last calibration has been performed." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_property.py b/src/metriport/fhir/types/device_property.py index e1f55ff..9232ce1 100644 --- a/src/metriport/fhir/types/device_property.py +++ b/src/metriport/fhir/types/device_property.py @@ -20,23 +20,26 @@ class DeviceProperty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)." ) value_quantity: typing.Optional[typing.List[Quantity]] = pydantic.Field( - alias="valueQuantity", description="Property value as a quantity." + alias="valueQuantity", default=None, description="Property value as a quantity." ) value_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="valueCode", description="Property value as a code, e.g., NTP4 (synced to NTP)." + alias="valueCode", default=None, description="Property value as a code, e.g., NTP4 (synced to NTP)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_request.py b/src/metriport/fhir/types/device_request.py index e72beec..dfd0ad4 100644 --- a/src/metriport/fhir/types/device_request.py +++ b/src/metriport/fhir/types/device_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,90 +28,100 @@ class DeviceRequest(BaseResource): Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. """ - resource_type: typing_extensions.Literal["DeviceRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this order by the orderer or by the receiver." + default=None, description="Identifiers assigned to this order by the orderer or by the receiver." ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="Plan/proposal/order fulfilled by this request." + alias="basedOn", default=None, description="Plan/proposal/order fulfilled by this request." ) prior_request: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="priorRequest", + default=None, description="The request takes the place of the referenced completed or terminated request(s).", ) group_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="groupIdentifier", description="Composite request this is part of." + alias="groupIdentifier", default=None, description="Composite request this is part of." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the request.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the request.") intent: typing.Optional[Code] = pydantic.Field( - description="Whether the request is a proposal, plan, an original order or a reflex order." + default=None, description="Whether the request is a proposal, plan, an original order or a reflex order." ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the {{title}} should be addressed with respect to other requests." + default=None, + description="Indicates how quickly the {{title}} should be addressed with respect to other requests.", ) code_reference: typing.Optional[Reference] = pydantic.Field( - alias="codeReference", description="The details of the device to be used." + alias="codeReference", default=None, description="The details of the device to be used." ) code_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="codeCodeableConcept", description="The details of the device to be used." + alias="codeCodeableConcept", default=None, description="The details of the device to be used." ) parameter: typing.Optional[typing.List[DeviceRequestParameter]] = pydantic.Field( - description="Specific parameters for the ordered item. For example, the prism value for lenses." + default=None, description="Specific parameters for the ordered item. For example, the prism value for lenses." ) subject: Reference = pydantic.Field(description="The patient who will use the device.") encounter: typing.Optional[Reference] = pydantic.Field( - description="An encounter that provides additional context in which this request is made." + default=None, description="An encounter that provides additional context in which this request is made." ) occurrence_date_time: typing.Optional[str] = pydantic.Field( alias="occurrenceDateTime", + default=None, description='The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".', ) occurrence_period: typing.Optional[Period] = pydantic.Field( alias="occurrencePeriod", + default=None, description='The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".', ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( alias="occurrenceTiming", + default=None, description='The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".', ) authored_on: typing.Optional[DateTime] = pydantic.Field( - alias="authoredOn", description="When the request transitioned to being actionable." + alias="authoredOn", default=None, description="When the request transitioned to being actionable." ) requester: typing.Optional[Reference] = pydantic.Field( - description="The individual who initiated the request and has responsibility for its activation." + default=None, description="The individual who initiated the request and has responsibility for its activation." ) performer_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="performerType", description="Desired type of performer for doing the diagnostic testing." + alias="performerType", default=None, description="Desired type of performer for doing the diagnostic testing." ) performer: typing.Optional[Reference] = pydantic.Field( - description="The desired performer for doing the diagnostic testing." + default=None, description="The desired performer for doing the diagnostic testing." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Reason or justification for the use of this device." + alias="reasonCode", default=None, description="Reason or justification for the use of this device." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Reason or justification for the use of this device." + alias="reasonReference", default=None, description="Reason or justification for the use of this device." ) insurance: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service." + default=None, + description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.", ) supporting_info: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInfo", + default=None, description="Additional clinical information about the patient that may influence the request fulfilment. For example, this may include where on the subject's body the device will be used (i.e. the target site).", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." + default=None, + description="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", ) relevant_history: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="relevantHistory", description="Key events in the history of the request." + alias="relevantHistory", default=None, description="Key events in the history of the request." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_request_parameter.py b/src/metriport/fhir/types/device_request_parameter.py index dd9cc65..820cee7 100644 --- a/src/metriport/fhir/types/device_request_parameter.py +++ b/src/metriport/fhir/types/device_request_parameter.py @@ -21,29 +21,32 @@ class DeviceRequestParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code or string that identifies the device detail being asserted." + default=None, description="A code or string that identifies the device detail being asserted." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="The value of the device detail." + alias="valueCodeableConcept", default=None, description="The value of the device detail." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The value of the device detail." + alias="valueQuantity", default=None, description="The value of the device detail." ) value_range: typing.Optional[Range] = pydantic.Field( - alias="valueRange", description="The value of the device detail." + alias="valueRange", default=None, description="The value of the device detail." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of the device detail." + alias="valueBoolean", default=None, description="The value of the device detail." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_specialization.py b/src/metriport/fhir/types/device_specialization.py index 9c5679f..f4bb042 100644 --- a/src/metriport/fhir/types/device_specialization.py +++ b/src/metriport/fhir/types/device_specialization.py @@ -19,20 +19,23 @@ class DeviceSpecialization(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) system_type: CodeableConcept = pydantic.Field( alias="systemType", description="The standard that is used to operate and communicate." ) version: typing.Optional[str] = pydantic.Field( - description="The version of the standard that is used to operate and communicate." + default=None, description="The version of the standard that is used to operate and communicate." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_udi_carrier.py b/src/metriport/fhir/types/device_udi_carrier.py index ae8cdbe..529b4e3 100644 --- a/src/metriport/fhir/types/device_udi_carrier.py +++ b/src/metriport/fhir/types/device_udi_carrier.py @@ -21,35 +21,43 @@ class DeviceUdiCarrier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) device_identifier: typing.Optional[str] = pydantic.Field( alias="deviceIdentifier", + default=None, description="The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.", ) issuer: typing.Optional[Uri] = pydantic.Field( - description="Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di." + default=None, + description="Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.", ) jurisdiction: typing.Optional[Uri] = pydantic.Field( - description="The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi." + default=None, + description="The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.", ) carrier_aidc: typing.Optional[Base64Binary] = pydantic.Field( alias="carrierAIDC", + default=None, description="The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats _SHALL_ be base64 encoded.", ) carrier_hrf: typing.Optional[str] = pydantic.Field( alias="carrierHRF", + default=None, description="The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.", ) entry_type: typing.Optional[DeviceUdiCarrierEntryType] = pydantic.Field( - alias="entryType", description="A coded entry to indicate how the data was entered." + alias="entryType", default=None, description="A coded entry to indicate how the data was entered." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_use_statement.py b/src/metriport/fhir/types/device_use_statement.py index 72ed6e4..905229c 100644 --- a/src/metriport/fhir/types/device_use_statement.py +++ b/src/metriport/fhir/types/device_use_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,51 +25,57 @@ class DeviceUseStatement(BaseResource): A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. """ - resource_type: typing_extensions.Literal["DeviceUseStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceUseStatement"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="An external identifier for this statement such as an IRI." + default=None, description="An external identifier for this statement such as an IRI." ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement.", ) status: typing.Optional[DeviceUseStatementStatus] = pydantic.Field( - description="A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed." + default=None, + description="A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", ) subject: Reference = pydantic.Field(description="The patient who used the device.") derived_from: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="derivedFrom", + default=None, description="Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement.", ) timing_timing: typing.Optional[Timing] = pydantic.Field( - alias="timingTiming", description="How often the device was used." + alias="timingTiming", default=None, description="How often the device was used." ) timing_period: typing.Optional[Period] = pydantic.Field( - alias="timingPeriod", description="How often the device was used." + alias="timingPeriod", default=None, description="How often the device was used." ) timing_date_time: typing.Optional[str] = pydantic.Field( - alias="timingDateTime", description="How often the device was used." + alias="timingDateTime", default=None, description="How often the device was used." ) recorded_on: typing.Optional[DateTime] = pydantic.Field( - alias="recordedOn", description="The time at which the statement was made/recorded." + alias="recordedOn", default=None, description="The time at which the statement was made/recorded." ) source: typing.Optional[Reference] = pydantic.Field( - description="Who reported the device was being used by the patient." + default=None, description="Who reported the device was being used by the patient." ) device: Reference = pydantic.Field(description="The details of the device used.") reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Reason or justification for the use of the device." + alias="reasonCode", default=None, description="Reason or justification for the use of the device." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates another resource whose existence justifies this DeviceUseStatement.", ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( alias="bodySite", + default=None, description="Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." + default=None, + description="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/device_version.py b/src/metriport/fhir/types/device_version.py index b77f4b3..e7bec31 100644 --- a/src/metriport/fhir/types/device_version.py +++ b/src/metriport/fhir/types/device_version.py @@ -20,18 +20,23 @@ class DeviceVersion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of the device version.") - component: typing.Optional[Identifier] = pydantic.Field(description="A single component of the device version.") - value: typing.Optional[str] = pydantic.Field(description="The version text.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The type of the device version.") + component: typing.Optional[Identifier] = pydantic.Field( + default=None, description="A single component of the device version." + ) + value: typing.Optional[str] = pydantic.Field(default=None, description="The version text.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/diagnostic_report.py b/src/metriport/fhir/types/diagnostic_report.py index 017089b..7311f90 100644 --- a/src/metriport/fhir/types/diagnostic_report.py +++ b/src/metriport/fhir/types/diagnostic_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -27,64 +25,78 @@ class DiagnosticReport(BaseResource): The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. """ - resource_type: typing_extensions.Literal["DiagnosticReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DiagnosticReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this report by the performer or other systems." + default=None, description="Identifiers assigned to this report by the performer or other systems." ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="Details concerning a service requested." + alias="basedOn", default=None, description="Details concerning a service requested." + ) + status: typing.Optional[DiagnosticReportStatus] = pydantic.Field( + default=None, description="The status of the diagnostic report." ) - status: typing.Optional[DiagnosticReportStatus] = pydantic.Field(description="The status of the diagnostic report.") category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes." + default=None, + description="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", ) code: CodeableConcept = pydantic.Field(description="A code or name that describes this diagnostic report.") subject: typing.Optional[Reference] = pydantic.Field( - description="The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources." + default=None, + description="The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about." + default=None, + description="The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.", ) effective_date_time: typing.Optional[str] = pydantic.Field( alias="effectiveDateTime", + default=None, description="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", ) issued: typing.Optional[Instant] = pydantic.Field( - description="The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified." + default=None, + description="The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.", ) performer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The diagnostic service that is responsible for issuing the report." + default=None, description="The diagnostic service that is responsible for issuing the report." ) results_interpreter: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="resultsInterpreter", + default=None, description="The practitioner or organization that is responsible for the report's conclusions and interpretations.", ) specimen: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Details about the specimens on which this diagnostic report is based." + default=None, description="Details about the specimens on which this diagnostic report is based." ) result: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="[Observations](observation.html) that are part of this diagnostic report." + default=None, description="[Observations](observation.html) that are part of this diagnostic report." ) imaging_study: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="imagingStudy", + default=None, description="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.", ) media: typing.Optional[typing.List[DiagnosticReportMedia]] = pydantic.Field( - description="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." + default=None, + description="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", ) conclusion: typing.Optional[str] = pydantic.Field( - description="Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report." + default=None, + description="Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.", ) conclusion_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="conclusionCode", + default=None, description="One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.", ) presented_form: typing.Optional[typing.List[Attachment]] = pydantic.Field( alias="presentedForm", + default=None, description="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", ) diff --git a/src/metriport/fhir/types/diagnostic_report_media.py b/src/metriport/fhir/types/diagnostic_report_media.py index 00bdf16..f3bf1fd 100644 --- a/src/metriport/fhir/types/diagnostic_report_media.py +++ b/src/metriport/fhir/types/diagnostic_report_media.py @@ -19,17 +19,21 @@ class DiagnosticReportMedia(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) comment: typing.Optional[str] = pydantic.Field( - description="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features." + default=None, + description="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", ) link: Reference = pydantic.Field(description="Reference to the image source.") diff --git a/src/metriport/fhir/types/distance.py b/src/metriport/fhir/types/distance.py index 99ae55b..488e1ac 100644 --- a/src/metriport/fhir/types/distance.py +++ b/src/metriport/fhir/types/distance.py @@ -23,23 +23,27 @@ class Distance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) value: typing.Optional[Decimal] = pydantic.Field( - description="The value of the measured amount. The value includes an implicit precision in the presentation of the value." + default=None, + description="The value of the measured amount. The value includes an implicit precision in the presentation of the value.", ) comparator: typing.Optional[DistanceComparator] = pydantic.Field( - description='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.' + default=None, + description='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.', ) - unit: typing.Optional[str] = pydantic.Field(description="A human-readable form of the unit.") + unit: typing.Optional[str] = pydantic.Field(default=None, description="A human-readable form of the unit.") system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the system that provides the coded form of the unit." + default=None, description="The identification of the system that provides the coded form of the unit." ) code: typing.Optional[Code] = pydantic.Field( - description="A computer processable form of the unit in some unit representation system." + default=None, description="A computer processable form of the unit in some unit representation system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_manifest.py b/src/metriport/fhir/types/document_manifest.py index 2b00838..019ff3b 100644 --- a/src/metriport/fhir/types/document_manifest.py +++ b/src/metriport/fhir/types/document_manifest.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,43 +24,52 @@ class DocumentManifest(BaseResource): A collection of documents compiled for a purpose together with metadata that applies to the collection. """ - resource_type: typing_extensions.Literal["DocumentManifest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DocumentManifest"] = pydantic.Field(alias="resourceType") master_identifier: typing.Optional[Identifier] = pydantic.Field( alias="masterIdentifier", + default=None, description="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Other identifiers associated with the document manifest, including version independent identifiers." + default=None, + description="Other identifiers associated with the document manifest, including version independent identifiers.", ) status: typing.Optional[DocumentManifestStatus] = pydantic.Field( - description="The status of this document manifest." + default=None, description="The status of this document manifest." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest." + default=None, + description="The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.", ) subject: typing.Optional[Reference] = pydantic.Field( - description="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." + default=None, + description="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", ) created: typing.Optional[DateTime] = pydantic.Field( - description="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)." + default=None, + description="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", ) author: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included." + default=None, + description="Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.", ) recipient: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A patient, practitioner, or organization for which this set of documents is intended." + default=None, + description="A patient, practitioner, or organization for which this set of documents is intended.", ) source: typing.Optional[Uri] = pydantic.Field( - description="Identifies the source system, application, or software that produced the document manifest." + default=None, + description="Identifies the source system, application, or software that produced the document manifest.", ) description: typing.Optional[str] = pydantic.Field( - description='Human-readable description of the source document. This is sometimes known as the "title".' + default=None, + description='Human-readable description of the source document. This is sometimes known as the "title".', ) content: typing.List[Reference] = pydantic.Field( description="The list of Resources that consist of the parts of this manifest." ) related: typing.Optional[typing.List[DocumentManifestRelated]] = pydantic.Field( - description="Related identifiers or resources associated with the DocumentManifest." + default=None, description="Related identifiers or resources associated with the DocumentManifest." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_manifest_related.py b/src/metriport/fhir/types/document_manifest_related.py index 5efad3a..5998384 100644 --- a/src/metriport/fhir/types/document_manifest_related.py +++ b/src/metriport/fhir/types/document_manifest_related.py @@ -20,20 +20,25 @@ class DocumentManifestRelated(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers." + default=None, + description="Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.", ) ref: typing.Optional[Reference] = pydantic.Field( - description="Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc." + default=None, + description="Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_reference.py b/src/metriport/fhir/types/document_reference.py index 16594af..48e63f4 100644 --- a/src/metriport/fhir/types/document_reference.py +++ b/src/metriport/fhir/types/document_reference.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,53 +26,65 @@ class DocumentReference(BaseResource): A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text. """ - resource_type: typing_extensions.Literal["DocumentReference"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DocumentReference"] = pydantic.Field(alias="resourceType") master_identifier: typing.Optional[Identifier] = pydantic.Field( alias="masterIdentifier", + default=None, description="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Other identifiers associated with the document, including version independent identifiers." + default=None, + description="Other identifiers associated with the document, including version independent identifiers.", ) status: typing.Optional[DocumentReferenceStatus] = pydantic.Field( - description="The status of this document reference." + default=None, description="The status of this document reference." ) doc_status: typing.Optional[Code] = pydantic.Field( - alias="docStatus", description="The status of the underlying document." + alias="docStatus", default=None, description="The status of the underlying document." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced." + default=None, + description="Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type." + default=None, + description="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", ) subject: typing.Optional[Reference] = pydantic.Field( - description="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)." + default=None, + description="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", + ) + date: typing.Optional[Instant] = pydantic.Field( + default=None, description="When the document reference was created." ) - date: typing.Optional[Instant] = pydantic.Field(description="When the document reference was created.") author: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies who is responsible for adding the information to the document." + default=None, description="Identifies who is responsible for adding the information to the document." ) authenticator: typing.Optional[Reference] = pydantic.Field( - description="Which person or organization authenticates that this document is valid." + default=None, description="Which person or organization authenticates that this document is valid." ) custodian: typing.Optional[Reference] = pydantic.Field( - description="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." + default=None, + description="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", ) relates_to: typing.Optional[typing.List[DocumentReferenceRelatesTo]] = pydantic.Field( alias="relatesTo", + default=None, description="Relationships that this document has with other document references that already exist.", ) - description: typing.Optional[str] = pydantic.Field(description="Human-readable description of the source document.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human-readable description of the source document." + ) security_label: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="securityLabel", + default=None, description='A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.', ) content: typing.List[DocumentReferenceContent] = pydantic.Field( description="The document and format referenced. There may be multiple content element repetitions, each with a different format." ) context: typing.Optional[DocumentReferenceContext] = pydantic.Field( - description="The clinical context in which the document was prepared." + default=None, description="The clinical context in which the document was prepared." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_reference_content.py b/src/metriport/fhir/types/document_reference_content.py index fa75d4a..d17b00c 100644 --- a/src/metriport/fhir/types/document_reference_content.py +++ b/src/metriport/fhir/types/document_reference_content.py @@ -20,20 +20,24 @@ class DocumentReferenceContent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) attachment: Attachment = pydantic.Field( description="The document or URL of the document along with critical metadata to prove content has integrity." ) format: typing.Optional[Coding] = pydantic.Field( - description="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType." + default=None, + description="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_reference_context.py b/src/metriport/fhir/types/document_reference_context.py index c52939e..c6a5458 100644 --- a/src/metriport/fhir/types/document_reference_context.py +++ b/src/metriport/fhir/types/document_reference_context.py @@ -21,37 +21,45 @@ class DocumentReferenceContext(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) encounter: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Describes the clinical encounter or type of care that the document content is associated with." + default=None, + description="Describes the clinical encounter or type of care that the document content is associated with.", ) event: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.' + default=None, + description='This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.', ) period: typing.Optional[Period] = pydantic.Field( - description="The time period over which the service that is described by the document was provided." + default=None, + description="The time period over which the service that is described by the document was provided.", ) facility_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="facilityType", description="The kind of facility where the patient was seen." + alias="facilityType", default=None, description="The kind of facility where the patient was seen." ) practice_setting: typing.Optional[CodeableConcept] = pydantic.Field( alias="practiceSetting", + default=None, description="This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.", ) source_patient_info: typing.Optional[Reference] = pydantic.Field( alias="sourcePatientInfo", + default=None, description="The Patient Information as known when the document was published. May be a reference to a version specific, or contained.", ) related: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Related identifiers or resources associated with the DocumentReference." + default=None, description="Related identifiers or resources associated with the DocumentReference." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/document_reference_relates_to.py b/src/metriport/fhir/types/document_reference_relates_to.py index a2d5586..c9f1c2f 100644 --- a/src/metriport/fhir/types/document_reference_relates_to.py +++ b/src/metriport/fhir/types/document_reference_relates_to.py @@ -20,17 +20,20 @@ class DocumentReferenceRelatesTo(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[DocumentReferenceRelatesToCode] = pydantic.Field( - description="The type of relationship that this document has with anther document." + default=None, description="The type of relationship that this document has with anther document." ) target: Reference = pydantic.Field(description="The target document of this relationship.") diff --git a/src/metriport/fhir/types/domain_configuration.py b/src/metriport/fhir/types/domain_configuration.py index cbcfdee..fa1f45f 100644 --- a/src/metriport/fhir/types/domain_configuration.py +++ b/src/metriport/fhir/types/domain_configuration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,21 +21,28 @@ class DomainConfiguration(pydantic.BaseModel): Domain specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["DomainConfiguration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DomainConfiguration"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) domain: Uri = pydantic.Field(description="Globally unique domain name for this configuration.") identity_provider: typing.Optional[IdentityProvider] = pydantic.Field( - alias="identityProvider", description="Optional external Identity Provider (IdP) for the domain name." + alias="identityProvider", + default=None, + description="Optional external Identity Provider (IdP) for the domain name.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/dosage.py b/src/metriport/fhir/types/dosage.py index 644e264..6ec3743 100644 --- a/src/metriport/fhir/types/dosage.py +++ b/src/metriport/fhir/types/dosage.py @@ -19,49 +19,62 @@ class Dosage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[int] = pydantic.Field( - description="Indicates the order in which the dosage instructions should be applied or interpreted." + default=None, + description="Indicates the order in which the dosage instructions should be applied or interpreted.", ) - text: typing.Optional[str] = pydantic.Field(description="Free text dosage instructions e.g. SIG.") + text: typing.Optional[str] = pydantic.Field(default=None, description="Free text dosage instructions e.g. SIG.") additional_instruction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="additionalInstruction", + default=None, description='Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").', ) patient_instruction: typing.Optional[str] = pydantic.Field( - alias="patientInstruction", description="Instructions in terms that are understood by the patient or consumer." + alias="patientInstruction", + default=None, + description="Instructions in terms that are understood by the patient or consumer.", + ) + timing: typing.Optional[Timing] = pydantic.Field( + default=None, description="When medication should be administered." ) - timing: typing.Optional[Timing] = pydantic.Field(description="When medication should be administered.") as_needed_boolean: typing.Optional[bool] = pydantic.Field( alias="asNeededBoolean", + default=None, description="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).", ) as_needed_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="asNeededCodeableConcept", + default=None, description="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).", ) - site: typing.Optional[CodeableConcept] = pydantic.Field(description="Body site to administer to.") - route: typing.Optional[CodeableConcept] = pydantic.Field(description="How drug should enter body.") - method: typing.Optional[CodeableConcept] = pydantic.Field(description="Technique for administering medication.") + site: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Body site to administer to.") + route: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="How drug should enter body.") + method: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Technique for administering medication." + ) dose_and_rate: typing.Optional[typing.List[DosageDoseAndRate]] = pydantic.Field( - alias="doseAndRate", description="The amount of medication administered." + alias="doseAndRate", default=None, description="The amount of medication administered." ) max_dose_per_period: typing.Optional[Ratio] = pydantic.Field( - alias="maxDosePerPeriod", description="Upper limit on medication per unit of time." + alias="maxDosePerPeriod", default=None, description="Upper limit on medication per unit of time." ) max_dose_per_administration: typing.Optional[Quantity] = pydantic.Field( - alias="maxDosePerAdministration", description="Upper limit on medication per administration." + alias="maxDosePerAdministration", default=None, description="Upper limit on medication per administration." ) max_dose_per_lifetime: typing.Optional[Quantity] = pydantic.Field( - alias="maxDosePerLifetime", description="Upper limit on medication per lifetime of the patient." + alias="maxDosePerLifetime", default=None, description="Upper limit on medication per lifetime of the patient." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/dosage_dose_and_rate.py b/src/metriport/fhir/types/dosage_dose_and_rate.py index 92e90da..0a2c213 100644 --- a/src/metriport/fhir/types/dosage_dose_and_rate.py +++ b/src/metriport/fhir/types/dosage_dose_and_rate.py @@ -19,30 +19,35 @@ class DosageDoseAndRate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of dose or rate specified, for example, ordered or calculated." + default=None, description="The kind of dose or rate specified, for example, ordered or calculated." + ) + dose_range: typing.Optional[Range] = pydantic.Field( + alias="doseRange", default=None, description="Amount of medication per dose." ) - dose_range: typing.Optional[Range] = pydantic.Field(alias="doseRange", description="Amount of medication per dose.") dose_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="doseQuantity", description="Amount of medication per dose." + alias="doseQuantity", default=None, description="Amount of medication per dose." ) rate_ratio: typing.Optional[Ratio] = pydantic.Field( - alias="rateRatio", description="Amount of medication per unit of time." + alias="rateRatio", default=None, description="Amount of medication per unit of time." ) rate_range: typing.Optional[Range] = pydantic.Field( - alias="rateRange", description="Amount of medication per unit of time." + alias="rateRange", default=None, description="Amount of medication per unit of time." ) rate_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="rateQuantity", description="Amount of medication per unit of time." + alias="rateQuantity", default=None, description="Amount of medication per unit of time." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/duration.py b/src/metriport/fhir/types/duration.py index 417482e..ac2baa6 100644 --- a/src/metriport/fhir/types/duration.py +++ b/src/metriport/fhir/types/duration.py @@ -23,23 +23,27 @@ class Duration(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) value: typing.Optional[Decimal] = pydantic.Field( - description="The value of the measured amount. The value includes an implicit precision in the presentation of the value." + default=None, + description="The value of the measured amount. The value includes an implicit precision in the presentation of the value.", ) comparator: typing.Optional[DurationComparator] = pydantic.Field( - description='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.' + default=None, + description='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.', ) - unit: typing.Optional[str] = pydantic.Field(description="A human-readable form of the unit.") + unit: typing.Optional[str] = pydantic.Field(default=None, description="A human-readable form of the unit.") system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the system that provides the coded form of the unit." + default=None, description="The identification of the system that provides the coded form of the unit." ) code: typing.Optional[Code] = pydantic.Field( - description="A computer processable form of the unit in some unit representation system." + default=None, description="A computer processable form of the unit in some unit representation system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/effect_evidence_synthesis.py b/src/metriport/fhir/types/effect_evidence_synthesis.py index 66e4e02..92d686b 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -35,86 +33,106 @@ class EffectEvidenceSynthesis(BaseResource): The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies. """ - resource_type: typing_extensions.Literal["EffectEvidenceSynthesis"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EffectEvidenceSynthesis"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers." + default=None, + description="An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this effect evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this effect evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the effect evidence synthesis." + default=None, description="A short, descriptive, user-friendly title for the effect evidence synthesis." ) status: typing.Optional[EffectEvidenceSynthesisStatus] = pydantic.Field( - description="The status of this effect evidence synthesis. Enables tracking the life-cycle of the content." + default=None, + description="The status of this effect evidence synthesis. Enables tracking the life-cycle of the content.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes." + default=None, + description="The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the effect evidence synthesis." + default=None, + description="The name of the organization or individual that published the effect evidence synthesis.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the effect evidence synthesis from a consumer's perspective." + default=None, + description="A free text natural language description of the effect evidence synthesis from a consumer's perspective.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate effect evidence synthesis instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the effect evidence synthesis is intended to be used." + default=None, + description="A legal or geographic region in which the effect evidence synthesis is intended to be used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis." + default=None, + description="A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the effect evidence synthesis content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the EffectEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the EffectEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) synthesis_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="synthesisType", description="Type of synthesis eg meta-analysis." + alias="synthesisType", default=None, description="Type of synthesis eg meta-analysis." ) study_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="studyType", description="Type of study eg randomized trial." + alias="studyType", default=None, description="Type of study eg randomized trial." ) population: Reference = pydantic.Field( description="A reference to a EvidenceVariable resource that defines the population for the research." @@ -130,17 +148,20 @@ class EffectEvidenceSynthesis(BaseResource): description="A reference to a EvidenceVariable resomece that defines the outcome for the research." ) sample_size: typing.Optional[EffectEvidenceSynthesisSampleSize] = pydantic.Field( - alias="sampleSize", description="A description of the size of the sample involved in the synthesis." + alias="sampleSize", + default=None, + description="A description of the size of the sample involved in the synthesis.", ) results_by_exposure: typing.Optional[typing.List[EffectEvidenceSynthesisResultsByExposure]] = pydantic.Field( alias="resultsByExposure", + default=None, description="A description of the results for each exposure considered in the effect estimate.", ) effect_estimate: typing.Optional[typing.List[EffectEvidenceSynthesisEffectEstimate]] = pydantic.Field( - alias="effectEstimate", description="The estimated effect of the exposure variant." + alias="effectEstimate", default=None, description="The estimated effect of the exposure variant." ) certainty: typing.Optional[typing.List[EffectEvidenceSynthesisCertainty]] = pydantic.Field( - description="A description of the certainty of the effect estimate." + default=None, description="A description of the certainty of the effect estimate." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_certainty.py b/src/metriport/fhir/types/effect_evidence_synthesis_certainty.py index 64403e1..570bada 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_certainty.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_certainty.py @@ -21,23 +21,28 @@ class EffectEvidenceSynthesisCertainty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) rating: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A rating of the certainty of the effect estimate." + default=None, description="A rating of the certainty of the effect estimate." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) certainty_subcomponent: typing.Optional[typing.List[EffectEvidenceSynthesisCertaintySubcomponent]] = pydantic.Field( - alias="certaintySubcomponent", description="A description of a component of the overall certainty." + alias="certaintySubcomponent", + default=None, + description="A description of a component of the overall certainty.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_certainty_subcomponent.py b/src/metriport/fhir/types/effect_evidence_synthesis_certainty_subcomponent.py index bc56f8d..448c973 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_certainty_subcomponent.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_certainty_subcomponent.py @@ -20,21 +20,26 @@ class EffectEvidenceSynthesisCertaintySubcomponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Type of subcomponent of certainty rating.") + type: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Type of subcomponent of certainty rating." + ) rating: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A rating of a subcomponent of rating certainty." + default=None, description="A rating of a subcomponent of rating certainty." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_effect_estimate.py b/src/metriport/fhir/types/effect_evidence_synthesis_effect_estimate.py index aade64e..960f51e 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_effect_estimate.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_effect_estimate.py @@ -21,28 +21,37 @@ class EffectEvidenceSynthesisEffectEstimate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Human-readable summary of effect estimate.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human-readable summary of effect estimate." + ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Examples include relative risk and mean difference." + default=None, description="Examples include relative risk and mean difference." ) variant_state: typing.Optional[CodeableConcept] = pydantic.Field( - alias="variantState", description="Used to define variant exposure states such as low-risk state." + alias="variantState", default=None, description="Used to define variant exposure states such as low-risk state." + ) + value: typing.Optional[Decimal] = pydantic.Field( + default=None, description="The point estimate of the effect estimate." ) - value: typing.Optional[Decimal] = pydantic.Field(description="The point estimate of the effect estimate.") unit_of_measure: typing.Optional[CodeableConcept] = pydantic.Field( - alias="unitOfMeasure", description="Specifies the UCUM unit for the outcome." + alias="unitOfMeasure", default=None, description="Specifies the UCUM unit for the outcome." ) precision_estimate: typing.Optional[typing.List[EffectEvidenceSynthesisPrecisionEstimate]] = pydantic.Field( - alias="precisionEstimate", description="A description of the precision of the estimate for the effect." + alias="precisionEstimate", + default=None, + description="A description of the precision of the estimate for the effect.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_precision_estimate.py b/src/metriport/fhir/types/effect_evidence_synthesis_precision_estimate.py index 3b376e0..c761165 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_precision_estimate.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_precision_estimate.py @@ -20,21 +20,26 @@ class EffectEvidenceSynthesisPrecisionEstimate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Examples include confidence interval and interquartile range." + default=None, description="Examples include confidence interval and interquartile range." ) - level: typing.Optional[Decimal] = pydantic.Field(description="Use 95 for a 95% confidence interval.") - from_: typing.Optional[Decimal] = pydantic.Field(alias="from", description="Lower bound of confidence interval.") - to: typing.Optional[Decimal] = pydantic.Field(description="Upper bound of confidence interval.") + level: typing.Optional[Decimal] = pydantic.Field(default=None, description="Use 95 for a 95% confidence interval.") + from_: typing.Optional[Decimal] = pydantic.Field( + alias="from", default=None, description="Lower bound of confidence interval." + ) + to: typing.Optional[Decimal] = pydantic.Field(default=None, description="Upper bound of confidence interval.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_results_by_exposure.py b/src/metriport/fhir/types/effect_evidence_synthesis_results_by_exposure.py index 8aeb110..251e161 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_results_by_exposure.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_results_by_exposure.py @@ -23,24 +23,28 @@ class EffectEvidenceSynthesisResultsByExposure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="Human-readable summary of results by exposure state." + default=None, description="Human-readable summary of results by exposure state." ) exposure_state: typing.Optional[EffectEvidenceSynthesisResultsByExposureExposureState] = pydantic.Field( alias="exposureState", + default=None, description="Whether these results are for the exposure state or alternative exposure state.", ) variant_state: typing.Optional[CodeableConcept] = pydantic.Field( - alias="variantState", description="Used to define variant exposure states such as low-risk state." + alias="variantState", default=None, description="Used to define variant exposure states such as low-risk state." ) risk_evidence_synthesis: Reference = pydantic.Field( alias="riskEvidenceSynthesis", description="Reference to a RiskEvidenceSynthesis resource." diff --git a/src/metriport/fhir/types/effect_evidence_synthesis_sample_size.py b/src/metriport/fhir/types/effect_evidence_synthesis_sample_size.py index fa66c14..9865ab7 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis_sample_size.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis_sample_size.py @@ -18,21 +18,28 @@ class EffectEvidenceSynthesisSampleSize(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Human-readable summary of sample size.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human-readable summary of sample size." + ) number_of_studies: typing.Optional[int] = pydantic.Field( - alias="numberOfStudies", description="Number of studies included in this evidence synthesis." + alias="numberOfStudies", default=None, description="Number of studies included in this evidence synthesis." ) number_of_participants: typing.Optional[int] = pydantic.Field( - alias="numberOfParticipants", description="Number of participants included in this evidence synthesis." + alias="numberOfParticipants", + default=None, + description="Number of participants included in this evidence synthesis.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element.py b/src/metriport/fhir/types/element.py index 79d1069..5a6bf7e 100644 --- a/src/metriport/fhir/types/element.py +++ b/src/metriport/fhir/types/element.py @@ -18,10 +18,12 @@ class Element(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition.py b/src/metriport/fhir/types/element_definition.py index c415d86..59da75e 100644 --- a/src/metriport/fhir/types/element_definition.py +++ b/src/metriport/fhir/types/element_definition.py @@ -61,783 +61,978 @@ class ElementDefinition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description='The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.' + default=None, + description='The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.', ) representation: typing.Optional[typing.List[ElementDefinitionRepresentationItem]] = pydantic.Field( - description="Codes that define how this element is represented in instances, when the deviation varies from the normal case." + default=None, + description="Codes that define how this element is represented in instances, when the deviation varies from the normal case.", ) slice_name: typing.Optional[str] = pydantic.Field( alias="sliceName", + default=None, description="The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", ) slice_is_constraining: typing.Optional[bool] = pydantic.Field( alias="sliceIsConstraining", + default=None, description="If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.", ) label: typing.Optional[str] = pydantic.Field( - description="A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." + default=None, + description="A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", ) code: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="A code that has the same meaning as the element in a particular terminology." + default=None, description="A code that has the same meaning as the element in a particular terminology." ) slicing: typing.Optional[ElementDefinitionSlicing] = pydantic.Field( - description="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..\* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." + default=None, + description="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..\* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", ) short: typing.Optional[str] = pydantic.Field( - description="A concise description of what this element means (e.g. for use in autogenerated summaries)." + default=None, + description="A concise description of what this element means (e.g. for use in autogenerated summaries).", ) definition: typing.Optional[Markdown] = pydantic.Field( - description="Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition)." + default=None, + description="Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).", ) comment: typing.Optional[Markdown] = pydantic.Field( - description="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment)." + default=None, + description="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).", ) requirements: typing.Optional[Markdown] = pydantic.Field( - description="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." + default=None, + description="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", ) alias: typing.Optional[typing.List[str]] = pydantic.Field( - description="Identifies additional names by which this element might also be known." + default=None, description="Identifies additional names by which this element might also be known." ) min: typing.Optional[UnsignedInt] = pydantic.Field( - description="The minimum number of times this element SHALL appear in the instance." + default=None, description="The minimum number of times this element SHALL appear in the instance." ) max: typing.Optional[str] = pydantic.Field( - description="The maximum number of times this element is permitted to appear in the instance." + default=None, description="The maximum number of times this element is permitted to appear in the instance." ) base: typing.Optional[ElementDefinitionBase] = pydantic.Field( - description="Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same." + default=None, + description="Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.", ) content_reference: typing.Optional[Uri] = pydantic.Field( alias="contentReference", + default=None, description="Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.", ) type: typing.Optional[typing.List[ElementDefinitionType]] = pydantic.Field( - description="The data type or resource that the value of this element is permitted to be." + default=None, description="The data type or resource that the value of this element is permitted to be." ) default_value_base_64_binary: typing.Optional[str] = pydantic.Field( alias="defaultValueBase64Binary", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_boolean: typing.Optional[bool] = pydantic.Field( alias="defaultValueBoolean", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_canonical: typing.Optional[str] = pydantic.Field( alias="defaultValueCanonical", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_code: typing.Optional[str] = pydantic.Field( alias="defaultValueCode", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_date: typing.Optional[str] = pydantic.Field( alias="defaultValueDate", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_date_time: typing.Optional[str] = pydantic.Field( alias="defaultValueDateTime", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_decimal: typing.Optional[float] = pydantic.Field( alias="defaultValueDecimal", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_id: typing.Optional[str] = pydantic.Field( alias="defaultValueId", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_instant: typing.Optional[str] = pydantic.Field( alias="defaultValueInstant", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_integer: typing.Optional[float] = pydantic.Field( alias="defaultValueInteger", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_markdown: typing.Optional[str] = pydantic.Field( alias="defaultValueMarkdown", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_oid: typing.Optional[str] = pydantic.Field( alias="defaultValueOid", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_positive_int: typing.Optional[float] = pydantic.Field( alias="defaultValuePositiveInt", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_string: typing.Optional[str] = pydantic.Field( alias="defaultValueString", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_time: typing.Optional[str] = pydantic.Field( alias="defaultValueTime", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="defaultValueUnsignedInt", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_uri: typing.Optional[str] = pydantic.Field( alias="defaultValueUri", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_url: typing.Optional[str] = pydantic.Field( alias="defaultValueUrl", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_uuid: typing.Optional[str] = pydantic.Field( alias="defaultValueUuid", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_address: typing.Optional[Address] = pydantic.Field( alias="defaultValueAddress", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_age: typing.Optional[Age] = pydantic.Field( alias="defaultValueAge", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_annotation: typing.Optional[Annotation] = pydantic.Field( alias="defaultValueAnnotation", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="defaultValueAttachment", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="defaultValueCodeableConcept", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_coding: typing.Optional[Coding] = pydantic.Field( alias="defaultValueCoding", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="defaultValueContactPoint", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_count: typing.Optional[Count] = pydantic.Field( alias="defaultValueCount", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_distance: typing.Optional[Distance] = pydantic.Field( alias="defaultValueDistance", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_duration: typing.Optional[Duration] = pydantic.Field( alias="defaultValueDuration", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_human_name: typing.Optional[HumanName] = pydantic.Field( alias="defaultValueHumanName", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_identifier: typing.Optional[Identifier] = pydantic.Field( alias="defaultValueIdentifier", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_money: typing.Optional[Money] = pydantic.Field( alias="defaultValueMoney", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_period: typing.Optional[Period] = pydantic.Field( alias="defaultValuePeriod", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="defaultValueQuantity", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_range: typing.Optional[Range] = pydantic.Field( alias="defaultValueRange", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_ratio: typing.Optional[Ratio] = pydantic.Field( alias="defaultValueRatio", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_reference: typing.Optional[Reference] = pydantic.Field( alias="defaultValueReference", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="defaultValueSampledData", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_signature: typing.Optional[Signature] = pydantic.Field( alias="defaultValueSignature", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_timing: typing.Optional[Timing] = pydantic.Field( alias="defaultValueTiming", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="defaultValueContactDetail", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_contributor: typing.Optional[Contributor] = pydantic.Field( alias="defaultValueContributor", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="defaultValueDataRequirement", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_expression: typing.Optional[Expression] = pydantic.Field( alias="defaultValueExpression", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="defaultValueParameterDefinition", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="defaultValueRelatedArtifact", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="defaultValueTriggerDefinition", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="defaultValueUsageContext", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_dosage: typing.Optional[Dosage] = pydantic.Field( alias="defaultValueDosage", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) default_value_meta: typing.Optional[Meta] = pydantic.Field( alias="defaultValueMeta", + default=None, description="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", ) meaning_when_missing: typing.Optional[Markdown] = pydantic.Field( alias="meaningWhenMissing", + default=None, description="The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", ) order_meaning: typing.Optional[str] = pydantic.Field( alias="orderMeaning", + default=None, description="If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.", ) fixed_base_64_binary: typing.Optional[str] = pydantic.Field( alias="fixedBase64Binary", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_boolean: typing.Optional[bool] = pydantic.Field( alias="fixedBoolean", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_canonical: typing.Optional[str] = pydantic.Field( alias="fixedCanonical", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_code: typing.Optional[str] = pydantic.Field( alias="fixedCode", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_date: typing.Optional[str] = pydantic.Field( alias="fixedDate", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_date_time: typing.Optional[str] = pydantic.Field( alias="fixedDateTime", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_decimal: typing.Optional[float] = pydantic.Field( alias="fixedDecimal", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_id: typing.Optional[str] = pydantic.Field( alias="fixedId", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_instant: typing.Optional[str] = pydantic.Field( alias="fixedInstant", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_integer: typing.Optional[float] = pydantic.Field( alias="fixedInteger", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_markdown: typing.Optional[str] = pydantic.Field( alias="fixedMarkdown", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_oid: typing.Optional[str] = pydantic.Field( alias="fixedOid", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_positive_int: typing.Optional[float] = pydantic.Field( alias="fixedPositiveInt", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_string: typing.Optional[str] = pydantic.Field( alias="fixedString", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_time: typing.Optional[str] = pydantic.Field( alias="fixedTime", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_unsigned_int: typing.Optional[float] = pydantic.Field( alias="fixedUnsignedInt", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_uri: typing.Optional[str] = pydantic.Field( alias="fixedUri", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_url: typing.Optional[str] = pydantic.Field( alias="fixedUrl", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_uuid: typing.Optional[str] = pydantic.Field( alias="fixedUuid", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_address: typing.Optional[Address] = pydantic.Field( alias="fixedAddress", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_age: typing.Optional[Age] = pydantic.Field( alias="fixedAge", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_annotation: typing.Optional[Annotation] = pydantic.Field( alias="fixedAnnotation", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_attachment: typing.Optional[Attachment] = pydantic.Field( alias="fixedAttachment", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="fixedCodeableConcept", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_coding: typing.Optional[Coding] = pydantic.Field( alias="fixedCoding", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="fixedContactPoint", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_count: typing.Optional[Count] = pydantic.Field( alias="fixedCount", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_distance: typing.Optional[Distance] = pydantic.Field( alias="fixedDistance", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_duration: typing.Optional[Duration] = pydantic.Field( alias="fixedDuration", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_human_name: typing.Optional[HumanName] = pydantic.Field( alias="fixedHumanName", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_identifier: typing.Optional[Identifier] = pydantic.Field( alias="fixedIdentifier", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_money: typing.Optional[Money] = pydantic.Field( alias="fixedMoney", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_period: typing.Optional[Period] = pydantic.Field( alias="fixedPeriod", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_quantity: typing.Optional[Quantity] = pydantic.Field( alias="fixedQuantity", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_range: typing.Optional[Range] = pydantic.Field( alias="fixedRange", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_ratio: typing.Optional[Ratio] = pydantic.Field( alias="fixedRatio", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_reference: typing.Optional[Reference] = pydantic.Field( alias="fixedReference", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="fixedSampledData", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_signature: typing.Optional[Signature] = pydantic.Field( alias="fixedSignature", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_timing: typing.Optional[Timing] = pydantic.Field( alias="fixedTiming", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="fixedContactDetail", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_contributor: typing.Optional[Contributor] = pydantic.Field( alias="fixedContributor", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="fixedDataRequirement", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_expression: typing.Optional[Expression] = pydantic.Field( alias="fixedExpression", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="fixedParameterDefinition", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="fixedRelatedArtifact", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="fixedTriggerDefinition", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="fixedUsageContext", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_dosage: typing.Optional[Dosage] = pydantic.Field( alias="fixedDosage", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) fixed_meta: typing.Optional[Meta] = pydantic.Field( alias="fixedMeta", + default=None, description="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", ) pattern_base_64_binary: typing.Optional[str] = pydantic.Field( alias="patternBase64Binary", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_boolean: typing.Optional[bool] = pydantic.Field( alias="patternBoolean", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_canonical: typing.Optional[str] = pydantic.Field( alias="patternCanonical", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_code: typing.Optional[str] = pydantic.Field( alias="patternCode", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_date: typing.Optional[str] = pydantic.Field( alias="patternDate", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_date_time: typing.Optional[str] = pydantic.Field( alias="patternDateTime", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_decimal: typing.Optional[float] = pydantic.Field( alias="patternDecimal", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_id: typing.Optional[str] = pydantic.Field( alias="patternId", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_instant: typing.Optional[str] = pydantic.Field( alias="patternInstant", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_integer: typing.Optional[float] = pydantic.Field( alias="patternInteger", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_markdown: typing.Optional[str] = pydantic.Field( alias="patternMarkdown", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_oid: typing.Optional[str] = pydantic.Field( alias="patternOid", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_positive_int: typing.Optional[float] = pydantic.Field( alias="patternPositiveInt", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_string: typing.Optional[str] = pydantic.Field( alias="patternString", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_time: typing.Optional[str] = pydantic.Field( alias="patternTime", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_unsigned_int: typing.Optional[float] = pydantic.Field( alias="patternUnsignedInt", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_uri: typing.Optional[str] = pydantic.Field( alias="patternUri", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_url: typing.Optional[str] = pydantic.Field( alias="patternUrl", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_uuid: typing.Optional[str] = pydantic.Field( alias="patternUuid", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_address: typing.Optional[Address] = pydantic.Field( alias="patternAddress", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_age: typing.Optional[Age] = pydantic.Field( alias="patternAge", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_annotation: typing.Optional[Annotation] = pydantic.Field( alias="patternAnnotation", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_attachment: typing.Optional[Attachment] = pydantic.Field( alias="patternAttachment", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="patternCodeableConcept", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_coding: typing.Optional[Coding] = pydantic.Field( alias="patternCoding", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="patternContactPoint", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_count: typing.Optional[Count] = pydantic.Field( alias="patternCount", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_distance: typing.Optional[Distance] = pydantic.Field( alias="patternDistance", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_duration: typing.Optional[Duration] = pydantic.Field( alias="patternDuration", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_human_name: typing.Optional[HumanName] = pydantic.Field( alias="patternHumanName", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_identifier: typing.Optional[Identifier] = pydantic.Field( alias="patternIdentifier", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_money: typing.Optional[Money] = pydantic.Field( alias="patternMoney", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_period: typing.Optional[Period] = pydantic.Field( alias="patternPeriod", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_quantity: typing.Optional[Quantity] = pydantic.Field( alias="patternQuantity", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_range: typing.Optional[Range] = pydantic.Field( alias="patternRange", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_ratio: typing.Optional[Ratio] = pydantic.Field( alias="patternRatio", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_reference: typing.Optional[Reference] = pydantic.Field( alias="patternReference", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="patternSampledData", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_signature: typing.Optional[Signature] = pydantic.Field( alias="patternSignature", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_timing: typing.Optional[Timing] = pydantic.Field( alias="patternTiming", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="patternContactDetail", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_contributor: typing.Optional[Contributor] = pydantic.Field( alias="patternContributor", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="patternDataRequirement", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_expression: typing.Optional[Expression] = pydantic.Field( alias="patternExpression", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="patternParameterDefinition", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="patternRelatedArtifact", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="patternTriggerDefinition", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="patternUsageContext", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_dosage: typing.Optional[Dosage] = pydantic.Field( alias="patternDosage", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) pattern_meta: typing.Optional[Meta] = pydantic.Field( alias="patternMeta", + default=None, description="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.", ) example: typing.Optional[typing.List[ElementDefinitionExample]] = pydantic.Field( - description="A sample value for this element demonstrating the type of information that would typically be found in the element." + default=None, + description="A sample value for this element demonstrating the type of information that would typically be found in the element.", ) min_value_date: typing.Optional[str] = pydantic.Field( alias="minValueDate", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_date_time: typing.Optional[str] = pydantic.Field( alias="minValueDateTime", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_instant: typing.Optional[str] = pydantic.Field( alias="minValueInstant", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_time: typing.Optional[str] = pydantic.Field( alias="minValueTime", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_decimal: typing.Optional[float] = pydantic.Field( alias="minValueDecimal", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_integer: typing.Optional[float] = pydantic.Field( alias="minValueInteger", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_positive_int: typing.Optional[float] = pydantic.Field( alias="minValuePositiveInt", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="minValueUnsignedInt", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) min_value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="minValueQuantity", + default=None, description="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_date: typing.Optional[str] = pydantic.Field( alias="maxValueDate", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_date_time: typing.Optional[str] = pydantic.Field( alias="maxValueDateTime", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_instant: typing.Optional[str] = pydantic.Field( alias="maxValueInstant", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_time: typing.Optional[str] = pydantic.Field( alias="maxValueTime", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_decimal: typing.Optional[float] = pydantic.Field( alias="maxValueDecimal", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_integer: typing.Optional[float] = pydantic.Field( alias="maxValueInteger", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_positive_int: typing.Optional[float] = pydantic.Field( alias="maxValuePositiveInt", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="maxValueUnsignedInt", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="maxValueQuantity", + default=None, description="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", ) max_length: typing.Optional[int] = pydantic.Field( alias="maxLength", + default=None, description="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.", ) condition: typing.Optional[typing.List[Id]] = pydantic.Field( - description="A reference to an invariant that may make additional statements about the cardinality or value in the instance." + default=None, + description="A reference to an invariant that may make additional statements about the cardinality or value in the instance.", ) constraint: typing.Optional[typing.List[ElementDefinitionConstraint]] = pydantic.Field( - description="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." + default=None, + description="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", ) must_support: typing.Optional[bool] = pydantic.Field( alias="mustSupport", + default=None, description='If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.', ) is_modifier: typing.Optional[bool] = pydantic.Field( alias="isModifier", + default=None, description="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.", ) is_modifier_reason: typing.Optional[str] = pydantic.Field( alias="isModifierReason", + default=None, description="Explains how that element affects the interpretation of the resource or element that contains it.", ) is_summary: typing.Optional[bool] = pydantic.Field( alias="isSummary", + default=None, description="Whether the element should be included if a client requests a search with the parameter \_summary=true.", ) binding: typing.Optional[ElementDefinitionBinding] = pydantic.Field( - description="Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)." + default=None, + description="Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).", ) mapping: typing.Optional[typing.List[ElementDefinitionMapping]] = pydantic.Field( - description="Identifies a concept from an external specification that roughly corresponds to this element." + default=None, + description="Identifies a concept from an external specification that roughly corresponds to this element.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_base.py b/src/metriport/fhir/types/element_definition_base.py index 22c3d58..c30169d 100644 --- a/src/metriport/fhir/types/element_definition_base.py +++ b/src/metriport/fhir/types/element_definition_base.py @@ -19,23 +19,27 @@ class ElementDefinitionBase(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base." + default=None, + description="The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.", ) min: typing.Optional[UnsignedInt] = pydantic.Field( - description="Minimum cardinality of the base element identified by the path." + default=None, description="Minimum cardinality of the base element identified by the path." ) max: typing.Optional[str] = pydantic.Field( - description="Maximum cardinality of the base element identified by the path." + default=None, description="Maximum cardinality of the base element identified by the path." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_binding.py b/src/metriport/fhir/types/element_definition_binding.py index e417179..d2f041f 100644 --- a/src/metriport/fhir/types/element_definition_binding.py +++ b/src/metriport/fhir/types/element_definition_binding.py @@ -20,23 +20,29 @@ class ElementDefinitionBinding(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) strength: typing.Optional[ElementDefinitionBindingStrength] = pydantic.Field( - description="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." + default=None, + description="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", ) description: typing.Optional[str] = pydantic.Field( - description="Describes the intended use of this particular set of codes." + default=None, description="Describes the intended use of this particular set of codes." ) value_set: typing.Optional[Canonical] = pydantic.Field( - alias="valueSet", description="Refers to the value set that identifies the set of codes the binding refers to." + alias="valueSet", + default=None, + description="Refers to the value set that identifies the set of codes the binding refers to.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_constraint.py b/src/metriport/fhir/types/element_definition_constraint.py index ff77ae7..5efec73 100644 --- a/src/metriport/fhir/types/element_definition_constraint.py +++ b/src/metriport/fhir/types/element_definition_constraint.py @@ -21,35 +21,42 @@ class ElementDefinitionConstraint(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) key: typing.Optional[Id] = pydantic.Field( - description="Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality." + default=None, + description="Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.", ) requirements: typing.Optional[str] = pydantic.Field( - description="Description of why this constraint is necessary or appropriate." + default=None, description="Description of why this constraint is necessary or appropriate." ) severity: typing.Optional[ElementDefinitionConstraintSeverity] = pydantic.Field( - description="Identifies the impact constraint violation has on the conformance of the instance." + default=None, description="Identifies the impact constraint violation has on the conformance of the instance." ) human: typing.Optional[str] = pydantic.Field( - description="Text that can be used to describe the constraint in messages identifying that the constraint has been violated." + default=None, + description="Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", ) expression: typing.Optional[str] = pydantic.Field( - description="A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met." + default=None, + description="A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.", ) xpath: typing.Optional[str] = pydantic.Field( - description="An XPath expression of constraint that can be executed to see if this constraint is met." + default=None, + description="An XPath expression of constraint that can be executed to see if this constraint is met.", ) source: typing.Optional[Canonical] = pydantic.Field( - description="A reference to the original source of the constraint, for traceability purposes." + default=None, description="A reference to the original source of the constraint, for traceability purposes." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_discriminator.py b/src/metriport/fhir/types/element_definition_discriminator.py index 2dd7049..0b5b7c7 100644 --- a/src/metriport/fhir/types/element_definition_discriminator.py +++ b/src/metriport/fhir/types/element_definition_discriminator.py @@ -19,20 +19,24 @@ class ElementDefinitionDiscriminator(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[ElementDefinitionDiscriminatorType] = pydantic.Field( - description="How the element value is interpreted when discrimination is evaluated." + default=None, description="How the element value is interpreted when discrimination is evaluated." ) path: typing.Optional[str] = pydantic.Field( - description="A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based." + default=None, + description="A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_example.py b/src/metriport/fhir/types/element_definition_example.py index 7e73d98..e063cd1 100644 --- a/src/metriport/fhir/types/element_definition_example.py +++ b/src/metriport/fhir/types/element_definition_example.py @@ -49,216 +49,269 @@ class ElementDefinitionExample(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) label: typing.Optional[str] = pydantic.Field( - description="Describes the purpose of this example amoung the set of examples." + default=None, description="Describes the purpose of this example amoung the set of examples." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( alias="valueBase64Binary", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_canonical: typing.Optional[str] = pydantic.Field( alias="valueCanonical", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_code: typing.Optional[str] = pydantic.Field( alias="valueCode", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_date: typing.Optional[str] = pydantic.Field( alias="valueDate", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_decimal: typing.Optional[float] = pydantic.Field( alias="valueDecimal", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_id: typing.Optional[str] = pydantic.Field( alias="valueId", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_instant: typing.Optional[str] = pydantic.Field( alias="valueInstant", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_markdown: typing.Optional[str] = pydantic.Field( alias="valueMarkdown", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_oid: typing.Optional[str] = pydantic.Field( alias="valueOid", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_positive_int: typing.Optional[float] = pydantic.Field( alias="valuePositiveInt", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_time: typing.Optional[str] = pydantic.Field( alias="valueTime", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="valueUnsignedInt", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_uri: typing.Optional[str] = pydantic.Field( alias="valueUri", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_url: typing.Optional[str] = pydantic.Field( alias="valueUrl", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_uuid: typing.Optional[str] = pydantic.Field( alias="valueUuid", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_address: typing.Optional[Address] = pydantic.Field( alias="valueAddress", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_age: typing.Optional[Age] = pydantic.Field( alias="valueAge", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_annotation: typing.Optional[Annotation] = pydantic.Field( alias="valueAnnotation", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_coding: typing.Optional[Coding] = pydantic.Field( alias="valueCoding", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="valueContactPoint", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_count: typing.Optional[Count] = pydantic.Field( alias="valueCount", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_distance: typing.Optional[Distance] = pydantic.Field( alias="valueDistance", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_duration: typing.Optional[Duration] = pydantic.Field( alias="valueDuration", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_human_name: typing.Optional[HumanName] = pydantic.Field( alias="valueHumanName", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_identifier: typing.Optional[Identifier] = pydantic.Field( alias="valueIdentifier", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_money: typing.Optional[Money] = pydantic.Field( alias="valueMoney", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_period: typing.Optional[Period] = pydantic.Field( alias="valuePeriod", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_ratio: typing.Optional[Ratio] = pydantic.Field( alias="valueRatio", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="valueSampledData", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_signature: typing.Optional[Signature] = pydantic.Field( alias="valueSignature", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_timing: typing.Optional[Timing] = pydantic.Field( alias="valueTiming", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="valueContactDetail", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_contributor: typing.Optional[Contributor] = pydantic.Field( alias="valueContributor", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="valueDataRequirement", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_expression: typing.Optional[Expression] = pydantic.Field( alias="valueExpression", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="valueParameterDefinition", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="valueRelatedArtifact", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="valueTriggerDefinition", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="valueUsageContext", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_dosage: typing.Optional[Dosage] = pydantic.Field( alias="valueDosage", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) value_meta: typing.Optional[Meta] = pydantic.Field( alias="valueMeta", + default=None, description="The actual value for the element, which must be one of the types allowed for this element.", ) diff --git a/src/metriport/fhir/types/element_definition_mapping.py b/src/metriport/fhir/types/element_definition_mapping.py index e213767..5a8b77e 100644 --- a/src/metriport/fhir/types/element_definition_mapping.py +++ b/src/metriport/fhir/types/element_definition_mapping.py @@ -20,24 +20,29 @@ class ElementDefinitionMapping(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - identity: typing.Optional[Id] = pydantic.Field(description="An internal reference to the definition of a mapping.") + identity: typing.Optional[Id] = pydantic.Field( + default=None, description="An internal reference to the definition of a mapping." + ) language: typing.Optional[Code] = pydantic.Field( - description="Identifies the computable language in which mapping.map is expressed." + default=None, description="Identifies the computable language in which mapping.map is expressed." ) map: typing.Optional[str] = pydantic.Field( - description="Expresses what part of the target specification corresponds to this element." + default=None, description="Expresses what part of the target specification corresponds to this element." ) comment: typing.Optional[str] = pydantic.Field( - description="Comments that provide information about the mapping or its use." + default=None, description="Comments that provide information about the mapping or its use." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_slicing.py b/src/metriport/fhir/types/element_definition_slicing.py index ff28cbf..7b48b64 100644 --- a/src/metriport/fhir/types/element_definition_slicing.py +++ b/src/metriport/fhir/types/element_definition_slicing.py @@ -20,26 +20,32 @@ class ElementDefinitionSlicing(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) discriminator: typing.Optional[typing.List[ElementDefinitionDiscriminator]] = pydantic.Field( - description="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." + default=None, + description="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", ) description: typing.Optional[str] = pydantic.Field( - description="A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated." + default=None, + description="A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", ) ordered: typing.Optional[bool] = pydantic.Field( - description="If the matching elements have to occur in the same order as defined in the profile." + default=None, description="If the matching elements have to occur in the same order as defined in the profile." ) rules: typing.Optional[ElementDefinitionSlicingRules] = pydantic.Field( - description="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end." + default=None, + description="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/element_definition_type.py b/src/metriport/fhir/types/element_definition_type.py index bb8a92a..9e0cdc5 100644 --- a/src/metriport/fhir/types/element_definition_type.py +++ b/src/metriport/fhir/types/element_definition_type.py @@ -22,30 +22,38 @@ class ElementDefinitionType(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Uri] = pydantic.Field( - description='URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.' + default=None, + description='URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.', ) profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide." + default=None, + description="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.", ) target_profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="targetProfile", + default=None, description='Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.', ) aggregation: typing.Optional[typing.List[ElementDefinitionTypeAggregationItem]] = pydantic.Field( - description="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle." + default=None, + description="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", ) versioning: typing.Optional[ElementDefinitionTypeVersioning] = pydantic.Field( - description="Whether this reference needs to be version specific or version independent, or whether either can be used." + default=None, + description="Whether this reference needs to be version specific or version independent, or whether either can be used.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/encounter.py b/src/metriport/fhir/types/encounter.py index bab8357..e8a639e 100644 --- a/src/metriport/fhir/types/encounter.py +++ b/src/metriport/fhir/types/encounter.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -32,17 +30,19 @@ class Encounter(BaseResource): An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. """ - resource_type: typing_extensions.Literal["Encounter"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Encounter"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier(s) by which this encounter is known." + default=None, description="Identifier(s) by which this encounter is known." ) status: typing.Optional[EncounterStatus] = pydantic.Field( + default=None, description=( "planned \n" " arrived \n" " triaged \n" " in-progress \n" " onleave \n" " finished \n" " cancelled +.\n" - ) + ), ) status_history: typing.Optional[typing.List[EncounterStatusHistory]] = pydantic.Field( alias="statusHistory", + default=None, description="The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.", ) class_: Coding = pydantic.Field( @@ -51,60 +51,77 @@ class Encounter(BaseResource): ) class_history: typing.Optional[typing.List[EncounterClassHistory]] = pydantic.Field( alias="classHistory", + default=None, description="The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." + default=None, + description="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", ) service_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="serviceType", description="Broad categorization of the service that is to be provided (e.g. cardiology)." + alias="serviceType", + default=None, + description="Broad categorization of the service that is to be provided (e.g. cardiology).", + ) + priority: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Indicates the urgency of the encounter." + ) + subject: typing.Optional[Reference] = pydantic.Field( + default=None, description="The patient or group present at the encounter." ) - priority: typing.Optional[CodeableConcept] = pydantic.Field(description="Indicates the urgency of the encounter.") - subject: typing.Optional[Reference] = pydantic.Field(description="The patient or group present at the encounter.") episode_of_care: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="episodeOfCare", + default=None, description="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="The request this encounter satisfies (e.g. incoming referral or procedure request).", ) participant: typing.Optional[typing.List[EncounterParticipant]] = pydantic.Field( - description="The list of people responsible for providing the service." + default=None, description="The list of people responsible for providing the service." ) appointment: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The appointment that scheduled this encounter." + default=None, description="The appointment that scheduled this encounter." + ) + period: typing.Optional[Period] = pydantic.Field( + default=None, description="The start and end time of the encounter." ) - period: typing.Optional[Period] = pydantic.Field(description="The start and end time of the encounter.") length: typing.Optional[Duration] = pydantic.Field( - description="Quantity of time the encounter lasted. This excludes the time during leaves of absence." + default=None, + description="Quantity of time the encounter lasted. This excludes the time during leaves of absence.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.", ) diagnosis: typing.Optional[typing.List[EncounterDiagnosis]] = pydantic.Field( - description="The list of diagnosis relevant to this encounter." + default=None, description="The list of diagnosis relevant to this encounter." ) account: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The set of accounts that may be used for billing for this Encounter." + default=None, description="The set of accounts that may be used for billing for this Encounter." ) hospitalization: typing.Optional[EncounterHospitalization] = pydantic.Field( - description="Details about the admission to a healthcare service." + default=None, description="Details about the admission to a healthcare service." ) location: typing.Optional[typing.List[EncounterLocation]] = pydantic.Field( - description="List of locations where the patient has been during this encounter." + default=None, description="List of locations where the patient has been during this encounter." ) service_provider: typing.Optional[Reference] = pydantic.Field( alias="serviceProvider", + default=None, description="The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.", ) part_of: typing.Optional[Reference] = pydantic.Field( alias="partOf", + default=None, description="Another Encounter of which this encounter is a part of (administratively or in time).", ) diff --git a/src/metriport/fhir/types/encounter_class_history.py b/src/metriport/fhir/types/encounter_class_history.py index 93daa44..ac145b2 100644 --- a/src/metriport/fhir/types/encounter_class_history.py +++ b/src/metriport/fhir/types/encounter_class_history.py @@ -20,13 +20,16 @@ class EncounterClassHistory(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) class_: Coding = pydantic.Field( diff --git a/src/metriport/fhir/types/encounter_diagnosis.py b/src/metriport/fhir/types/encounter_diagnosis.py index ddb5a30..d47aa7a 100644 --- a/src/metriport/fhir/types/encounter_diagnosis.py +++ b/src/metriport/fhir/types/encounter_diagnosis.py @@ -21,22 +21,28 @@ class EncounterDiagnosis(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) condition: Reference = pydantic.Field( description="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." ) use: typing.Optional[CodeableConcept] = pydantic.Field( - description="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)." + default=None, + description="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).", + ) + rank: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="Ranking of the diagnosis (for each role type)." ) - rank: typing.Optional[PositiveInt] = pydantic.Field(description="Ranking of the diagnosis (for each role type).") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/encounter_hospitalization.py b/src/metriport/fhir/types/encounter_hospitalization.py index b626026..1294e41 100644 --- a/src/metriport/fhir/types/encounter_hospitalization.py +++ b/src/metriport/fhir/types/encounter_hospitalization.py @@ -21,42 +21,46 @@ class EncounterHospitalization(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) pre_admission_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="preAdmissionIdentifier", description="Pre-admission identifier." + alias="preAdmissionIdentifier", default=None, description="Pre-admission identifier." ) origin: typing.Optional[Reference] = pydantic.Field( - description="The location/organization from which the patient came before admission." + default=None, description="The location/organization from which the patient came before admission." ) admit_source: typing.Optional[CodeableConcept] = pydantic.Field( - alias="admitSource", description="From where patient was admitted (physician referral, transfer)." + alias="admitSource", default=None, description="From where patient was admitted (physician referral, transfer)." ) re_admission: typing.Optional[CodeableConcept] = pydantic.Field( - alias="reAdmission", description="Whether this hospitalization is a readmission and why if known." + alias="reAdmission", default=None, description="Whether this hospitalization is a readmission and why if known." ) diet_preference: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="dietPreference", description="Diet preferences reported by the patient." + alias="dietPreference", default=None, description="Diet preferences reported by the patient." ) special_courtesy: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="specialCourtesy", description="Special courtesies (VIP, board member)." + alias="specialCourtesy", default=None, description="Special courtesies (VIP, board member)." ) special_arrangement: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="specialArrangement", + default=None, description="Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.", ) destination: typing.Optional[Reference] = pydantic.Field( - description="Location/organization to which the patient is discharged." + default=None, description="Location/organization to which the patient is discharged." ) discharge_disposition: typing.Optional[CodeableConcept] = pydantic.Field( - alias="dischargeDisposition", description="Category or kind of location after discharge." + alias="dischargeDisposition", default=None, description="Category or kind of location after discharge." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/encounter_location.py b/src/metriport/fhir/types/encounter_location.py index 8837171..dce7292 100644 --- a/src/metriport/fhir/types/encounter_location.py +++ b/src/metriport/fhir/types/encounter_location.py @@ -22,25 +22,30 @@ class EncounterLocation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) location: Reference = pydantic.Field(description="The location where the encounter takes place.") status: typing.Optional[EncounterLocationStatus] = pydantic.Field( - description="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time." + default=None, + description="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", ) physical_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="physicalType", + default=None, description="This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.", ) period: typing.Optional[Period] = pydantic.Field( - description="Time period during which the patient was present at the location." + default=None, description="Time period during which the patient was present at the location." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/encounter_participant.py b/src/metriport/fhir/types/encounter_participant.py index 754e43c..2aa4d38 100644 --- a/src/metriport/fhir/types/encounter_participant.py +++ b/src/metriport/fhir/types/encounter_participant.py @@ -21,23 +21,27 @@ class EncounterParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Role of participant in encounter." + default=None, description="Role of participant in encounter." ) period: typing.Optional[Period] = pydantic.Field( - description="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period." + default=None, + description="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", ) individual: typing.Optional[Reference] = pydantic.Field( - description="Persons involved in the encounter other than the patient." + default=None, description="Persons involved in the encounter other than the patient." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/encounter_status_history.py b/src/metriport/fhir/types/encounter_status_history.py index 2041ca6..fd23d69 100644 --- a/src/metriport/fhir/types/encounter_status_history.py +++ b/src/metriport/fhir/types/encounter_status_history.py @@ -20,19 +20,23 @@ class EncounterStatusHistory(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) status: typing.Optional[EncounterStatusHistoryStatus] = pydantic.Field( + default=None, description=( "planned \n" " arrived \n" " triaged \n" " in-progress \n" " onleave \n" " finished \n" " cancelled +.\n" - ) + ), ) period: Period = pydantic.Field(description="The time that the episode was in the specified status.") diff --git a/src/metriport/fhir/types/endpoint.py b/src/metriport/fhir/types/endpoint.py index ad6cdf4..0eb72e8 100644 --- a/src/metriport/fhir/types/endpoint.py +++ b/src/metriport/fhir/types/endpoint.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,29 +26,32 @@ class Endpoint(BaseResource): The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information. """ - resource_type: typing_extensions.Literal["Endpoint"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Endpoint"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for the organization that is used to identify the endpoint across multiple disparate systems." + default=None, + description="Identifier for the organization that is used to identify the endpoint across multiple disparate systems.", ) status: typing.Optional[EndpointStatus] = pydantic.Field( - description=("active \n" " suspended \n" " error \n" " off \n" " test.\n") + default=None, description=("active \n" " suspended \n" " error \n" " off \n" " test.\n") ) connection_type: Coding = pydantic.Field( alias="connectionType", description="A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).", ) name: typing.Optional[str] = pydantic.Field( - description="A friendly name that this endpoint can be referred to with." + default=None, description="A friendly name that this endpoint can be referred to with." ) managing_organization: typing.Optional[Reference] = pydantic.Field( alias="managingOrganization", + default=None, description="The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).", ) contact: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting." + default=None, + description="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.", ) period: typing.Optional[Period] = pydantic.Field( - description="The interval during which the endpoint is expected to be operational." + default=None, description="The interval during which the endpoint is expected to be operational." ) payload_type: typing.List[CodeableConcept] = pydantic.Field( alias="payloadType", @@ -58,13 +59,14 @@ class Endpoint(BaseResource): ) payload_mime_type: typing.Optional[typing.List[Code]] = pydantic.Field( alias="payloadMimeType", + default=None, description="The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).", ) address: typing.Optional[Url] = pydantic.Field( - description="The uri that describes the actual end-point to connect to." + default=None, description="The uri that describes the actual end-point to connect to." ) header: typing.Optional[typing.List[str]] = pydantic.Field( - description="Additional headers / information to send as part of the notification." + default=None, description="Additional headers / information to send as part of the notification." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/enrollment_request.py b/src/metriport/fhir/types/enrollment_request.py index 1d69eda..b1ef111 100644 --- a/src/metriport/fhir/types/enrollment_request.py +++ b/src/metriport/fhir/types/enrollment_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -23,19 +21,23 @@ class EnrollmentRequest(BaseResource): This resource provides the insurance enrollment details to the insurer regarding a specified coverage. """ - resource_type: typing_extensions.Literal["EnrollmentRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EnrollmentRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="The Response business identifier." + default=None, description="The Response business identifier." + ) + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") + created: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date when this resource was created." + ) + insurer: typing.Optional[Reference] = pydantic.Field( + default=None, description="The Insurer who is target of the request." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") - created: typing.Optional[DateTime] = pydantic.Field(description="The date when this resource was created.") - insurer: typing.Optional[Reference] = pydantic.Field(description="The Insurer who is target of the request.") provider: typing.Optional[Reference] = pydantic.Field( - description="The practitioner who is responsible for the services rendered to the patient." + default=None, description="The practitioner who is responsible for the services rendered to the patient." ) - candidate: typing.Optional[Reference] = pydantic.Field(description="Patient Resource.") + candidate: typing.Optional[Reference] = pydantic.Field(default=None, description="Patient Resource.") coverage: typing.Optional[Reference] = pydantic.Field( - description="Reference to the program or plan identification, underwriter or payor." + default=None, description="Reference to the program or plan identification, underwriter or payor." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/enrollment_response.py b/src/metriport/fhir/types/enrollment_response.py index be2893e..a4ecaee 100644 --- a/src/metriport/fhir/types/enrollment_response.py +++ b/src/metriport/fhir/types/enrollment_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,24 +22,29 @@ class EnrollmentResponse(BaseResource): This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource. """ - resource_type: typing_extensions.Literal["EnrollmentResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EnrollmentResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="The Response business identifier." + default=None, description="The Response business identifier." + ) + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") + request: typing.Optional[Reference] = pydantic.Field( + default=None, description="Original request resource reference." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") - request: typing.Optional[Reference] = pydantic.Field(description="Original request resource reference.") outcome: typing.Optional[EnrollmentResponseOutcome] = pydantic.Field( - description="Processing status: error, complete." + default=None, description="Processing status: error, complete." + ) + disposition: typing.Optional[str] = pydantic.Field( + default=None, description="A description of the status of the adjudication." ) - disposition: typing.Optional[str] = pydantic.Field(description="A description of the status of the adjudication.") created: typing.Optional[DateTime] = pydantic.Field( - description="The date when the enclosed suite of services were performed or completed." + default=None, description="The date when the enclosed suite of services were performed or completed." ) organization: typing.Optional[Reference] = pydantic.Field( - description="The Insurer who produced this adjudicated response." + default=None, description="The Insurer who produced this adjudicated response." ) request_provider: typing.Optional[Reference] = pydantic.Field( alias="requestProvider", + default=None, description="The practitioner who is responsible for the services rendered to the patient.", ) diff --git a/src/metriport/fhir/types/episode_of_care.py b/src/metriport/fhir/types/episode_of_care.py index 71662f9..ec5e1a1 100644 --- a/src/metriport/fhir/types/episode_of_care.py +++ b/src/metriport/fhir/types/episode_of_care.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,43 +24,52 @@ class EpisodeOfCare(BaseResource): An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. """ - resource_type: typing_extensions.Literal["EpisodeOfCare"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EpisodeOfCare"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes." + default=None, + description="The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.", ) status: typing.Optional[EpisodeOfCareStatus] = pydantic.Field( - description=("planned \n" " waitlist \n" " active \n" " onhold \n" " finished \n" " cancelled.\n") + default=None, description=("planned \n" " waitlist \n" " active \n" " onhold \n" " finished \n" " cancelled.\n") ) status_history: typing.Optional[typing.List[EpisodeOfCareStatusHistory]] = pydantic.Field( alias="statusHistory", + default=None, description="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care." + default=None, + description="A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.", ) diagnosis: typing.Optional[typing.List[EpisodeOfCareDiagnosis]] = pydantic.Field( - description="The list of diagnosis relevant to this episode of care." + default=None, description="The list of diagnosis relevant to this episode of care." ) patient: Reference = pydantic.Field(description="The patient who is the focus of this episode of care.") managing_organization: typing.Optional[Reference] = pydantic.Field( alias="managingOrganization", + default=None, description="The organization that has assumed the specific responsibilities for the specified duration.", ) period: typing.Optional[Period] = pydantic.Field( - description="The interval during which the managing organization assumes the defined responsibility." + default=None, + description="The interval during which the managing organization assumes the defined responsibility.", ) referral_request: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="referralRequest", + default=None, description="Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", ) care_manager: typing.Optional[Reference] = pydantic.Field( - alias="careManager", description="The practitioner that is the care manager/care coordinator for this patient." + alias="careManager", + default=None, + description="The practitioner that is the care manager/care coordinator for this patient.", ) team: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The list of practitioners that may be facilitating this episode of care for specific purposes." + default=None, + description="The list of practitioners that may be facilitating this episode of care for specific purposes.", ) account: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The set of accounts that may be used for billing for this EpisodeOfCare." + default=None, description="The set of accounts that may be used for billing for this EpisodeOfCare." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/episode_of_care_diagnosis.py b/src/metriport/fhir/types/episode_of_care_diagnosis.py index 1b3c875..160961d 100644 --- a/src/metriport/fhir/types/episode_of_care_diagnosis.py +++ b/src/metriport/fhir/types/episode_of_care_diagnosis.py @@ -21,22 +21,28 @@ class EpisodeOfCareDiagnosis(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) condition: Reference = pydantic.Field( description="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)." + default=None, + description="Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).", + ) + rank: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="Ranking of the diagnosis (for each role type)." ) - rank: typing.Optional[PositiveInt] = pydantic.Field(description="Ranking of the diagnosis (for each role type).") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/episode_of_care_status_history.py b/src/metriport/fhir/types/episode_of_care_status_history.py index 67d10f7..71d6105 100644 --- a/src/metriport/fhir/types/episode_of_care_status_history.py +++ b/src/metriport/fhir/types/episode_of_care_status_history.py @@ -20,17 +20,20 @@ class EpisodeOfCareStatusHistory(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) status: typing.Optional[EpisodeOfCareStatusHistoryStatus] = pydantic.Field( - description=("planned \n" " waitlist \n" " active \n" " onhold \n" " finished \n" " cancelled.\n") + default=None, description=("planned \n" " waitlist \n" " active \n" " onhold \n" " finished \n" " cancelled.\n") ) period: Period = pydantic.Field( description="The period during this EpisodeOfCare that the specific status applied." diff --git a/src/metriport/fhir/types/event_definition.py b/src/metriport/fhir/types/event_definition.py index bb58977..556e189 100644 --- a/src/metriport/fhir/types/event_definition.py +++ b/src/metriport/fhir/types/event_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -31,96 +29,119 @@ class EventDefinition(BaseResource): The EventDefinition resource provides a reusable description of when a particular event can occur. """ - resource_type: typing_extensions.Literal["EventDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EventDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the event definition." + default=None, description="A short, descriptive, user-friendly title for the event definition." ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the event definition giving additional information about its content." + default=None, + description="An explanatory or alternate title for the event definition giving additional information about its content.", ) status: typing.Optional[EventDefinitionStatus] = pydantic.Field( - description="The status of this event definition. Enables tracking the life-cycle of the content." + default=None, description="The status of this event definition. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="A code or group definition that describes the intended subject of the event definition.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="A code or group definition that describes the intended subject of the event definition.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes." + default=None, + description="The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the event definition." + default=None, description="The name of the organization or individual that published the event definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the event definition from a consumer's perspective." + default=None, + description="A free text natural language description of the event definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the event definition is intended to be used." + default=None, description="A legal or geographic region in which the event definition is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this event definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this event definition is needed and why it has been designed as it has.", ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description of how the event definition is used from a clinical perspective." + default=None, + description="A detailed description of how the event definition is used from a clinical perspective.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition." + default=None, + description="A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the event definition content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related resources such as additional documentation, justification, or bibliographic references.", ) trigger: typing.List[TriggerDefinition] = pydantic.Field( diff --git a/src/metriport/fhir/types/evidence.py b/src/metriport/fhir/types/evidence.py index d4ef1b9..e970f91 100644 --- a/src/metriport/fhir/types/evidence.py +++ b/src/metriport/fhir/types/evidence.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -31,86 +29,105 @@ class Evidence(BaseResource): The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["Evidence"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Evidence"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers." + default=None, + description="An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this evidence when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this evidence when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the evidence." + default=None, description="A short, descriptive, user-friendly title for the evidence." ) short_title: typing.Optional[str] = pydantic.Field( alias="shortTitle", + default=None, description="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the Evidence giving additional information about its content." + default=None, + description="An explanatory or alternate title for the Evidence giving additional information about its content.", ) status: typing.Optional[EvidenceStatus] = pydantic.Field( - description="The status of this evidence. Enables tracking the life-cycle of the content." + default=None, description="The status of this evidence. Enables tracking the life-cycle of the content." ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes." + default=None, + description="The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the evidence." + default=None, description="The name of the organization or individual that published the evidence." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the evidence from a consumer's perspective." + default=None, + description="A free text natural language description of the evidence from a consumer's perspective.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the evidence is intended to be used." + default=None, description="A legal or geographic region in which the evidence is intended to be used." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence." + default=None, + description="A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the evidence content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the Evidence. Topics provide a high-level categorization grouping types of Evidences that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the Evidence. Topics provide a high-level categorization grouping types of Evidences that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) exposure_background: Reference = pydantic.Field( @@ -119,10 +136,12 @@ class Evidence(BaseResource): ) exposure_variant: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="exposureVariant", + default=None, description="A reference to a EvidenceVariable resource that defines the exposure for the research.", ) outcome: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A reference to a EvidenceVariable resomece that defines the outcome for the research." + default=None, + description="A reference to a EvidenceVariable resomece that defines the outcome for the research.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/evidence_variable.py b/src/metriport/fhir/types/evidence_variable.py index d70c5b8..e5b3e79 100644 --- a/src/metriport/fhir/types/evidence_variable.py +++ b/src/metriport/fhir/types/evidence_variable.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,90 +30,110 @@ class EvidenceVariable(BaseResource): The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["EvidenceVariable"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EvidenceVariable"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers." + default=None, + description="An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the evidence variable." + default=None, description="A short, descriptive, user-friendly title for the evidence variable." ) short_title: typing.Optional[str] = pydantic.Field( alias="shortTitle", + default=None, description="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the EvidenceVariable giving additional information about its content." + default=None, + description="An explanatory or alternate title for the EvidenceVariable giving additional information about its content.", ) status: typing.Optional[EvidenceVariableStatus] = pydantic.Field( - description="The status of this evidence variable. Enables tracking the life-cycle of the content." + default=None, + description="The status of this evidence variable. Enables tracking the life-cycle of the content.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes." + default=None, + description="The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the evidence variable." + default=None, description="The name of the organization or individual that published the evidence variable." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the evidence variable from a consumer's perspective." + default=None, + description="A free text natural language description of the evidence variable from a consumer's perspective.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the evidence variable is intended to be used." + default=None, description="A legal or geographic region in which the evidence variable is intended to be used." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable." + default=None, + description="A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the evidence variable content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the EvidenceVariable. Topics provide a high-level categorization grouping types of EvidenceVariables that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the EvidenceVariable. Topics provide a high-level categorization grouping types of EvidenceVariables that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) type: typing.Optional[EvidenceVariableType] = pydantic.Field( - description="The type of evidence element, a population, an exposure, or an outcome." + default=None, description="The type of evidence element, a population, an exposure, or an outcome." ) characteristic: typing.List[EvidenceVariableCharacteristic] = pydantic.Field( description='A characteristic that defines the members of the evidence element. Multiple characteristics are applied with "and" semantics.' diff --git a/src/metriport/fhir/types/evidence_variable_characteristic.py b/src/metriport/fhir/types/evidence_variable_characteristic.py index b4c0f23..8842352 100644 --- a/src/metriport/fhir/types/evidence_variable_characteristic.py +++ b/src/metriport/fhir/types/evidence_variable_characteristic.py @@ -28,66 +28,87 @@ class EvidenceVariableCharacteristic(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user." + default=None, + description="A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.", ) definition_reference: typing.Optional[Reference] = pydantic.Field( alias="definitionReference", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_canonical: typing.Optional[str] = pydantic.Field( alias="definitionCanonical", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="definitionCodeableConcept", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_expression: typing.Optional[Expression] = pydantic.Field( alias="definitionExpression", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="definitionDataRequirement", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="definitionTriggerDefinition", + default=None, description="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) usage_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="usageContext", + default=None, description="Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.", ) exclude: typing.Optional[bool] = pydantic.Field( - description="When true, members with this characteristic are excluded from the element." + default=None, description="When true, members with this characteristic are excluded from the element." ) participant_effective_date_time: typing.Optional[str] = pydantic.Field( - alias="participantEffectiveDateTime", description="Indicates what effective period the study covers." + alias="participantEffectiveDateTime", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_period: typing.Optional[Period] = pydantic.Field( - alias="participantEffectivePeriod", description="Indicates what effective period the study covers." + alias="participantEffectivePeriod", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_duration: typing.Optional[Duration] = pydantic.Field( - alias="participantEffectiveDuration", description="Indicates what effective period the study covers." + alias="participantEffectiveDuration", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_timing: typing.Optional[Timing] = pydantic.Field( - alias="participantEffectiveTiming", description="Indicates what effective period the study covers." + alias="participantEffectiveTiming", + default=None, + description="Indicates what effective period the study covers.", ) time_from_start: typing.Optional[Duration] = pydantic.Field( - alias="timeFromStart", description="Indicates duration from the participant's study entry." + alias="timeFromStart", default=None, description="Indicates duration from the participant's study entry." ) group_measure: typing.Optional[EvidenceVariableCharacteristicGroupMeasure] = pydantic.Field( - alias="groupMeasure", description="Indicates how elements are aggregated within the study effective period." + alias="groupMeasure", + default=None, + description="Indicates how elements are aggregated within the study effective period.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/example_scenario.py b/src/metriport/fhir/types/example_scenario.py index d3b607c..c7a72c3 100644 --- a/src/metriport/fhir/types/example_scenario.py +++ b/src/metriport/fhir/types/example_scenario.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,57 +29,68 @@ class ExampleScenario(BaseResource): Example of workflow instance. """ - resource_type: typing_extensions.Literal["ExampleScenario"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ExampleScenario"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers." + default=None, + description="An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) status: typing.Optional[ExampleScenarioStatus] = pydantic.Field( - description="The status of this example scenario. Enables tracking the life-cycle of the content." + default=None, description="The status of this example scenario. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition')." + default=None, + description="The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the example scenario." + default=None, description="The name of the organization or individual that published the example scenario." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the example scenario is intended to be used." + default=None, description="A legal or geographic region in which the example scenario is intended to be used." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario." + default=None, + description="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario." + default=None, + description="What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.", ) actor: typing.Optional[typing.List[ExampleScenarioActor]] = pydantic.Field( - description="Actor participating in the resource." + default=None, description="Actor participating in the resource." ) instance: typing.Optional[typing.List[ExampleScenarioInstance]] = pydantic.Field( - description="Each resource and each version that is present in the workflow." + default=None, description="Each resource and each version that is present in the workflow." ) process: typing.Optional[typing.List[ExampleScenarioProcess]] = pydantic.Field( - description="Each major process - a group of operations." + default=None, description="Each major process - a group of operations." + ) + workflow: typing.Optional[typing.List[Canonical]] = pydantic.Field( + default=None, description="Another nested workflow." ) - workflow: typing.Optional[typing.List[Canonical]] = pydantic.Field(description="Another nested workflow.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/example_scenario_actor.py b/src/metriport/fhir/types/example_scenario_actor.py index 52933ef..7cbca21 100644 --- a/src/metriport/fhir/types/example_scenario_actor.py +++ b/src/metriport/fhir/types/example_scenario_actor.py @@ -20,21 +20,26 @@ class ExampleScenarioActor(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - actor_id: typing.Optional[str] = pydantic.Field(alias="actorId", description="ID or acronym of actor.") + actor_id: typing.Optional[str] = pydantic.Field( + alias="actorId", default=None, description="ID or acronym of actor." + ) type: typing.Optional[ExampleScenarioActorType] = pydantic.Field( - description="The type of actor - person or system." + default=None, description="The type of actor - person or system." ) - name: typing.Optional[str] = pydantic.Field(description="The name of the actor as shown in the page.") - description: typing.Optional[Markdown] = pydantic.Field(description="The description of the actor.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The name of the actor as shown in the page.") + description: typing.Optional[Markdown] = pydantic.Field(default=None, description="The description of the actor.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/example_scenario_alternative.py b/src/metriport/fhir/types/example_scenario_alternative.py index c55797b..0ac3e6b 100644 --- a/src/metriport/fhir/types/example_scenario_alternative.py +++ b/src/metriport/fhir/types/example_scenario_alternative.py @@ -21,23 +21,28 @@ class ExampleScenarioAlternative(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) title: typing.Optional[str] = pydantic.Field( - description="The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked." + default=None, + description="The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.", ) description: typing.Optional[Markdown] = pydantic.Field( - description="A human-readable description of the alternative explaining when the alternative should occur rather than the base step." + default=None, + description="A human-readable description of the alternative explaining when the alternative should occur rather than the base step.", ) step: typing.Optional[typing.List[ExampleScenarioStep]] = pydantic.Field( - description="What happens in each alternative option." + default=None, description="What happens in each alternative option." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/example_scenario_contained_instance.py b/src/metriport/fhir/types/example_scenario_contained_instance.py index c7688e4..a553c01 100644 --- a/src/metriport/fhir/types/example_scenario_contained_instance.py +++ b/src/metriport/fhir/types/example_scenario_contained_instance.py @@ -18,20 +18,23 @@ class ExampleScenarioContainedInstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) resource_id: typing.Optional[str] = pydantic.Field( - alias="resourceId", description="Each resource contained in the instance." + alias="resourceId", default=None, description="Each resource contained in the instance." ) version_id: typing.Optional[str] = pydantic.Field( - alias="versionId", description="A specific version of a resource contained in the instance." + alias="versionId", default=None, description="A specific version of a resource contained in the instance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/example_scenario_instance.py b/src/metriport/fhir/types/example_scenario_instance.py index cc2f07f..23f4a9a 100644 --- a/src/metriport/fhir/types/example_scenario_instance.py +++ b/src/metriport/fhir/types/example_scenario_instance.py @@ -22,28 +22,34 @@ class ExampleScenarioInstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) resource_id: typing.Optional[str] = pydantic.Field( - alias="resourceId", description="The id of the resource for referencing." + alias="resourceId", default=None, description="The id of the resource for referencing." ) - resource_type: typing.Optional[Code] = pydantic.Field(alias="resourceType", description="The type of the resource.") - name: typing.Optional[str] = pydantic.Field(description="A short name for the resource instance.") + resource_type: typing.Optional[Code] = pydantic.Field( + alias="resourceType", default=None, description="The type of the resource." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="A short name for the resource instance.") description: typing.Optional[Markdown] = pydantic.Field( - description="Human-friendly description of the resource instance." + default=None, description="Human-friendly description of the resource instance." ) version: typing.Optional[typing.List[ExampleScenarioVersion]] = pydantic.Field( - description="A specific version of the resource." + default=None, description="A specific version of the resource." ) contained_instance: typing.Optional[typing.List[ExampleScenarioContainedInstance]] = pydantic.Field( alias="containedInstance", + default=None, description="Resources contained in the instance (e.g. the observations contained in a bundle).", ) diff --git a/src/metriport/fhir/types/example_scenario_operation.py b/src/metriport/fhir/types/example_scenario_operation.py index 9e4dc68..433e405 100644 --- a/src/metriport/fhir/types/example_scenario_operation.py +++ b/src/metriport/fhir/types/example_scenario_operation.py @@ -20,32 +20,43 @@ class ExampleScenarioOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - number: typing.Optional[str] = pydantic.Field(description="The sequential number of the interaction, e.g. 1.2.5.") - type: typing.Optional[str] = pydantic.Field(description="The type of operation - CRUD.") - name: typing.Optional[str] = pydantic.Field(description="The human-friendly name of the interaction.") - initiator: typing.Optional[str] = pydantic.Field(description="Who starts the transaction.") - receiver: typing.Optional[str] = pydantic.Field(description="Who receives the transaction.") - description: typing.Optional[Markdown] = pydantic.Field(description="A comment to be inserted in the diagram.") + number: typing.Optional[str] = pydantic.Field( + default=None, description="The sequential number of the interaction, e.g. 1.2.5." + ) + type: typing.Optional[str] = pydantic.Field(default=None, description="The type of operation - CRUD.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The human-friendly name of the interaction.") + initiator: typing.Optional[str] = pydantic.Field(default=None, description="Who starts the transaction.") + receiver: typing.Optional[str] = pydantic.Field(default=None, description="Who receives the transaction.") + description: typing.Optional[Markdown] = pydantic.Field( + default=None, description="A comment to be inserted in the diagram." + ) initiator_active: typing.Optional[bool] = pydantic.Field( - alias="initiatorActive", description="Whether the initiator is deactivated right after the transaction." + alias="initiatorActive", + default=None, + description="Whether the initiator is deactivated right after the transaction.", ) receiver_active: typing.Optional[bool] = pydantic.Field( - alias="receiverActive", description="Whether the receiver is deactivated right after the transaction." + alias="receiverActive", + default=None, + description="Whether the receiver is deactivated right after the transaction.", ) request: typing.Optional[ExampleScenarioContainedInstance] = pydantic.Field( - description="Each resource instance used by the initiator." + default=None, description="Each resource instance used by the initiator." ) response: typing.Optional[ExampleScenarioContainedInstance] = pydantic.Field( - description="Each resource instance used by the responder." + default=None, description="Each resource instance used by the responder." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/example_scenario_process.py b/src/metriport/fhir/types/example_scenario_process.py index 997a35b..e4e4479 100644 --- a/src/metriport/fhir/types/example_scenario_process.py +++ b/src/metriport/fhir/types/example_scenario_process.py @@ -21,26 +21,33 @@ class ExampleScenarioProcess(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - title: typing.Optional[str] = pydantic.Field(description="The diagram title of the group of operations.") + title: typing.Optional[str] = pydantic.Field( + default=None, description="The diagram title of the group of operations." + ) description: typing.Optional[Markdown] = pydantic.Field( - description="A longer description of the group of operations." + default=None, description="A longer description of the group of operations." ) pre_conditions: typing.Optional[Markdown] = pydantic.Field( - alias="preConditions", description="Description of initial status before the process starts." + alias="preConditions", default=None, description="Description of initial status before the process starts." ) post_conditions: typing.Optional[Markdown] = pydantic.Field( - alias="postConditions", description="Description of final status after the process ends." + alias="postConditions", default=None, description="Description of final status after the process ends." + ) + step: typing.Optional[typing.List[ExampleScenarioStep]] = pydantic.Field( + default=None, description="Each step of the process." ) - step: typing.Optional[typing.List[ExampleScenarioStep]] = pydantic.Field(description="Each step of the process.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/example_scenario_step.py b/src/metriport/fhir/types/example_scenario_step.py index 3c4fb58..4488b93 100644 --- a/src/metriport/fhir/types/example_scenario_step.py +++ b/src/metriport/fhir/types/example_scenario_step.py @@ -21,20 +21,28 @@ class ExampleScenarioStep(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - process: typing.Optional[typing.List[ExampleScenarioProcess]] = pydantic.Field(description="Nested process.") - pause: typing.Optional[bool] = pydantic.Field(description="If there is a pause in the flow.") - operation: typing.Optional[ExampleScenarioOperation] = pydantic.Field(description="Each interaction or action.") + process: typing.Optional[typing.List[ExampleScenarioProcess]] = pydantic.Field( + default=None, description="Nested process." + ) + pause: typing.Optional[bool] = pydantic.Field(default=None, description="If there is a pause in the flow.") + operation: typing.Optional[ExampleScenarioOperation] = pydantic.Field( + default=None, description="Each interaction or action." + ) alternative: typing.Optional[typing.List[ExampleScenarioAlternative]] = pydantic.Field( - description="Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances." + default=None, + description="Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/example_scenario_version.py b/src/metriport/fhir/types/example_scenario_version.py index 1da4f0d..d4d4992 100644 --- a/src/metriport/fhir/types/example_scenario_version.py +++ b/src/metriport/fhir/types/example_scenario_version.py @@ -19,19 +19,24 @@ class ExampleScenarioVersion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) version_id: typing.Optional[str] = pydantic.Field( - alias="versionId", description="The identifier of a specific version of a resource." + alias="versionId", default=None, description="The identifier of a specific version of a resource." + ) + description: typing.Optional[Markdown] = pydantic.Field( + default=None, description="The description of the resource version." ) - description: typing.Optional[Markdown] = pydantic.Field(description="The description of the resource version.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/explanation_of_benefit.py b/src/metriport/fhir/types/explanation_of_benefit.py index 4b5aa70..4168db8 100644 --- a/src/metriport/fhir/types/explanation_of_benefit.py +++ b/src/metriport/fhir/types/explanation_of_benefit.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -43,32 +41,34 @@ class ExplanationOfBenefit(BaseResource): This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. """ - resource_type: typing_extensions.Literal["ExplanationOfBenefit"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ExplanationOfBenefit"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this explanation of benefit." + default=None, description="A unique identifier assigned to this explanation of benefit." ) status: typing.Optional[ExplanationOfBenefitStatus] = pydantic.Field( - description="The status of the resource instance." + default=None, description="The status of the resource instance." ) type: CodeableConcept = pydantic.Field( description="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." ) sub_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="subType", + default=None, description="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", ) use: typing.Optional[Code] = pydantic.Field( - description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future." + default=None, + description="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.", ) patient: Reference = pydantic.Field( description="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought." ) billable_period: typing.Optional[Period] = pydantic.Field( - alias="billablePeriod", description="The period for which charges are being submitted." + alias="billablePeriod", default=None, description="The period for which charges are being submitted." ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date this resource was created.") + created: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date this resource was created.") enterer: typing.Optional[Reference] = pydantic.Field( - description="Individual who created the claim, predetermination or preauthorization." + default=None, description="Individual who created the claim, predetermination or preauthorization." ) insurer: Reference = pydantic.Field( description="The party responsible for authorization, adjudication and reimbursement." @@ -77,104 +77,126 @@ class ExplanationOfBenefit(BaseResource): description="The provider which is responsible for the claim, predetermination or preauthorization." ) priority: typing.Optional[CodeableConcept] = pydantic.Field( - description="The provider-required urgency of processing the request. Typical values include: stat, routine deferred." + default=None, + description="The provider-required urgency of processing the request. Typical values include: stat, routine deferred.", ) funds_reserve_requested: typing.Optional[CodeableConcept] = pydantic.Field( alias="fundsReserveRequested", + default=None, description="A code to indicate whether and for whom funds are to be reserved for future claims.", ) funds_reserve: typing.Optional[CodeableConcept] = pydantic.Field( alias="fundsReserve", + default=None, description="A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.", ) related: typing.Optional[typing.List[ExplanationOfBenefitRelated]] = pydantic.Field( - description="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event." + default=None, + description="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.", ) prescription: typing.Optional[Reference] = pydantic.Field( - description="Prescription to support the dispensing of pharmacy, device or vision products." + default=None, description="Prescription to support the dispensing of pharmacy, device or vision products." ) original_prescription: typing.Optional[Reference] = pydantic.Field( alias="originalPrescription", + default=None, description="Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.", ) payee: typing.Optional[ExplanationOfBenefitPayee] = pydantic.Field( - description="The party to be reimbursed for cost of the products and services according to the terms of the policy." + default=None, + description="The party to be reimbursed for cost of the products and services according to the terms of the policy.", + ) + referral: typing.Optional[Reference] = pydantic.Field( + default=None, description="A reference to a referral resource." + ) + facility: typing.Optional[Reference] = pydantic.Field( + default=None, description="Facility where the services were provided." ) - referral: typing.Optional[Reference] = pydantic.Field(description="A reference to a referral resource.") - facility: typing.Optional[Reference] = pydantic.Field(description="Facility where the services were provided.") claim: typing.Optional[Reference] = pydantic.Field( - description="The business identifier for the instance of the adjudication request: claim predetermination or preauthorization." + default=None, + description="The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.", ) claim_response: typing.Optional[Reference] = pydantic.Field( alias="claimResponse", + default=None, description="The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.", ) outcome: typing.Optional[Code] = pydantic.Field( - description="The outcome of the claim, predetermination, or preauthorization processing." + default=None, description="The outcome of the claim, predetermination, or preauthorization processing." ) disposition: typing.Optional[str] = pydantic.Field( - description="A human readable description of the status of the adjudication." + default=None, description="A human readable description of the status of the adjudication." ) pre_auth_ref: typing.Optional[typing.List[str]] = pydantic.Field( alias="preAuthRef", + default=None, description="Reference from the Insurer which is used in later communications which refers to this adjudication.", ) pre_auth_ref_period: typing.Optional[typing.List[Period]] = pydantic.Field( alias="preAuthRefPeriod", + default=None, description="The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.", ) care_team: typing.Optional[typing.List[ExplanationOfBenefitCareTeam]] = pydantic.Field( - alias="careTeam", description="The members of the team who provided the products and services." + alias="careTeam", default=None, description="The members of the team who provided the products and services." ) supporting_info: typing.Optional[typing.List[ExplanationOfBenefitSupportingInfo]] = pydantic.Field( alias="supportingInfo", + default=None, description="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", ) diagnosis: typing.Optional[typing.List[ExplanationOfBenefitDiagnosis]] = pydantic.Field( - description="Information about diagnoses relevant to the claim items." + default=None, description="Information about diagnoses relevant to the claim items." ) procedure: typing.Optional[typing.List[ExplanationOfBenefitProcedure]] = pydantic.Field( - description="Procedures performed on the patient relevant to the billing items with the claim." + default=None, description="Procedures performed on the patient relevant to the billing items with the claim." ) precedence: typing.Optional[PositiveInt] = pydantic.Field( - description="This indicates the relative order of a series of EOBs related to different coverages for the same suite of services." + default=None, + description="This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.", ) insurance: typing.List[ExplanationOfBenefitInsurance] = pydantic.Field( description="Financial instruments for reimbursement for the health care products and services specified on the claim." ) accident: typing.Optional[ExplanationOfBenefitAccident] = pydantic.Field( - description="Details of a accident which resulted in injuries which required the products and services listed in the claim." + default=None, + description="Details of a accident which resulted in injuries which required the products and services listed in the claim.", ) item: typing.Optional[typing.List[ExplanationOfBenefitItem]] = pydantic.Field( - description="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details." + default=None, + description="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", ) add_item: typing.Optional[typing.List[ExplanationOfBenefitAddItem]] = pydantic.Field( - alias="addItem", description="The first-tier service adjudications for payor added product or service lines." + alias="addItem", + default=None, + description="The first-tier service adjudications for payor added product or service lines.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results which are presented at the header level rather than at the line-item or add-item levels." + default=None, + description="The adjudication results which are presented at the header level rather than at the line-item or add-item levels.", ) total: typing.Optional[typing.List[ExplanationOfBenefitTotal]] = pydantic.Field( - description="Categorized monetary totals for the adjudication." + default=None, description="Categorized monetary totals for the adjudication." ) payment: typing.Optional[ExplanationOfBenefitPayment] = pydantic.Field( - description="Payment details for the adjudication of the claim." + default=None, description="Payment details for the adjudication of the claim." ) form_code: typing.Optional[CodeableConcept] = pydantic.Field( - alias="formCode", description="A code for the form to be used for printing the content." + alias="formCode", default=None, description="A code for the form to be used for printing the content." ) form: typing.Optional[Attachment] = pydantic.Field( - description="The actual form, by reference or inclusion, for printing the content or an EOB." + default=None, description="The actual form, by reference or inclusion, for printing the content or an EOB." ) process_note: typing.Optional[typing.List[ExplanationOfBenefitProcessNote]] = pydantic.Field( alias="processNote", + default=None, description="A note that describes or explains adjudication results in a human readable form.", ) benefit_period: typing.Optional[Period] = pydantic.Field( - alias="benefitPeriod", description="The term of the benefits documented in this response." + alias="benefitPeriod", default=None, description="The term of the benefits documented in this response." ) benefit_balance: typing.Optional[typing.List[ExplanationOfBenefitBenefitBalance]] = pydantic.Field( - alias="benefitBalance", description="Balance by Benefit Category." + alias="benefitBalance", default=None, description="Balance by Benefit Category." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_accident.py b/src/metriport/fhir/types/explanation_of_benefit_accident.py index a6be526..60f4ce7 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_accident.py +++ b/src/metriport/fhir/types/explanation_of_benefit_accident.py @@ -21,26 +21,31 @@ class ExplanationOfBenefitAccident(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) date: typing.Optional[dt.date] = pydantic.Field( - description="Date of an accident event related to the products and services contained in the claim." + default=None, + description="Date of an accident event related to the products and services contained in the claim.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." + default=None, + description="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="The physical location of the accident event." + alias="locationAddress", default=None, description="The physical location of the accident event." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="The physical location of the accident event." + alias="locationReference", default=None, description="The physical location of the accident event." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_add_item.py b/src/metriport/fhir/types/explanation_of_benefit_add_item.py index a93b6a5..a7d820e 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_add_item.py +++ b/src/metriport/fhir/types/explanation_of_benefit_add_item.py @@ -28,84 +28,97 @@ class ExplanationOfBenefitAddItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="itemSequence", description="Claim items which this service line is intended to replace." + alias="itemSequence", default=None, description="Claim items which this service line is intended to replace." ) detail_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="detailSequence", + default=None, description="The sequence number of the details within the claim item which this line is intended to replace.", ) sub_detail_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="subDetailSequence", + default=None, description="The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.", ) provider: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The providers who are authorized for the services rendered to the patient." + default=None, description="The providers who are authorized for the services rendered to the patient." ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) location_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="locationCodeableConcept", description="Where the product or service was provided." + alias="locationCodeableConcept", default=None, description="Where the product or service was provided." ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="Where the product or service was provided." + alias="locationAddress", default=None, description="Where the product or service was provided." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="Where the product or service was provided." + alias="locationReference", default=None, description="Where the product or service was provided." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( - alias="bodySite", description="Physical service site on the patient (limb, tooth, etc.)." + alias="bodySite", default=None, description="Physical service site on the patient (limb, tooth, etc.)." ) sub_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="subSite", description="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." + alias="subSite", + default=None, + description="A region or surface of the bodySite, e.g. limb region or tooth surface(s).", ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) detail: typing.Optional[typing.List[ExplanationOfBenefitDetail1]] = pydantic.Field( - description="The second-tier service adjudications for payor added services." + default=None, description="The second-tier service adjudications for payor added services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_adjudication.py b/src/metriport/fhir/types/explanation_of_benefit_adjudication.py index 9e0e9e9..f4bdb95 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_adjudication.py +++ b/src/metriport/fhir/types/explanation_of_benefit_adjudication.py @@ -21,24 +21,31 @@ class ExplanationOfBenefitAdjudication(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( description="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item." ) reason: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code supporting the understanding of the adjudication result and explaining variance from expected amount." + default=None, + description="A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + ) + amount: typing.Optional[Money] = pydantic.Field( + default=None, description="Monetary amount associated with the category." ) - amount: typing.Optional[Money] = pydantic.Field(description="Monetary amount associated with the category.") value: typing.Optional[Decimal] = pydantic.Field( - description="A non-monetary value associated with the category. Mutually exclusive to the amount element above." + default=None, + description="A non-monetary value associated with the category. Mutually exclusive to the amount element above.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_benefit_balance.py b/src/metriport/fhir/types/explanation_of_benefit_benefit_balance.py index 386b29f..f4b7041 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_benefit_balance.py +++ b/src/metriport/fhir/types/explanation_of_benefit_benefit_balance.py @@ -20,36 +20,42 @@ class ExplanationOfBenefitBenefitBalance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( description="Code to identify the general type of benefits under which products and services are provided." ) excluded: typing.Optional[bool] = pydantic.Field( - description="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." + default=None, + description="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", ) - name: typing.Optional[str] = pydantic.Field(description="A short name or tag for the benefit.") + name: typing.Optional[str] = pydantic.Field(default=None, description="A short name or tag for the benefit.") description: typing.Optional[str] = pydantic.Field( - description="A richer description of the benefit or services covered." + default=None, description="A richer description of the benefit or services covered." ) network: typing.Optional[CodeableConcept] = pydantic.Field( - description="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." + default=None, + description="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", ) unit: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates if the benefits apply to an individual or to the family." + default=None, description="Indicates if the benefits apply to an individual or to the family." ) term: typing.Optional[CodeableConcept] = pydantic.Field( - description="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." + default=None, + description="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", ) financial: typing.Optional[typing.List[ExplanationOfBenefitFinancial]] = pydantic.Field( - description="Benefits Used to date." + default=None, description="Benefits Used to date." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_care_team.py b/src/metriport/fhir/types/explanation_of_benefit_care_team.py index 2c4c914..2c39da6 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_care_team.py +++ b/src/metriport/fhir/types/explanation_of_benefit_care_team.py @@ -21,27 +21,31 @@ class ExplanationOfBenefitCareTeam(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify care team entries." + default=None, description="A number to uniquely identify care team entries." ) provider: Reference = pydantic.Field(description="Member of the team who provided the product or service.") responsible: typing.Optional[bool] = pydantic.Field( - description="The party who is billing and/or responsible for the claimed products or services." + default=None, description="The party who is billing and/or responsible for the claimed products or services." ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." + default=None, + description="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", ) qualification: typing.Optional[CodeableConcept] = pydantic.Field( - description="The qualification of the practitioner which is applicable for this service." + default=None, description="The qualification of the practitioner which is applicable for this service." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_detail.py b/src/metriport/fhir/types/explanation_of_benefit_detail.py index 8a40a84..b2e1b97 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_detail.py +++ b/src/metriport/fhir/types/explanation_of_benefit_detail.py @@ -26,59 +26,68 @@ class ExplanationOfBenefitDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." + default=None, + description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) sub_detail: typing.Optional[typing.List[ExplanationOfBenefitSubDetail]] = pydantic.Field( - alias="subDetail", description="Third-tier of goods and services." + alias="subDetail", default=None, description="Third-tier of goods and services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_detail_1.py b/src/metriport/fhir/types/explanation_of_benefit_detail_1.py index 1bac0b8..c6de3eb 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_detail_1.py +++ b/src/metriport/fhir/types/explanation_of_benefit_detail_1.py @@ -25,13 +25,16 @@ class ExplanationOfBenefitDetail1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) product_or_service: CodeableConcept = pydantic.Field( @@ -39,30 +42,34 @@ class ExplanationOfBenefitDetail1(pydantic.BaseModel): description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) sub_detail: typing.Optional[typing.List[ExplanationOfBenefitSubDetail1]] = pydantic.Field( - alias="subDetail", description="The third-tier service adjudications for payor added services." + alias="subDetail", default=None, description="The third-tier service adjudications for payor added services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_diagnosis.py b/src/metriport/fhir/types/explanation_of_benefit_diagnosis.py index 3223516..2b9f2d1 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_diagnosis.py +++ b/src/metriport/fhir/types/explanation_of_benefit_diagnosis.py @@ -21,34 +21,42 @@ class ExplanationOfBenefitDiagnosis(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify diagnosis entries." + default=None, description="A number to uniquely identify diagnosis entries." ) diagnosis_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="diagnosisCodeableConcept", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) diagnosis_reference: typing.Optional[Reference] = pydantic.Field( alias="diagnosisReference", + default=None, description="The nature of illness or problem in a coded form or as a reference to an external defined Condition.", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="When the condition was observed or the relative ranking." + default=None, description="When the condition was observed or the relative ranking." ) on_admission: typing.Optional[CodeableConcept] = pydantic.Field( - alias="onAdmission", description="Indication of whether the diagnosis was present on admission to a facility." + alias="onAdmission", + default=None, + description="Indication of whether the diagnosis was present on admission to a facility.", ) package_code: typing.Optional[CodeableConcept] = pydantic.Field( alias="packageCode", + default=None, description="A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", ) diff --git a/src/metriport/fhir/types/explanation_of_benefit_financial.py b/src/metriport/fhir/types/explanation_of_benefit_financial.py index dd0d38a..36595de 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_financial.py +++ b/src/metriport/fhir/types/explanation_of_benefit_financial.py @@ -20,30 +20,41 @@ class ExplanationOfBenefitFinancial(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="Classification of benefit being provided.") allowed_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="allowedUnsignedInt", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedUnsignedInt", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) allowed_string: typing.Optional[str] = pydantic.Field( - alias="allowedString", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedString", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) allowed_money: typing.Optional[Money] = pydantic.Field( - alias="allowedMoney", description="The quantity of the benefit which is permitted under the coverage." + alias="allowedMoney", + default=None, + description="The quantity of the benefit which is permitted under the coverage.", ) used_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="usedUnsignedInt", description="The quantity of the benefit which have been consumed to date." + alias="usedUnsignedInt", + default=None, + description="The quantity of the benefit which have been consumed to date.", ) used_money: typing.Optional[Money] = pydantic.Field( - alias="usedMoney", description="The quantity of the benefit which have been consumed to date." + alias="usedMoney", default=None, description="The quantity of the benefit which have been consumed to date." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_insurance.py b/src/metriport/fhir/types/explanation_of_benefit_insurance.py index cfb542e..75972ff 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_insurance.py +++ b/src/metriport/fhir/types/explanation_of_benefit_insurance.py @@ -19,23 +19,28 @@ class ExplanationOfBenefitInsurance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) focal: typing.Optional[bool] = pydantic.Field( - description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true." + default=None, + description="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", ) coverage: Reference = pydantic.Field( description="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) pre_auth_ref: typing.Optional[typing.List[str]] = pydantic.Field( alias="preAuthRef", + default=None, description="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", ) diff --git a/src/metriport/fhir/types/explanation_of_benefit_item.py b/src/metriport/fhir/types/explanation_of_benefit_item.py index c0d3389..4f6a731 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_item.py +++ b/src/metriport/fhir/types/explanation_of_benefit_item.py @@ -28,96 +28,112 @@ class ExplanationOfBenefitItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - sequence: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify item entries.") + sequence: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify item entries." + ) care_team_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="careTeamSequence", description="Care team members related to this service or product." + alias="careTeamSequence", default=None, description="Care team members related to this service or product." ) diagnosis_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="diagnosisSequence", description="Diagnoses applicable for this service or product." + alias="diagnosisSequence", default=None, description="Diagnoses applicable for this service or product." ) procedure_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( - alias="procedureSequence", description="Procedures applicable for this service or product." + alias="procedureSequence", default=None, description="Procedures applicable for this service or product." ) information_sequence: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="informationSequence", + default=None, description="Exceptions, special conditions and supporting information applicable for this service or product.", ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) serviced_date: typing.Optional[str] = pydantic.Field( alias="servicedDate", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) serviced_period: typing.Optional[Period] = pydantic.Field( alias="servicedPeriod", + default=None, description="The date or dates when the service or product was supplied, performed or completed.", ) location_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="locationCodeableConcept", description="Where the product or service was provided." + alias="locationCodeableConcept", default=None, description="Where the product or service was provided." ) location_address: typing.Optional[Address] = pydantic.Field( - alias="locationAddress", description="Where the product or service was provided." + alias="locationAddress", default=None, description="Where the product or service was provided." ) location_reference: typing.Optional[Reference] = pydantic.Field( - alias="locationReference", description="Where the product or service was provided." + alias="locationReference", default=None, description="Where the product or service was provided." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( - alias="bodySite", description="Physical service site on the patient (limb, tooth, etc.)." + alias="bodySite", default=None, description="Physical service site on the patient (limb, tooth, etc.)." ) sub_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="subSite", description="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." + alias="subSite", + default=None, + description="A region or surface of the bodySite, e.g. limb region or tooth surface(s).", ) encounter: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A billed item may include goods or services provided in multiple encounters." + default=None, description="A billed item may include goods or services provided in multiple encounters." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item." + default=None, + description="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", ) detail: typing.Optional[typing.List[ExplanationOfBenefitDetail]] = pydantic.Field( - description="Second-tier of goods and services." + default=None, description="Second-tier of goods and services." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_payee.py b/src/metriport/fhir/types/explanation_of_benefit_payee.py index aac5c0b..541706c 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_payee.py +++ b/src/metriport/fhir/types/explanation_of_benefit_payee.py @@ -20,20 +20,23 @@ class ExplanationOfBenefitPayee(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of Party to be reimbursed: Subscriber, provider, other." + default=None, description="Type of Party to be reimbursed: Subscriber, provider, other." ) party: typing.Optional[Reference] = pydantic.Field( - description="Reference to the individual or organization to whom any payment will be made." + default=None, description="Reference to the individual or organization to whom any payment will be made." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_payment.py b/src/metriport/fhir/types/explanation_of_benefit_payment.py index f9889f3..51166ea 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_payment.py +++ b/src/metriport/fhir/types/explanation_of_benefit_payment.py @@ -21,30 +21,36 @@ class ExplanationOfBenefitPayment(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Whether this represents partial or complete payment of the benefits payable." + default=None, description="Whether this represents partial or complete payment of the benefits payable." ) adjustment: typing.Optional[Money] = pydantic.Field( - description="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication." + default=None, + description="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", ) adjustment_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="adjustmentReason", description="Reason for the payment adjustment." + alias="adjustmentReason", default=None, description="Reason for the payment adjustment." ) date: typing.Optional[dt.date] = pydantic.Field( - description="Estimated date the payment will be issued or the actual issue date of payment." + default=None, description="Estimated date the payment will be issued or the actual issue date of payment." + ) + amount: typing.Optional[Money] = pydantic.Field( + default=None, description="Benefits payable less any payment adjustment." ) - amount: typing.Optional[Money] = pydantic.Field(description="Benefits payable less any payment adjustment.") identifier: typing.Optional[Identifier] = pydantic.Field( - description="Issuer's unique identifier for the payment instrument." + default=None, description="Issuer's unique identifier for the payment instrument." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_procedure.py b/src/metriport/fhir/types/explanation_of_benefit_procedure.py index df4fdce..af02965 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_procedure.py +++ b/src/metriport/fhir/types/explanation_of_benefit_procedure.py @@ -22,34 +22,39 @@ class ExplanationOfBenefitProcedure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify procedure entries." + default=None, description="A number to uniquely identify procedure entries." ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="When the condition was observed or the relative ranking." + default=None, description="When the condition was observed or the relative ranking." ) date: typing.Optional[DateTime] = pydantic.Field( - description="Date and optionally time the procedure was performed." + default=None, description="Date and optionally time the procedure was performed." ) procedure_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="procedureCodeableConcept", + default=None, description="The code or reference to a Procedure resource which identifies the clinical intervention performed.", ) procedure_reference: typing.Optional[Reference] = pydantic.Field( alias="procedureReference", + default=None, description="The code or reference to a Procedure resource which identifies the clinical intervention performed.", ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_process_note.py b/src/metriport/fhir/types/explanation_of_benefit_process_note.py index 56a0b85..e3c0173 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_process_note.py +++ b/src/metriport/fhir/types/explanation_of_benefit_process_note.py @@ -21,24 +21,29 @@ class ExplanationOfBenefitProcessNote(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - number: typing.Optional[PositiveInt] = pydantic.Field(description="A number to uniquely identify a note entry.") + number: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="A number to uniquely identify a note entry." + ) type: typing.Optional[ExplanationOfBenefitProcessNoteType] = pydantic.Field( - description="The business purpose of the note text." + default=None, description="The business purpose of the note text." ) text: typing.Optional[str] = pydantic.Field( - description="The explanation or description associated with the processing." + default=None, description="The explanation or description associated with the processing." ) language: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code to define the language used in the text of the note." + default=None, description="A code to define the language used in the text of the note." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_related.py b/src/metriport/fhir/types/explanation_of_benefit_related.py index 39088a8..fdde5fa 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_related.py +++ b/src/metriport/fhir/types/explanation_of_benefit_related.py @@ -21,21 +21,25 @@ class ExplanationOfBenefitRelated(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - claim: typing.Optional[Reference] = pydantic.Field(description="Reference to a related claim.") + claim: typing.Optional[Reference] = pydantic.Field(default=None, description="Reference to a related claim.") relationship: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code to convey how the claims are related." + default=None, description="A code to convey how the claims are related." ) reference: typing.Optional[Identifier] = pydantic.Field( - description="An alternate organizational reference to the case or file to which this particular claim pertains." + default=None, + description="An alternate organizational reference to the case or file to which this particular claim pertains.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_sub_detail.py b/src/metriport/fhir/types/explanation_of_benefit_sub_detail.py index af99c1c..dccc8c4 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_sub_detail.py +++ b/src/metriport/fhir/types/explanation_of_benefit_sub_detail.py @@ -25,56 +25,65 @@ class ExplanationOfBenefitSubDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." + default=None, + description="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", ) revenue: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of revenue or cost center providing the product and/or service." + default=None, description="The type of revenue or cost center providing the product and/or service." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Code to identify the general type of benefits under which products and services are provided." + default=None, + description="Code to identify the general type of benefits under which products and services are provided.", ) product_or_service: CodeableConcept = pydantic.Field( alias="productOrService", description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) program_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programCode", description="Identifies the program under which this may be recovered." + alias="programCode", default=None, description="Identifies the program under which this may be recovered." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) udi: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Unique Device Identifiers associated with this line item." + default=None, description="Unique Device Identifiers associated with this line item." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_sub_detail_1.py b/src/metriport/fhir/types/explanation_of_benefit_sub_detail_1.py index 004104d..2250faa 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_sub_detail_1.py +++ b/src/metriport/fhir/types/explanation_of_benefit_sub_detail_1.py @@ -24,13 +24,16 @@ class ExplanationOfBenefitSubDetail1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) product_or_service: CodeableConcept = pydantic.Field( @@ -38,27 +41,31 @@ class ExplanationOfBenefitSubDetail1(pydantic.BaseModel): description="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", ) modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Item typification or modifiers codes to convey additional context for the product or service." + default=None, + description="Item typification or modifiers codes to convey additional context for the product or service.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of repetitions of a service or product." + default=None, description="The number of repetitions of a service or product." ) unit_price: typing.Optional[Money] = pydantic.Field( alias="unitPrice", + default=None, description="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." + default=None, + description="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", ) net: typing.Optional[Money] = pydantic.Field( - description="The quantity times the unit price for an additional service or product or charge." + default=None, description="The quantity times the unit price for an additional service or product or charge." ) note_number: typing.Optional[typing.List[PositiveInt]] = pydantic.Field( alias="noteNumber", + default=None, description="The numbers associated with notes below which apply to the adjudication of this item.", ) adjudication: typing.Optional[typing.List[ExplanationOfBenefitAdjudication]] = pydantic.Field( - description="The adjudication results." + default=None, description="The adjudication results." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_supporting_info.py b/src/metriport/fhir/types/explanation_of_benefit_supporting_info.py index 98a2532..06b757e 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_supporting_info.py +++ b/src/metriport/fhir/types/explanation_of_benefit_supporting_info.py @@ -25,52 +25,62 @@ class ExplanationOfBenefitSupportingInfo(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="A number to uniquely identify supporting information entries." + default=None, description="A number to uniquely identify supporting information entries." ) category: CodeableConcept = pydantic.Field( description="The general class of the information supplied: information; exception; accident, employment; onset, etc." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought." + default=None, + description="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", ) timing_date: typing.Optional[str] = pydantic.Field( - alias="timingDate", description="The date when or period to which this information refers." + alias="timingDate", default=None, description="The date when or period to which this information refers." ) timing_period: typing.Optional[Period] = pydantic.Field( - alias="timingPeriod", description="The date when or period to which this information refers." + alias="timingPeriod", default=None, description="The date when or period to which this information refers." ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", ) reason: typing.Optional[Coding] = pydantic.Field( - description="Provides the reason in the situation where a reason code is required in addition to the content." + default=None, + description="Provides the reason in the situation where a reason code is required in addition to the content.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/explanation_of_benefit_total.py b/src/metriport/fhir/types/explanation_of_benefit_total.py index e6a3c7c..384f71a 100644 --- a/src/metriport/fhir/types/explanation_of_benefit_total.py +++ b/src/metriport/fhir/types/explanation_of_benefit_total.py @@ -20,13 +20,16 @@ class ExplanationOfBenefitTotal(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/expression.py b/src/metriport/fhir/types/expression.py index d217c6d..f78b7d2 100644 --- a/src/metriport/fhir/types/expression.py +++ b/src/metriport/fhir/types/expression.py @@ -22,24 +22,30 @@ class Expression(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) description: typing.Optional[str] = pydantic.Field( - description="A brief, natural language description of the condition that effectively communicates the intended semantics." + default=None, + description="A brief, natural language description of the condition that effectively communicates the intended semantics.", ) name: typing.Optional[Id] = pydantic.Field( - description="A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined." + default=None, + description="A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.", ) language: typing.Optional[ExpressionLanguage] = pydantic.Field( - description="The media type of the language for the expression." + default=None, description="The media type of the language for the expression." ) expression: typing.Optional[str] = pydantic.Field( - description="An expression in the specified language that returns a value." + default=None, description="An expression in the specified language that returns a value." + ) + reference: typing.Optional[Uri] = pydantic.Field( + default=None, description="A URI that defines where the expression is found." ) - reference: typing.Optional[Uri] = pydantic.Field(description="A URI that defines where the expression is found.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/extension.py b/src/metriport/fhir/types/extension.py index 804eb08..5943ef7 100644 --- a/src/metriport/fhir/types/extension.py +++ b/src/metriport/fhir/types/extension.py @@ -20,212 +20,264 @@ class Extension(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) url: typing.Optional[Uri] = pydantic.Field( - description="Source of the definition for the extension code - a logical name or a URL." + default=None, description="Source of the definition for the extension code - a logical name or a URL." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( alias="valueBase64Binary", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_canonical: typing.Optional[str] = pydantic.Field( alias="valueCanonical", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_code: typing.Optional[str] = pydantic.Field( alias="valueCode", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_date: typing.Optional[str] = pydantic.Field( alias="valueDate", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_decimal: typing.Optional[float] = pydantic.Field( alias="valueDecimal", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_id: typing.Optional[str] = pydantic.Field( alias="valueId", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_instant: typing.Optional[str] = pydantic.Field( alias="valueInstant", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_markdown: typing.Optional[str] = pydantic.Field( alias="valueMarkdown", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_oid: typing.Optional[str] = pydantic.Field( alias="valueOid", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_positive_int: typing.Optional[float] = pydantic.Field( alias="valuePositiveInt", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_time: typing.Optional[str] = pydantic.Field( alias="valueTime", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="valueUnsignedInt", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_uri: typing.Optional[str] = pydantic.Field( alias="valueUri", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_url: typing.Optional[str] = pydantic.Field( alias="valueUrl", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_uuid: typing.Optional[str] = pydantic.Field( alias="valueUuid", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_address: typing.Optional[Address] = pydantic.Field( alias="valueAddress", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_age: typing.Optional[Age] = pydantic.Field( alias="valueAge", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_annotation: typing.Optional[Annotation] = pydantic.Field( alias="valueAnnotation", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_coding: typing.Optional[Coding] = pydantic.Field( alias="valueCoding", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="valueContactPoint", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_count: typing.Optional[Count] = pydantic.Field( alias="valueCount", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_distance: typing.Optional[Distance] = pydantic.Field( alias="valueDistance", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_duration: typing.Optional[Duration] = pydantic.Field( alias="valueDuration", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_human_name: typing.Optional[HumanName] = pydantic.Field( alias="valueHumanName", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_identifier: typing.Optional[Identifier] = pydantic.Field( alias="valueIdentifier", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_money: typing.Optional[Money] = pydantic.Field( alias="valueMoney", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_period: typing.Optional[Period] = pydantic.Field( alias="valuePeriod", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_ratio: typing.Optional[Ratio] = pydantic.Field( alias="valueRatio", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="valueSampledData", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_signature: typing.Optional[Signature] = pydantic.Field( alias="valueSignature", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_timing: typing.Optional[Timing] = pydantic.Field( alias="valueTiming", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="valueContactDetail", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_contributor: typing.Optional[Contributor] = pydantic.Field( alias="valueContributor", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="valueDataRequirement", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_expression: typing.Optional[Expression] = pydantic.Field( alias="valueExpression", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="valueParameterDefinition", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="valueRelatedArtifact", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="valueTriggerDefinition", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="valueUsageContext", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_dosage: typing.Optional[Dosage] = pydantic.Field( alias="valueDosage", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_meta: typing.Optional[Meta] = pydantic.Field( alias="valueMeta", + default=None, description="Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) diff --git a/src/metriport/fhir/types/family_member_history.py b/src/metriport/fhir/types/family_member_history.py index f70f047..0ede883 100644 --- a/src/metriport/fhir/types/family_member_history.py +++ b/src/metriport/fhir/types/family_member_history.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -31,88 +29,116 @@ class FamilyMemberHistory(BaseResource): Significant health conditions for a person related to the patient relevant in the context of care for the patient. """ - resource_type: typing_extensions.Literal["FamilyMemberHistory"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["FamilyMemberHistory"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", ) status: typing.Optional[FamilyMemberHistoryStatus] = pydantic.Field( - description="A code specifying the status of the record of the family history of a specific family member." + default=None, + description="A code specifying the status of the record of the family history of a specific family member.", ) data_absent_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="dataAbsentReason", description="Describes why the family member's history is not available." + alias="dataAbsentReason", + default=None, + description="Describes why the family member's history is not available.", ) patient: Reference = pydantic.Field(description="The person who this history concerns.") date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and possibly time) when the family member history was recorded or last updated." + default=None, + description="The date (and possibly time) when the family member history was recorded or last updated.", ) name: typing.Optional[str] = pydantic.Field( - description='This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".' + default=None, + description='This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".', ) relationship: CodeableConcept = pydantic.Field( description="The type of relationship this person has to the patient (father, mother, brother etc.)." ) - sex: typing.Optional[CodeableConcept] = pydantic.Field(description="The birth sex of the family member.") + sex: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The birth sex of the family member." + ) born_period: typing.Optional[Period] = pydantic.Field( - alias="bornPeriod", description="The actual or approximate date of birth of the relative." + alias="bornPeriod", default=None, description="The actual or approximate date of birth of the relative." ) born_date: typing.Optional[str] = pydantic.Field( - alias="bornDate", description="The actual or approximate date of birth of the relative." + alias="bornDate", default=None, description="The actual or approximate date of birth of the relative." ) born_string: typing.Optional[str] = pydantic.Field( - alias="bornString", description="The actual or approximate date of birth of the relative." + alias="bornString", default=None, description="The actual or approximate date of birth of the relative." ) age_age: typing.Optional[Age] = pydantic.Field( - alias="ageAge", description="The age of the relative at the time the family member history is recorded." + alias="ageAge", + default=None, + description="The age of the relative at the time the family member history is recorded.", ) age_range: typing.Optional[Range] = pydantic.Field( - alias="ageRange", description="The age of the relative at the time the family member history is recorded." + alias="ageRange", + default=None, + description="The age of the relative at the time the family member history is recorded.", ) age_string: typing.Optional[str] = pydantic.Field( - alias="ageString", description="The age of the relative at the time the family member history is recorded." + alias="ageString", + default=None, + description="The age of the relative at the time the family member history is recorded.", ) estimated_age: typing.Optional[bool] = pydantic.Field( - alias="estimatedAge", description="If true, indicates that the age value specified is an estimated value." + alias="estimatedAge", + default=None, + description="If true, indicates that the age value specified is an estimated value.", ) deceased_boolean: typing.Optional[bool] = pydantic.Field( alias="deceasedBoolean", + default=None, description="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", ) deceased_age: typing.Optional[Age] = pydantic.Field( alias="deceasedAge", + default=None, description="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", ) deceased_range: typing.Optional[Range] = pydantic.Field( alias="deceasedRange", + default=None, description="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", ) deceased_date: typing.Optional[str] = pydantic.Field( alias="deceasedDate", + default=None, description="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", ) deceased_string: typing.Optional[str] = pydantic.Field( alias="deceasedString", + default=None, description="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes why the family member history occurred in coded or textual form." + alias="reasonCode", + default=None, + description="Describes why the family member history occurred in coded or textual form.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." + default=None, + description="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", ) condition: typing.Optional[typing.List[FamilyMemberHistoryCondition]] = pydantic.Field( - description="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." + default=None, + description="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/family_member_history_condition.py b/src/metriport/fhir/types/family_member_history_condition.py index 3d1a514..c1a0a09 100644 --- a/src/metriport/fhir/types/family_member_history_condition.py +++ b/src/metriport/fhir/types/family_member_history_condition.py @@ -23,43 +23,52 @@ class FamilyMemberHistoryCondition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field( description="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." ) outcome: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates what happened following the condition. If the condition resulted in death, deceased date is captured on the relation." + default=None, + description="Indicates what happened following the condition. If the condition resulted in death, deceased date is captured on the relation.", ) contributed_to_death: typing.Optional[bool] = pydantic.Field( alias="contributedToDeath", + default=None, description="This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.", ) onset_age: typing.Optional[Age] = pydantic.Field( alias="onsetAge", + default=None, description="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", ) onset_range: typing.Optional[Range] = pydantic.Field( alias="onsetRange", + default=None, description="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", ) onset_period: typing.Optional[Period] = pydantic.Field( alias="onsetPeriod", + default=None, description="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", ) onset_string: typing.Optional[str] = pydantic.Field( alias="onsetString", + default=None, description="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="An area where general notes can be placed about this specific condition." + default=None, description="An area where general notes can be placed about this specific condition." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/flag.py b/src/metriport/fhir/types/flag.py index 5f801ee..d461afc 100644 --- a/src/metriport/fhir/types/flag.py +++ b/src/metriport/fhir/types/flag.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,13 +22,15 @@ class Flag(BaseResource): Prospective warnings of potential issues when providing care to the patient. """ - resource_type: typing_extensions.Literal["Flag"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Flag"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) - status: typing.Optional[FlagStatus] = pydantic.Field(description="Supports basic workflow.") + status: typing.Optional[FlagStatus] = pydantic.Field(default=None, description="Supports basic workflow.") category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." + default=None, + description="Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", ) code: CodeableConcept = pydantic.Field( description="The coded value or textual component of the flag to display to the user." @@ -39,13 +39,14 @@ class Flag(BaseResource): description="The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with." ) period: typing.Optional[Period] = pydantic.Field( - description="The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified." + default=None, + description="The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="This alert is only relevant during the encounter." + default=None, description="This alert is only relevant during the encounter." ) author: typing.Optional[Reference] = pydantic.Field( - description="The person, organization or device that created the flag." + default=None, description="The person, organization or device that created the flag." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/goal.py b/src/metriport/fhir/types/goal.py index c03e42a..cda88c2 100644 --- a/src/metriport/fhir/types/goal.py +++ b/src/metriport/fhir/types/goal.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -25,22 +23,25 @@ class Goal(BaseResource): Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. """ - resource_type: typing_extensions.Literal["Goal"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Goal"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", ) lifecycle_status: typing.Optional[GoalLifecycleStatus] = pydantic.Field( - alias="lifecycleStatus", description="The state of the goal throughout its lifecycle." + alias="lifecycleStatus", default=None, description="The state of the goal throughout its lifecycle." ) achievement_status: typing.Optional[CodeableConcept] = pydantic.Field( alias="achievementStatus", + default=None, description="Describes the progression, or lack thereof, towards the goal against the target.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates a category the goal falls within." + default=None, description="Indicates a category the goal falls within." ) priority: typing.Optional[CodeableConcept] = pydantic.Field( - description="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." + default=None, + description="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", ) description: CodeableConcept = pydantic.Field( description='Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".' @@ -49,34 +50,45 @@ class Goal(BaseResource): description="Identifies the patient, group or organization for whom the goal is being established." ) start_date: typing.Optional[str] = pydantic.Field( - alias="startDate", description="The date or event after which the goal should begin being pursued." + alias="startDate", + default=None, + description="The date or event after which the goal should begin being pursued.", ) start_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="startCodeableConcept", description="The date or event after which the goal should begin being pursued." + alias="startCodeableConcept", + default=None, + description="The date or event after which the goal should begin being pursued.", ) target: typing.Optional[typing.List[GoalTarget]] = pydantic.Field( - description="Indicates what should be done by when." + default=None, description="Indicates what should be done by when." ) status_date: typing.Optional[dt.date] = pydantic.Field( alias="statusDate", + default=None, description="Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", ) status_reason: typing.Optional[str] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current status." + alias="statusReason", default=None, description="Captures the reason for the current status." ) expressed_by: typing.Optional[Reference] = pydantic.Field( - alias="expressedBy", description="Indicates whose goal this is - patient goal, practitioner goal, etc." + alias="expressedBy", + default=None, + description="Indicates whose goal this is - patient goal, practitioner goal, etc.", ) addresses: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The identified conditions and other health record elements that are intended to be addressed by the goal." + default=None, + description="The identified conditions and other health record elements that are intended to be addressed by the goal.", + ) + note: typing.Optional[typing.List[Annotation]] = pydantic.Field( + default=None, description="Any comments related to the goal." ) - note: typing.Optional[typing.List[Annotation]] = pydantic.Field(description="Any comments related to the goal.") outcome_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="outcomeCode", + default=None, description="Identifies the change (or lack of change) at the point when the status of the goal is assessed.", ) outcome_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="outcomeReference", description="Details of what's changed (or not changed)." + alias="outcomeReference", default=None, description="Details of what's changed (or not changed)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/goal_target.py b/src/metriport/fhir/types/goal_target.py index b781c43..01f91b7 100644 --- a/src/metriport/fhir/types/goal_target.py +++ b/src/metriport/fhir/types/goal_target.py @@ -23,52 +23,65 @@ class GoalTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) measure: typing.Optional[CodeableConcept] = pydantic.Field( - description="The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." + default=None, + description="The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", ) detail_quantity: typing.Optional[Quantity] = pydantic.Field( alias="detailQuantity", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_range: typing.Optional[Range] = pydantic.Field( alias="detailRange", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="detailCodeableConcept", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_string: typing.Optional[str] = pydantic.Field( alias="detailString", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_boolean: typing.Optional[bool] = pydantic.Field( alias="detailBoolean", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_integer: typing.Optional[float] = pydantic.Field( alias="detailInteger", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) detail_ratio: typing.Optional[Ratio] = pydantic.Field( alias="detailRatio", + default=None, description="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", ) due_date: typing.Optional[str] = pydantic.Field( alias="dueDate", + default=None, description="Indicates either the date or the duration after start by which the goal should be met.", ) due_duration: typing.Optional[Duration] = pydantic.Field( alias="dueDuration", + default=None, description="Indicates either the date or the duration after start by which the goal should be met.", ) diff --git a/src/metriport/fhir/types/graph_definition.py b/src/metriport/fhir/types/graph_definition.py index eccae72..d787143 100644 --- a/src/metriport/fhir/types/graph_definition.py +++ b/src/metriport/fhir/types/graph_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -29,52 +27,60 @@ class GraphDefinition(BaseResource): A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set. """ - resource_type: typing_extensions.Literal["GraphDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["GraphDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) status: typing.Optional[GraphDefinitionStatus] = pydantic.Field( - description="The status of this graph definition. Enables tracking the life-cycle of the content." + default=None, description="The status of this graph definition. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes." + default=None, + description="The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the graph definition." + default=None, description="The name of the organization or individual that published the graph definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the graph definition from a consumer's perspective." + default=None, + description="A free text natural language description of the graph definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate graph definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the graph definition is intended to be used." + default=None, description="A legal or geographic region in which the graph definition is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this graph definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this graph definition is needed and why it has been designed as it has.", ) start: typing.Optional[Code] = pydantic.Field( - description="The type of FHIR resource at which instances of this graph start." + default=None, description="The type of FHIR resource at which instances of this graph start." ) profile: typing.Optional[Canonical] = pydantic.Field( - description="The profile that describes the use of the base resource." + default=None, description="The profile that describes the use of the base resource." ) link: typing.Optional[typing.List[GraphDefinitionLink]] = pydantic.Field( - description="Links this graph makes rules about." + default=None, description="Links this graph makes rules about." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/graph_definition_compartment.py b/src/metriport/fhir/types/graph_definition_compartment.py index f82fdc4..d99354d 100644 --- a/src/metriport/fhir/types/graph_definition_compartment.py +++ b/src/metriport/fhir/types/graph_definition_compartment.py @@ -21,24 +21,32 @@ class GraphDefinitionCompartment(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) use: typing.Optional[GraphDefinitionCompartmentUse] = pydantic.Field( - description="Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed." + default=None, + description="Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.", ) - code: typing.Optional[Code] = pydantic.Field(description="Identifies the compartment.") + code: typing.Optional[Code] = pydantic.Field(default=None, description="Identifies the compartment.") rule: typing.Optional[GraphDefinitionCompartmentRule] = pydantic.Field( - description=("identical \n" " matching \n" " different \n" " no-rule \n" " custom.\n") + default=None, description=("identical \n" " matching \n" " different \n" " no-rule \n" " custom.\n") + ) + expression: typing.Optional[str] = pydantic.Field( + default=None, description="Custom rule, as a FHIRPath expression." + ) + description: typing.Optional[str] = pydantic.Field( + default=None, description="Documentation for FHIRPath expression." ) - expression: typing.Optional[str] = pydantic.Field(description="Custom rule, as a FHIRPath expression.") - description: typing.Optional[str] = pydantic.Field(description="Documentation for FHIRPath expression.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/graph_definition_link.py b/src/metriport/fhir/types/graph_definition_link.py index 26d6726..526a9cf 100644 --- a/src/metriport/fhir/types/graph_definition_link.py +++ b/src/metriport/fhir/types/graph_definition_link.py @@ -20,26 +20,31 @@ class GraphDefinitionLink(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="A FHIR expression that identifies one of FHIR References to other resources." + default=None, description="A FHIR expression that identifies one of FHIR References to other resources." ) - slice_name: typing.Optional[str] = pydantic.Field(alias="sliceName", description="Which slice (if profiled).") - min: typing.Optional[int] = pydantic.Field(description="Minimum occurrences for this link.") - max: typing.Optional[str] = pydantic.Field(description="Maximum occurrences for this link.") + slice_name: typing.Optional[str] = pydantic.Field( + alias="sliceName", default=None, description="Which slice (if profiled)." + ) + min: typing.Optional[int] = pydantic.Field(default=None, description="Minimum occurrences for this link.") + max: typing.Optional[str] = pydantic.Field(default=None, description="Maximum occurrences for this link.") description: typing.Optional[str] = pydantic.Field( - description="Information about why this link is of interest in this graph definition." + default=None, description="Information about why this link is of interest in this graph definition." ) target: typing.Optional[typing.List[GraphDefinitionTarget]] = pydantic.Field( - description="Potential target for the link." + default=None, description="Potential target for the link." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/graph_definition_target.py b/src/metriport/fhir/types/graph_definition_target.py index b342d52..7041019 100644 --- a/src/metriport/fhir/types/graph_definition_target.py +++ b/src/metriport/fhir/types/graph_definition_target.py @@ -23,23 +23,26 @@ class GraphDefinitionTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Code] = pydantic.Field(description="Type of resource this link refers to.") - params: typing.Optional[str] = pydantic.Field(description="A set of parameters to look up.") - profile: typing.Optional[Canonical] = pydantic.Field(description="Profile for the target resource.") + type: typing.Optional[Code] = pydantic.Field(default=None, description="Type of resource this link refers to.") + params: typing.Optional[str] = pydantic.Field(default=None, description="A set of parameters to look up.") + profile: typing.Optional[Canonical] = pydantic.Field(default=None, description="Profile for the target resource.") compartment: typing.Optional[typing.List[GraphDefinitionCompartment]] = pydantic.Field( - description="Compartment Consistency Rules." + default=None, description="Compartment Consistency Rules." ) link: typing.Optional[typing.List[GraphDefinitionLink]] = pydantic.Field( - description="Additional links from target resource." + default=None, description="Additional links from target resource." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/group.py b/src/metriport/fhir/types/group.py index 88993f1..6158b43 100644 --- a/src/metriport/fhir/types/group.py +++ b/src/metriport/fhir/types/group.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,37 +24,40 @@ class Group(BaseResource): Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. """ - resource_type: typing_extensions.Literal["Group"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Group"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique business identifier for this group." + default=None, description="A unique business identifier for this group." ) active: typing.Optional[bool] = pydantic.Field( - description="Indicates whether the record for the group is available for use or is merely being retained for historical purposes." + default=None, + description="Indicates whether the record for the group is available for use or is merely being retained for historical purposes.", ) type: typing.Optional[GroupType] = pydantic.Field( - description="Identifies the broad classification of the kind of resources the group includes." + default=None, description="Identifies the broad classification of the kind of resources the group includes." ) actual: typing.Optional[bool] = pydantic.Field( - description="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals." + default=None, + description="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description='Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.' + default=None, description='Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.' ) name: typing.Optional[str] = pydantic.Field( - description="A label assigned to the group for human identification and communication." + default=None, description="A label assigned to the group for human identification and communication." ) quantity: typing.Optional[UnsignedInt] = pydantic.Field( - description="A count of the number of resource instances that are part of the group." + default=None, description="A count of the number of resource instances that are part of the group." ) managing_entity: typing.Optional[Reference] = pydantic.Field( alias="managingEntity", + default=None, description="Entity responsible for defining and maintaining Group characteristics and/or registered members.", ) characteristic: typing.Optional[typing.List[GroupCharacteristic]] = pydantic.Field( - description="Identifies traits whose presence r absence is shared by members of the group." + default=None, description="Identifies traits whose presence r absence is shared by members of the group." ) member: typing.Optional[typing.List[GroupMember]] = pydantic.Field( - description="Identifies the resource instances that are members of the group." + default=None, description="Identifies the resource instances that are members of the group." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/group_characteristic.py b/src/metriport/fhir/types/group_characteristic.py index b058e6d..e0de36d 100644 --- a/src/metriport/fhir/types/group_characteristic.py +++ b/src/metriport/fhir/types/group_characteristic.py @@ -23,41 +23,51 @@ class GroupCharacteristic(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="A code that identifies the kind of trait being asserted.") value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", ) exclude: typing.Optional[bool] = pydantic.Field( - description="If true, indicates the characteristic is one that is NOT held by members of the group." + default=None, + description="If true, indicates the characteristic is one that is NOT held by members of the group.", ) period: typing.Optional[Period] = pydantic.Field( - description="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June." + default=None, + description="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/group_member.py b/src/metriport/fhir/types/group_member.py index db33b9a..b3a7d9c 100644 --- a/src/metriport/fhir/types/group_member.py +++ b/src/metriport/fhir/types/group_member.py @@ -20,23 +20,27 @@ class GroupMember(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) entity: Reference = pydantic.Field( description="A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same." ) period: typing.Optional[Period] = pydantic.Field( - description="The period that the member was in the group, if known." + default=None, description="The period that the member was in the group, if known." ) inactive: typing.Optional[bool] = pydantic.Field( - description="A flag to indicate that the member is no longer in the group, but previously may have been a member." + default=None, + description="A flag to indicate that the member is no longer in the group, but previously may have been a member.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/guidance_response.py b/src/metriport/fhir/types/guidance_response.py index 4522df8..19ddf09 100644 --- a/src/metriport/fhir/types/guidance_response.py +++ b/src/metriport/fhir/types/guidance_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -26,62 +24,76 @@ class GuidanceResponse(BaseResource): A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. """ - resource_type: typing_extensions.Literal["GuidanceResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["GuidanceResponse"] = pydantic.Field(alias="resourceType") request_identifier: typing.Optional[Identifier] = pydantic.Field( alias="requestIdentifier", + default=None, description="The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Allows a service to provide unique, business identifiers for the response." + default=None, description="Allows a service to provide unique, business identifiers for the response." ) module_uri: typing.Optional[str] = pydantic.Field( alias="moduleUri", + default=None, description="An identifier, CodeableConcept or canonical reference to the guidance that was requested.", ) module_canonical: typing.Optional[str] = pydantic.Field( alias="moduleCanonical", + default=None, description="An identifier, CodeableConcept or canonical reference to the guidance that was requested.", ) module_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="moduleCodeableConcept", + default=None, description="An identifier, CodeableConcept or canonical reference to the guidance that was requested.", ) status: typing.Optional[GuidanceResponseStatus] = pydantic.Field( - description="The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information." + default=None, + description="The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.", + ) + subject: typing.Optional[Reference] = pydantic.Field( + default=None, description="The patient for which the request was processed." ) - subject: typing.Optional[Reference] = pydantic.Field(description="The patient for which the request was processed.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The encounter during which this response was created or to which the creation of this record is tightly associated." + default=None, + description="The encounter during which this response was created or to which the creation of this record is tightly associated.", ) occurrence_date_time: typing.Optional[DateTime] = pydantic.Field( - alias="occurrenceDateTime", description="Indicates when the guidance response was processed." + alias="occurrenceDateTime", default=None, description="Indicates when the guidance response was processed." ) performer: typing.Optional[Reference] = pydantic.Field( - description="Provides a reference to the device that performed the guidance." + default=None, description="Provides a reference to the device that performed the guidance." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes the reason for the guidance response in coded or textual form." + alias="reasonCode", + default=None, + description="Describes the reason for the guidance response in coded or textual form.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Provides a mechanism to communicate additional information about the response." + default=None, description="Provides a mechanism to communicate additional information about the response." ) evaluation_message: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="evaluationMessage", + default=None, description="Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.", ) output_parameters: typing.Optional[Reference] = pydantic.Field( alias="outputParameters", + default=None, description="The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.", ) result: typing.Optional[Reference] = pydantic.Field( - description="The actions, if any, produced by the evaluation of the artifact." + default=None, description="The actions, if any, produced by the evaluation of the artifact." ) data_requirement: typing.Optional[typing.List[DataRequirement]] = pydantic.Field( alias="dataRequirement", + default=None, description="If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.", ) diff --git a/src/metriport/fhir/types/healthcare_service.py b/src/metriport/fhir/types/healthcare_service.py index 501e803..9de64bc 100644 --- a/src/metriport/fhir/types/healthcare_service.py +++ b/src/metriport/fhir/types/healthcare_service.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -28,84 +26,100 @@ class HealthcareService(BaseResource): The details of a healthcare service available at a location. """ - resource_type: typing_extensions.Literal["HealthcareService"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["HealthcareService"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="External identifiers for this item." + default=None, description="External identifiers for this item." ) active: typing.Optional[bool] = pydantic.Field( - description="This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this." + default=None, + description="This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.", ) provided_by: typing.Optional[Reference] = pydantic.Field( - alias="providedBy", description="The organization that provides this healthcare service." + alias="providedBy", default=None, description="The organization that provides this healthcare service." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Identifies the broad category of service being performed or delivered." + default=None, description="Identifies the broad category of service being performed or delivered." ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The specific type of service that may be delivered or performed." + default=None, description="The specific type of service that may be delivered or performed." ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Collection of specialties handled by the service site. This is more of a medical term." + default=None, + description="Collection of specialties handled by the service site. This is more of a medical term.", ) location: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The location(s) where this healthcare service may be provided." + default=None, description="The location(s) where this healthcare service may be provided." ) name: typing.Optional[str] = pydantic.Field( - description="Further description of the service as it would be presented to a consumer while searching." + default=None, + description="Further description of the service as it would be presented to a consumer while searching.", ) comment: typing.Optional[str] = pydantic.Field( - description="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." + default=None, + description="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", ) extra_details: typing.Optional[Markdown] = pydantic.Field( - alias="extraDetails", description="Extra details about the service that can't be placed in the other fields." + alias="extraDetails", + default=None, + description="Extra details about the service that can't be placed in the other fields.", ) photo: typing.Optional[Attachment] = pydantic.Field( - description="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." + default=None, + description="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="List of contacts related to this specific healthcare service." + default=None, description="List of contacts related to this specific healthcare service." ) coverage_area: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="coverageArea", + default=None, description="The location(s) that this service is available to (not where the service is provided).", ) service_provision_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceProvisionCode", + default=None, description="The code(s) that detail the conditions under which the healthcare service is available/offered.", ) eligibility: typing.Optional[typing.List[HealthcareServiceEligibility]] = pydantic.Field( - description="Does this service have specific eligibility requirements that need to be met in order to use the service?" + default=None, + description="Does this service have specific eligibility requirements that need to be met in order to use the service?", ) program: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Programs that this service is applicable to." + default=None, description="Programs that this service is applicable to." ) characteristic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Collection of characteristics (attributes)." + default=None, description="Collection of characteristics (attributes)." ) communication: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used." + default=None, + description="Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.", ) referral_method: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="referralMethod", + default=None, description="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", ) appointment_required: typing.Optional[bool] = pydantic.Field( alias="appointmentRequired", + default=None, description="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", ) available_time: typing.Optional[typing.List[HealthcareServiceAvailableTime]] = pydantic.Field( - alias="availableTime", description="A collection of times that the Service Site is available." + alias="availableTime", default=None, description="A collection of times that the Service Site is available." ) not_available: typing.Optional[typing.List[HealthcareServiceNotAvailable]] = pydantic.Field( alias="notAvailable", + default=None, description="The HealthcareService is not available during this period of time due to the provided reason.", ) availability_exceptions: typing.Optional[str] = pydantic.Field( alias="availabilityExceptions", + default=None, description="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource." + default=None, + description="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/healthcare_service_available_time.py b/src/metriport/fhir/types/healthcare_service_available_time.py index eab07ff..488f59b 100644 --- a/src/metriport/fhir/types/healthcare_service_available_time.py +++ b/src/metriport/fhir/types/healthcare_service_available_time.py @@ -20,28 +20,36 @@ class HealthcareServiceAvailableTime(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) days_of_week: typing.Optional[typing.List[HealthcareServiceAvailableTimeDaysOfWeekItem]] = pydantic.Field( alias="daysOfWeek", + default=None, description="Indicates which days of the week are available between the start and end Times.", ) all_day: typing.Optional[bool] = pydantic.Field( - alias="allDay", description="Is this always available? (hence times are irrelevant) e.g. 24 hour service." + alias="allDay", + default=None, + description="Is this always available? (hence times are irrelevant) e.g. 24 hour service.", ) available_start_time: typing.Optional[Time] = pydantic.Field( alias="availableStartTime", + default=None, description="The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", ) available_end_time: typing.Optional[Time] = pydantic.Field( alias="availableEndTime", + default=None, description="The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", ) diff --git a/src/metriport/fhir/types/healthcare_service_eligibility.py b/src/metriport/fhir/types/healthcare_service_eligibility.py index af7396d..946f2e5 100644 --- a/src/metriport/fhir/types/healthcare_service_eligibility.py +++ b/src/metriport/fhir/types/healthcare_service_eligibility.py @@ -20,18 +20,23 @@ class HealthcareServiceEligibility(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="Coded value for the eligibility.") + code: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Coded value for the eligibility." + ) comment: typing.Optional[Markdown] = pydantic.Field( - description="Describes the eligibility conditions for the service." + default=None, description="Describes the eligibility conditions for the service." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/healthcare_service_not_available.py b/src/metriport/fhir/types/healthcare_service_not_available.py index 1650e33..1ce3e91 100644 --- a/src/metriport/fhir/types/healthcare_service_not_available.py +++ b/src/metriport/fhir/types/healthcare_service_not_available.py @@ -19,20 +19,23 @@ class HealthcareServiceNotAvailable(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="The reason that can be presented to the user as to why this time is not available." + default=None, description="The reason that can be presented to the user as to why this time is not available." ) during: typing.Optional[Period] = pydantic.Field( - description="Service is not available (seasonally or for a public holiday) from this date." + default=None, description="Service is not available (seasonally or for a public holiday) from this date." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/human_name.py b/src/metriport/fhir/types/human_name.py index 7f3750a..6ce683b 100644 --- a/src/metriport/fhir/types/human_name.py +++ b/src/metriport/fhir/types/human_name.py @@ -20,27 +20,35 @@ class HumanName(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + ) + use: typing.Optional[HumanNameUse] = pydantic.Field( + default=None, description="Identifies the purpose for this name." ) - use: typing.Optional[HumanNameUse] = pydantic.Field(description="Identifies the purpose for this name.") text: typing.Optional[str] = pydantic.Field( - description="Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts." + default=None, + description="Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.", ) family: typing.Optional[str] = pydantic.Field( - description="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." + default=None, + description="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.", ) - given: typing.Optional[typing.List[str]] = pydantic.Field(description="Given name.") + given: typing.Optional[typing.List[str]] = pydantic.Field(default=None, description="Given name.") prefix: typing.Optional[typing.List[str]] = pydantic.Field( - description="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." + default=None, + description="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.", ) suffix: typing.Optional[typing.List[str]] = pydantic.Field( - description="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." + default=None, + description="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.", ) period: typing.Optional[Period] = pydantic.Field( - description="Indicates the period of time when this name was valid for the named person." + default=None, description="Indicates the period of time when this name was valid for the named person." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/identifier.py b/src/metriport/fhir/types/identifier.py index 3d0f22d..bcb4d5e 100644 --- a/src/metriport/fhir/types/identifier.py +++ b/src/metriport/fhir/types/identifier.py @@ -21,26 +21,31 @@ class Identifier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - use: typing.Optional[IdentifierUse] = pydantic.Field(description="The purpose of this identifier.") + use: typing.Optional[IdentifierUse] = pydantic.Field(default=None, description="The purpose of this identifier.") type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." + default=None, + description="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", ) system: typing.Optional[Uri] = pydantic.Field( - description="Establishes the namespace for the value - that is, a URL that describes a set values that are unique." + default=None, + description="Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", ) value: typing.Optional[str] = pydantic.Field( - description="The portion of the identifier typically relevant to the user and which is unique within the context of the system." + default=None, + description="The portion of the identifier typically relevant to the user and which is unique within the context of the system.", ) period: typing.Optional[Period] = pydantic.Field( - description="Time period during which identifier is/was valid for use." + default=None, description="Time period during which identifier is/was valid for use." ) assigner: typing.Optional[Reference] = pydantic.Field( - description="Organization that issued/manages the identifier." + default=None, description="Organization that issued/manages the identifier." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/identity_provider.py b/src/metriport/fhir/types/identity_provider.py index 83f13e2..a25cf7e 100644 --- a/src/metriport/fhir/types/identity_provider.py +++ b/src/metriport/fhir/types/identity_provider.py @@ -28,7 +28,9 @@ class IdentityProvider(pydantic.BaseModel): client_id: str = pydantic.Field(alias="clientId", description="External Identity Provider client ID.") client_secret: str = pydantic.Field(alias="clientSecret", description="External Identity Provider client secret.") use_subject: typing.Optional[bool] = pydantic.Field( - alias="useSubject", description="Optional flag to use the subject field instead of the email field." + alias="useSubject", + default=None, + description="Optional flag to use the subject field instead of the email field.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/imaging_study.py b/src/metriport/fhir/types/imaging_study.py index 14afcb6..fc63519 100644 --- a/src/metriport/fhir/types/imaging_study.py +++ b/src/metriport/fhir/types/imaging_study.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,62 +26,78 @@ class ImagingStudy(BaseResource): Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. """ - resource_type: typing_extensions.Literal["ImagingStudy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImagingStudy"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number." + default=None, + description="Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number.", + ) + status: typing.Optional[ImagingStudyStatus] = pydantic.Field( + default=None, description="The current state of the ImagingStudy." ) - status: typing.Optional[ImagingStudyStatus] = pydantic.Field(description="The current state of the ImagingStudy.") modality: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="A list of all the series.modality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." + default=None, + description="A list of all the series.modality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).", ) subject: Reference = pydantic.Field(description="The subject, typically a patient, of the imaging study.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made." + default=None, + description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.", ) - started: typing.Optional[DateTime] = pydantic.Field(description="Date and time the study started.") + started: typing.Optional[DateTime] = pydantic.Field(default=None, description="Date and time the study started.") based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="A list of the diagnostic requests that resulted in this imaging study being performed.", ) - referrer: typing.Optional[Reference] = pydantic.Field(description="The requesting/referring physician.") + referrer: typing.Optional[Reference] = pydantic.Field( + default=None, description="The requesting/referring physician." + ) interpreter: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Who read the study and interpreted the images or other content." + default=None, description="Who read the study and interpreted the images or other content." ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType." + default=None, + description="The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.", ) number_of_series: typing.Optional[UnsignedInt] = pydantic.Field( alias="numberOfSeries", + default=None, description="Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.", ) number_of_instances: typing.Optional[UnsignedInt] = pydantic.Field( alias="numberOfInstances", + default=None, description="Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", ) procedure_reference: typing.Optional[Reference] = pydantic.Field( - alias="procedureReference", description="The procedure which this ImagingStudy was part of." + alias="procedureReference", default=None, description="The procedure which this ImagingStudy was part of." ) procedure_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="procedureCode", description="The code for the performed procedure type." + alias="procedureCode", default=None, description="The code for the performed procedure type." ) location: typing.Optional[Reference] = pydantic.Field( - description="The principal physical location where the ImagingStudy was performed." + default=None, description="The principal physical location where the ImagingStudy was performed." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="Description of clinical condition indicating why the ImagingStudy was requested.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Indicates another resource whose existence justifies this Study." + alias="reasonReference", + default=None, + description="Indicates another resource whose existence justifies this Study.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element." + default=None, + description="Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.", ) description: typing.Optional[str] = pydantic.Field( - description="The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed." + default=None, + description="The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.", ) series: typing.Optional[typing.List[ImagingStudySeries]] = pydantic.Field( - description="Each study has one or more series of images or other content." + default=None, description="Each study has one or more series of images or other content." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/imaging_study_instance.py b/src/metriport/fhir/types/imaging_study_instance.py index 1d36836..c045bb2 100644 --- a/src/metriport/fhir/types/imaging_study_instance.py +++ b/src/metriport/fhir/types/imaging_study_instance.py @@ -21,21 +21,26 @@ class ImagingStudyInstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) uid: typing.Optional[Id] = pydantic.Field( - description="The DICOM SOP Instance UID for this image or other DICOM content." + default=None, description="The DICOM SOP Instance UID for this image or other DICOM content." ) sop_class: Coding = pydantic.Field(alias="sopClass", description="DICOM instance type.") - number: typing.Optional[UnsignedInt] = pydantic.Field(description="The number of instance in the series.") - title: typing.Optional[str] = pydantic.Field(description="The description of the instance.") + number: typing.Optional[UnsignedInt] = pydantic.Field( + default=None, description="The number of instance in the series." + ) + title: typing.Optional[str] = pydantic.Field(default=None, description="The description of the instance.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/imaging_study_performer.py b/src/metriport/fhir/types/imaging_study_performer.py index f87a7ef..756c026 100644 --- a/src/metriport/fhir/types/imaging_study_performer.py +++ b/src/metriport/fhir/types/imaging_study_performer.py @@ -20,17 +20,20 @@ class ImagingStudyPerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Distinguishes the type of involvement of the performer in the series." + default=None, description="Distinguishes the type of involvement of the performer in the series." ) actor: Reference = pydantic.Field(description="Indicates who or what performed the series.") diff --git a/src/metriport/fhir/types/imaging_study_series.py b/src/metriport/fhir/types/imaging_study_series.py index a0b0af3..aad0775 100644 --- a/src/metriport/fhir/types/imaging_study_series.py +++ b/src/metriport/fhir/types/imaging_study_series.py @@ -25,44 +25,53 @@ class ImagingStudySeries(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - uid: typing.Optional[Id] = pydantic.Field(description="The DICOM Series Instance UID for the series.") + uid: typing.Optional[Id] = pydantic.Field(default=None, description="The DICOM Series Instance UID for the series.") number: typing.Optional[UnsignedInt] = pydantic.Field( - description="The numeric identifier of this series in the study." + default=None, description="The numeric identifier of this series in the study." ) modality: Coding = pydantic.Field(description="The modality of this series sequence.") - description: typing.Optional[str] = pydantic.Field(description="A description of the series.") + description: typing.Optional[str] = pydantic.Field(default=None, description="A description of the series.") number_of_instances: typing.Optional[UnsignedInt] = pydantic.Field( alias="numberOfInstances", + default=None, description="Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType." + default=None, + description="The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.", ) body_site: typing.Optional[Coding] = pydantic.Field( alias="bodySite", + default=None, description="The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.", ) laterality: typing.Optional[Coding] = pydantic.Field( - description="The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite." + default=None, + description="The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.", ) specimen: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The specimen imaged, e.g., for whole slide imaging of a biopsy." + default=None, description="The specimen imaged, e.g., for whole slide imaging of a biopsy." + ) + started: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date and time the series was started." ) - started: typing.Optional[DateTime] = pydantic.Field(description="The date and time the series was started.") performer: typing.Optional[typing.List[ImagingStudyPerformer]] = pydantic.Field( - description="Indicates who or what performed the series and how they were involved." + default=None, description="Indicates who or what performed the series and how they were involved." ) instance: typing.Optional[typing.List[ImagingStudyInstance]] = pydantic.Field( - description="A single SOP instance within the series, e.g. an image, or presentation state." + default=None, description="A single SOP instance within the series, e.g. an image, or presentation state." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/immunization.py b/src/metriport/fhir/types/immunization.py index 6a5f156..3f7cccb 100644 --- a/src/metriport/fhir/types/immunization.py +++ b/src/metriport/fhir/types/immunization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,15 +28,15 @@ class Immunization(BaseResource): Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. """ - resource_type: typing_extensions.Literal["Immunization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Immunization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this immunization record." + default=None, description="A unique identifier assigned to this immunization record." ) status: typing.Optional[Code] = pydantic.Field( - description="Indicates the current status of the immunization event." + default=None, description="Indicates the current status of the immunization event." ) status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Indicates the reason the immunization event was not performed." + alias="statusReason", default=None, description="Indicates the reason the immunization event was not performed." ) vaccine_code: CodeableConcept = pydantic.Field( alias="vaccineCode", description="Vaccine that was administered or was to be administered." @@ -47,77 +45,90 @@ class Immunization(BaseResource): description="The patient who either received or did not receive the immunization." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." + default=None, + description="The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="Date vaccine administered or was to be administered." + alias="occurrenceDateTime", default=None, description="Date vaccine administered or was to be administered." ) occurrence_string: typing.Optional[str] = pydantic.Field( - alias="occurrenceString", description="Date vaccine administered or was to be administered." + alias="occurrenceString", default=None, description="Date vaccine administered or was to be administered." ) recorded: typing.Optional[DateTime] = pydantic.Field( - description="The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event." + default=None, + description="The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.", ) primary_source: typing.Optional[bool] = pydantic.Field( alias="primarySource", + default=None, description="An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.", ) report_origin: typing.Optional[CodeableConcept] = pydantic.Field( alias="reportOrigin", + default=None, description="The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.", ) location: typing.Optional[Reference] = pydantic.Field( - description="The service delivery location where the vaccine administration occurred." + default=None, description="The service delivery location where the vaccine administration occurred." ) - manufacturer: typing.Optional[Reference] = pydantic.Field(description="Name of vaccine manufacturer.") + manufacturer: typing.Optional[Reference] = pydantic.Field(default=None, description="Name of vaccine manufacturer.") lot_number: typing.Optional[str] = pydantic.Field( - alias="lotNumber", description="Lot number of the vaccine product." + alias="lotNumber", default=None, description="Lot number of the vaccine product." ) expiration_date: typing.Optional[dt.date] = pydantic.Field( - alias="expirationDate", description="Date vaccine batch expires." + alias="expirationDate", default=None, description="Date vaccine batch expires." + ) + site: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Body site where vaccine was administered." ) - site: typing.Optional[CodeableConcept] = pydantic.Field(description="Body site where vaccine was administered.") route: typing.Optional[CodeableConcept] = pydantic.Field( - description="The path by which the vaccine product is taken into the body." + default=None, description="The path by which the vaccine product is taken into the body." ) dose_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="doseQuantity", description="The quantity of vaccine product that was administered." + alias="doseQuantity", default=None, description="The quantity of vaccine product that was administered." ) performer: typing.Optional[typing.List[ImmunizationPerformer]] = pydantic.Field( - description="Indicates who performed the immunization event." + default=None, description="Indicates who performed the immunization event." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Extra information about the immunization that is not conveyed by the other attributes." + default=None, + description="Extra information about the immunization that is not conveyed by the other attributes.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Reasons why the vaccine was administered." + alias="reasonCode", default=None, description="Reasons why the vaccine was administered." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Condition, Observation or DiagnosticReport that supports why the immunization was administered.", ) is_subpotent: typing.Optional[bool] = pydantic.Field( alias="isSubpotent", + default=None, description="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", ) subpotent_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="subpotentReason", description="Reason why a dose is considered to be subpotent." + alias="subpotentReason", default=None, description="Reason why a dose is considered to be subpotent." ) education: typing.Optional[typing.List[ImmunizationEducation]] = pydantic.Field( - description="Educational material presented to the patient (or guardian) at the time of vaccine administration." + default=None, + description="Educational material presented to the patient (or guardian) at the time of vaccine administration.", ) program_eligibility: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="programEligibility", description="Indicates a patient's eligibility for a funding program." + alias="programEligibility", default=None, description="Indicates a patient's eligibility for a funding program." ) funding_source: typing.Optional[CodeableConcept] = pydantic.Field( alias="fundingSource", + default=None, description="Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).", ) reaction: typing.Optional[typing.List[ImmunizationReaction]] = pydantic.Field( - description="Categorical data indicating that an adverse event is associated in time to an immunization." + default=None, + description="Categorical data indicating that an adverse event is associated in time to an immunization.", ) protocol_applied: typing.Optional[typing.List[ImmunizationProtocolApplied]] = pydantic.Field( alias="protocolApplied", + default=None, description="The protocol (set of recommendations) being followed by the provider who administered the dose.", ) diff --git a/src/metriport/fhir/types/immunization_education.py b/src/metriport/fhir/types/immunization_education.py index bcc9e1d..e14a24d 100644 --- a/src/metriport/fhir/types/immunization_education.py +++ b/src/metriport/fhir/types/immunization_education.py @@ -20,26 +20,30 @@ class ImmunizationEducation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) document_type: typing.Optional[str] = pydantic.Field( - alias="documentType", description="Identifier of the material presented to the patient." + alias="documentType", default=None, description="Identifier of the material presented to the patient." ) reference: typing.Optional[Uri] = pydantic.Field( - description="Reference pointer to the educational material given to the patient if the information was on line." + default=None, + description="Reference pointer to the educational material given to the patient if the information was on line.", ) publication_date: typing.Optional[DateTime] = pydantic.Field( - alias="publicationDate", description="Date the educational material was published." + alias="publicationDate", default=None, description="Date the educational material was published." ) presentation_date: typing.Optional[DateTime] = pydantic.Field( - alias="presentationDate", description="Date the educational material was given to the patient." + alias="presentationDate", default=None, description="Date the educational material was given to the patient." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/immunization_evaluation.py b/src/metriport/fhir/types/immunization_evaluation.py index a311f98..579e7b3 100644 --- a/src/metriport/fhir/types/immunization_evaluation.py +++ b/src/metriport/fhir/types/immunization_evaluation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,19 +22,20 @@ class ImmunizationEvaluation(BaseResource): Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those recommendations. """ - resource_type: typing_extensions.Literal["ImmunizationEvaluation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImmunizationEvaluation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this immunization evaluation record." + default=None, description="A unique identifier assigned to this immunization evaluation record." ) status: typing.Optional[Code] = pydantic.Field( - description="Indicates the current status of the evaluation of the vaccination administration event." + default=None, + description="Indicates the current status of the evaluation of the vaccination administration event.", ) patient: Reference = pydantic.Field(description="The individual for whom the evaluation is being done.") date: typing.Optional[DateTime] = pydantic.Field( - description="The date the evaluation of the vaccine administration event was performed." + default=None, description="The date the evaluation of the vaccine administration event was performed." ) authority: typing.Optional[Reference] = pydantic.Field( - description="Indicates the authority who published the protocol (e.g. ACIP)." + default=None, description="Indicates the authority who published the protocol (e.g. ACIP)." ) target_disease: CodeableConcept = pydantic.Field( alias="targetDisease", description="The vaccine preventable disease the dose is being evaluated against." @@ -50,23 +49,27 @@ class ImmunizationEvaluation(BaseResource): ) dose_status_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="doseStatusReason", + default=None, description="Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.", ) - description: typing.Optional[str] = pydantic.Field(description="Additional information about the evaluation.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Additional information about the evaluation." + ) series: typing.Optional[str] = pydantic.Field( - description="One possible path to achieve presumed immunity against a disease - within the context of an authority." + default=None, + description="One possible path to achieve presumed immunity against a disease - within the context of an authority.", ) dose_number_positive_int: typing.Optional[float] = pydantic.Field( - alias="doseNumberPositiveInt", description="Nominal position in a series." + alias="doseNumberPositiveInt", default=None, description="Nominal position in a series." ) dose_number_string: typing.Optional[str] = pydantic.Field( - alias="doseNumberString", description="Nominal position in a series." + alias="doseNumberString", default=None, description="Nominal position in a series." ) series_doses_positive_int: typing.Optional[float] = pydantic.Field( - alias="seriesDosesPositiveInt", description="The recommended number of doses to achieve immunity." + alias="seriesDosesPositiveInt", default=None, description="The recommended number of doses to achieve immunity." ) series_doses_string: typing.Optional[str] = pydantic.Field( - alias="seriesDosesString", description="The recommended number of doses to achieve immunity." + alias="seriesDosesString", default=None, description="The recommended number of doses to achieve immunity." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/immunization_performer.py b/src/metriport/fhir/types/immunization_performer.py index 79108bb..a851a54 100644 --- a/src/metriport/fhir/types/immunization_performer.py +++ b/src/metriport/fhir/types/immunization_performer.py @@ -20,17 +20,21 @@ class ImmunizationPerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." + default=None, + description="Describes the type of performance (e.g. ordering provider, administering provider, etc.).", ) actor: Reference = pydantic.Field(description="The practitioner or organization who performed the action.") diff --git a/src/metriport/fhir/types/immunization_protocol_applied.py b/src/metriport/fhir/types/immunization_protocol_applied.py index 20694bb..737784c 100644 --- a/src/metriport/fhir/types/immunization_protocol_applied.py +++ b/src/metriport/fhir/types/immunization_protocol_applied.py @@ -20,35 +20,42 @@ class ImmunizationProtocolApplied(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) series: typing.Optional[str] = pydantic.Field( - description="One possible path to achieve presumed immunity against a disease - within the context of an authority." + default=None, + description="One possible path to achieve presumed immunity against a disease - within the context of an authority.", ) authority: typing.Optional[Reference] = pydantic.Field( - description="Indicates the authority who published the protocol (e.g. ACIP) that is being followed." + default=None, + description="Indicates the authority who published the protocol (e.g. ACIP) that is being followed.", ) target_disease: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="targetDisease", description="The vaccine preventable disease the dose is being administered against." + alias="targetDisease", + default=None, + description="The vaccine preventable disease the dose is being administered against.", ) dose_number_positive_int: typing.Optional[float] = pydantic.Field( - alias="doseNumberPositiveInt", description="Nominal position in a series." + alias="doseNumberPositiveInt", default=None, description="Nominal position in a series." ) dose_number_string: typing.Optional[str] = pydantic.Field( - alias="doseNumberString", description="Nominal position in a series." + alias="doseNumberString", default=None, description="Nominal position in a series." ) series_doses_positive_int: typing.Optional[float] = pydantic.Field( - alias="seriesDosesPositiveInt", description="The recommended number of doses to achieve immunity." + alias="seriesDosesPositiveInt", default=None, description="The recommended number of doses to achieve immunity." ) series_doses_string: typing.Optional[str] = pydantic.Field( - alias="seriesDosesString", description="The recommended number of doses to achieve immunity." + alias="seriesDosesString", default=None, description="The recommended number of doses to achieve immunity." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/immunization_reaction.py b/src/metriport/fhir/types/immunization_reaction.py index c8efde1..1ee8d68 100644 --- a/src/metriport/fhir/types/immunization_reaction.py +++ b/src/metriport/fhir/types/immunization_reaction.py @@ -20,18 +20,21 @@ class ImmunizationReaction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - date: typing.Optional[DateTime] = pydantic.Field(description="Date of reaction to the immunization.") - detail: typing.Optional[Reference] = pydantic.Field(description="Details of the reaction.") - reported: typing.Optional[bool] = pydantic.Field(description="Self-reported indicator.") + date: typing.Optional[DateTime] = pydantic.Field(default=None, description="Date of reaction to the immunization.") + detail: typing.Optional[Reference] = pydantic.Field(default=None, description="Details of the reaction.") + reported: typing.Optional[bool] = pydantic.Field(default=None, description="Self-reported indicator.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/immunization_recommendation.py b/src/metriport/fhir/types/immunization_recommendation.py index 9e79f07..0a63696 100644 --- a/src/metriport/fhir/types/immunization_recommendation.py +++ b/src/metriport/fhir/types/immunization_recommendation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .date_time import DateTime @@ -23,16 +21,16 @@ class ImmunizationRecommendation(BaseResource): A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification. """ - resource_type: typing_extensions.Literal["ImmunizationRecommendation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImmunizationRecommendation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this particular recommendation record." + default=None, description="A unique identifier assigned to this particular recommendation record." ) patient: Reference = pydantic.Field(description="The patient the recommendation(s) are for.") date: typing.Optional[DateTime] = pydantic.Field( - description="The date the immunization recommendation(s) were created." + default=None, description="The date the immunization recommendation(s) were created." ) authority: typing.Optional[Reference] = pydantic.Field( - description="Indicates the authority who published the protocol (e.g. ACIP)." + default=None, description="Indicates the authority who published the protocol (e.g. ACIP)." ) recommendation: typing.List[ImmunizationRecommendationRecommendation] = pydantic.Field( description="Vaccine administration recommendations." diff --git a/src/metriport/fhir/types/immunization_recommendation_date_criterion.py b/src/metriport/fhir/types/immunization_recommendation_date_criterion.py index 5126ae0..2db4499 100644 --- a/src/metriport/fhir/types/immunization_recommendation_date_criterion.py +++ b/src/metriport/fhir/types/immunization_recommendation_date_criterion.py @@ -20,20 +20,23 @@ class ImmunizationRecommendationDateCriterion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field( description="Date classification of recommendation. For example, earliest date to give, latest date to give, etc." ) value: typing.Optional[DateTime] = pydantic.Field( - description="The date whose meaning is specified by dateCriterion.code." + default=None, description="The date whose meaning is specified by dateCriterion.code." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/immunization_recommendation_recommendation.py b/src/metriport/fhir/types/immunization_recommendation_recommendation.py index 7534d3f..8c4e0dd 100644 --- a/src/metriport/fhir/types/immunization_recommendation_recommendation.py +++ b/src/metriport/fhir/types/immunization_recommendation_recommendation.py @@ -21,23 +21,27 @@ class ImmunizationRecommendationRecommendation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) vaccine_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="vaccineCode", description="Vaccine(s) or vaccine group that pertain to the recommendation." + alias="vaccineCode", default=None, description="Vaccine(s) or vaccine group that pertain to the recommendation." ) target_disease: typing.Optional[CodeableConcept] = pydantic.Field( - alias="targetDisease", description="The targeted disease for the recommendation." + alias="targetDisease", default=None, description="The targeted disease for the recommendation." ) contraindicated_vaccine_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="contraindicatedVaccineCode", + default=None, description="Vaccine(s) which should not be used to fulfill the recommendation.", ) forecast_status: CodeableConcept = pydantic.Field( @@ -45,38 +49,45 @@ class ImmunizationRecommendationRecommendation(pydantic.BaseModel): description="Indicates the patient status with respect to the path to immunity for the target disease.", ) forecast_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="forecastReason", description="The reason for the assigned forecast status." + alias="forecastReason", default=None, description="The reason for the assigned forecast status." ) date_criterion: typing.Optional[typing.List[ImmunizationRecommendationDateCriterion]] = pydantic.Field( alias="dateCriterion", + default=None, description="Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.", ) description: typing.Optional[str] = pydantic.Field( - description="Contains the description about the protocol under which the vaccine was administered." + default=None, + description="Contains the description about the protocol under which the vaccine was administered.", ) series: typing.Optional[str] = pydantic.Field( - description="One possible path to achieve presumed immunity against a disease - within the context of an authority." + default=None, + description="One possible path to achieve presumed immunity against a disease - within the context of an authority.", ) dose_number_positive_int: typing.Optional[float] = pydantic.Field( alias="doseNumberPositiveInt", + default=None, description="Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).", ) dose_number_string: typing.Optional[str] = pydantic.Field( alias="doseNumberString", + default=None, description="Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).", ) series_doses_positive_int: typing.Optional[float] = pydantic.Field( - alias="seriesDosesPositiveInt", description="The recommended number of doses to achieve immunity." + alias="seriesDosesPositiveInt", default=None, description="The recommended number of doses to achieve immunity." ) series_doses_string: typing.Optional[str] = pydantic.Field( - alias="seriesDosesString", description="The recommended number of doses to achieve immunity." + alias="seriesDosesString", default=None, description="The recommended number of doses to achieve immunity." ) supporting_immunization: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingImmunization", + default=None, description="Immunization event history and/or evaluation that supports the status and recommendation.", ) supporting_patient_information: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingPatientInformation", + default=None, description="Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.", ) diff --git a/src/metriport/fhir/types/implementation_guide.py b/src/metriport/fhir/types/implementation_guide.py index 5305c55..eb9ee3b 100644 --- a/src/metriport/fhir/types/implementation_guide.py +++ b/src/metriport/fhir/types/implementation_guide.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -33,71 +31,88 @@ class ImplementationGuide(BaseResource): A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts. """ - resource_type: typing_extensions.Literal["ImplementationGuide"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImplementationGuide"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers." + default=None, + description="An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the implementation guide." + default=None, description="A short, descriptive, user-friendly title for the implementation guide." ) status: typing.Optional[ImplementationGuideStatus] = pydantic.Field( - description="The status of this implementation guide. Enables tracking the life-cycle of the content." + default=None, + description="The status of this implementation guide. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes." + default=None, + description="The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the implementation guide." + default=None, description="The name of the organization or individual that published the implementation guide." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the implementation guide from a consumer's perspective." + default=None, + description="A free text natural language description of the implementation guide from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the implementation guide is intended to be used." + default=None, + description="A legal or geographic region in which the implementation guide is intended to be used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide." + default=None, + description="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.", ) package_id: typing.Optional[Id] = pydantic.Field( alias="packageId", + default=None, description="The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.", ) license: typing.Optional[ImplementationGuideLicense] = pydantic.Field( - description="The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'." + default=None, + description="The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.", ) fhir_version: typing.Optional[typing.List[ImplementationGuideFhirVersionItem]] = pydantic.Field( alias="fhirVersion", + default=None, description="The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version.", ) depends_on: typing.Optional[typing.List[ImplementationGuideDependsOn]] = pydantic.Field( alias="dependsOn", + default=None, description="Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.", ) global_: typing.Optional[typing.List[ImplementationGuideGlobal]] = pydantic.Field( alias="global", + default=None, description="A set of profiles that all resources covered by this implementation guide must conform to.", ) definition: typing.Optional[ImplementationGuideDefinition] = pydantic.Field( - description="The information needed by an IG publisher tool to publish the whole implementation guide." + default=None, + description="The information needed by an IG publisher tool to publish the whole implementation guide.", ) manifest: typing.Optional[ImplementationGuideManifest] = pydantic.Field( - description="Information about an assembled implementation guide, created by the publication tooling." + default=None, + description="Information about an assembled implementation guide, created by the publication tooling.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_definition.py b/src/metriport/fhir/types/implementation_guide_definition.py index 304698c..3b7ea00 100644 --- a/src/metriport/fhir/types/implementation_guide_definition.py +++ b/src/metriport/fhir/types/implementation_guide_definition.py @@ -23,29 +23,33 @@ class ImplementationGuideDefinition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) grouping: typing.Optional[typing.List[ImplementationGuideGrouping]] = pydantic.Field( - description="A logical group of resources. Logical groups can be used when building pages." + default=None, description="A logical group of resources. Logical groups can be used when building pages." ) resource: typing.List[ImplementationGuideResource] = pydantic.Field( description="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." ) page: typing.Optional[ImplementationGuidePage] = pydantic.Field( - description="A page / section in the implementation guide. The root page is the implementation guide home page." + default=None, + description="A page / section in the implementation guide. The root page is the implementation guide home page.", ) parameter: typing.Optional[typing.List[ImplementationGuideParameter]] = pydantic.Field( - description="Defines how IG is built by tools." + default=None, description="Defines how IG is built by tools." ) template: typing.Optional[typing.List[ImplementationGuideTemplate]] = pydantic.Field( - description="A template for building resources." + default=None, description="A template for building resources." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_depends_on.py b/src/metriport/fhir/types/implementation_guide_depends_on.py index b3d5d2a..ea1e17c 100644 --- a/src/metriport/fhir/types/implementation_guide_depends_on.py +++ b/src/metriport/fhir/types/implementation_guide_depends_on.py @@ -20,21 +20,27 @@ class ImplementationGuideDependsOn(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) uri: Canonical = pydantic.Field(description="A canonical reference to the Implementation guide for the dependency.") package_id: typing.Optional[Id] = pydantic.Field( - alias="packageId", description="The NPM package name for the Implementation Guide that this IG depends on." + alias="packageId", + default=None, + description="The NPM package name for the Implementation Guide that this IG depends on.", ) version: typing.Optional[str] = pydantic.Field( - description="The version of the IG that is depended on, when the correct version is required to understand the IG correctly." + default=None, + description="The version of the IG that is depended on, when the correct version is required to understand the IG correctly.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_global.py b/src/metriport/fhir/types/implementation_guide_global.py index 9dfb633..77b42ae 100644 --- a/src/metriport/fhir/types/implementation_guide_global.py +++ b/src/metriport/fhir/types/implementation_guide_global.py @@ -20,16 +20,21 @@ class ImplementationGuideGlobal(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Code] = pydantic.Field(description="The type of resource that all instances must conform to.") + type: typing.Optional[Code] = pydantic.Field( + default=None, description="The type of resource that all instances must conform to." + ) profile: Canonical = pydantic.Field(description="A reference to the profile that all instances must conform to.") def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_grouping.py b/src/metriport/fhir/types/implementation_guide_grouping.py index dc50eb8..608ea05 100644 --- a/src/metriport/fhir/types/implementation_guide_grouping.py +++ b/src/metriport/fhir/types/implementation_guide_grouping.py @@ -18,19 +18,25 @@ class ImplementationGuideGrouping(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="The human-readable title to display for the package of resources when rendering the implementation guide." + default=None, + description="The human-readable title to display for the package of resources when rendering the implementation guide.", + ) + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human readable text describing the package." ) - description: typing.Optional[str] = pydantic.Field(description="Human readable text describing the package.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/implementation_guide_manifest.py b/src/metriport/fhir/types/implementation_guide_manifest.py index ec02ec0..03790bb 100644 --- a/src/metriport/fhir/types/implementation_guide_manifest.py +++ b/src/metriport/fhir/types/implementation_guide_manifest.py @@ -21,29 +21,33 @@ class ImplementationGuideManifest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) rendering: typing.Optional[Url] = pydantic.Field( - description="A pointer to official web page, PDF or other rendering of the implementation guide." + default=None, description="A pointer to official web page, PDF or other rendering of the implementation guide." ) resource: typing.List[ImplementationGuideResource1] = pydantic.Field( description="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." ) page: typing.Optional[typing.List[ImplementationGuidePage1]] = pydantic.Field( - description="Information about a page within the IG." + default=None, description="Information about a page within the IG." ) image: typing.Optional[typing.List[str]] = pydantic.Field( - description="Indicates a relative path to an image that exists within the IG." + default=None, description="Indicates a relative path to an image that exists within the IG." ) other: typing.Optional[typing.List[str]] = pydantic.Field( - description="Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG." + default=None, + description="Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_page.py b/src/metriport/fhir/types/implementation_guide_page.py index 2530920..30f5c17 100644 --- a/src/metriport/fhir/types/implementation_guide_page.py +++ b/src/metriport/fhir/types/implementation_guide_page.py @@ -22,27 +22,33 @@ class ImplementationGuidePage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name_url: typing.Optional[str] = pydantic.Field(alias="nameUrl", description="The source address for the page.") + name_url: typing.Optional[str] = pydantic.Field( + alias="nameUrl", default=None, description="The source address for the page." + ) name_reference: typing.Optional[Reference] = pydantic.Field( - alias="nameReference", description="The source address for the page." + alias="nameReference", default=None, description="The source address for the page." ) title: typing.Optional[str] = pydantic.Field( - description="A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc." + default=None, + description="A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.", ) generation: typing.Optional[ImplementationGuidePageGeneration] = pydantic.Field( - description="A code that indicates how the page is generated." + default=None, description="A code that indicates how the page is generated." ) page: typing.Optional[typing.List[ImplementationGuidePage]] = pydantic.Field( - description="Nested Pages/Sections under this page." + default=None, description="Nested Pages/Sections under this page." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_page_1.py b/src/metriport/fhir/types/implementation_guide_page_1.py index a8fec11..633b2ed 100644 --- a/src/metriport/fhir/types/implementation_guide_page_1.py +++ b/src/metriport/fhir/types/implementation_guide_page_1.py @@ -18,19 +18,24 @@ class ImplementationGuidePage1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Relative path to the page.") - title: typing.Optional[str] = pydantic.Field(description="Label for the page intended for human display.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Relative path to the page.") + title: typing.Optional[str] = pydantic.Field( + default=None, description="Label for the page intended for human display." + ) anchor: typing.Optional[typing.List[str]] = pydantic.Field( - description="The name of an anchor available on the page." + default=None, description="The name of an anchor available on the page." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_parameter.py b/src/metriport/fhir/types/implementation_guide_parameter.py index 5ae26d3..f689da7 100644 --- a/src/metriport/fhir/types/implementation_guide_parameter.py +++ b/src/metriport/fhir/types/implementation_guide_parameter.py @@ -19,16 +19,20 @@ class ImplementationGuideParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[ImplementationGuideParameterCode] = pydantic.Field( + default=None, description=( "apply \n" " path-resource \n" @@ -40,9 +44,9 @@ class ImplementationGuideParameter(pydantic.BaseModel): " generate-json \n" " generate-turtle \n" " html-template.\n" - ) + ), ) - value: typing.Optional[str] = pydantic.Field(description="Value for named type.") + value: typing.Optional[str] = pydantic.Field(default=None, description="Value for named type.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/implementation_guide_resource.py b/src/metriport/fhir/types/implementation_guide_resource.py index 23c3ddb..174ee72 100644 --- a/src/metriport/fhir/types/implementation_guide_resource.py +++ b/src/metriport/fhir/types/implementation_guide_resource.py @@ -21,36 +21,44 @@ class ImplementationGuideResource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) reference: Reference = pydantic.Field(description="Where this resource is found.") fhir_version: typing.Optional[typing.List[ImplementationGuideResourceFhirVersionItem]] = pydantic.Field( alias="fhirVersion", + default=None, description="Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.", ) name: typing.Optional[str] = pydantic.Field( - description="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name)." + default=None, + description="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).", ) description: typing.Optional[str] = pydantic.Field( - description="A description of the reason that a resource has been included in the implementation guide." + default=None, + description="A description of the reason that a resource has been included in the implementation guide.", ) example_boolean: typing.Optional[bool] = pydantic.Field( alias="exampleBoolean", + default=None, description="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", ) example_canonical: typing.Optional[str] = pydantic.Field( alias="exampleCanonical", + default=None, description="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", ) grouping_id: typing.Optional[Id] = pydantic.Field( - alias="groupingId", description="Reference to the id of the grouping this resource appears in." + alias="groupingId", default=None, description="Reference to the id of the grouping this resource appears in." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_resource_1.py b/src/metriport/fhir/types/implementation_guide_resource_1.py index a40cf42..a79cc60 100644 --- a/src/metriport/fhir/types/implementation_guide_resource_1.py +++ b/src/metriport/fhir/types/implementation_guide_resource_1.py @@ -20,26 +20,33 @@ class ImplementationGuideResource1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) reference: Reference = pydantic.Field(description="Where this resource is found.") example_boolean: typing.Optional[bool] = pydantic.Field( alias="exampleBoolean", + default=None, description="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", ) example_canonical: typing.Optional[str] = pydantic.Field( alias="exampleCanonical", + default=None, description="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", ) relative_path: typing.Optional[Url] = pydantic.Field( - alias="relativePath", description="The relative path for primary page for this resource within the IG." + alias="relativePath", + default=None, + description="The relative path for primary page for this resource within the IG.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/implementation_guide_template.py b/src/metriport/fhir/types/implementation_guide_template.py index c088be8..be5cd61 100644 --- a/src/metriport/fhir/types/implementation_guide_template.py +++ b/src/metriport/fhir/types/implementation_guide_template.py @@ -19,18 +19,21 @@ class ImplementationGuideTemplate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[Code] = pydantic.Field(description="Type of template specified.") - source: typing.Optional[str] = pydantic.Field(description="The source location for the template.") - scope: typing.Optional[str] = pydantic.Field(description="The scope in which the template applies.") + code: typing.Optional[Code] = pydantic.Field(default=None, description="Type of template specified.") + source: typing.Optional[str] = pydantic.Field(default=None, description="The source location for the template.") + scope: typing.Optional[str] = pydantic.Field(default=None, description="The scope in which the template applies.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/insurance_plan.py b/src/metriport/fhir/types/insurance_plan.py index f98719e..e78556d 100644 --- a/src/metriport/fhir/types/insurance_plan.py +++ b/src/metriport/fhir/types/insurance_plan.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,50 +25,56 @@ class InsurancePlan(BaseResource): Details of a Health Insurance product/plan provided by an organization. """ - resource_type: typing_extensions.Literal["InsurancePlan"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["InsurancePlan"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server.", ) status: typing.Optional[InsurancePlanStatus] = pydantic.Field( - description="The current state of the health insurance product." + default=None, description="The current state of the health insurance product." ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The kind of health insurance product." + default=None, description="The kind of health insurance product." ) name: typing.Optional[str] = pydantic.Field( - description="Official name of the health insurance product as designated by the owner." + default=None, description="Official name of the health insurance product as designated by the owner." ) alias: typing.Optional[typing.List[str]] = pydantic.Field( - description="A list of alternate names that the product is known as, or was known as in the past." + default=None, description="A list of alternate names that the product is known as, or was known as in the past." ) period: typing.Optional[Period] = pydantic.Field( - description="The period of time that the health insurance product is available." + default=None, description="The period of time that the health insurance product is available." ) owned_by: typing.Optional[Reference] = pydantic.Field( alias="ownedBy", + default=None, description="The entity that is providing the health insurance product and underwriting the risk. This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'.", ) administered_by: typing.Optional[Reference] = pydantic.Field( alias="administeredBy", + default=None, description="An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.", ) coverage_area: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="coverageArea", description="The geographic region in which a health insurance product's benefits apply." + alias="coverageArea", + default=None, + description="The geographic region in which a health insurance product's benefits apply.", ) contact: typing.Optional[typing.List[InsurancePlanContact]] = pydantic.Field( - description="The contact for the health insurance product for a certain purpose." + default=None, description="The contact for the health insurance product for a certain purpose." ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The technical endpoints providing access to services operated for the health insurance product." + default=None, + description="The technical endpoints providing access to services operated for the health insurance product.", ) network: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to the network included in the health insurance product." + default=None, description="Reference to the network included in the health insurance product." ) coverage: typing.Optional[typing.List[InsurancePlanCoverage]] = pydantic.Field( - description="Details about the coverage offered by the insurance product." + default=None, description="Details about the coverage offered by the insurance product." ) plan: typing.Optional[typing.List[InsurancePlanPlan]] = pydantic.Field( - description="Details about an insurance plan." + default=None, description="Details about an insurance plan." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_benefit.py b/src/metriport/fhir/types/insurance_plan_benefit.py index 90cea5c..4181572 100644 --- a/src/metriport/fhir/types/insurance_plan_benefit.py +++ b/src/metriport/fhir/types/insurance_plan_benefit.py @@ -20,23 +20,26 @@ class InsurancePlanBenefit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Type of benefit (primary care; speciality care; inpatient; outpatient)." ) requirement: typing.Optional[str] = pydantic.Field( - description="The referral requirements to have access/coverage for this benefit." + default=None, description="The referral requirements to have access/coverage for this benefit." ) limit: typing.Optional[typing.List[InsurancePlanLimit]] = pydantic.Field( - description="The specific limits on the benefit." + default=None, description="The specific limits on the benefit." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_benefit_1.py b/src/metriport/fhir/types/insurance_plan_benefit_1.py index dd8292e..3335ebd 100644 --- a/src/metriport/fhir/types/insurance_plan_benefit_1.py +++ b/src/metriport/fhir/types/insurance_plan_benefit_1.py @@ -20,20 +20,23 @@ class InsurancePlanBenefit1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care)." ) cost: typing.Optional[typing.List[InsurancePlanCost]] = pydantic.Field( - description="List of the costs associated with a specific benefit." + default=None, description="List of the costs associated with a specific benefit." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_contact.py b/src/metriport/fhir/types/insurance_plan_contact.py index bcf4e07..a45108f 100644 --- a/src/metriport/fhir/types/insurance_plan_contact.py +++ b/src/metriport/fhir/types/insurance_plan_contact.py @@ -22,23 +22,29 @@ class InsurancePlanContact(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) purpose: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a purpose for which the contact can be reached." + default=None, description="Indicates a purpose for which the contact can be reached." ) - name: typing.Optional[HumanName] = pydantic.Field(description="A name associated with the contact.") + name: typing.Optional[HumanName] = pydantic.Field(default=None, description="A name associated with the contact.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." + default=None, + description="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", + ) + address: typing.Optional[Address] = pydantic.Field( + default=None, description="Visiting or postal addresses for the contact." ) - address: typing.Optional[Address] = pydantic.Field(description="Visiting or postal addresses for the contact.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/insurance_plan_cost.py b/src/metriport/fhir/types/insurance_plan_cost.py index 9122491..9d35ca3 100644 --- a/src/metriport/fhir/types/insurance_plan_cost.py +++ b/src/metriport/fhir/types/insurance_plan_cost.py @@ -20,26 +20,32 @@ class InsurancePlanCost(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Type of cost (copay; individual cap; family cap; coinsurance; deductible)." ) applicability: typing.Optional[CodeableConcept] = pydantic.Field( - description="Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other)." + default=None, + description="Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).", ) qualifiers: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA)." + default=None, + description="Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).", ) value: typing.Optional[Quantity] = pydantic.Field( - description="The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance)." + default=None, + description="The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_coverage.py b/src/metriport/fhir/types/insurance_plan_coverage.py index 7e02da6..938f198 100644 --- a/src/metriport/fhir/types/insurance_plan_coverage.py +++ b/src/metriport/fhir/types/insurance_plan_coverage.py @@ -21,20 +21,23 @@ class InsurancePlanCoverage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="Type of coverage (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health)." ) network: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to the network that providing the type of coverage." + default=None, description="Reference to the network that providing the type of coverage." ) benefit: typing.List[InsurancePlanBenefit] = pydantic.Field( description="Specific benefits under this type of coverage." diff --git a/src/metriport/fhir/types/insurance_plan_general_cost.py b/src/metriport/fhir/types/insurance_plan_general_cost.py index 6eae58e..07796d8 100644 --- a/src/metriport/fhir/types/insurance_plan_general_cost.py +++ b/src/metriport/fhir/types/insurance_plan_general_cost.py @@ -21,22 +21,25 @@ class InsurancePlanGeneralCost(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Type of cost.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Type of cost.") group_size: typing.Optional[PositiveInt] = pydantic.Field( - alias="groupSize", description="Number of participants enrolled in the plan." + alias="groupSize", default=None, description="Number of participants enrolled in the plan." ) - cost: typing.Optional[Money] = pydantic.Field(description="Value of the cost.") + cost: typing.Optional[Money] = pydantic.Field(default=None, description="Value of the cost.") comment: typing.Optional[str] = pydantic.Field( - description="Additional information about the general costs associated with this plan." + default=None, description="Additional information about the general costs associated with this plan." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_limit.py b/src/metriport/fhir/types/insurance_plan_limit.py index 5922f91..b61df4c 100644 --- a/src/metriport/fhir/types/insurance_plan_limit.py +++ b/src/metriport/fhir/types/insurance_plan_limit.py @@ -20,19 +20,25 @@ class InsurancePlanLimit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value: typing.Optional[Quantity] = pydantic.Field( - description="The maximum amount of a service item a plan will pay for a covered benefit. For examples. wellness visits, or eyeglasses." + default=None, + description="The maximum amount of a service item a plan will pay for a covered benefit. For examples. wellness visits, or eyeglasses.", + ) + code: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The specific limit on the benefit." ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The specific limit on the benefit.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/insurance_plan_plan.py b/src/metriport/fhir/types/insurance_plan_plan.py index 008c3fb..de57c25 100644 --- a/src/metriport/fhir/types/insurance_plan_plan.py +++ b/src/metriport/fhir/types/insurance_plan_plan.py @@ -23,32 +23,38 @@ class InsurancePlanPlan(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description='Type of plan. For example, "Platinum" or "High Deductable".' + default=None, description='Type of plan. For example, "Platinum" or "High Deductable".' ) coverage_area: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="coverageArea", description="The geographic region in which a health insurance plan's benefits apply." + alias="coverageArea", + default=None, + description="The geographic region in which a health insurance plan's benefits apply.", ) network: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to the network that providing the type of coverage." + default=None, description="Reference to the network that providing the type of coverage." ) general_cost: typing.Optional[typing.List[InsurancePlanGeneralCost]] = pydantic.Field( - alias="generalCost", description="Overall costs associated with the plan." + alias="generalCost", default=None, description="Overall costs associated with the plan." ) specific_cost: typing.Optional[typing.List[InsurancePlanSpecificCost]] = pydantic.Field( - alias="specificCost", description="Costs associated with the coverage provided by the product." + alias="specificCost", default=None, description="Costs associated with the coverage provided by the product." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/insurance_plan_specific_cost.py b/src/metriport/fhir/types/insurance_plan_specific_cost.py index f197b97..6202f6a 100644 --- a/src/metriport/fhir/types/insurance_plan_specific_cost.py +++ b/src/metriport/fhir/types/insurance_plan_specific_cost.py @@ -20,20 +20,23 @@ class InsurancePlanSpecificCost(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: CodeableConcept = pydantic.Field( description="General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health)." ) benefit: typing.Optional[typing.List[InsurancePlanBenefit1]] = pydantic.Field( - description="List of the specific benefits under this category of benefit." + default=None, description="List of the specific benefits under this category of benefit." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/invoice.py b/src/metriport/fhir/types/invoice.py index fa5c85e..6d587e4 100644 --- a/src/metriport/fhir/types/invoice.py +++ b/src/metriport/fhir/types/invoice.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,48 +28,65 @@ class Invoice(BaseResource): Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose. """ - resource_type: typing_extensions.Literal["Invoice"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Invoice"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments." + default=None, + description="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.", + ) + status: typing.Optional[InvoiceStatus] = pydantic.Field( + default=None, description="The current state of the Invoice." ) - status: typing.Optional[InvoiceStatus] = pydantic.Field(description="The current state of the Invoice.") cancelled_reason: typing.Optional[str] = pydantic.Field( alias="cancelledReason", + default=None, description="In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary)." + default=None, + description="Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).", ) subject: typing.Optional[Reference] = pydantic.Field( - description="The individual or set of individuals receiving the goods and services billed in this invoice." + default=None, + description="The individual or set of individuals receiving the goods and services billed in this invoice.", ) recipient: typing.Optional[Reference] = pydantic.Field( - description="The individual or Organization responsible for balancing of this invoice." + default=None, description="The individual or Organization responsible for balancing of this invoice." + ) + date: typing.Optional[DateTime] = pydantic.Field( + default=None, description="Date/time(s) of when this Invoice was posted." ) - date: typing.Optional[DateTime] = pydantic.Field(description="Date/time(s) of when this Invoice was posted.") participant: typing.Optional[typing.List[InvoiceParticipant]] = pydantic.Field( - description="Indicates who or what performed or participated in the charged service." + default=None, description="Indicates who or what performed or participated in the charged service." + ) + issuer: typing.Optional[Reference] = pydantic.Field( + default=None, description="The organizationissuing the Invoice." ) - issuer: typing.Optional[Reference] = pydantic.Field(description="The organizationissuing the Invoice.") account: typing.Optional[Reference] = pydantic.Field( - description="Account which is supposed to be balanced with this Invoice." + default=None, description="Account which is supposed to be balanced with this Invoice." ) line_item: typing.Optional[typing.List[InvoiceLineItem]] = pydantic.Field( alias="lineItem", + default=None, description="Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.", ) total_price_component: typing.Optional[typing.List[InvoicePriceComponent]] = pydantic.Field( alias="totalPriceComponent", + default=None, description="The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.", ) - total_net: typing.Optional[Money] = pydantic.Field(alias="totalNet", description="Invoice total , taxes excluded.") - total_gross: typing.Optional[Money] = pydantic.Field(alias="totalGross", description="Invoice total, tax included.") + total_net: typing.Optional[Money] = pydantic.Field( + alias="totalNet", default=None, description="Invoice total , taxes excluded." + ) + total_gross: typing.Optional[Money] = pydantic.Field( + alias="totalGross", default=None, description="Invoice total, tax included." + ) payment_terms: typing.Optional[Markdown] = pydantic.Field( alias="paymentTerms", + default=None, description="Payment details such as banking details, period of payment, deductibles, methods of payment.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the invoice by the issuer, subject, or other participants." + default=None, description="Comments made about the invoice by the issuer, subject, or other participants." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/invoice_line_item.py b/src/metriport/fhir/types/invoice_line_item.py index 4edfc9d..c90601a 100644 --- a/src/metriport/fhir/types/invoice_line_item.py +++ b/src/metriport/fhir/types/invoice_line_item.py @@ -22,28 +22,34 @@ class InvoiceLineItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) sequence: typing.Optional[PositiveInt] = pydantic.Field( - description="Sequence in which the items appear on the invoice." + default=None, description="Sequence in which the items appear on the invoice." ) charge_item_reference: typing.Optional[Reference] = pydantic.Field( alias="chargeItemReference", + default=None, description="The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", ) charge_item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="chargeItemCodeableConcept", + default=None, description="The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", ) price_component: typing.Optional[typing.List[InvoicePriceComponent]] = pydantic.Field( alias="priceComponent", + default=None, description="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.", ) diff --git a/src/metriport/fhir/types/invoice_participant.py b/src/metriport/fhir/types/invoice_participant.py index 7961688..812c570 100644 --- a/src/metriport/fhir/types/invoice_participant.py +++ b/src/metriport/fhir/types/invoice_participant.py @@ -20,17 +20,21 @@ class InvoiceParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device." + default=None, + description="Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.", ) actor: Reference = pydantic.Field( description="The device, practitioner, etc. who performed or participated in the service." diff --git a/src/metriport/fhir/types/invoice_price_component.py b/src/metriport/fhir/types/invoice_price_component.py index 8cf7731..18b2992 100644 --- a/src/metriport/fhir/types/invoice_price_component.py +++ b/src/metriport/fhir/types/invoice_price_component.py @@ -22,25 +22,31 @@ class InvoicePriceComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[InvoicePriceComponentType] = pydantic.Field( - description="This code identifies the type of the component." + default=None, description="This code identifies the type of the component." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc." + default=None, + description="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", ) factor: typing.Optional[Decimal] = pydantic.Field( - description="The factor that has been applied on the base price for calculating this component." + default=None, description="The factor that has been applied on the base price for calculating this component." + ) + amount: typing.Optional[Money] = pydantic.Field( + default=None, description="The amount calculated for this component." ) - amount: typing.Optional[Money] = pydantic.Field(description="The amount calculated for this component.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/json_web_key.py b/src/metriport/fhir/types/json_web_key.py index 7e247cd..8cd7a4e 100644 --- a/src/metriport/fhir/types/json_web_key.py +++ b/src/metriport/fhir/types/json_web_key.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -22,43 +20,53 @@ class JsonWebKey(pydantic.BaseModel): A JSON object that represents a cryptographic key. The members of the object represent properties of the key, including its value. """ - resource_type: typing_extensions.Literal["JsonWebKey"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["JsonWebKey"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - active: typing.Optional[bool] = pydantic.Field(description="Whether this key is in active use.") - alg: typing.Optional[str] = pydantic.Field(description="The specific cryptographic algorithm used with the key.") - kty: typing.Optional[str] = pydantic.Field(description="The family of cryptographic algorithms used with the key.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + active: typing.Optional[bool] = pydantic.Field(default=None, description="Whether this key is in active use.") + alg: typing.Optional[str] = pydantic.Field( + default=None, description="The specific cryptographic algorithm used with the key." + ) + kty: typing.Optional[str] = pydantic.Field( + default=None, description="The family of cryptographic algorithms used with the key." + ) use: typing.Optional[str] = pydantic.Field( - description="How the key was meant to be used; sig represents the signature." + default=None, description="How the key was meant to be used; sig represents the signature." ) key_ops: typing.Optional[typing.List[str]] = pydantic.Field( - description="The operation(s) for which the key is intended to be used." + default=None, description="The operation(s) for which the key is intended to be used." ) x_5_c: typing.Optional[typing.List[str]] = pydantic.Field( alias="x5c", + default=None, description="The x.509 certificate chain. The first entry in the array is the certificate to use for token verification; the other certificates can be used to verify this first certificate.", ) - n: typing.Optional[str] = pydantic.Field(description="The modulus for the RSA public key.") - e: typing.Optional[str] = pydantic.Field(description="The exponent for the RSA public key.") - kid: typing.Optional[str] = pydantic.Field(description="The unique identifier for the key.") + n: typing.Optional[str] = pydantic.Field(default=None, description="The modulus for the RSA public key.") + e: typing.Optional[str] = pydantic.Field(default=None, description="The exponent for the RSA public key.") + kid: typing.Optional[str] = pydantic.Field(default=None, description="The unique identifier for the key.") x_5_t: typing.Optional[str] = pydantic.Field( - alias="x5t", description="The thumbprint of the x.509 cert (SHA-1 thumbprint)." + alias="x5t", default=None, description="The thumbprint of the x.509 cert (SHA-1 thumbprint)." ) - d: typing.Optional[str] = pydantic.Field(description="The exponent for the RSA private key.") - p: typing.Optional[str] = pydantic.Field(description="The first prime factor.") - q: typing.Optional[str] = pydantic.Field(description="The second prime factor.") - dp: typing.Optional[str] = pydantic.Field(description="The first factor CRT exponent.") - dq: typing.Optional[str] = pydantic.Field(description="The second factor CRT exponent.") - qi: typing.Optional[str] = pydantic.Field(description="The first CRT coefficient.") + d: typing.Optional[str] = pydantic.Field(default=None, description="The exponent for the RSA private key.") + p: typing.Optional[str] = pydantic.Field(default=None, description="The first prime factor.") + q: typing.Optional[str] = pydantic.Field(default=None, description="The second prime factor.") + dp: typing.Optional[str] = pydantic.Field(default=None, description="The first factor CRT exponent.") + dq: typing.Optional[str] = pydantic.Field(default=None, description="The second factor CRT exponent.") + qi: typing.Optional[str] = pydantic.Field(default=None, description="The first CRT coefficient.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/library.py b/src/metriport/fhir/types/library.py index 4a3dbb9..4c91449 100644 --- a/src/metriport/fhir/types/library.py +++ b/src/metriport/fhir/types/library.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -33,110 +31,133 @@ class Library(BaseResource): The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets. """ - resource_type: typing_extensions.Literal["Library"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Library"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers." + default=None, + description="An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts." + default=None, + description="A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the library." + default=None, description="A short, descriptive, user-friendly title for the library." ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the library giving additional information about its content." + default=None, + description="An explanatory or alternate title for the library giving additional information about its content.", ) status: typing.Optional[LibraryStatus] = pydantic.Field( - description="The status of this library. Enables tracking the life-cycle of the content." + default=None, description="The status of this library. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) type: CodeableConcept = pydantic.Field( description="Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition." ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="A code or group definition that describes the intended subject of the contents of the library.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="A code or group definition that describes the intended subject of the contents of the library.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes." + default=None, + description="The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the library." + default=None, description="The name of the organization or individual that published the library." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the library from a consumer's perspective." + default=None, + description="A free text natural language description of the library from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the library is intended to be used." + default=None, description="A legal or geographic region in which the library is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this library is needed and why it has been designed as it has." + default=None, description="Explanation of why this library is needed and why it has been designed as it has." ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description of how the library is used from a clinical perspective." + default=None, description="A detailed description of how the library is used from a clinical perspective." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library." + default=None, + description="A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the library content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) parameter: typing.Optional[typing.List[ParameterDefinition]] = pydantic.Field( - description="The parameter element defines parameters used by the library." + default=None, description="The parameter element defines parameters used by the library." ) data_requirement: typing.Optional[typing.List[DataRequirement]] = pydantic.Field( alias="dataRequirement", + default=None, description="Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.", ) content: typing.Optional[typing.List[Attachment]] = pydantic.Field( - description="The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content." + default=None, + description="The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/linkage.py b/src/metriport/fhir/types/linkage.py index f378537..23745ad 100644 --- a/src/metriport/fhir/types/linkage.py +++ b/src/metriport/fhir/types/linkage.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .linkage_item import LinkageItem @@ -21,12 +19,13 @@ class Linkage(BaseResource): Identifies two or more records (resource instances) that refer to the same real-world "occurrence". """ - resource_type: typing_extensions.Literal["Linkage"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Linkage"] = pydantic.Field(alias="resourceType") active: typing.Optional[bool] = pydantic.Field( - description='Indicates whether the asserted set of linkages are considered to be "in effect".' + default=None, description='Indicates whether the asserted set of linkages are considered to be "in effect".' ) author: typing.Optional[Reference] = pydantic.Field( - description="Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated." + default=None, + description="Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.", ) item: typing.List[LinkageItem] = pydantic.Field( description="Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items." diff --git a/src/metriport/fhir/types/linkage_item.py b/src/metriport/fhir/types/linkage_item.py index aa8742e..bbcfd4a 100644 --- a/src/metriport/fhir/types/linkage_item.py +++ b/src/metriport/fhir/types/linkage_item.py @@ -20,17 +20,21 @@ class LinkageItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[LinkageItemType] = pydantic.Field( - description='Distinguishes which item is "source of truth" (if any) and which items are no longer considered to be current representations.' + default=None, + description='Distinguishes which item is "source of truth" (if any) and which items are no longer considered to be current representations.', ) resource: Reference = pydantic.Field(description="The resource instance being linked as part of the group.") diff --git a/src/metriport/fhir/types/list.py b/src/metriport/fhir/types/list.py index 5f95903..80ec97d 100644 --- a/src/metriport/fhir/types/list.py +++ b/src/metriport/fhir/types/list.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,37 +25,44 @@ class List(BaseResource): A list is a curated collection of resources. """ - resource_type: typing_extensions.Literal["List"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["List"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for the List assigned for business purposes outside the context of FHIR." + default=None, description="Identifier for the List assigned for business purposes outside the context of FHIR." + ) + status: typing.Optional[ListStatus] = pydantic.Field( + default=None, description="Indicates the current state of this list." ) - status: typing.Optional[ListStatus] = pydantic.Field(description="Indicates the current state of this list.") mode: typing.Optional[ListMode] = pydantic.Field( - description="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." + default=None, + description="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", + ) + title: typing.Optional[str] = pydantic.Field( + default=None, description="A label for the list assigned by the author." ) - title: typing.Optional[str] = pydantic.Field(description="A label for the list assigned by the author.") code: typing.Optional[CodeableConcept] = pydantic.Field( - description="This code defines the purpose of the list - why it was created." + default=None, description="This code defines the purpose of the list - why it was created." ) subject: typing.Optional[Reference] = pydantic.Field( - description="The common subject (or patient) of the resources that are in the list if there is one." + default=None, + description="The common subject (or patient) of the resources that are in the list if there is one.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The encounter that is the context in which this list was created." + default=None, description="The encounter that is the context in which this list was created." ) - date: typing.Optional[DateTime] = pydantic.Field(description="The date that the list was prepared.") + date: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date that the list was prepared.") source: typing.Optional[Reference] = pydantic.Field( - description="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list." + default=None, + description="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", ) ordered_by: typing.Optional[CodeableConcept] = pydantic.Field( - alias="orderedBy", description="What order applies to the items in the list." + alias="orderedBy", default=None, description="What order applies to the items in the list." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments that apply to the overall list." + default=None, description="Comments that apply to the overall list." ) - entry: typing.Optional[typing.List[ListEntry]] = pydantic.Field(description="Entries in this list.") + entry: typing.Optional[typing.List[ListEntry]] = pydantic.Field(default=None, description="Entries in this list.") empty_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="emptyReason", description="If the list is empty, why the list is empty." + alias="emptyReason", default=None, description="If the list is empty, why the list is empty." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/list_entry.py b/src/metriport/fhir/types/list_entry.py index 2ddb0f2..4b19dd6 100644 --- a/src/metriport/fhir/types/list_entry.py +++ b/src/metriport/fhir/types/list_entry.py @@ -21,20 +21,26 @@ class ListEntry(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) flag: typing.Optional[CodeableConcept] = pydantic.Field( - description="The flag allows the system constructing the list to indicate the role and significance of the item in the list." + default=None, + description="The flag allows the system constructing the list to indicate the role and significance of the item in the list.", ) - deleted: typing.Optional[bool] = pydantic.Field(description="True if this item is marked as deleted in the list.") - date: typing.Optional[DateTime] = pydantic.Field(description="When this item was added to the list.") + deleted: typing.Optional[bool] = pydantic.Field( + default=None, description="True if this item is marked as deleted in the list." + ) + date: typing.Optional[DateTime] = pydantic.Field(default=None, description="When this item was added to the list.") item: Reference = pydantic.Field(description="A reference to the actual resource from which data was derived.") def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/location.py b/src/metriport/fhir/types/location.py index 4814962..4469b94 100644 --- a/src/metriport/fhir/types/location.py +++ b/src/metriport/fhir/types/location.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .base_resource import BaseResource @@ -29,58 +27,70 @@ class Location(BaseResource): Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated. """ - resource_type: typing_extensions.Literal["Location"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Location"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique code or number identifying the location to its users." + default=None, description="Unique code or number identifying the location to its users." ) status: typing.Optional[LocationStatus] = pydantic.Field( - description="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." + default=None, + description="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", ) operational_status: typing.Optional[Coding] = pydantic.Field( alias="operationalStatus", + default=None, description="The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.", ) name: typing.Optional[str] = pydantic.Field( - description="Name of the location as used by humans. Does not need to be unique." + default=None, description="Name of the location as used by humans. Does not need to be unique." ) alias: typing.Optional[typing.List[str]] = pydantic.Field( - description="A list of alternate names that the location is known as, or was known as, in the past." + default=None, + description="A list of alternate names that the location is known as, or was known as, in the past.", ) description: typing.Optional[str] = pydantic.Field( - description="Description of the Location, which helps in finding or referencing the place." + default=None, description="Description of the Location, which helps in finding or referencing the place." ) mode: typing.Optional[LocationMode] = pydantic.Field( - description="Indicates whether a resource instance represents a specific location or a class of locations." + default=None, + description="Indicates whether a resource instance represents a specific location or a class of locations.", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates the type of function performed at the location." + default=None, description="Indicates the type of function performed at the location." ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." + default=None, + description="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", ) - address: typing.Optional[Address] = pydantic.Field(description="Physical location.") + address: typing.Optional[Address] = pydantic.Field(default=None, description="Physical location.") physical_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="physicalType", description="Physical form of the location, e.g. building, room, vehicle, road." + alias="physicalType", + default=None, + description="Physical form of the location, e.g. building, room, vehicle, road.", ) position: typing.Optional[LocationPosition] = pydantic.Field( - description="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." + default=None, + description="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", ) managing_organization: typing.Optional[Reference] = pydantic.Field( alias="managingOrganization", + default=None, description="The organization responsible for the provisioning and upkeep of the location.", ) part_of: typing.Optional[Reference] = pydantic.Field( - alias="partOf", description="Another Location of which this Location is physically a part of." + alias="partOf", default=None, description="Another Location of which this Location is physically a part of." ) hours_of_operation: typing.Optional[typing.List[LocationHoursOfOperation]] = pydantic.Field( - alias="hoursOfOperation", description="What days/times during a week is this location usually open." + alias="hoursOfOperation", + default=None, + description="What days/times during a week is this location usually open.", ) availability_exceptions: typing.Optional[str] = pydantic.Field( alias="availabilityExceptions", + default=None, description="A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.", ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Technical endpoints providing access to services operated for the location." + default=None, description="Technical endpoints providing access to services operated for the location." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/location_hours_of_operation.py b/src/metriport/fhir/types/location_hours_of_operation.py index 74960b3..743136a 100644 --- a/src/metriport/fhir/types/location_hours_of_operation.py +++ b/src/metriport/fhir/types/location_hours_of_operation.py @@ -20,25 +20,31 @@ class LocationHoursOfOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) days_of_week: typing.Optional[typing.List[Code]] = pydantic.Field( alias="daysOfWeek", + default=None, description="Indicates which days of the week are available between the start and end Times.", ) - all_day: typing.Optional[bool] = pydantic.Field(alias="allDay", description="The Location is open all day.") + all_day: typing.Optional[bool] = pydantic.Field( + alias="allDay", default=None, description="The Location is open all day." + ) opening_time: typing.Optional[Time] = pydantic.Field( - alias="openingTime", description="Time that the Location opens." + alias="openingTime", default=None, description="Time that the Location opens." ) closing_time: typing.Optional[Time] = pydantic.Field( - alias="closingTime", description="Time that the Location closes." + alias="closingTime", default=None, description="Time that the Location closes." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/location_position.py b/src/metriport/fhir/types/location_position.py index 3c63513..ca6a5aa 100644 --- a/src/metriport/fhir/types/location_position.py +++ b/src/metriport/fhir/types/location_position.py @@ -19,23 +19,29 @@ class LocationPosition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) longitude: typing.Optional[Decimal] = pydantic.Field( - description="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)." + default=None, + description="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", ) latitude: typing.Optional[Decimal] = pydantic.Field( - description="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)." + default=None, + description="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", ) altitude: typing.Optional[Decimal] = pydantic.Field( - description="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)." + default=None, + description="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/login.py b/src/metriport/fhir/types/login.py index bc6749f..2f9d568 100644 --- a/src/metriport/fhir/types/login.py +++ b/src/metriport/fhir/types/login.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -26,68 +24,89 @@ class Login(pydantic.BaseModel): Login event and session details. """ - resource_type: typing_extensions.Literal["Login"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Login"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - client: typing.Optional[Reference] = pydantic.Field(description="The client requesting the code.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + client: typing.Optional[Reference] = pydantic.Field(default=None, description="The client requesting the code.") profile_type: typing.Optional[Code] = pydantic.Field( - alias="profileType", description="Optional required profile resource type." + alias="profileType", default=None, description="Optional required profile resource type." + ) + project: typing.Optional[Reference] = pydantic.Field( + default=None, description="Optional required project for the login." ) - project: typing.Optional[Reference] = pydantic.Field(description="Optional required project for the login.") user: Reference = pydantic.Field(description="The user requesting the code.") membership: typing.Optional[Reference] = pydantic.Field( - description="Reference to the project membership which includes FHIR identity (patient, practitioner, etc), access policy, and user configuration." + default=None, + description="Reference to the project membership which includes FHIR identity (patient, practitioner, etc), access policy, and user configuration.", ) - scope: typing.Optional[str] = pydantic.Field(description="OAuth scope or scopes.") + scope: typing.Optional[str] = pydantic.Field(default=None, description="OAuth scope or scopes.") auth_method: LoginAuthMethod = pydantic.Field( alias="authMethod", description="The authentication method used to obtain the code (password or google)." ) auth_time: Instant = pydantic.Field(alias="authTime", description="Time when the End-User authentication occurred.") cookie: typing.Optional[str] = pydantic.Field( - description="The cookie value that can be used for session management." + default=None, description="The cookie value that can be used for session management." ) code: typing.Optional[str] = pydantic.Field( - description="The authorization code generated by the authorization server. The authorization code MUST expire shortly after it is issued to mitigate the risk of leaks. A maximum authorization code lifetime of 10 minutes is RECOMMENDED. The client MUST NOT use the authorization code more than once. If an authorization code is used more than once, the authorization server MUST deny the request and SHOULD revoke (when possible) all tokens previously issued based on that authorization code. The authorization code is bound to the client identifier and redirection URI." + default=None, + description="The authorization code generated by the authorization server. The authorization code MUST expire shortly after it is issued to mitigate the risk of leaks. A maximum authorization code lifetime of 10 minutes is RECOMMENDED. The client MUST NOT use the authorization code more than once. If an authorization code is used more than once, the authorization server MUST deny the request and SHOULD revoke (when possible) all tokens previously issued based on that authorization code. The authorization code is bound to the client identifier and redirection URI.", ) code_challenge: typing.Optional[str] = pydantic.Field( - alias="codeChallenge", description="PKCE code challenge presented in the authorization request." + alias="codeChallenge", default=None, description="PKCE code challenge presented in the authorization request." ) code_challenge_method: typing.Optional[LoginCodeChallengeMethod] = pydantic.Field( alias="codeChallengeMethod", + default=None, description='OPTIONAL, defaults to "plain" if not present in the request. Code verifier transformation method is "S256" or "plain".', ) refresh_secret: typing.Optional[str] = pydantic.Field( - alias="refreshSecret", description="Optional secure random string that can be used in an OAuth refresh token." + alias="refreshSecret", + default=None, + description="Optional secure random string that can be used in an OAuth refresh token.", ) nonce: typing.Optional[str] = pydantic.Field( - description="Optional cryptographically random string that your app adds to the initial request and the authorization server includes inside the ID Token, used to prevent token replay attacks." + default=None, + description="Optional cryptographically random string that your app adds to the initial request and the authorization server includes inside the ID Token, used to prevent token replay attacks.", ) mfa_verified: typing.Optional[bool] = pydantic.Field( alias="mfaVerified", + default=None, description="Whether the user has verified using multi-factor authentication (MFA). This will only be set is the user has MFA enabled (see User.mfaEnrolled).", ) - granted: typing.Optional[bool] = pydantic.Field(description="Whether a token has been granted for this login.") - revoked: typing.Optional[bool] = pydantic.Field(description="Whether this login has been revoked or invalidated.") - admin: typing.Optional[bool] = pydantic.Field(description="DEPRECATED") + granted: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether a token has been granted for this login." + ) + revoked: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether this login has been revoked or invalidated." + ) + admin: typing.Optional[bool] = pydantic.Field(default=None, description="DEPRECATED") super_admin: typing.Optional[bool] = pydantic.Field( - alias="superAdmin", description="Whether this login has super administrator privileges." + alias="superAdmin", default=None, description="Whether this login has super administrator privileges." + ) + launch: typing.Optional[Reference] = pydantic.Field( + default=None, description="Optional SMART App Launch context for this login." ) - launch: typing.Optional[Reference] = pydantic.Field(description="Optional SMART App Launch context for this login.") remote_address: typing.Optional[str] = pydantic.Field( alias="remoteAddress", + default=None, description="The Internet Protocol (IP) address of the client or last proxy that sent the request.", ) user_agent: typing.Optional[str] = pydantic.Field( - alias="userAgent", description="The User-Agent request header as sent by the client." + alias="userAgent", default=None, description="The User-Agent request header as sent by the client." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/marketing_status.py b/src/metriport/fhir/types/marketing_status.py index 922eaf9..3b22b9d 100644 --- a/src/metriport/fhir/types/marketing_status.py +++ b/src/metriport/fhir/types/marketing_status.py @@ -21,20 +21,24 @@ class MarketingStatus(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) country: CodeableConcept = pydantic.Field( description="The country in which the marketing authorisation has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements." ) jurisdiction: typing.Optional[CodeableConcept] = pydantic.Field( - description="Where a Medicines Regulatory Agency has granted a marketing authorisation for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified." + default=None, + description="Where a Medicines Regulatory Agency has granted a marketing authorisation for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified.", ) status: CodeableConcept = pydantic.Field( description="This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples." @@ -45,6 +49,7 @@ class MarketingStatus(pydantic.BaseModel): ) restore_date: typing.Optional[DateTime] = pydantic.Field( alias="restoreDate", + default=None, description="The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.", ) diff --git a/src/metriport/fhir/types/measure.py b/src/metriport/fhir/types/measure.py index 4ce8622..09d72e7 100644 --- a/src/metriport/fhir/types/measure.py +++ b/src/metriport/fhir/types/measure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,144 +31,176 @@ class Measure(BaseResource): The Measure resource provides the definition of a quality measure. """ - resource_type: typing_extensions.Literal["Measure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Measure"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers." + default=None, + description="An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the measure." + default=None, description="A short, descriptive, user-friendly title for the measure." ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the measure giving additional information about its content." + default=None, + description="An explanatory or alternate title for the measure giving additional information about its content.", ) status: typing.Optional[MeasureStatus] = pydantic.Field( - description="The status of this measure. Enables tracking the life-cycle of the content." + default=None, description="The status of this measure. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes." + default=None, + description="The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the measure." + default=None, description="The name of the organization or individual that published the measure." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the measure from a consumer's perspective." + default=None, + description="A free text natural language description of the measure from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the measure is intended to be used." + default=None, description="A legal or geographic region in which the measure is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this measure is needed and why it has been designed as it has." + default=None, description="Explanation of why this measure is needed and why it has been designed as it has." ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description, from a clinical perspective, of how the measure is used." + default=None, description="A detailed description, from a clinical perspective, of how the measure is used." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure." + default=None, + description="A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the measure content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) library: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A reference to a Library resource containing the formal logic used by the measure." + default=None, description="A reference to a Library resource containing the formal logic used by the measure." ) disclaimer: typing.Optional[Markdown] = pydantic.Field( - description="Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure." + default=None, + description="Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.", ) scoring: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented." + default=None, + description="Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.", ) composite_scoring: typing.Optional[CodeableConcept] = pydantic.Field( alias="compositeScoring", + default=None, description="If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization." + default=None, + description="Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.", ) risk_adjustment: typing.Optional[str] = pydantic.Field( alias="riskAdjustment", + default=None, description="A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.", ) rate_aggregation: typing.Optional[str] = pydantic.Field( alias="rateAggregation", + default=None, description="Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.", ) rationale: typing.Optional[Markdown] = pydantic.Field( - description="Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence." + default=None, + description="Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.", ) clinical_recommendation_statement: typing.Optional[Markdown] = pydantic.Field( alias="clinicalRecommendationStatement", + default=None, description="Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.", ) improvement_notation: typing.Optional[CodeableConcept] = pydantic.Field( alias="improvementNotation", + default=None, description="Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).", ) definition: typing.Optional[typing.List[Markdown]] = pydantic.Field( - description="Provides a description of an individual term used within the measure." + default=None, description="Provides a description of an individual term used within the measure." ) guidance: typing.Optional[Markdown] = pydantic.Field( - description="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure." + default=None, + description="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.", ) group: typing.Optional[typing.List[MeasureGroup]] = pydantic.Field( - description="A group of population criteria for the measure." + default=None, description="A group of population criteria for the measure." ) supplemental_data: typing.Optional[typing.List[MeasureSupplementalData]] = pydantic.Field( alias="supplementalData", + default=None, description="The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.", ) diff --git a/src/metriport/fhir/types/measure_component.py b/src/metriport/fhir/types/measure_component.py index 235f257..26fa785 100644 --- a/src/metriport/fhir/types/measure_component.py +++ b/src/metriport/fhir/types/measure_component.py @@ -20,20 +20,24 @@ class MeasureComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures." + default=None, + description="Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", ) description: typing.Optional[str] = pydantic.Field( - description="The human readable description of this stratifier criteria component." + default=None, description="The human readable description of this stratifier criteria component." ) criteria: Expression = pydantic.Field( description="An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element." diff --git a/src/metriport/fhir/types/measure_group.py b/src/metriport/fhir/types/measure_group.py index 8ca00e9..e3cc2f9 100644 --- a/src/metriport/fhir/types/measure_group.py +++ b/src/metriport/fhir/types/measure_group.py @@ -21,26 +21,31 @@ class MeasureGroup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures." + default=None, + description="Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.", ) description: typing.Optional[str] = pydantic.Field( - description="The human readable description of this population group." + default=None, description="The human readable description of this population group." ) population: typing.Optional[typing.List[MeasurePopulation]] = pydantic.Field( - description="A population criteria for the measure." + default=None, description="A population criteria for the measure." ) stratifier: typing.Optional[typing.List[MeasureStratifier]] = pydantic.Field( - description="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path." + default=None, + description="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/measure_population.py b/src/metriport/fhir/types/measure_population.py index 5de9108..a65313e 100644 --- a/src/metriport/fhir/types/measure_population.py +++ b/src/metriport/fhir/types/measure_population.py @@ -20,18 +20,23 @@ class MeasurePopulation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of population criteria.") + code: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The type of population criteria." + ) description: typing.Optional[str] = pydantic.Field( - description="The human readable description of this population criteria." + default=None, description="The human readable description of this population criteria." ) criteria: Expression = pydantic.Field( description="An expression that specifies the criteria for the population, typically the name of an expression in a library." diff --git a/src/metriport/fhir/types/measure_report.py b/src/metriport/fhir/types/measure_report.py index 3eafa3e..719cbe6 100644 --- a/src/metriport/fhir/types/measure_report.py +++ b/src/metriport/fhir/types/measure_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -28,36 +26,43 @@ class MeasureReport(BaseResource): The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation. """ - resource_type: typing_extensions.Literal["MeasureReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MeasureReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.", ) status: typing.Optional[MeasureReportStatus] = pydantic.Field( - description="The MeasureReport status. No data will be available until the MeasureReport status is complete." + default=None, + description="The MeasureReport status. No data will be available until the MeasureReport status is complete.", ) type: typing.Optional[MeasureReportType] = pydantic.Field( - description="The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure." + default=None, + description="The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.", ) measure: Canonical = pydantic.Field( description="A reference to the Measure that was calculated to produce this report." ) subject: typing.Optional[Reference] = pydantic.Field( - description="Optional subject identifying the individual or individuals the report is for." + default=None, description="Optional subject identifying the individual or individuals the report is for." + ) + date: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date this measure report was generated." ) - date: typing.Optional[DateTime] = pydantic.Field(description="The date this measure report was generated.") reporter: typing.Optional[Reference] = pydantic.Field( - description="The individual, location, or organization that is reporting the data." + default=None, description="The individual, location, or organization that is reporting the data." ) period: Period = pydantic.Field(description="The reporting period for which the report was calculated.") improvement_notation: typing.Optional[CodeableConcept] = pydantic.Field( alias="improvementNotation", + default=None, description="Whether improvement in the measure is noted by an increase or decrease in the measure score.", ) group: typing.Optional[typing.List[MeasureReportGroup]] = pydantic.Field( - description="The results of the calculation, one for each population group in the measure." + default=None, description="The results of the calculation, one for each population group in the measure." ) evaluated_resource: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="evaluatedResource", + default=None, description="A reference to a Bundle containing the Resources that were used in the calculation of this measure.", ) diff --git a/src/metriport/fhir/types/measure_report_component.py b/src/metriport/fhir/types/measure_report_component.py index e0b9bae..4fa171b 100644 --- a/src/metriport/fhir/types/measure_report_component.py +++ b/src/metriport/fhir/types/measure_report_component.py @@ -19,13 +19,16 @@ class MeasureReportComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="The code for the stratum component value.") diff --git a/src/metriport/fhir/types/measure_report_group.py b/src/metriport/fhir/types/measure_report_group.py index d5a214a..5932192 100644 --- a/src/metriport/fhir/types/measure_report_group.py +++ b/src/metriport/fhir/types/measure_report_group.py @@ -22,27 +22,33 @@ class MeasureReportGroup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="The meaning of the population group as defined in the measure definition." + default=None, description="The meaning of the population group as defined in the measure definition." ) population: typing.Optional[typing.List[MeasureReportPopulation]] = pydantic.Field( - description="The populations that make up the population group, one for each type of population appropriate for the measure." + default=None, + description="The populations that make up the population group, one for each type of population appropriate for the measure.", ) measure_score: typing.Optional[Quantity] = pydantic.Field( alias="measureScore", + default=None, description="The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.", ) stratifier: typing.Optional[typing.List[MeasureReportStratifier]] = pydantic.Field( - description="When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure." + default=None, + description="When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/measure_report_population.py b/src/metriport/fhir/types/measure_report_population.py index 6ef598b..e54fd17 100644 --- a/src/metriport/fhir/types/measure_report_population.py +++ b/src/metriport/fhir/types/measure_report_population.py @@ -20,19 +20,23 @@ class MeasureReportPopulation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of the population.") - count: typing.Optional[int] = pydantic.Field(description="The number of members of the population.") + code: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The type of the population.") + count: typing.Optional[int] = pydantic.Field(default=None, description="The number of members of the population.") subject_results: typing.Optional[Reference] = pydantic.Field( alias="subjectResults", + default=None, description="This element refers to a List of subject level MeasureReport resources, one for each subject in this population.", ) diff --git a/src/metriport/fhir/types/measure_report_population_1.py b/src/metriport/fhir/types/measure_report_population_1.py index 4e764e1..52e1d82 100644 --- a/src/metriport/fhir/types/measure_report_population_1.py +++ b/src/metriport/fhir/types/measure_report_population_1.py @@ -20,19 +20,25 @@ class MeasureReportPopulation1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of the population.") - count: typing.Optional[int] = pydantic.Field(description="The number of members of the population in this stratum.") + code: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The type of the population.") + count: typing.Optional[int] = pydantic.Field( + default=None, description="The number of members of the population in this stratum." + ) subject_results: typing.Optional[Reference] = pydantic.Field( alias="subjectResults", + default=None, description="This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.", ) diff --git a/src/metriport/fhir/types/measure_report_stratifier.py b/src/metriport/fhir/types/measure_report_stratifier.py index bf56b06..c749d25 100644 --- a/src/metriport/fhir/types/measure_report_stratifier.py +++ b/src/metriport/fhir/types/measure_report_stratifier.py @@ -20,20 +20,24 @@ class MeasureReportStratifier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The meaning of this stratifier, as defined in the measure definition." + default=None, description="The meaning of this stratifier, as defined in the measure definition." ) stratum: typing.Optional[typing.List[MeasureReportStratum]] = pydantic.Field( - description="This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value." + default=None, + description="This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/measure_report_stratum.py b/src/metriport/fhir/types/measure_report_stratum.py index e8bb5cc..9753cd8 100644 --- a/src/metriport/fhir/types/measure_report_stratum.py +++ b/src/metriport/fhir/types/measure_report_stratum.py @@ -22,26 +22,32 @@ class MeasureReportStratum(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value: typing.Optional[CodeableConcept] = pydantic.Field( - description="The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique." + default=None, + description="The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.", ) component: typing.Optional[typing.List[MeasureReportComponent]] = pydantic.Field( - description="A stratifier component value." + default=None, description="A stratifier component value." ) population: typing.Optional[typing.List[MeasureReportPopulation1]] = pydantic.Field( - description="The populations that make up the stratum, one for each type of population appropriate to the measure." + default=None, + description="The populations that make up the stratum, one for each type of population appropriate to the measure.", ) measure_score: typing.Optional[Quantity] = pydantic.Field( alias="measureScore", + default=None, description="The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.", ) diff --git a/src/metriport/fhir/types/measure_stratifier.py b/src/metriport/fhir/types/measure_stratifier.py index d606dd9..2b82fe2 100644 --- a/src/metriport/fhir/types/measure_stratifier.py +++ b/src/metriport/fhir/types/measure_stratifier.py @@ -21,26 +21,32 @@ class MeasureStratifier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures." + default=None, + description="Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", ) description: typing.Optional[str] = pydantic.Field( - description="The human readable description of this stratifier criteria." + default=None, description="The human readable description of this stratifier criteria." ) criteria: typing.Optional[Expression] = pydantic.Field( - description="An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element." + default=None, + description="An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.", ) component: typing.Optional[typing.List[MeasureComponent]] = pydantic.Field( - description="A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path." + default=None, + description="A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/measure_supplemental_data.py b/src/metriport/fhir/types/measure_supplemental_data.py index d87f974..d3827f3 100644 --- a/src/metriport/fhir/types/measure_supplemental_data.py +++ b/src/metriport/fhir/types/measure_supplemental_data.py @@ -20,23 +20,28 @@ class MeasureSupplementalData(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures." + default=None, + description="Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.", ) usage: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation." + default=None, + description="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.", ) description: typing.Optional[str] = pydantic.Field( - description="The human readable description of this supplemental data." + default=None, description="The human readable description of this supplemental data." ) criteria: Expression = pydantic.Field( description="The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element." diff --git a/src/metriport/fhir/types/media.py b/src/metriport/fhir/types/media.py index 1937c1d..3706acf 100644 --- a/src/metriport/fhir/types/media.py +++ b/src/metriport/fhir/types/media.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .attachment import Attachment @@ -29,67 +27,86 @@ class Media(BaseResource): A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. """ - resource_type: typing_extensions.Literal["Media"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Media"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." + default=None, + description="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A procedure that is fulfilled in whole or in part by the creation of this media." + alias="basedOn", + default=None, + description="A procedure that is fulfilled in whole or in part by the creation of this media.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger event of which this particular event is a component or step." + alias="partOf", + default=None, + description="A larger event of which this particular event is a component or step.", ) - status: typing.Optional[Code] = pydantic.Field(description="The current state of the {{title}}.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The current state of the {{title}}.") type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that classifies whether the media is an image, video or audio recording or some other media category." + default=None, + description="A code that classifies whether the media is an image, video or audio recording or some other media category.", ) modality: typing.Optional[CodeableConcept] = pydantic.Field( - description="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." + default=None, + description="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.", ) view: typing.Optional[CodeableConcept] = pydantic.Field( - description="The name of the imaging view e.g. Lateral or Antero-posterior (AP)." + default=None, description="The name of the imaging view e.g. Lateral or Antero-posterior (AP)." + ) + subject: typing.Optional[Reference] = pydantic.Field( + default=None, description="Who/What this Media is a record of." ) - subject: typing.Optional[Reference] = pydantic.Field(description="Who/What this Media is a record of.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The encounter that establishes the context for this media." + default=None, description="The encounter that establishes the context for this media." ) created_date_time: typing.Optional[str] = pydantic.Field( - alias="createdDateTime", description="The date and time(s) at which the media was collected." + alias="createdDateTime", default=None, description="The date and time(s) at which the media was collected." ) created_period: typing.Optional[Period] = pydantic.Field( - alias="createdPeriod", description="The date and time(s) at which the media was collected." + alias="createdPeriod", default=None, description="The date and time(s) at which the media was collected." ) issued: typing.Optional[Instant] = pydantic.Field( - description="The date and time this version of the media was made available to providers, typically after having been reviewed." + default=None, + description="The date and time this version of the media was made available to providers, typically after having been reviewed.", ) operator: typing.Optional[Reference] = pydantic.Field( - description="The person who administered the collection of the image." + default=None, description="The person who administered the collection of the image." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes why the event occurred in coded or textual form." + alias="reasonCode", default=None, description="Describes why the event occurred in coded or textual form." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( alias="bodySite", + default=None, description="Indicates the site on the subject's body where the observation was made (i.e. the target site).", ) device_name: typing.Optional[str] = pydantic.Field( alias="deviceName", + default=None, description="The name of the device / manufacturer of the device that was used to make the recording.", ) - device: typing.Optional[Reference] = pydantic.Field(description="The device used to collect the media.") - height: typing.Optional[PositiveInt] = pydantic.Field(description="Height of the image in pixels (photo/video).") - width: typing.Optional[PositiveInt] = pydantic.Field(description="Width of the image in pixels (photo/video).") + device: typing.Optional[Reference] = pydantic.Field( + default=None, description="The device used to collect the media." + ) + height: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="Height of the image in pixels (photo/video)." + ) + width: typing.Optional[PositiveInt] = pydantic.Field( + default=None, description="Width of the image in pixels (photo/video)." + ) frames: typing.Optional[PositiveInt] = pydantic.Field( - description="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." + default=None, + description="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.", ) duration: typing.Optional[Decimal] = pydantic.Field( - description="The duration of the recording in seconds - for audio and video." + default=None, description="The duration of the recording in seconds - for audio and video." ) content: Attachment = pydantic.Field( description="The actual content of the media - inline or by direct reference to the media source file." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the media by the performer, subject or other participants." + default=None, description="Comments made about the media by the performer, subject or other participants." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication.py b/src/metriport/fhir/types/medication.py index 8b99402..b90fbf5 100644 --- a/src/metriport/fhir/types/medication.py +++ b/src/metriport/fhir/types/medication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -26,28 +24,33 @@ class Medication(BaseResource): This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. """ - resource_type: typing_extensions.Literal["Medication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Medication"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifier for this medication." + default=None, description="Business identifier for this medication." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." + default=None, + description="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.", + ) + status: typing.Optional[Code] = pydantic.Field( + default=None, description="A code to indicate if the medication is in active use." ) - status: typing.Optional[Code] = pydantic.Field(description="A code to indicate if the medication is in active use.") manufacturer: typing.Optional[Reference] = pydantic.Field( - description="Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product." + default=None, + description="Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.", ) form: typing.Optional[CodeableConcept] = pydantic.Field( - description="Describes the form of the item. Powder; tablets; capsule." + default=None, description="Describes the form of the item. Powder; tablets; capsule." ) amount: typing.Optional[Ratio] = pydantic.Field( - description="Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." + default=None, + description="Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).", ) ingredient: typing.Optional[typing.List[MedicationIngredient]] = pydantic.Field( - description="Identifies a particular constituent of interest in the product." + default=None, description="Identifies a particular constituent of interest in the product." ) batch: typing.Optional[MedicationBatch] = pydantic.Field( - description="Information that only applies to packages (not products)." + default=None, description="Information that only applies to packages (not products)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_administration.py b/src/metriport/fhir/types/medication_administration.py index 086e0c8..4d83ce9 100644 --- a/src/metriport/fhir/types/medication_administration.py +++ b/src/metriport/fhir/types/medication_administration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,73 +26,90 @@ class MedicationAdministration(BaseResource): Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. """ - resource_type: typing_extensions.Literal["MedicationAdministration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationAdministration"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." + default=None, + description="Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", ) instantiates: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event." + default=None, + description="A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger event of which this particular event is a component or step." + alias="partOf", + default=None, + description="A larger event of which this particular event is a component or step.", ) status: typing.Optional[Code] = pydantic.Field( - description="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way." + default=None, + description="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", ) status_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="statusReason", description="A code indicating why the administration was not performed." + alias="statusReason", default=None, description="A code indicating why the administration was not performed." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates where the medication is expected to be consumed or administered." + default=None, description="Indicates where the medication is expected to be consumed or administered." ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) subject: Reference = pydantic.Field(description="The person or animal or group receiving the medication.") context: typing.Optional[Reference] = pydantic.Field( - description="The visit, admission, or other contact between patient and health care provider during which the medication administration was performed." + default=None, + description="The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.", ) supporting_information: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInformation", + default=None, description="Additional information (for example, patient height and weight) that supports the administration of the medication.", ) effective_date_time: typing.Optional[str] = pydantic.Field( alias="effectiveDateTime", + default=None, description="A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", ) performer: typing.Optional[typing.List[MedicationAdministrationPerformer]] = pydantic.Field( - description="Indicates who or what performed the medication administration and how they were involved." + default=None, + description="Indicates who or what performed the medication administration and how they were involved.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="A code indicating why the medication was given." + alias="reasonCode", default=None, description="A code indicating why the medication was given." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Condition or observation that supports why the medication was administered.", ) request: typing.Optional[Reference] = pydantic.Field( - description="The original request, instruction or authority to perform the administration." + default=None, description="The original request, instruction or authority to perform the administration." ) device: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The device used in administering the medication to the patient. For example, a particular infusion pump." + default=None, + description="The device used in administering the medication to the patient. For example, a particular infusion pump.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Extra information about the medication administration that is not conveyed by the other attributes." + default=None, + description="Extra information about the medication administration that is not conveyed by the other attributes.", ) dosage: typing.Optional[MedicationAdministrationDosage] = pydantic.Field( - description="Describes the medication dosage information details e.g. dose, rate, site, route, etc." + default=None, + description="Describes the medication dosage information details e.g. dose, rate, site, route, etc.", ) event_history: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="eventHistory", + default=None, description="A summary of the events of interest that have occurred, such as when the administration was verified.", ) diff --git a/src/metriport/fhir/types/medication_administration_dosage.py b/src/metriport/fhir/types/medication_administration_dosage.py index 9702070..58531e1 100644 --- a/src/metriport/fhir/types/medication_administration_dosage.py +++ b/src/metriport/fhir/types/medication_administration_dosage.py @@ -21,40 +21,50 @@ class MedicationAdministrationDosage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) text: typing.Optional[str] = pydantic.Field( + default=None, description=( "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\n" "\n" "The dosage instructions should reflect the dosage of the medication that was administered.\n" - ) + ), ) site: typing.Optional[CodeableConcept] = pydantic.Field( - description='A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".' + default=None, + description='A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".', ) route: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc." + default=None, + description="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." + default=None, + description="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", ) dose: typing.Optional[Quantity] = pydantic.Field( - description="The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection." + default=None, + description="The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", ) rate_ratio: typing.Optional[Ratio] = pydantic.Field( alias="rateRatio", + default=None, description="Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", ) rate_quantity: typing.Optional[Quantity] = pydantic.Field( alias="rateQuantity", + default=None, description="Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", ) diff --git a/src/metriport/fhir/types/medication_administration_performer.py b/src/metriport/fhir/types/medication_administration_performer.py index 59dae3d..2f3e3c4 100644 --- a/src/metriport/fhir/types/medication_administration_performer.py +++ b/src/metriport/fhir/types/medication_administration_performer.py @@ -20,17 +20,21 @@ class MedicationAdministrationPerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Distinguishes the type of involvement of the performer in the medication administration." + default=None, + description="Distinguishes the type of involvement of the performer in the medication administration.", ) actor: Reference = pydantic.Field(description="Indicates who or what performed the medication administration.") diff --git a/src/metriport/fhir/types/medication_batch.py b/src/metriport/fhir/types/medication_batch.py index 7a48e27..a39346c 100644 --- a/src/metriport/fhir/types/medication_batch.py +++ b/src/metriport/fhir/types/medication_batch.py @@ -19,20 +19,23 @@ class MedicationBatch(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) lot_number: typing.Optional[str] = pydantic.Field( - alias="lotNumber", description="The assigned lot number of a batch of the specified product." + alias="lotNumber", default=None, description="The assigned lot number of a batch of the specified product." ) expiration_date: typing.Optional[DateTime] = pydantic.Field( - alias="expirationDate", description="When this specific batch of product will expire." + alias="expirationDate", default=None, description="When this specific batch of product will expire." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_dispense.py b/src/metriport/fhir/types/medication_dispense.py index 584347e..955b949 100644 --- a/src/metriport/fhir/types/medication_dispense.py +++ b/src/metriport/fhir/types/medication_dispense.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,89 +27,111 @@ class MedicationDispense(BaseResource): Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. """ - resource_type: typing_extensions.Literal["MedicationDispense"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationDispense"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." + default=None, + description="Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="The procedure that trigger the dispense." + alias="partOf", default=None, description="The procedure that trigger the dispense." ) status: typing.Optional[Code] = pydantic.Field( - description="A code specifying the state of the set of dispense events." + default=None, description="A code specifying the state of the set of dispense events." ) status_reason_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReasonCodeableConcept", description="Indicates the reason why a dispense was not performed." + alias="statusReasonCodeableConcept", + default=None, + description="Indicates the reason why a dispense was not performed.", ) status_reason_reference: typing.Optional[Reference] = pydantic.Field( - alias="statusReasonReference", description="Indicates the reason why a dispense was not performed." + alias="statusReasonReference", + default=None, + description="Indicates the reason why a dispense was not performed.", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." + default=None, + description="Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).", ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) subject: typing.Optional[Reference] = pydantic.Field( - description="A link to a resource representing the person or the group to whom the medication will be given." + default=None, + description="A link to a resource representing the person or the group to whom the medication will be given.", ) context: typing.Optional[Reference] = pydantic.Field( - description="The encounter or episode of care that establishes the context for this event." + default=None, description="The encounter or episode of care that establishes the context for this event." ) supporting_information: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInformation", + default=None, description="Additional information that supports the medication being dispensed.", ) performer: typing.Optional[typing.List[MedicationDispensePerformer]] = pydantic.Field( - description="Indicates who or what performed the event." + default=None, description="Indicates who or what performed the event." ) location: typing.Optional[Reference] = pydantic.Field( - description="The principal physical location where the dispense was performed." + default=None, description="The principal physical location where the dispense was performed." ) authorizing_prescription: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="authorizingPrescription", description="Indicates the medication order that is being dispensed against." + alias="authorizingPrescription", + default=None, + description="Indicates the medication order that is being dispensed against.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." + default=None, + description="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The amount of medication that has been dispensed. Includes unit of measure." + default=None, description="The amount of medication that has been dispensed. Includes unit of measure." ) days_supply: typing.Optional[Quantity] = pydantic.Field( - alias="daysSupply", description="The amount of medication expressed as a timing amount." + alias="daysSupply", default=None, description="The amount of medication expressed as a timing amount." ) when_prepared: typing.Optional[DateTime] = pydantic.Field( - alias="whenPrepared", description="The time when the dispensed product was packaged and reviewed." + alias="whenPrepared", default=None, description="The time when the dispensed product was packaged and reviewed." ) when_handed_over: typing.Optional[DateTime] = pydantic.Field( alias="whenHandedOver", + default=None, description="The time the dispensed product was provided to the patient or their representative.", ) destination: typing.Optional[Reference] = pydantic.Field( - description="Identification of the facility/location where the medication was shipped to, as part of the dispense event." + default=None, + description="Identification of the facility/location where the medication was shipped to, as part of the dispense event.", ) receiver: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional." + default=None, + description="Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Extra information about the dispense that could not be conveyed in the other attributes." + default=None, + description="Extra information about the dispense that could not be conveyed in the other attributes.", ) dosage_instruction: typing.Optional[typing.List[Dosage]] = pydantic.Field( - alias="dosageInstruction", description="Indicates how the medication is to be used by the patient." + alias="dosageInstruction", + default=None, + description="Indicates how the medication is to be used by the patient.", ) substitution: typing.Optional[MedicationDispenseSubstitution] = pydantic.Field( - description="Indicates whether or not substitution was made as part of the dispense. In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done." + default=None, + description="Indicates whether or not substitution was made as part of the dispense. In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.", ) detected_issue: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="detectedIssue", + default=None, description="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc.", ) event_history: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="eventHistory", + default=None, description="A summary of the events of interest that have occurred, such as when the dispense was verified.", ) diff --git a/src/metriport/fhir/types/medication_dispense_performer.py b/src/metriport/fhir/types/medication_dispense_performer.py index 9e2f81d..1dfa65e 100644 --- a/src/metriport/fhir/types/medication_dispense_performer.py +++ b/src/metriport/fhir/types/medication_dispense_performer.py @@ -20,17 +20,21 @@ class MedicationDispensePerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Distinguishes the type of performer in the dispense. For example, date enterer, packager, final checker." + default=None, + description="Distinguishes the type of performer in the dispense. For example, date enterer, packager, final checker.", ) actor: Reference = pydantic.Field( description="The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication." diff --git a/src/metriport/fhir/types/medication_dispense_substitution.py b/src/metriport/fhir/types/medication_dispense_substitution.py index 7e94f13..45b7309 100644 --- a/src/metriport/fhir/types/medication_dispense_substitution.py +++ b/src/metriport/fhir/types/medication_dispense_substitution.py @@ -20,27 +20,33 @@ class MedicationDispenseSubstitution(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) was_substituted: typing.Optional[bool] = pydantic.Field( alias="wasSubstituted", + default=None, description="True if the dispenser dispensed a different drug or product from what was prescribed.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code signifying whether a different drug was dispensed from what was prescribed." + default=None, description="A code signifying whether a different drug was dispensed from what was prescribed." ) reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates the reason for the substitution (or lack of substitution) from what was prescribed." + default=None, + description="Indicates the reason for the substitution (or lack of substitution) from what was prescribed.", ) responsible_party: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="responsibleParty", + default=None, description="The person or organization that has primary responsibility for the substitution.", ) diff --git a/src/metriport/fhir/types/medication_ingredient.py b/src/metriport/fhir/types/medication_ingredient.py index 2914266..7900b0a 100644 --- a/src/metriport/fhir/types/medication_ingredient.py +++ b/src/metriport/fhir/types/medication_ingredient.py @@ -21,29 +21,36 @@ class MedicationIngredient(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="itemCodeableConcept", + default=None, description="The actual ingredient - either a substance (simple ingredient) or another medication of a medication.", ) item_reference: typing.Optional[Reference] = pydantic.Field( alias="itemReference", + default=None, description="The actual ingredient - either a substance (simple ingredient) or another medication of a medication.", ) is_active: typing.Optional[bool] = pydantic.Field( alias="isActive", + default=None, description="Indication of whether this ingredient affects the therapeutic action of the drug.", ) strength: typing.Optional[Ratio] = pydantic.Field( - description="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet." + default=None, + description="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge.py b/src/metriport/fhir/types/medication_knowledge.py index d945632..9fbe63e 100644 --- a/src/metriport/fhir/types/medication_knowledge.py +++ b/src/metriport/fhir/types/medication_knowledge.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -35,80 +33,95 @@ class MedicationKnowledge(BaseResource): Information about a medication that is used to support knowledge. """ - resource_type: typing_extensions.Literal["MedicationKnowledge"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationKnowledge"] = pydantic.Field(alias="resourceType") code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." + default=None, + description="A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.", ) status: typing.Optional[Code] = pydantic.Field( - description="A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties." + default=None, + description="A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties.", ) manufacturer: typing.Optional[Reference] = pydantic.Field( - description="Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product." + default=None, + description="Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.", ) dose_form: typing.Optional[CodeableConcept] = pydantic.Field( - alias="doseForm", description="Describes the form of the item. Powder; tablets; capsule." + alias="doseForm", default=None, description="Describes the form of the item. Powder; tablets; capsule." ) amount: typing.Optional[Quantity] = pydantic.Field( - description="Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." + default=None, + description="Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).", ) synonym: typing.Optional[typing.List[str]] = pydantic.Field( - description="Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol." + default=None, + description="Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol.", ) related_medication_knowledge: typing.Optional[ typing.List[MedicationKnowledgeRelatedMedicationKnowledge] ] = pydantic.Field( - alias="relatedMedicationKnowledge", description="Associated or related knowledge about a medication." + alias="relatedMedicationKnowledge", + default=None, + description="Associated or related knowledge about a medication.", ) associated_medication: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="associatedMedication", + default=None, description="Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor).", ) product_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="productType", + default=None, description="Category of the medication or product (e.g. branded product, therapeutic moeity, generic product, innovator product, etc.).", ) monograph: typing.Optional[typing.List[MedicationKnowledgeMonograph]] = pydantic.Field( - description="Associated documentation about the medication." + default=None, description="Associated documentation about the medication." ) ingredient: typing.Optional[typing.List[MedicationKnowledgeIngredient]] = pydantic.Field( - description="Identifies a particular constituent of interest in the product." + default=None, description="Identifies a particular constituent of interest in the product." ) preparation_instruction: typing.Optional[Markdown] = pydantic.Field( - alias="preparationInstruction", description="The instructions for preparing the medication." + alias="preparationInstruction", default=None, description="The instructions for preparing the medication." ) intended_route: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="intendedRoute", description="The intended or approved route of administration." + alias="intendedRoute", default=None, description="The intended or approved route of administration." ) cost: typing.Optional[typing.List[MedicationKnowledgeCost]] = pydantic.Field( - description="The price of the medication." + default=None, description="The price of the medication." ) monitoring_program: typing.Optional[typing.List[MedicationKnowledgeMonitoringProgram]] = pydantic.Field( - alias="monitoringProgram", description="The program under which the medication is reviewed." + alias="monitoringProgram", default=None, description="The program under which the medication is reviewed." ) administration_guidelines: typing.Optional[ typing.List[MedicationKnowledgeAdministrationGuidelines] ] = pydantic.Field( - alias="administrationGuidelines", description="Guidelines for the administration of the medication." + alias="administrationGuidelines", + default=None, + description="Guidelines for the administration of the medication.", ) medicine_classification: typing.Optional[typing.List[MedicationKnowledgeMedicineClassification]] = pydantic.Field( alias="medicineClassification", + default=None, description="Categorization of the medication within a formulary or classification system.", ) packaging: typing.Optional[MedicationKnowledgePackaging] = pydantic.Field( - description="Information that only applies to packages (not products)." + default=None, description="Information that only applies to packages (not products)." ) drug_characteristic: typing.Optional[typing.List[MedicationKnowledgeDrugCharacteristic]] = pydantic.Field( alias="drugCharacteristic", + default=None, description="Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.", ) contraindication: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.)." + default=None, + description="Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).", ) regulatory: typing.Optional[typing.List[MedicationKnowledgeRegulatory]] = pydantic.Field( - description="Regulatory information about a medication." + default=None, description="Regulatory information about a medication." ) kinetics: typing.Optional[typing.List[MedicationKnowledgeKinetics]] = pydantic.Field( - description="The time course of drug absorption, distribution, metabolism and excretion of a medication from the body." + default=None, + description="The time course of drug absorption, distribution, metabolism and excretion of a medication from the body.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_administration_guidelines.py b/src/metriport/fhir/types/medication_knowledge_administration_guidelines.py index 113040e..f4deef3 100644 --- a/src/metriport/fhir/types/medication_knowledge_administration_guidelines.py +++ b/src/metriport/fhir/types/medication_knowledge_administration_guidelines.py @@ -22,28 +22,34 @@ class MedicationKnowledgeAdministrationGuidelines(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) dosage: typing.Optional[typing.List[MedicationKnowledgeDosage]] = pydantic.Field( - description="Dosage for the medication for the specific guidelines." + default=None, description="Dosage for the medication for the specific guidelines." ) indication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="indicationCodeableConcept", + default=None, description="Indication for use that apply to the specific administration guidelines.", ) indication_reference: typing.Optional[Reference] = pydantic.Field( alias="indicationReference", + default=None, description="Indication for use that apply to the specific administration guidelines.", ) patient_characteristics: typing.Optional[typing.List[MedicationKnowledgePatientCharacteristics]] = pydantic.Field( alias="patientCharacteristics", + default=None, description="Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).", ) diff --git a/src/metriport/fhir/types/medication_knowledge_cost.py b/src/metriport/fhir/types/medication_knowledge_cost.py index 082426b..33ced21 100644 --- a/src/metriport/fhir/types/medication_knowledge_cost.py +++ b/src/metriport/fhir/types/medication_knowledge_cost.py @@ -20,20 +20,23 @@ class MedicationKnowledgeCost(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="The category of the cost information. For example, manufacturers' cost, patient cost, claim reimbursement cost, actual acquisition cost." ) source: typing.Optional[str] = pydantic.Field( - description="The source or owner that assigns the price to the medication." + default=None, description="The source or owner that assigns the price to the medication." ) cost: Money = pydantic.Field(description="The price of the medication.") diff --git a/src/metriport/fhir/types/medication_knowledge_dosage.py b/src/metriport/fhir/types/medication_knowledge_dosage.py index 6b8e2e7..bda2a16 100644 --- a/src/metriport/fhir/types/medication_knowledge_dosage.py +++ b/src/metriport/fhir/types/medication_knowledge_dosage.py @@ -20,13 +20,16 @@ class MedicationKnowledgeDosage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( diff --git a/src/metriport/fhir/types/medication_knowledge_drug_characteristic.py b/src/metriport/fhir/types/medication_knowledge_drug_characteristic.py index 2743d2d..b2bb93f 100644 --- a/src/metriport/fhir/types/medication_knowledge_drug_characteristic.py +++ b/src/metriport/fhir/types/medication_knowledge_drug_characteristic.py @@ -20,29 +20,33 @@ class MedicationKnowledgeDrugCharacteristic(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint)." + default=None, + description="A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).", ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="Description of the characteristic." + alias="valueCodeableConcept", default=None, description="Description of the characteristic." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="Description of the characteristic." + alias="valueString", default=None, description="Description of the characteristic." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="Description of the characteristic." + alias="valueQuantity", default=None, description="Description of the characteristic." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( - alias="valueBase64Binary", description="Description of the characteristic." + alias="valueBase64Binary", default=None, description="Description of the characteristic." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_ingredient.py b/src/metriport/fhir/types/medication_knowledge_ingredient.py index 8678326..cca6216 100644 --- a/src/metriport/fhir/types/medication_knowledge_ingredient.py +++ b/src/metriport/fhir/types/medication_knowledge_ingredient.py @@ -21,29 +21,36 @@ class MedicationKnowledgeIngredient(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="itemCodeableConcept", + default=None, description="The actual ingredient - either a substance (simple ingredient) or another medication.", ) item_reference: typing.Optional[Reference] = pydantic.Field( alias="itemReference", + default=None, description="The actual ingredient - either a substance (simple ingredient) or another medication.", ) is_active: typing.Optional[bool] = pydantic.Field( alias="isActive", + default=None, description="Indication of whether this ingredient affects the therapeutic action of the drug.", ) strength: typing.Optional[Ratio] = pydantic.Field( - description="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet." + default=None, + description="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_kinetics.py b/src/metriport/fhir/types/medication_knowledge_kinetics.py index 2f2e459..44209b4 100644 --- a/src/metriport/fhir/types/medication_knowledge_kinetics.py +++ b/src/metriport/fhir/types/medication_knowledge_kinetics.py @@ -20,23 +20,29 @@ class MedicationKnowledgeKinetics(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) area_under_curve: typing.Optional[typing.List[Quantity]] = pydantic.Field( - alias="areaUnderCurve", description="The drug concentration measured at certain discrete points in time." + alias="areaUnderCurve", + default=None, + description="The drug concentration measured at certain discrete points in time.", ) lethal_dose_50: typing.Optional[typing.List[Quantity]] = pydantic.Field( - alias="lethalDose50", description="The median lethal dose of a drug." + alias="lethalDose50", default=None, description="The median lethal dose of a drug." ) half_life_period: typing.Optional[Duration] = pydantic.Field( alias="halfLifePeriod", + default=None, description="The time required for any specified property (e.g., the concentration of a substance in the body) to decrease by half.", ) diff --git a/src/metriport/fhir/types/medication_knowledge_max_dispense.py b/src/metriport/fhir/types/medication_knowledge_max_dispense.py index d0add97..b74e25f 100644 --- a/src/metriport/fhir/types/medication_knowledge_max_dispense.py +++ b/src/metriport/fhir/types/medication_knowledge_max_dispense.py @@ -20,20 +20,23 @@ class MedicationKnowledgeMaxDispense(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) quantity: Quantity = pydantic.Field( description="The maximum number of units of the medication that can be dispensed." ) period: typing.Optional[Duration] = pydantic.Field( - description="The period that applies to the maximum number of units." + default=None, description="The period that applies to the maximum number of units." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_medicine_classification.py b/src/metriport/fhir/types/medication_knowledge_medicine_classification.py index 7d9fa6a..52a8579 100644 --- a/src/metriport/fhir/types/medication_knowledge_medicine_classification.py +++ b/src/metriport/fhir/types/medication_knowledge_medicine_classification.py @@ -19,20 +19,24 @@ class MedicationKnowledgeMedicineClassification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification)." ) classification: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.)." + default=None, + description="Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_monitoring_program.py b/src/metriport/fhir/types/medication_knowledge_monitoring_program.py index 1ff7125..f183052 100644 --- a/src/metriport/fhir/types/medication_knowledge_monitoring_program.py +++ b/src/metriport/fhir/types/medication_knowledge_monitoring_program.py @@ -19,19 +19,22 @@ class MedicationKnowledgeMonitoringProgram(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of program under which the medication is monitored." + default=None, description="Type of program under which the medication is monitored." ) - name: typing.Optional[str] = pydantic.Field(description="Name of the reviewing program.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Name of the reviewing program.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/medication_knowledge_monograph.py b/src/metriport/fhir/types/medication_knowledge_monograph.py index f078d1d..aa98005 100644 --- a/src/metriport/fhir/types/medication_knowledge_monograph.py +++ b/src/metriport/fhir/types/medication_knowledge_monograph.py @@ -20,19 +20,25 @@ class MedicationKnowledgeMonograph(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The category of documentation about the medication. (e.g. professional monograph, patient education monograph)." + default=None, + description="The category of documentation about the medication. (e.g. professional monograph, patient education monograph).", + ) + source: typing.Optional[Reference] = pydantic.Field( + default=None, description="Associated documentation about the medication." ) - source: typing.Optional[Reference] = pydantic.Field(description="Associated documentation about the medication.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/medication_knowledge_packaging.py b/src/metriport/fhir/types/medication_knowledge_packaging.py index e9210df..0a74be4 100644 --- a/src/metriport/fhir/types/medication_knowledge_packaging.py +++ b/src/metriport/fhir/types/medication_knowledge_packaging.py @@ -20,20 +20,24 @@ class MedicationKnowledgePackaging(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that defines the specific type of packaging that the medication can be found in (e.g. blister sleeve, tube, bottle)." + default=None, + description="A code that defines the specific type of packaging that the medication can be found in (e.g. blister sleeve, tube, bottle).", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of product units the package would contain if fully loaded." + default=None, description="The number of product units the package would contain if fully loaded." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_patient_characteristics.py b/src/metriport/fhir/types/medication_knowledge_patient_characteristics.py index c26a982..6ba7bdb 100644 --- a/src/metriport/fhir/types/medication_knowledge_patient_characteristics.py +++ b/src/metriport/fhir/types/medication_knowledge_patient_characteristics.py @@ -20,25 +20,30 @@ class MedicationKnowledgePatientCharacteristics(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) characteristic_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="characteristicCodeableConcept", + default=None, description="Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).", ) characteristic_quantity: typing.Optional[Quantity] = pydantic.Field( alias="characteristicQuantity", + default=None, description="Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).", ) value: typing.Optional[typing.List[str]] = pydantic.Field( - description="The specific characteristic (e.g. height, weight, gender, etc.)." + default=None, description="The specific characteristic (e.g. height, weight, gender, etc.)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_knowledge_regulatory.py b/src/metriport/fhir/types/medication_knowledge_regulatory.py index 26ceeaf..1971d6d 100644 --- a/src/metriport/fhir/types/medication_knowledge_regulatory.py +++ b/src/metriport/fhir/types/medication_knowledge_regulatory.py @@ -22,26 +22,31 @@ class MedicationKnowledgeRegulatory(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) regulatory_authority: Reference = pydantic.Field( alias="regulatoryAuthority", description="The authority that is specifying the regulations." ) substitution: typing.Optional[typing.List[MedicationKnowledgeSubstitution]] = pydantic.Field( - description="Specifies if changes are allowed when dispensing a medication from a regulatory perspective." + default=None, + description="Specifies if changes are allowed when dispensing a medication from a regulatory perspective.", ) schedule: typing.Optional[typing.List[MedicationKnowledgeSchedule]] = pydantic.Field( - description="Specifies the schedule of a medication in jurisdiction." + default=None, description="Specifies the schedule of a medication in jurisdiction." ) max_dispense: typing.Optional[MedicationKnowledgeMaxDispense] = pydantic.Field( alias="maxDispense", + default=None, description="The maximum number of units of the medication that can be dispensed in a period.", ) diff --git a/src/metriport/fhir/types/medication_knowledge_related_medication_knowledge.py b/src/metriport/fhir/types/medication_knowledge_related_medication_knowledge.py index 26bfd50..5ac2f65 100644 --- a/src/metriport/fhir/types/medication_knowledge_related_medication_knowledge.py +++ b/src/metriport/fhir/types/medication_knowledge_related_medication_knowledge.py @@ -20,13 +20,16 @@ class MedicationKnowledgeRelatedMedicationKnowledge(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="The category of the associated medication knowledge reference.") diff --git a/src/metriport/fhir/types/medication_knowledge_schedule.py b/src/metriport/fhir/types/medication_knowledge_schedule.py index beee189..7bb7887 100644 --- a/src/metriport/fhir/types/medication_knowledge_schedule.py +++ b/src/metriport/fhir/types/medication_knowledge_schedule.py @@ -19,13 +19,16 @@ class MedicationKnowledgeSchedule(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) schedule: CodeableConcept = pydantic.Field(description="Specifies the specific drug schedule.") diff --git a/src/metriport/fhir/types/medication_knowledge_substitution.py b/src/metriport/fhir/types/medication_knowledge_substitution.py index de2064e..ac38280 100644 --- a/src/metriport/fhir/types/medication_knowledge_substitution.py +++ b/src/metriport/fhir/types/medication_knowledge_substitution.py @@ -19,18 +19,21 @@ class MedicationKnowledgeSubstitution(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="Specifies the type of substitution allowed.") allowed: typing.Optional[bool] = pydantic.Field( - description="Specifies if regulation allows for changes in the medication when dispensing." + default=None, description="Specifies if regulation allows for changes in the medication when dispensing." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_request.py b/src/metriport/fhir/types/medication_request.py index ad1fe8e..a4e159a 100644 --- a/src/metriport/fhir/types/medication_request.py +++ b/src/metriport/fhir/types/medication_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,123 +28,160 @@ class MedicationRequest(BaseResource): An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. """ - resource_type: typing_extensions.Literal["MedicationRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." + default=None, + description="Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", ) status: typing.Optional[Code] = pydantic.Field( - description="A code specifying the current state of the order. Generally, this will be active or completed state." + default=None, + description="A code specifying the current state of the order. Generally, this will be active or completed state.", ) status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the MedicationRequest." + alias="statusReason", + default=None, + description="Captures the reason for the current state of the MedicationRequest.", ) intent: typing.Optional[Code] = pydantic.Field( - description="Whether the request is a proposal, plan, or an original order." + default=None, description="Whether the request is a proposal, plan, or an original order." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." + default=None, + description="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the Medication Request should be addressed with respect to other requests." + default=None, + description="Indicates how quickly the Medication Request should be addressed with respect to other requests.", ) do_not_perform: typing.Optional[bool] = pydantic.Field( alias="doNotPerform", + default=None, description="If true indicates that the provider is asking for the medication request not to occur.", ) reported_boolean: typing.Optional[bool] = pydantic.Field( alias="reportedBoolean", + default=None, description="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", ) reported_reference: typing.Optional[Reference] = pydantic.Field( alias="reportedReference", + default=None, description="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", ) subject: Reference = pydantic.Field( description="A link to a resource representing the person or set of individuals to whom the medication will be given." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this [x] was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this [x] was created or to which the creation of this record is tightly associated.", ) supporting_information: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInformation", + default=None, description="Include additional information (for example, patient height and weight) that supports the ordering of the medication.", ) authored_on: typing.Optional[DateTime] = pydantic.Field( alias="authoredOn", + default=None, description="The date (and perhaps time) when the prescription was initially written or authored on.", ) requester: typing.Optional[Reference] = pydantic.Field( - description="The individual, organization, or device that initiated the request and has responsibility for its activation." + default=None, + description="The individual, organization, or device that initiated the request and has responsibility for its activation.", ) performer: typing.Optional[Reference] = pydantic.Field( - description="The specified desired performer of the medication treatment (e.g. the performer of the medication administration)." + default=None, + description="The specified desired performer of the medication treatment (e.g. the performer of the medication administration).", ) performer_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="performerType", description="Indicates the type of performer of the administration of the medication." + alias="performerType", + default=None, + description="Indicates the type of performer of the administration of the medication.", ) recorder: typing.Optional[Reference] = pydantic.Field( - description="The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order." + default=None, + description="The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="The reason or the indication for ordering or not ordering the medication." + alias="reasonCode", + default=None, + description="The reason or the indication for ordering or not ordering the medication.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Condition or observation that supports why the medication was ordered." + alias="reasonReference", + default=None, + description="Condition or observation that supports why the medication was ordered.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="A plan or request that is fulfilled in whole or in part by this medication request.", ) group_identifier: typing.Optional[Identifier] = pydantic.Field( alias="groupIdentifier", + default=None, description="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.", ) course_of_therapy_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="courseOfTherapyType", + default=None, description="The description of the overall patte3rn of the administration of the medication to the patient.", ) insurance: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service." + default=None, + description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Extra information about the prescription that could not be conveyed by the other attributes." + default=None, + description="Extra information about the prescription that could not be conveyed by the other attributes.", ) dosage_instruction: typing.Optional[typing.List[Dosage]] = pydantic.Field( - alias="dosageInstruction", description="Indicates how the medication is to be used by the patient." + alias="dosageInstruction", + default=None, + description="Indicates how the medication is to be used by the patient.", ) dispense_request: typing.Optional[MedicationRequestDispenseRequest] = pydantic.Field( alias="dispenseRequest", + default=None, description="Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.", ) substitution: typing.Optional[MedicationRequestSubstitution] = pydantic.Field( - description="Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done." + default=None, + description="Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", ) prior_prescription: typing.Optional[Reference] = pydantic.Field( alias="priorPrescription", + default=None, description="A link to a resource representing an earlier order related order or prescription.", ) detected_issue: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="detectedIssue", + default=None, description="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.", ) event_history: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="eventHistory", + default=None, description="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.", ) diff --git a/src/metriport/fhir/types/medication_request_dispense_request.py b/src/metriport/fhir/types/medication_request_dispense_request.py index 67b2665..54f468b 100644 --- a/src/metriport/fhir/types/medication_request_dispense_request.py +++ b/src/metriport/fhir/types/medication_request_dispense_request.py @@ -24,37 +24,48 @@ class MedicationRequestDispenseRequest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) initial_fill: typing.Optional[MedicationRequestInitialFill] = pydantic.Field( - alias="initialFill", description="Indicates the quantity or duration for the first dispense of the medication." + alias="initialFill", + default=None, + description="Indicates the quantity or duration for the first dispense of the medication.", ) dispense_interval: typing.Optional[Duration] = pydantic.Field( alias="dispenseInterval", + default=None, description="The minimum period of time that must occur between dispenses of the medication.", ) validity_period: typing.Optional[Period] = pydantic.Field( alias="validityPeriod", + default=None, description="This indicates the validity period of a prescription (stale dating the Prescription).", ) number_of_repeats_allowed: typing.Optional[UnsignedInt] = pydantic.Field( alias="numberOfRepeatsAllowed", + default=None, description='An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.', ) - quantity: typing.Optional[Quantity] = pydantic.Field(description="The amount that is to be dispensed for one fill.") + quantity: typing.Optional[Quantity] = pydantic.Field( + default=None, description="The amount that is to be dispensed for one fill." + ) expected_supply_duration: typing.Optional[Duration] = pydantic.Field( alias="expectedSupplyDuration", + default=None, description="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", ) performer: typing.Optional[Reference] = pydantic.Field( - description="Indicates the intended dispensing Organization specified by the prescriber." + default=None, description="Indicates the intended dispensing Organization specified by the prescriber." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_request_initial_fill.py b/src/metriport/fhir/types/medication_request_initial_fill.py index c441645..298f654 100644 --- a/src/metriport/fhir/types/medication_request_initial_fill.py +++ b/src/metriport/fhir/types/medication_request_initial_fill.py @@ -20,20 +20,23 @@ class MedicationRequestInitialFill(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The amount or quantity to provide as part of the first dispense." + default=None, description="The amount or quantity to provide as part of the first dispense." ) duration: typing.Optional[Duration] = pydantic.Field( - description="The length of time that the first dispense is expected to last." + default=None, description="The length of time that the first dispense is expected to last." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_request_substitution.py b/src/metriport/fhir/types/medication_request_substitution.py index c27c15e..dd8b7d6 100644 --- a/src/metriport/fhir/types/medication_request_substitution.py +++ b/src/metriport/fhir/types/medication_request_substitution.py @@ -19,25 +19,31 @@ class MedicationRequestSubstitution(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) allowed_boolean: typing.Optional[bool] = pydantic.Field( alias="allowedBoolean", + default=None, description="True if the prescriber allows a different drug to be dispensed from what was prescribed.", ) allowed_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="allowedCodeableConcept", + default=None, description="True if the prescriber allows a different drug to be dispensed from what was prescribed.", ) reason: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates the reason for the substitution, or why substitution must or must not be performed." + default=None, + description="Indicates the reason for the substitution, or why substitution must or must not be performed.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medication_statement.py b/src/metriport/fhir/types/medication_statement.py index 00647cf..775ce54 100644 --- a/src/metriport/fhir/types/medication_statement.py +++ b/src/metriport/fhir/types/medication_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,69 +25,87 @@ class MedicationStatement(BaseResource): A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. """ - resource_type: typing_extensions.Literal["MedicationStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationStatement"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." + default=None, + description="Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A plan, proposal or order that is fulfilled in whole or in part by this event." + alias="basedOn", + default=None, + description="A plan, proposal or order that is fulfilled in whole or in part by this event.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger event of which this particular event is a component or step." + alias="partOf", + default=None, + description="A larger event of which this particular event is a component or step.", ) status: typing.Optional[Code] = pydantic.Field( - description="A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed." + default=None, + description="A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", ) status_reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the MedicationStatement." + alias="statusReason", + default=None, + description="Captures the reason for the current state of the MedicationStatement.", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates where the medication is expected to be consumed or administered." + default=None, description="Indicates where the medication is expected to be consumed or administered." ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", ) subject: Reference = pydantic.Field(description="The person, animal or group who is/was taking the medication.") context: typing.Optional[Reference] = pydantic.Field( - description="The encounter or episode of care that establishes the context for this MedicationStatement." + default=None, + description="The encounter or episode of care that establishes the context for this MedicationStatement.", ) effective_date_time: typing.Optional[str] = pydantic.Field( alias="effectiveDateTime", + default=None, description="The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", ) date_asserted: typing.Optional[DateTime] = pydantic.Field( alias="dateAsserted", + default=None, description="The date when the medication statement was asserted by the information source.", ) information_source: typing.Optional[Reference] = pydantic.Field( alias="informationSource", + default=None, description="The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.", ) derived_from: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="derivedFrom", + default=None, description="Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="A reason for why the medication is being/was taken." + alias="reasonCode", default=None, description="A reason for why the medication is being/was taken." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Condition or observation that supports why the medication is being/was taken.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Provides extra information about the medication statement that is not conveyed by the other attributes." + default=None, + description="Provides extra information about the medication statement that is not conveyed by the other attributes.", ) dosage: typing.Optional[typing.List[Dosage]] = pydantic.Field( - description="Indicates how the medication is/was or should be taken by the patient." + default=None, description="Indicates how the medication is/was or should be taken by the patient." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product.py b/src/metriport/fhir/types/medicinal_product.py index 32f809a..87f1d63 100644 --- a/src/metriport/fhir/types/medicinal_product.py +++ b/src/metriport/fhir/types/medicinal_product.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,76 +25,89 @@ class MedicinalProduct(BaseResource): Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use). """ - resource_type: typing_extensions.Literal["MedicinalProduct"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProduct"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifier for this product. Could be an MPID." + default=None, description="Business identifier for this product. Could be an MPID." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Regulatory type, e.g. Investigational or Authorized." + default=None, description="Regulatory type, e.g. Investigational or Authorized." ) domain: typing.Optional[Coding] = pydantic.Field( - description="If this medicine applies to human or veterinary uses." + default=None, description="If this medicine applies to human or veterinary uses." ) combined_pharmaceutical_dose_form: typing.Optional[CodeableConcept] = pydantic.Field( alias="combinedPharmaceuticalDoseForm", + default=None, description="The dose form for a single part product, or combined form of a multiple part product.", ) legal_status_of_supply: typing.Optional[CodeableConcept] = pydantic.Field( alias="legalStatusOfSupply", + default=None, description="The legal status of supply of the medicinal product as classified by the regulator.", ) additional_monitoring_indicator: typing.Optional[CodeableConcept] = pydantic.Field( alias="additionalMonitoringIndicator", + default=None, description="Whether the Medicinal Product is subject to additional monitoring for regulatory reasons.", ) special_measures: typing.Optional[typing.List[str]] = pydantic.Field( alias="specialMeasures", + default=None, description="Whether the Medicinal Product is subject to special measures for regulatory reasons.", ) paediatric_use_indicator: typing.Optional[CodeableConcept] = pydantic.Field( - alias="paediatricUseIndicator", description="If authorised for use in children." + alias="paediatricUseIndicator", default=None, description="If authorised for use in children." ) product_classification: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="productClassification", description="Allows the product to be classified by various systems." + alias="productClassification", + default=None, + description="Allows the product to be classified by various systems.", ) marketing_status: typing.Optional[typing.List[MarketingStatus]] = pydantic.Field( alias="marketingStatus", + default=None, description="Marketing status of the medicinal product, in contrast to marketing authorizaton.", ) pharmaceutical_product: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="pharmaceuticalProduct", description="Pharmaceutical aspects of product." + alias="pharmaceuticalProduct", default=None, description="Pharmaceutical aspects of product." ) packaged_medicinal_product: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="packagedMedicinalProduct", description="Package representation for the product." + alias="packagedMedicinalProduct", default=None, description="Package representation for the product." ) attached_document: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="attachedDocument", description="Supporting documentation, typically for regulatory submission." + alias="attachedDocument", + default=None, + description="Supporting documentation, typically for regulatory submission.", ) master_file: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="masterFile", + default=None, description="A master file for to the medicinal product (e.g. Pharmacovigilance System Master File).", ) contact: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A product specific contact, person (in a role), or an organization." + default=None, description="A product specific contact, person (in a role), or an organization." ) clinical_trial: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="clinicalTrial", description="Clinical trials or studies that this product is involved in." + alias="clinicalTrial", default=None, description="Clinical trials or studies that this product is involved in." ) name: typing.List[MedicinalProductName] = pydantic.Field( description="The product's name, including full name and possibly coded parts." ) cross_reference: typing.Optional[typing.List[Identifier]] = pydantic.Field( alias="crossReference", + default=None, description="Reference to another product, e.g. for linking authorised to investigational product.", ) manufacturing_business_operation: typing.Optional[ typing.List[MedicinalProductManufacturingBusinessOperation] ] = pydantic.Field( alias="manufacturingBusinessOperation", + default=None, description="An operation applied to the product, for manufacturing or adminsitrative purpose.", ) special_designation: typing.Optional[typing.List[MedicinalProductSpecialDesignation]] = pydantic.Field( alias="specialDesignation", + default=None, description="Indicates if the medicinal product has an orphan designation for the treatment of a rare disease.", ) diff --git a/src/metriport/fhir/types/medicinal_product_authorization.py b/src/metriport/fhir/types/medicinal_product_authorization.py index b9bf1d8..8f7c107 100644 --- a/src/metriport/fhir/types/medicinal_product_authorization.py +++ b/src/metriport/fhir/types/medicinal_product_authorization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -28,51 +26,62 @@ class MedicinalProductAuthorization(BaseResource): The regulatory authorization of a medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductAuthorization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductAuthorization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifier for the marketing authorization, as assigned by a regulator." + default=None, description="Business identifier for the marketing authorization, as assigned by a regulator." + ) + subject: typing.Optional[Reference] = pydantic.Field( + default=None, description="The medicinal product that is being authorized." ) - subject: typing.Optional[Reference] = pydantic.Field(description="The medicinal product that is being authorized.") country: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The country in which the marketing authorization has been granted." + default=None, description="The country in which the marketing authorization has been granted." ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Jurisdiction within a country." + default=None, description="Jurisdiction within a country." + ) + status: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The status of the marketing authorization." ) - status: typing.Optional[CodeableConcept] = pydantic.Field(description="The status of the marketing authorization.") status_date: typing.Optional[DateTime] = pydantic.Field( - alias="statusDate", description="The date at which the given status has become applicable." + alias="statusDate", default=None, description="The date at which the given status has become applicable." ) restore_date: typing.Optional[DateTime] = pydantic.Field( alias="restoreDate", + default=None, description="The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.", ) validity_period: typing.Optional[Period] = pydantic.Field( alias="validityPeriod", + default=None, description="The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.", ) data_exclusivity_period: typing.Optional[Period] = pydantic.Field( alias="dataExclusivityPeriod", + default=None, description="A period of time after authorization before generic product applicatiosn can be submitted.", ) date_of_first_authorization: typing.Optional[DateTime] = pydantic.Field( alias="dateOfFirstAuthorization", + default=None, description="The date when the first authorization was granted by a Medicines Regulatory Agency.", ) international_birth_date: typing.Optional[DateTime] = pydantic.Field( alias="internationalBirthDate", + default=None, description="Date of first marketing authorization for a company's new medicinal product in any country in the World.", ) legal_basis: typing.Optional[CodeableConcept] = pydantic.Field( - alias="legalBasis", description="The legal framework against which this authorization is granted." + alias="legalBasis", default=None, description="The legal framework against which this authorization is granted." ) jurisdictional_authorization: typing.Optional[ typing.List[MedicinalProductAuthorizationJurisdictionalAuthorization] - ] = pydantic.Field(alias="jurisdictionalAuthorization", description="Authorization in areas within a country.") - holder: typing.Optional[Reference] = pydantic.Field(description="Marketing Authorization Holder.") - regulator: typing.Optional[Reference] = pydantic.Field(description="Medicines Regulatory Agency.") + ] = pydantic.Field( + alias="jurisdictionalAuthorization", default=None, description="Authorization in areas within a country." + ) + holder: typing.Optional[Reference] = pydantic.Field(default=None, description="Marketing Authorization Holder.") + regulator: typing.Optional[Reference] = pydantic.Field(default=None, description="Medicines Regulatory Agency.") procedure: typing.Optional[MedicinalProductAuthorizationProcedure] = pydantic.Field( - description="The regulatory procedure for granting or amending a marketing authorization." + default=None, description="The regulatory procedure for granting or amending a marketing authorization." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_authorization_jurisdictional_authorization.py b/src/metriport/fhir/types/medicinal_product_authorization_jurisdictional_authorization.py index 9d8bcf2..4653792 100644 --- a/src/metriport/fhir/types/medicinal_product_authorization_jurisdictional_authorization.py +++ b/src/metriport/fhir/types/medicinal_product_authorization_jurisdictional_authorization.py @@ -21,27 +21,30 @@ class MedicinalProductAuthorizationJurisdictionalAuthorization(pydantic.BaseMode """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="The assigned number for the marketing authorization." + default=None, description="The assigned number for the marketing authorization." ) - country: typing.Optional[CodeableConcept] = pydantic.Field(description="Country of authorization.") + country: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Country of authorization.") jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Jurisdiction within a country." + default=None, description="Jurisdiction within a country." ) legal_status_of_supply: typing.Optional[CodeableConcept] = pydantic.Field( - alias="legalStatusOfSupply", description="The legal status of supply in a jurisdiction or region." + alias="legalStatusOfSupply", default=None, description="The legal status of supply in a jurisdiction or region." ) validity_period: typing.Optional[Period] = pydantic.Field( - alias="validityPeriod", description="The start and expected end date of the authorization." + alias="validityPeriod", default=None, description="The start and expected end date of the authorization." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_authorization_procedure.py b/src/metriport/fhir/types/medicinal_product_authorization_procedure.py index 073859a..501e27c 100644 --- a/src/metriport/fhir/types/medicinal_product_authorization_procedure.py +++ b/src/metriport/fhir/types/medicinal_product_authorization_procedure.py @@ -23,21 +23,28 @@ class MedicinalProductAuthorizationProcedure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - identifier: typing.Optional[Identifier] = pydantic.Field(description="Identifier for this procedure.") + identifier: typing.Optional[Identifier] = pydantic.Field(default=None, description="Identifier for this procedure.") type: CodeableConcept = pydantic.Field(description="Type of procedure.") - date_period: typing.Optional[Period] = pydantic.Field(alias="datePeriod", description="Date of procedure.") - date_date_time: typing.Optional[str] = pydantic.Field(alias="dateDateTime", description="Date of procedure.") + date_period: typing.Optional[Period] = pydantic.Field( + alias="datePeriod", default=None, description="Date of procedure." + ) + date_date_time: typing.Optional[str] = pydantic.Field( + alias="dateDateTime", default=None, description="Date of procedure." + ) application: typing.Optional[typing.List[MedicinalProductAuthorizationProcedure]] = pydantic.Field( - description="Applcations submitted to obtain a marketing authorization." + default=None, description="Applcations submitted to obtain a marketing authorization." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_contraindication.py b/src/metriport/fhir/types/medicinal_product_contraindication.py index a9eaba4..cc9f6b4 100644 --- a/src/metriport/fhir/types/medicinal_product_contraindication.py +++ b/src/metriport/fhir/types/medicinal_product_contraindication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,29 +21,33 @@ class MedicinalProductContraindication(BaseResource): The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes. """ - resource_type: typing_extensions.Literal["MedicinalProductContraindication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductContraindication"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The medication for which this is an indication." + default=None, description="The medication for which this is an indication." ) disease: typing.Optional[CodeableConcept] = pydantic.Field( - description="The disease, symptom or procedure for the contraindication." + default=None, description="The disease, symptom or procedure for the contraindication." ) disease_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="diseaseStatus", description="The status of the disease or symptom for the contraindication." + alias="diseaseStatus", + default=None, + description="The status of the disease or symptom for the contraindication.", ) comorbidity: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A comorbidity (concurrent condition) or coinfection." + default=None, description="A comorbidity (concurrent condition) or coinfection." ) therapeutic_indication: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="therapeuticIndication", + default=None, description="Information about the use of the medicinal product in relation to other therapies as part of the indication.", ) other_therapy: typing.Optional[typing.List[MedicinalProductContraindicationOtherTherapy]] = pydantic.Field( alias="otherTherapy", + default=None, description="Information about the use of the medicinal product in relation to other therapies described as part of the indication.", ) population: typing.Optional[typing.List[Population]] = pydantic.Field( - description="The population group to which this applies." + default=None, description="The population group to which this applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_contraindication_other_therapy.py b/src/metriport/fhir/types/medicinal_product_contraindication_other_therapy.py index fadd75d..d8c3c9c 100644 --- a/src/metriport/fhir/types/medicinal_product_contraindication_other_therapy.py +++ b/src/metriport/fhir/types/medicinal_product_contraindication_other_therapy.py @@ -20,13 +20,16 @@ class MedicinalProductContraindicationOtherTherapy(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) therapy_relationship_type: CodeableConcept = pydantic.Field( @@ -35,10 +38,12 @@ class MedicinalProductContraindicationOtherTherapy(pydantic.BaseModel): ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", ) diff --git a/src/metriport/fhir/types/medicinal_product_country_language.py b/src/metriport/fhir/types/medicinal_product_country_language.py index b957016..c8c518c 100644 --- a/src/metriport/fhir/types/medicinal_product_country_language.py +++ b/src/metriport/fhir/types/medicinal_product_country_language.py @@ -19,18 +19,21 @@ class MedicinalProductCountryLanguage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) country: CodeableConcept = pydantic.Field(description="Country code for where this name applies.") jurisdiction: typing.Optional[CodeableConcept] = pydantic.Field( - description="Jurisdiction code for where this name applies." + default=None, description="Jurisdiction code for where this name applies." ) language: CodeableConcept = pydantic.Field(description="Language code for this name.") diff --git a/src/metriport/fhir/types/medicinal_product_indication.py b/src/metriport/fhir/types/medicinal_product_indication.py index c435bbc..d3dedc8 100644 --- a/src/metriport/fhir/types/medicinal_product_indication.py +++ b/src/metriport/fhir/types/medicinal_product_indication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,35 +22,43 @@ class MedicinalProductIndication(BaseResource): Indication for the Medicinal Product. """ - resource_type: typing_extensions.Literal["MedicinalProductIndication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductIndication"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The medication for which this is an indication." + default=None, description="The medication for which this is an indication." ) disease_symptom_procedure: typing.Optional[CodeableConcept] = pydantic.Field( alias="diseaseSymptomProcedure", + default=None, description="The disease, symptom or procedure that is the indication for treatment.", ) disease_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="diseaseStatus", description="The status of the disease or symptom for which the indication applies." + alias="diseaseStatus", + default=None, + description="The status of the disease or symptom for which the indication applies.", ) comorbidity: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Comorbidity (concurrent condition) or co-infection as part of the indication." + default=None, description="Comorbidity (concurrent condition) or co-infection as part of the indication." ) intended_effect: typing.Optional[CodeableConcept] = pydantic.Field( - alias="intendedEffect", description="The intended effect, aim or strategy to be achieved by the indication." + alias="intendedEffect", + default=None, + description="The intended effect, aim or strategy to be achieved by the indication.", ) duration: typing.Optional[Quantity] = pydantic.Field( - description="Timing or duration information as part of the indication." + default=None, description="Timing or duration information as part of the indication." ) other_therapy: typing.Optional[typing.List[MedicinalProductIndicationOtherTherapy]] = pydantic.Field( alias="otherTherapy", + default=None, description="Information about the use of the medicinal product in relation to other therapies described as part of the indication.", ) undesirable_effect: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="undesirableEffect", description="Describe the undesirable effects of the medicinal product." + alias="undesirableEffect", + default=None, + description="Describe the undesirable effects of the medicinal product.", ) population: typing.Optional[typing.List[Population]] = pydantic.Field( - description="The population group to which this applies." + default=None, description="The population group to which this applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_indication_other_therapy.py b/src/metriport/fhir/types/medicinal_product_indication_other_therapy.py index 2ca8504..b33e86a 100644 --- a/src/metriport/fhir/types/medicinal_product_indication_other_therapy.py +++ b/src/metriport/fhir/types/medicinal_product_indication_other_therapy.py @@ -20,13 +20,16 @@ class MedicinalProductIndicationOtherTherapy(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) therapy_relationship_type: CodeableConcept = pydantic.Field( @@ -35,10 +38,12 @@ class MedicinalProductIndicationOtherTherapy(pydantic.BaseModel): ) medication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="medicationCodeableConcept", + default=None, description="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", ) medication_reference: typing.Optional[Reference] = pydantic.Field( alias="medicationReference", + default=None, description="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", ) diff --git a/src/metriport/fhir/types/medicinal_product_ingredient.py b/src/metriport/fhir/types/medicinal_product_ingredient.py index 81d8cac..2193058 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,22 +22,23 @@ class MedicinalProductIngredient(BaseResource): An ingredient of a manufactured item or pharmaceutical product. """ - resource_type: typing_extensions.Literal["MedicinalProductIngredient"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductIngredient"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate." + default=None, + description="The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.", ) role: CodeableConcept = pydantic.Field(description="Ingredient role e.g. Active ingredient, excipient.") allergenic_indicator: typing.Optional[bool] = pydantic.Field( - alias="allergenicIndicator", description="If the ingredient is a known or suspected allergen." + alias="allergenicIndicator", default=None, description="If the ingredient is a known or suspected allergen." ) manufacturer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Manufacturer of this Ingredient." + default=None, description="Manufacturer of this Ingredient." ) specified_substance: typing.Optional[typing.List[MedicinalProductIngredientSpecifiedSubstance]] = pydantic.Field( - alias="specifiedSubstance", description="A specified substance that comprises this ingredient." + alias="specifiedSubstance", default=None, description="A specified substance that comprises this ingredient." ) substance: typing.Optional[MedicinalProductIngredientSubstance] = pydantic.Field( - description="The ingredient substance." + default=None, description="The ingredient substance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_ingredient_reference_strength.py b/src/metriport/fhir/types/medicinal_product_ingredient_reference_strength.py index a7f538e..7483d4f 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient_reference_strength.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient_reference_strength.py @@ -20,25 +20,32 @@ class MedicinalProductIngredientReferenceStrength(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - substance: typing.Optional[CodeableConcept] = pydantic.Field(description="Relevant reference substance.") + substance: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Relevant reference substance." + ) strength: Ratio = pydantic.Field(description="Strength expressed in terms of a reference substance.") strength_low_limit: typing.Optional[Ratio] = pydantic.Field( - alias="strengthLowLimit", description="Strength expressed in terms of a reference substance." + alias="strengthLowLimit", default=None, description="Strength expressed in terms of a reference substance." ) measurement_point: typing.Optional[str] = pydantic.Field( - alias="measurementPoint", description="For when strength is measured at a particular point or distance." + alias="measurementPoint", + default=None, + description="For when strength is measured at a particular point or distance.", ) country: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The country or countries for which the strength range applies." + default=None, description="The country or countries for which the strength range applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_ingredient_specified_substance.py b/src/metriport/fhir/types/medicinal_product_ingredient_specified_substance.py index db6c8fa..ea4094d 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient_specified_substance.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient_specified_substance.py @@ -20,22 +20,26 @@ class MedicinalProductIngredientSpecifiedSubstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="The specified substance.") group: CodeableConcept = pydantic.Field(description="The group of specified substance, e.g. group 1 to 4.") confidentiality: typing.Optional[CodeableConcept] = pydantic.Field( - description="Confidentiality level of the specified substance as the ingredient." + default=None, description="Confidentiality level of the specified substance as the ingredient." ) strength: typing.Optional[typing.List[MedicinalProductIngredientStrength]] = pydantic.Field( - description="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product." + default=None, + description="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_ingredient_strength.py b/src/metriport/fhir/types/medicinal_product_ingredient_strength.py index 787e993..340ab6c 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient_strength.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient_strength.py @@ -21,13 +21,16 @@ class MedicinalProductIngredientStrength(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) presentation: Ratio = pydantic.Field( @@ -35,21 +38,27 @@ class MedicinalProductIngredientStrength(pydantic.BaseModel): ) presentation_low_limit: typing.Optional[Ratio] = pydantic.Field( alias="presentationLowLimit", + default=None, description="A lower limit for the quantity of substance in the unit of presentation. For use when there is a range of strengths, this is the lower limit, with the presentation attribute becoming the upper limit.", ) - concentration: typing.Optional[Ratio] = pydantic.Field(description="The strength per unitary volume (or mass).") + concentration: typing.Optional[Ratio] = pydantic.Field( + default=None, description="The strength per unitary volume (or mass)." + ) concentration_low_limit: typing.Optional[Ratio] = pydantic.Field( alias="concentrationLowLimit", + default=None, description="A lower limit for the strength per unitary volume (or mass), for when there is a range. The concentration attribute then becomes the upper limit.", ) measurement_point: typing.Optional[str] = pydantic.Field( - alias="measurementPoint", description="For when strength is measured at a particular point or distance." + alias="measurementPoint", + default=None, + description="For when strength is measured at a particular point or distance.", ) country: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The country or countries for which the strength range applies." + default=None, description="The country or countries for which the strength range applies." ) reference_strength: typing.Optional[typing.List[MedicinalProductIngredientReferenceStrength]] = pydantic.Field( - alias="referenceStrength", description="Strength expressed in terms of a reference substance." + alias="referenceStrength", default=None, description="Strength expressed in terms of a reference substance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_ingredient_substance.py b/src/metriport/fhir/types/medicinal_product_ingredient_substance.py index 9721cf8..260d813 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient_substance.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient_substance.py @@ -20,18 +20,22 @@ class MedicinalProductIngredientSubstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="The ingredient substance.") strength: typing.Optional[typing.List[MedicinalProductIngredientStrength]] = pydantic.Field( - description="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product." + default=None, + description="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_interaction.py b/src/metriport/fhir/types/medicinal_product_interaction.py index 406cb24..fa5179e 100644 --- a/src/metriport/fhir/types/medicinal_product_interaction.py +++ b/src/metriport/fhir/types/medicinal_product_interaction.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,24 +20,28 @@ class MedicinalProductInteraction(BaseResource): The interactions of the medicinal product with other medicinal products, or other forms of interactions. """ - resource_type: typing_extensions.Literal["MedicinalProductInteraction"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductInteraction"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The medication for which this is a described interaction." + default=None, description="The medication for which this is a described interaction." ) - description: typing.Optional[str] = pydantic.Field(description="The interaction described.") + description: typing.Optional[str] = pydantic.Field(default=None, description="The interaction described.") interactant: typing.Optional[typing.List[MedicinalProductInteractionInteractant]] = pydantic.Field( - description="The specific medication, food or laboratory test that interacts." + default=None, description="The specific medication, food or laboratory test that interacts." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction." + default=None, + description="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.", ) effect: typing.Optional[CodeableConcept] = pydantic.Field( - description='The effect of the interaction, for example "reduced gastric absorption of primary medication".' + default=None, + description='The effect of the interaction, for example "reduced gastric absorption of primary medication".', ) incidence: typing.Optional[CodeableConcept] = pydantic.Field( - description="The incidence of the interaction, e.g. theoretical, observed." + default=None, description="The incidence of the interaction, e.g. theoretical, observed." + ) + management: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Actions for managing the interaction." ) - management: typing.Optional[CodeableConcept] = pydantic.Field(description="Actions for managing the interaction.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/medicinal_product_interaction_interactant.py b/src/metriport/fhir/types/medicinal_product_interaction_interactant.py index caeed3f..e5e8191 100644 --- a/src/metriport/fhir/types/medicinal_product_interaction_interactant.py +++ b/src/metriport/fhir/types/medicinal_product_interaction_interactant.py @@ -20,20 +20,27 @@ class MedicinalProductInteractionInteractant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) item_reference: typing.Optional[Reference] = pydantic.Field( - alias="itemReference", description="The specific medication, food or laboratory test that interacts." + alias="itemReference", + default=None, + description="The specific medication, food or laboratory test that interacts.", ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="itemCodeableConcept", description="The specific medication, food or laboratory test that interacts." + alias="itemCodeableConcept", + default=None, + description="The specific medication, food or laboratory test that interacts.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_manufactured.py b/src/metriport/fhir/types/medicinal_product_manufactured.py index 4bc0c0d..c712267 100644 --- a/src/metriport/fhir/types/medicinal_product_manufactured.py +++ b/src/metriport/fhir/types/medicinal_product_manufactured.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,25 +21,27 @@ class MedicinalProductManufactured(BaseResource): The manufactured item as contained in the packaged medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductManufactured"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductManufactured"] = pydantic.Field(alias="resourceType") manufactured_dose_form: CodeableConcept = pydantic.Field( alias="manufacturedDoseForm", description="Dose form as manufactured and before any transformation into the pharmaceutical product.", ) unit_of_presentation: typing.Optional[CodeableConcept] = pydantic.Field( alias="unitOfPresentation", + default=None, description="The “real world” units in which the quantity of the manufactured item is described.", ) quantity: Quantity = pydantic.Field(description='The quantity or "count number" of the manufactured item.') manufacturer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description='Manufacturer of the item (Note that this should be named "manufacturer" but it currently causes technical issues).' + default=None, + description='Manufacturer of the item (Note that this should be named "manufacturer" but it currently causes technical issues).', ) - ingredient: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Ingredient.") + ingredient: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Ingredient.") physical_characteristics: typing.Optional[ProdCharacteristic] = pydantic.Field( - alias="physicalCharacteristics", description="Dimensions, color etc." + alias="physicalCharacteristics", default=None, description="Dimensions, color etc." ) other_characteristics: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="otherCharacteristics", description="Other codeable characteristics." + alias="otherCharacteristics", default=None, description="Other codeable characteristics." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_manufacturing_business_operation.py b/src/metriport/fhir/types/medicinal_product_manufacturing_business_operation.py index d9972d7..9adef89 100644 --- a/src/metriport/fhir/types/medicinal_product_manufacturing_business_operation.py +++ b/src/metriport/fhir/types/medicinal_product_manufacturing_business_operation.py @@ -22,31 +22,38 @@ class MedicinalProductManufacturingBusinessOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) operation_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="operationType", description="The type of manufacturing operation." + alias="operationType", default=None, description="The type of manufacturing operation." ) authorisation_reference_number: typing.Optional[Identifier] = pydantic.Field( - alias="authorisationReferenceNumber", description="Regulatory authorization reference number." + alias="authorisationReferenceNumber", default=None, description="Regulatory authorization reference number." ) effective_date: typing.Optional[DateTime] = pydantic.Field( - alias="effectiveDate", description="Regulatory authorization date." + alias="effectiveDate", default=None, description="Regulatory authorization date." ) confidentiality_indicator: typing.Optional[CodeableConcept] = pydantic.Field( - alias="confidentialityIndicator", description="To indicate if this proces is commercially confidential." + alias="confidentialityIndicator", + default=None, + description="To indicate if this proces is commercially confidential.", ) manufacturer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The manufacturer or establishment associated with the process." + default=None, description="The manufacturer or establishment associated with the process." + ) + regulator: typing.Optional[Reference] = pydantic.Field( + default=None, description="A regulator which oversees the operation." ) - regulator: typing.Optional[Reference] = pydantic.Field(description="A regulator which oversees the operation.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/medicinal_product_name.py b/src/metriport/fhir/types/medicinal_product_name.py index eef3086..cb046f9 100644 --- a/src/metriport/fhir/types/medicinal_product_name.py +++ b/src/metriport/fhir/types/medicinal_product_name.py @@ -20,21 +20,26 @@ class MedicinalProductName(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - product_name: typing.Optional[str] = pydantic.Field(alias="productName", description="The full product name.") + product_name: typing.Optional[str] = pydantic.Field( + alias="productName", default=None, description="The full product name." + ) name_part: typing.Optional[typing.List[MedicinalProductNamePart]] = pydantic.Field( - alias="namePart", description="Coding words or phrases of the name." + alias="namePart", default=None, description="Coding words or phrases of the name." ) country_language: typing.Optional[typing.List[MedicinalProductCountryLanguage]] = pydantic.Field( - alias="countryLanguage", description="Country where the name applies." + alias="countryLanguage", default=None, description="Country where the name applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_name_part.py b/src/metriport/fhir/types/medicinal_product_name_part.py index fe9b1d4..5f9eb31 100644 --- a/src/metriport/fhir/types/medicinal_product_name_part.py +++ b/src/metriport/fhir/types/medicinal_product_name_part.py @@ -19,16 +19,19 @@ class MedicinalProductNamePart(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - part: typing.Optional[str] = pydantic.Field(description="A fragment of a product name.") + part: typing.Optional[str] = pydantic.Field(default=None, description="A fragment of a product name.") type: Coding = pydantic.Field(description="Idenifying type for this part of the name (e.g. strength part).") def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_packaged.py b/src/metriport/fhir/types/medicinal_product_packaged.py index 04089f2..5aa8fd2 100644 --- a/src/metriport/fhir/types/medicinal_product_packaged.py +++ b/src/metriport/fhir/types/medicinal_product_packaged.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -25,27 +23,30 @@ class MedicinalProductPackaged(BaseResource): A medicinal product in a container or package. """ - resource_type: typing_extensions.Literal["MedicinalProductPackaged"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="Unique identifier.") + resource_type: typing.Literal["MedicinalProductPackaged"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="Unique identifier." + ) subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The product with this is a pack for." + default=None, description="The product with this is a pack for." ) - description: typing.Optional[str] = pydantic.Field(description="Textual description.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Textual description.") legal_status_of_supply: typing.Optional[CodeableConcept] = pydantic.Field( alias="legalStatusOfSupply", + default=None, description="The legal status of supply of the medicinal product as classified by the regulator.", ) marketing_status: typing.Optional[typing.List[MarketingStatus]] = pydantic.Field( - alias="marketingStatus", description="Marketing information." + alias="marketingStatus", default=None, description="Marketing information." ) marketing_authorization: typing.Optional[Reference] = pydantic.Field( - alias="marketingAuthorization", description="Manufacturer of this Package Item." + alias="marketingAuthorization", default=None, description="Manufacturer of this Package Item." ) manufacturer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Manufacturer of this Package Item." + default=None, description="Manufacturer of this Package Item." ) batch_identifier: typing.Optional[typing.List[MedicinalProductPackagedBatchIdentifier]] = pydantic.Field( - alias="batchIdentifier", description="Batch numbering." + alias="batchIdentifier", default=None, description="Batch numbering." ) package_item: typing.List[MedicinalProductPackagedPackageItem] = pydantic.Field( alias="packageItem", diff --git a/src/metriport/fhir/types/medicinal_product_packaged_batch_identifier.py b/src/metriport/fhir/types/medicinal_product_packaged_batch_identifier.py index 84855b5..7f9c9f3 100644 --- a/src/metriport/fhir/types/medicinal_product_packaged_batch_identifier.py +++ b/src/metriport/fhir/types/medicinal_product_packaged_batch_identifier.py @@ -19,13 +19,16 @@ class MedicinalProductPackagedBatchIdentifier(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) outer_packaging: Identifier = pydantic.Field( @@ -33,6 +36,7 @@ class MedicinalProductPackagedBatchIdentifier(pydantic.BaseModel): ) immediate_packaging: typing.Optional[Identifier] = pydantic.Field( alias="immediatePackaging", + default=None, description="A number appearing on the immediate packaging (and not the outer packaging).", ) diff --git a/src/metriport/fhir/types/medicinal_product_packaged_package_item.py b/src/metriport/fhir/types/medicinal_product_packaged_package_item.py index 2532fae..3109bda 100644 --- a/src/metriport/fhir/types/medicinal_product_packaged_package_item.py +++ b/src/metriport/fhir/types/medicinal_product_packaged_package_item.py @@ -26,48 +26,53 @@ class MedicinalProductPackagedPackageItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Including possibly Data Carrier Identifier." + default=None, description="Including possibly Data Carrier Identifier." ) type: CodeableConcept = pydantic.Field(description="The physical type of the container of the medicine.") quantity: Quantity = pydantic.Field( description="The quantity of this package in the medicinal product, at the current level of packaging. The outermost is always 1." ) material: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Material type of the package item." + default=None, description="Material type of the package item." ) alternate_material: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="alternateMaterial", description="A possible alternate material for the packaging." + alias="alternateMaterial", default=None, description="A possible alternate material for the packaging." ) device: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A device accompanying a medicinal product." + default=None, description="A device accompanying a medicinal product." ) manufactured_item: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="manufacturedItem", description="The manufactured item as contained in the packaged medicinal product." + alias="manufacturedItem", + default=None, + description="The manufactured item as contained in the packaged medicinal product.", ) package_item: typing.Optional[typing.List[MedicinalProductPackagedPackageItem]] = pydantic.Field( - alias="packageItem", description="Allows containers within containers." + alias="packageItem", default=None, description="Allows containers within containers." ) physical_characteristics: typing.Optional[ProdCharacteristic] = pydantic.Field( - alias="physicalCharacteristics", description="Dimensions, color etc." + alias="physicalCharacteristics", default=None, description="Dimensions, color etc." ) other_characteristics: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="otherCharacteristics", description="Other codeable characteristics." + alias="otherCharacteristics", default=None, description="Other codeable characteristics." ) shelf_life_storage: typing.Optional[typing.List[ProductShelfLife]] = pydantic.Field( - alias="shelfLifeStorage", description="Shelf Life and storage information." + alias="shelfLifeStorage", default=None, description="Shelf Life and storage information." ) manufacturer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Manufacturer of this Package Item." + default=None, description="Manufacturer of this Package Item." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical.py index 4ab2102..4e5c0a5 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,20 +24,20 @@ class MedicinalProductPharmaceutical(BaseResource): A pharmaceutical product described in terms of its composition and dose form. """ - resource_type: typing_extensions.Literal["MedicinalProductPharmaceutical"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductPharmaceutical"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="An identifier for the pharmaceutical medicinal product." + default=None, description="An identifier for the pharmaceutical medicinal product." ) administrable_dose_form: CodeableConcept = pydantic.Field( alias="administrableDoseForm", description="The administrable dose form, after necessary reconstitution." ) unit_of_presentation: typing.Optional[CodeableConcept] = pydantic.Field( - alias="unitOfPresentation", description="Todo." + alias="unitOfPresentation", default=None, description="Todo." ) - ingredient: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Ingredient.") - device: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Accompanying device.") + ingredient: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Ingredient.") + device: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Accompanying device.") characteristics: typing.Optional[typing.List[MedicinalProductPharmaceuticalCharacteristics]] = pydantic.Field( - description="Characteristics e.g. a products onset of action." + default=None, description="Characteristics e.g. a products onset of action." ) route_of_administration: typing.List[MedicinalProductPharmaceuticalRouteOfAdministration] = pydantic.Field( alias="routeOfAdministration", diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical_characteristics.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical_characteristics.py index 13961b2..b94ac11 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical_characteristics.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical_characteristics.py @@ -19,18 +19,21 @@ class MedicinalProductPharmaceuticalCharacteristics(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="A coded characteristic.") status: typing.Optional[CodeableConcept] = pydantic.Field( - description="The status of characteristic e.g. assigned or pending." + default=None, description="The status of characteristic e.g. assigned or pending." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical_route_of_administration.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical_route_of_administration.py index 1e938f9..bea339f 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical_route_of_administration.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical_route_of_administration.py @@ -23,38 +23,46 @@ class MedicinalProductPharmaceuticalRouteOfAdministration(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="Coded expression for the route.") first_dose: typing.Optional[Quantity] = pydantic.Field( alias="firstDose", + default=None, description="The first dose (dose quantity) administered in humans can be specified, for a product under investigation, using a numerical value and its unit of measurement.", ) max_single_dose: typing.Optional[Quantity] = pydantic.Field( alias="maxSingleDose", + default=None, description="The maximum single dose that can be administered as per the protocol of a clinical trial can be specified using a numerical value and its unit of measurement.", ) max_dose_per_day: typing.Optional[Quantity] = pydantic.Field( alias="maxDosePerDay", + default=None, description="The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered as per the protocol referenced in the clinical trial authorisation.", ) max_dose_per_treatment_period: typing.Optional[Ratio] = pydantic.Field( alias="maxDosePerTreatmentPeriod", + default=None, description="The maximum dose per treatment period that can be administered as per the protocol referenced in the clinical trial authorisation.", ) max_treatment_period: typing.Optional[Duration] = pydantic.Field( alias="maxTreatmentPeriod", + default=None, description="The maximum treatment period during which an Investigational Medicinal Product can be administered as per the protocol referenced in the clinical trial authorisation.", ) target_species: typing.Optional[typing.List[MedicinalProductPharmaceuticalTargetSpecies]] = pydantic.Field( - alias="targetSpecies", description="A species for which this route applies." + alias="targetSpecies", default=None, description="A species for which this route applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical_target_species.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical_target_species.py index 7b79c4e..b053c83 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical_target_species.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical_target_species.py @@ -20,18 +20,22 @@ class MedicinalProductPharmaceuticalTargetSpecies(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field(description="Coded expression for the species.") withdrawal_period: typing.Optional[typing.List[MedicinalProductPharmaceuticalWithdrawalPeriod]] = pydantic.Field( alias="withdrawalPeriod", + default=None, description="A species specific time during which consumption of animal product is not appropriate.", ) diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical_withdrawal_period.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical_withdrawal_period.py index 3e83ba3..a1f74b9 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical_withdrawal_period.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical_withdrawal_period.py @@ -20,13 +20,16 @@ class MedicinalProductPharmaceuticalWithdrawalPeriod(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) tissue: CodeableConcept = pydantic.Field( @@ -34,7 +37,7 @@ class MedicinalProductPharmaceuticalWithdrawalPeriod(pydantic.BaseModel): ) value: Quantity = pydantic.Field(description="A value for the time.") supporting_information: typing.Optional[str] = pydantic.Field( - alias="supportingInformation", description="Extra information about the withdrawal period." + alias="supportingInformation", default=None, description="Extra information about the withdrawal period." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/medicinal_product_special_designation.py b/src/metriport/fhir/types/medicinal_product_special_designation.py index ffb5ce9..5a90bc1 100644 --- a/src/metriport/fhir/types/medicinal_product_special_designation.py +++ b/src/metriport/fhir/types/medicinal_product_special_designation.py @@ -22,35 +22,40 @@ class MedicinalProductSpecialDesignation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for the designation, or procedure number." + default=None, description="Identifier for the designation, or procedure number." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of special designation, e.g. orphan drug, minor use." + default=None, description="The type of special designation, e.g. orphan drug, minor use." ) intended_use: typing.Optional[CodeableConcept] = pydantic.Field( - alias="intendedUse", description="The intended use of the product, e.g. prevention, treatment." + alias="intendedUse", default=None, description="The intended use of the product, e.g. prevention, treatment." ) indication_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="indicationCodeableConcept", description="Condition for which the medicinal use applies." + alias="indicationCodeableConcept", default=None, description="Condition for which the medicinal use applies." ) indication_reference: typing.Optional[Reference] = pydantic.Field( - alias="indicationReference", description="Condition for which the medicinal use applies." + alias="indicationReference", default=None, description="Condition for which the medicinal use applies." ) status: typing.Optional[CodeableConcept] = pydantic.Field( - description="For example granted, pending, expired or withdrawn." + default=None, description="For example granted, pending, expired or withdrawn." + ) + date: typing.Optional[DateTime] = pydantic.Field(default=None, description="Date when the designation was granted.") + species: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Animal species for which this applies." ) - date: typing.Optional[DateTime] = pydantic.Field(description="Date when the designation was granted.") - species: typing.Optional[CodeableConcept] = pydantic.Field(description="Animal species for which this applies.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/medicinal_product_undesirable_effect.py b/src/metriport/fhir/types/medicinal_product_undesirable_effect.py index b21e410..ee0746f 100644 --- a/src/metriport/fhir/types/medicinal_product_undesirable_effect.py +++ b/src/metriport/fhir/types/medicinal_product_undesirable_effect.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,19 +20,21 @@ class MedicinalProductUndesirableEffect(BaseResource): Describe the undesirable effects of the medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductUndesirableEffect"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductUndesirableEffect"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The medication for which this is an indication." + default=None, description="The medication for which this is an indication." ) symptom_condition_effect: typing.Optional[CodeableConcept] = pydantic.Field( - alias="symptomConditionEffect", description="The symptom, condition or undesirable effect." + alias="symptomConditionEffect", default=None, description="The symptom, condition or undesirable effect." + ) + classification: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Classification of the effect." ) - classification: typing.Optional[CodeableConcept] = pydantic.Field(description="Classification of the effect.") frequency_of_occurrence: typing.Optional[CodeableConcept] = pydantic.Field( - alias="frequencyOfOccurrence", description="The frequency of occurrence of the effect." + alias="frequencyOfOccurrence", default=None, description="The frequency of occurrence of the effect." ) population: typing.Optional[typing.List[Population]] = pydantic.Field( - description="The population group to which this applies." + default=None, description="The population group to which this applies." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_definition.py b/src/metriport/fhir/types/message_definition.py index 665bb13..2e315ec 100644 --- a/src/metriport/fhir/types/message_definition.py +++ b/src/metriport/fhir/types/message_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,84 +31,99 @@ class MessageDefinition(BaseResource): Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. """ - resource_type: typing_extensions.Literal["MessageDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MessageDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="The business identifier that is used to reference the MessageDefinition and _is_ expected to be consistent from server to server." + default=None, + description="The business identifier that is used to reference the MessageDefinition and _is_ expected to be consistent from server to server.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the message definition." + default=None, description="A short, descriptive, user-friendly title for the message definition." ) replaces: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A MessageDefinition that is superseded by this definition." + default=None, description="A MessageDefinition that is superseded by this definition." ) status: typing.Optional[MessageDefinitionStatus] = pydantic.Field( - description="The status of this message definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this message definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes." + default=None, + description="The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the message definition." + default=None, description="The name of the organization or individual that published the message definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the message definition from a consumer's perspective." + default=None, + description="A free text natural language description of the message definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the message definition is intended to be used." + default=None, description="A legal or geographic region in which the message definition is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this message definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this message definition is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition." + default=None, + description="A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.", ) base: typing.Optional[Canonical] = pydantic.Field( - description="The MessageDefinition that is the basis for the contents of this resource." + default=None, description="The MessageDefinition that is the basis for the contents of this resource." ) parent: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="Identifies a protocol or workflow that this MessageDefinition represents a step in." + default=None, description="Identifies a protocol or workflow that this MessageDefinition represents a step in." ) event_coding: typing.Optional[Coding] = pydantic.Field( - alias="eventCoding", description="Event code or link to the EventDefinition." + alias="eventCoding", default=None, description="Event code or link to the EventDefinition." ) event_uri: typing.Optional[str] = pydantic.Field( - alias="eventUri", description="Event code or link to the EventDefinition." + alias="eventUri", default=None, description="Event code or link to the EventDefinition." ) category: typing.Optional[MessageDefinitionCategory] = pydantic.Field( - description="The impact of the content of the message." + default=None, description="The impact of the content of the message." ) focus: typing.Optional[typing.List[MessageDefinitionFocus]] = pydantic.Field( - description="Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge." + default=None, + description="Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.", ) response_required: typing.Optional[MessageDefinitionResponseRequired] = pydantic.Field( alias="responseRequired", + default=None, description="Declare at a message definition level whether a response is required or only upon error or success, or never.", ) allowed_response: typing.Optional[typing.List[MessageDefinitionAllowedResponse]] = pydantic.Field( alias="allowedResponse", + default=None, description="Indicates what types of messages may be sent as an application-level response to this message.", ) graph: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources." + default=None, + description="Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_definition_allowed_response.py b/src/metriport/fhir/types/message_definition_allowed_response.py index 4b500d6..25b1406 100644 --- a/src/metriport/fhir/types/message_definition_allowed_response.py +++ b/src/metriport/fhir/types/message_definition_allowed_response.py @@ -20,20 +20,24 @@ class MessageDefinitionAllowedResponse(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) message: Canonical = pydantic.Field( description="A reference to the message definition that must be adhered to by this supported response." ) situation: typing.Optional[Markdown] = pydantic.Field( - description="Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses)." + default=None, + description="Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_definition_focus.py b/src/metriport/fhir/types/message_definition_focus.py index bdcf8f6..a1994b6 100644 --- a/src/metriport/fhir/types/message_definition_focus.py +++ b/src/metriport/fhir/types/message_definition_focus.py @@ -21,26 +21,32 @@ class MessageDefinitionFocus(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="The kind of resource that must be the focus for this message." + default=None, description="The kind of resource that must be the focus for this message." ) profile: typing.Optional[Canonical] = pydantic.Field( - description="A profile that reflects constraints for the focal resource (and potentially for related resources)." + default=None, + description="A profile that reflects constraints for the focal resource (and potentially for related resources).", ) min: typing.Optional[UnsignedInt] = pydantic.Field( - description="Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition." + default=None, + description="Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", ) max: typing.Optional[str] = pydantic.Field( - description="Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition." + default=None, + description="Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_header.py b/src/metriport/fhir/types/message_header.py index 5c7477f..e01966b 100644 --- a/src/metriport/fhir/types/message_header.py +++ b/src/metriport/fhir/types/message_header.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -26,44 +24,51 @@ class MessageHeader(BaseResource): The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. """ - resource_type: typing_extensions.Literal["MessageHeader"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MessageHeader"] = pydantic.Field(alias="resourceType") event_coding: typing.Optional[Coding] = pydantic.Field( alias="eventCoding", + default=None, description='Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://terminology.hl7.org/CodeSystem/message-events". Alternatively uri to the EventDefinition.', ) event_uri: typing.Optional[str] = pydantic.Field( alias="eventUri", + default=None, description='Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://terminology.hl7.org/CodeSystem/message-events". Alternatively uri to the EventDefinition.', ) destination: typing.Optional[typing.List[MessageHeaderDestination]] = pydantic.Field( - description="The destination application which the message is intended for." + default=None, description="The destination application which the message is intended for." ) sender: typing.Optional[Reference] = pydantic.Field( - description="Identifies the sending system to allow the use of a trust relationship." + default=None, description="Identifies the sending system to allow the use of a trust relationship." ) enterer: typing.Optional[Reference] = pydantic.Field( - description="The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." + default=None, + description="The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.", ) author: typing.Optional[Reference] = pydantic.Field( - description="The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." + default=None, + description="The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.", ) source: MessageHeaderSource = pydantic.Field( description="The source application from which this message originated." ) responsible: typing.Optional[Reference] = pydantic.Field( - description="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." + default=None, + description="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.", ) reason: typing.Optional[CodeableConcept] = pydantic.Field( - description="Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message." + default=None, + description="Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.", ) response: typing.Optional[MessageHeaderResponse] = pydantic.Field( - description="Information about the message that this message is a response to. Only present if this message is a response." + default=None, + description="Information about the message that this message is a response to. Only present if this message is a response.", ) focus: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The actual data of the message - a reference to the root/focus class of the event." + default=None, description="The actual data of the message - a reference to the root/focus class of the event." ) definition: typing.Optional[Canonical] = pydantic.Field( - description="Permanent link to the MessageDefinition for this message." + default=None, description="Permanent link to the MessageDefinition for this message." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_header_destination.py b/src/metriport/fhir/types/message_header_destination.py index 239eb1a..a0680d0 100644 --- a/src/metriport/fhir/types/message_header_destination.py +++ b/src/metriport/fhir/types/message_header_destination.py @@ -20,22 +20,29 @@ class MessageHeaderDestination(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Human-readable name for the target system.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Human-readable name for the target system.") target: typing.Optional[Reference] = pydantic.Field( - description="Identifies the target end system in situations where the initial message transmission is to an intermediary system." + default=None, + description="Identifies the target end system in situations where the initial message transmission is to an intermediary system.", + ) + endpoint: typing.Optional[Url] = pydantic.Field( + default=None, description="Indicates where the message should be routed to." ) - endpoint: typing.Optional[Url] = pydantic.Field(description="Indicates where the message should be routed to.") receiver: typing.Optional[Reference] = pydantic.Field( - description="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." + default=None, + description="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/message_header_response.py b/src/metriport/fhir/types/message_header_response.py index fb9effa..f8e3b49 100644 --- a/src/metriport/fhir/types/message_header_response.py +++ b/src/metriport/fhir/types/message_header_response.py @@ -21,22 +21,28 @@ class MessageHeaderResponse(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Id] = pydantic.Field( - description="The MessageHeader.id of the message to which this message is a response." + default=None, description="The MessageHeader.id of the message to which this message is a response." ) code: typing.Optional[MessageHeaderResponseCode] = pydantic.Field( - description="Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not." + default=None, + description="Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.", + ) + details: typing.Optional[Reference] = pydantic.Field( + default=None, description="Full details of any issues found in the message." ) - details: typing.Optional[Reference] = pydantic.Field(description="Full details of any issues found in the message.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/message_header_source.py b/src/metriport/fhir/types/message_header_source.py index 0e3c5c3..0d2e2b4 100644 --- a/src/metriport/fhir/types/message_header_source.py +++ b/src/metriport/fhir/types/message_header_source.py @@ -20,27 +20,32 @@ class MessageHeaderSource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Human-readable name for the source system.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Human-readable name for the source system.") software: typing.Optional[str] = pydantic.Field( - description="May include configuration or other information useful in debugging." + default=None, description="May include configuration or other information useful in debugging." ) version: typing.Optional[str] = pydantic.Field( - description="Can convey versions of multiple systems in situations where a message passes through multiple hands." + default=None, + description="Can convey versions of multiple systems in situations where a message passes through multiple hands.", ) contact: typing.Optional[ContactPoint] = pydantic.Field( - description="An e-mail, phone, website or other contact point to use to resolve issues with message communications." + default=None, + description="An e-mail, phone, website or other contact point to use to resolve issues with message communications.", ) endpoint: typing.Optional[Url] = pydantic.Field( - description="Identifies the routing target to send acknowledgements to." + default=None, description="Identifies the routing target to send acknowledgements to." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/meta.py b/src/metriport/fhir/types/meta.py index 47edba0..f761287 100644 --- a/src/metriport/fhir/types/meta.py +++ b/src/metriport/fhir/types/meta.py @@ -23,39 +23,47 @@ class Meta(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) version_id: typing.Optional[Id] = pydantic.Field( alias="versionId", + default=None, description="The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.", ) last_updated: typing.Optional[Instant] = pydantic.Field( - alias="lastUpdated", description="When the resource last changed - e.g. when the version changed." + alias="lastUpdated", default=None, description="When the resource last changed - e.g. when the version changed." ) source: typing.Optional[Uri] = pydantic.Field( - description="A uri that identifies the source system of the resource. This provides a minimal amount of [[[Provenance]]] information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc." + default=None, + description="A uri that identifies the source system of the resource. This provides a minimal amount of [[[Provenance]]] information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.", ) profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A list of profiles (references to [[[StructureDefinition]]] resources) that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]]." + default=None, + description="A list of profiles (references to [[[StructureDefinition]]] resources) that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].", ) security: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." + default=None, + description="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.", ) tag: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource." + default=None, + description="Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.", ) - project: typing.Optional[Uri] = pydantic.Field(description="The project that contains this resource.") + project: typing.Optional[Uri] = pydantic.Field(default=None, description="The project that contains this resource.") author: typing.Optional[Reference] = pydantic.Field( - description="The individual, device or organization who initiated the last change." + default=None, description="The individual, device or organization who initiated the last change." ) account: typing.Optional[Reference] = pydantic.Field( - description="Optional account reference that can be used for sub-project compartments." + default=None, description="Optional account reference that can be used for sub-project compartments." ) compartment: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The list of compartments containing this resource. This is readonly and is set by the server." + default=None, + description="The list of compartments containing this resource. This is readonly and is set by the server.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence.py b/src/metriport/fhir/types/molecular_sequence.py index 9149529..9117c16 100644 --- a/src/metriport/fhir/types/molecular_sequence.py +++ b/src/metriport/fhir/types/molecular_sequence.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .identifier import Identifier @@ -28,56 +26,64 @@ class MolecularSequence(BaseResource): Raw data describing a biological sequence. """ - resource_type: typing_extensions.Literal["MolecularSequence"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MolecularSequence"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier for this particular sequence instance. This is a FHIR-defined id." + default=None, + description="A unique identifier for this particular sequence instance. This is a FHIR-defined id.", ) type: typing.Optional[MolecularSequenceType] = pydantic.Field( - description="Amino Acid Sequence/ DNA Sequence / RNA Sequence." + default=None, description="Amino Acid Sequence/ DNA Sequence / RNA Sequence." ) coordinate_system: typing.Optional[int] = pydantic.Field( alias="coordinateSystem", + default=None, description="Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).", ) patient: typing.Optional[Reference] = pydantic.Field( - description="The patient whose sequencing results are described by this resource." + default=None, description="The patient whose sequencing results are described by this resource." ) - specimen: typing.Optional[Reference] = pydantic.Field(description="Specimen used for sequencing.") + specimen: typing.Optional[Reference] = pydantic.Field(default=None, description="Specimen used for sequencing.") device: typing.Optional[Reference] = pydantic.Field( - description="The method for sequencing, for example, chip information." + default=None, description="The method for sequencing, for example, chip information." ) performer: typing.Optional[Reference] = pydantic.Field( - description="The organization or lab that should be responsible for this result." + default=None, description="The organization or lab that should be responsible for this result." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The number of copies of the sequence of interest. (RNASeq)." + default=None, description="The number of copies of the sequence of interest. (RNASeq)." ) reference_seq: typing.Optional[MolecularSequenceReferenceSeq] = pydantic.Field( alias="referenceSeq", + default=None, description="A sequence that is used as a reference to describe variants that are present in a sequence analyzed.", ) variant: typing.Optional[typing.List[MolecularSequenceVariant]] = pydantic.Field( - description="The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string." + default=None, + description="The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.", ) observed_seq: typing.Optional[str] = pydantic.Field( alias="observedSeq", + default=None, description="Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.", ) quality: typing.Optional[typing.List[MolecularSequenceQuality]] = pydantic.Field( - description="An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686))." + default=None, + description="An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).", ) read_coverage: typing.Optional[int] = pydantic.Field( alias="readCoverage", + default=None, description="Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", ) repository: typing.Optional[typing.List[MolecularSequenceRepository]] = pydantic.Field( - description="Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq." + default=None, + description="Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", ) pointer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Pointer to next atomic sequence which at most contains one variant." + default=None, description="Pointer to next atomic sequence which at most contains one variant." ) structure_variant: typing.Optional[typing.List[MolecularSequenceStructureVariant]] = pydantic.Field( - alias="structureVariant", description="Information about chromosome structure variation." + alias="structureVariant", default=None, description="Information about chromosome structure variation." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_inner.py b/src/metriport/fhir/types/molecular_sequence_inner.py index efca61c..ff3ae45 100644 --- a/src/metriport/fhir/types/molecular_sequence_inner.py +++ b/src/metriport/fhir/types/molecular_sequence_inner.py @@ -18,20 +18,25 @@ class MolecularSequenceInner(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) start: typing.Optional[int] = pydantic.Field( - description="Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." + default=None, + description="Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", ) end: typing.Optional[int] = pydantic.Field( - description="Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." + default=None, + description="Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_outer.py b/src/metriport/fhir/types/molecular_sequence_outer.py index 16cc7d1..9e76ce0 100644 --- a/src/metriport/fhir/types/molecular_sequence_outer.py +++ b/src/metriport/fhir/types/molecular_sequence_outer.py @@ -18,20 +18,25 @@ class MolecularSequenceOuter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) start: typing.Optional[int] = pydantic.Field( - description="Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." + default=None, + description="Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", ) end: typing.Optional[int] = pydantic.Field( - description="Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." + default=None, + description="Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_quality.py b/src/metriport/fhir/types/molecular_sequence_quality.py index 1670668..2cc4151 100644 --- a/src/metriport/fhir/types/molecular_sequence_quality.py +++ b/src/metriport/fhir/types/molecular_sequence_quality.py @@ -23,59 +23,74 @@ class MolecularSequenceQuality(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[MolecularSequenceQualityType] = pydantic.Field(description="INDEL / SNP / Undefined variant.") + type: typing.Optional[MolecularSequenceQualityType] = pydantic.Field( + default=None, description="INDEL / SNP / Undefined variant." + ) standard_sequence: typing.Optional[CodeableConcept] = pydantic.Field( - alias="standardSequence", description="Gold standard sequence used for comparing against." + alias="standardSequence", default=None, description="Gold standard sequence used for comparing against." ) start: typing.Optional[int] = pydantic.Field( - description="Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." + default=None, + description="Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", ) end: typing.Optional[int] = pydantic.Field( - description="End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." + default=None, + description="End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", ) score: typing.Optional[Quantity] = pydantic.Field( - description="The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685))." + default=None, + description="The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="Which method is used to get sequence quality." + default=None, description="Which method is used to get sequence quality." ) truth_tp: typing.Optional[Decimal] = pydantic.Field( alias="truthTP", + default=None, description="True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", ) query_tp: typing.Optional[Decimal] = pydantic.Field( alias="queryTP", + default=None, description="True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", ) truth_fn: typing.Optional[Decimal] = pydantic.Field( alias="truthFN", + default=None, description="False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.", ) query_fp: typing.Optional[Decimal] = pydantic.Field( alias="queryFP", + default=None, description="False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.", ) gt_fp: typing.Optional[Decimal] = pydantic.Field( alias="gtFP", + default=None, description="The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).", ) - precision: typing.Optional[Decimal] = pydantic.Field(description="QUERY.TP / (QUERY.TP + QUERY.FP).") - recall: typing.Optional[Decimal] = pydantic.Field(description="TRUTH.TP / (TRUTH.TP + TRUTH.FN).") + precision: typing.Optional[Decimal] = pydantic.Field(default=None, description="QUERY.TP / (QUERY.TP + QUERY.FP).") + recall: typing.Optional[Decimal] = pydantic.Field(default=None, description="TRUTH.TP / (TRUTH.TP + TRUTH.FN).") f_score: typing.Optional[Decimal] = pydantic.Field( alias="fScore", + default=None, description="Harmonic mean of Recall and Precision, computed as: 2 _ precision _ recall / (precision + recall).", ) roc: typing.Optional[MolecularSequenceRoc] = pydantic.Field( - description="Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff." + default=None, + description="Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_reference_seq.py b/src/metriport/fhir/types/molecular_sequence_reference_seq.py index c218fae..937b723 100644 --- a/src/metriport/fhir/types/molecular_sequence_reference_seq.py +++ b/src/metriport/fhir/types/molecular_sequence_reference_seq.py @@ -22,44 +22,56 @@ class MolecularSequenceReferenceSeq(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) chromosome: typing.Optional[CodeableConcept] = pydantic.Field( - description="Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340))." + default=None, + description="Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).", ) genome_build: typing.Optional[str] = pydantic.Field( alias="genomeBuild", + default=None, description="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", ) orientation: typing.Optional[MolecularSequenceReferenceSeqOrientation] = pydantic.Field( - description='A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.' + default=None, + description='A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.', ) reference_seq_id: typing.Optional[CodeableConcept] = pydantic.Field( alias="referenceSeqId", + default=None, description="Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG*” identifies reference sequence for genes, “NM*” for messenger RNA transcripts, and “NP\_” for amino acid sequences.", ) reference_seq_pointer: typing.Optional[Reference] = pydantic.Field( - alias="referenceSeqPointer", description="A pointer to another MolecularSequence entity as reference sequence." + alias="referenceSeqPointer", + default=None, + description="A pointer to another MolecularSequence entity as reference sequence.", ) reference_seq_string: typing.Optional[str] = pydantic.Field( - alias="referenceSeqString", description='A string like "ACGT".' + alias="referenceSeqString", default=None, description='A string like "ACGT".' ) strand: typing.Optional[MolecularSequenceReferenceSeqStrand] = pydantic.Field( - description="An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm." + default=None, + description="An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", ) window_start: typing.Optional[int] = pydantic.Field( alias="windowStart", + default=None, description="Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", ) window_end: typing.Optional[int] = pydantic.Field( alias="windowEnd", + default=None, description="End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", ) diff --git a/src/metriport/fhir/types/molecular_sequence_repository.py b/src/metriport/fhir/types/molecular_sequence_repository.py index a6b903b..67ff1f1 100644 --- a/src/metriport/fhir/types/molecular_sequence_repository.py +++ b/src/metriport/fhir/types/molecular_sequence_repository.py @@ -20,34 +20,42 @@ class MolecularSequenceRepository(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[MolecularSequenceRepositoryType] = pydantic.Field( - description="Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource." + default=None, + description="Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.", ) url: typing.Optional[Uri] = pydantic.Field( - description="URI of an external repository which contains further details about the genetics data." + default=None, + description="URI of an external repository which contains further details about the genetics data.", ) name: typing.Optional[str] = pydantic.Field( - description="URI of an external repository which contains further details about the genetics data." + default=None, + description="URI of an external repository which contains further details about the genetics data.", ) dataset_id: typing.Optional[str] = pydantic.Field( alias="datasetId", + default=None, description="Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.", ) variantset_id: typing.Optional[str] = pydantic.Field( alias="variantsetId", + default=None, description="Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.", ) readset_id: typing.Optional[str] = pydantic.Field( - alias="readsetId", description="Id of the read in this external repository." + alias="readsetId", default=None, description="Id of the read in this external repository." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_roc.py b/src/metriport/fhir/types/molecular_sequence_roc.py index b039532..0c7f344 100644 --- a/src/metriport/fhir/types/molecular_sequence_roc.py +++ b/src/metriport/fhir/types/molecular_sequence_roc.py @@ -19,38 +19,46 @@ class MolecularSequenceRoc(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) score: typing.Optional[typing.List[int]] = pydantic.Field( - description="Invidual data point representing the GQ (genotype quality) score threshold." + default=None, description="Invidual data point representing the GQ (genotype quality) score threshold." ) num_tp: typing.Optional[typing.List[int]] = pydantic.Field( alias="numTP", + default=None, description='The number of true positives if the GQ score threshold was set to "score" field value.', ) num_fp: typing.Optional[typing.List[int]] = pydantic.Field( alias="numFP", + default=None, description='The number of false positives if the GQ score threshold was set to "score" field value.', ) num_fn: typing.Optional[typing.List[int]] = pydantic.Field( alias="numFN", + default=None, description='The number of false negatives if the GQ score threshold was set to "score" field value.', ) precision: typing.Optional[typing.List[Decimal]] = pydantic.Field( - description='Calculated precision if the GQ score threshold was set to "score" field value.' + default=None, description='Calculated precision if the GQ score threshold was set to "score" field value.' ) sensitivity: typing.Optional[typing.List[Decimal]] = pydantic.Field( - description='Calculated sensitivity if the GQ score threshold was set to "score" field value.' + default=None, description='Calculated sensitivity if the GQ score threshold was set to "score" field value.' ) f_measure: typing.Optional[typing.List[Decimal]] = pydantic.Field( - alias="fMeasure", description='Calculated fScore if the GQ score threshold was set to "score" field value.' + alias="fMeasure", + default=None, + description='Calculated fScore if the GQ score threshold was set to "score" field value.', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/molecular_sequence_structure_variant.py b/src/metriport/fhir/types/molecular_sequence_structure_variant.py index 49b68c3..dc8662d 100644 --- a/src/metriport/fhir/types/molecular_sequence_structure_variant.py +++ b/src/metriport/fhir/types/molecular_sequence_structure_variant.py @@ -21,24 +21,33 @@ class MolecularSequenceStructureVariant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) variant_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="variantType", description="Information about chromosome structure variation DNA change type." + alias="variantType", + default=None, + description="Information about chromosome structure variation DNA change type.", ) exact: typing.Optional[bool] = pydantic.Field( - description="Used to indicate if the outer and inner start-end values have the same meaning." + default=None, description="Used to indicate if the outer and inner start-end values have the same meaning." + ) + length: typing.Optional[int] = pydantic.Field(default=None, description="Length of the variant chromosome.") + outer: typing.Optional[MolecularSequenceOuter] = pydantic.Field( + default=None, description="Structural variant outer." + ) + inner: typing.Optional[MolecularSequenceInner] = pydantic.Field( + default=None, description="Structural variant inner." ) - length: typing.Optional[int] = pydantic.Field(description="Length of the variant chromosome.") - outer: typing.Optional[MolecularSequenceOuter] = pydantic.Field(description="Structural variant outer.") - inner: typing.Optional[MolecularSequenceInner] = pydantic.Field(description="Structural variant inner.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/molecular_sequence_variant.py b/src/metriport/fhir/types/molecular_sequence_variant.py index 622dcc3..e73a4f5 100644 --- a/src/metriport/fhir/types/molecular_sequence_variant.py +++ b/src/metriport/fhir/types/molecular_sequence_variant.py @@ -19,34 +19,42 @@ class MolecularSequenceVariant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) start: typing.Optional[int] = pydantic.Field( - description="Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." + default=None, + description="Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", ) end: typing.Optional[int] = pydantic.Field( - description="End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." + default=None, + description="End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", ) observed_allele: typing.Optional[str] = pydantic.Field( alias="observedAllele", + default=None, description="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", ) reference_allele: typing.Optional[str] = pydantic.Field( alias="referenceAllele", + default=None, description="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", ) cigar: typing.Optional[str] = pydantic.Field( - description="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." + default=None, + description="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", ) variant_pointer: typing.Optional[Reference] = pydantic.Field( - alias="variantPointer", description="A pointer to an Observation containing variant information." + alias="variantPointer", default=None, description="A pointer to an Observation containing variant information." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/money.py b/src/metriport/fhir/types/money.py index 58f8875..1572dd4 100644 --- a/src/metriport/fhir/types/money.py +++ b/src/metriport/fhir/types/money.py @@ -21,13 +21,17 @@ class Money(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - value: typing.Optional[Decimal] = pydantic.Field(description="Numerical value (with implicit precision).") - currency: typing.Optional[Code] = pydantic.Field(description="ISO 4217 Currency Code.") + value: typing.Optional[Decimal] = pydantic.Field( + default=None, description="Numerical value (with implicit precision)." + ) + currency: typing.Optional[Code] = pydantic.Field(default=None, description="ISO 4217 Currency Code.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/naming_system.py b/src/metriport/fhir/types/naming_system.py index fa3e150..a41f0c1 100644 --- a/src/metriport/fhir/types/naming_system.py +++ b/src/metriport/fhir/types/naming_system.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,43 +25,50 @@ class NamingSystem(BaseResource): A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. """ - resource_type: typing_extensions.Literal["NamingSystem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["NamingSystem"] = pydantic.Field(alias="resourceType") name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) status: typing.Optional[NamingSystemStatus] = pydantic.Field( - description="The status of this naming system. Enables tracking the life-cycle of the content." + default=None, description="The status of this naming system. Enables tracking the life-cycle of the content." ) kind: typing.Optional[NamingSystemKind] = pydantic.Field( - description="Indicates the purpose for the naming system - what kinds of things does it make unique?" + default=None, + description="Indicates the purpose for the naming system - what kinds of things does it make unique?", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes." + default=None, + description="The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the naming system." + default=None, description="The name of the organization or individual that published the naming system." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) responsible: typing.Optional[str] = pydantic.Field( - description="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." + default=None, + description="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Categorizes a naming system for easier search by grouping related naming systems." + default=None, description="Categorizes a naming system for easier search by grouping related naming systems." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc." + default=None, + description="A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the naming system is intended to be used." + default=None, description="A legal or geographic region in which the naming system is intended to be used." ) usage: typing.Optional[str] = pydantic.Field( - description="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." + default=None, + description="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.", ) unique_id: typing.List[NamingSystemUniqueId] = pydantic.Field( alias="uniqueId", diff --git a/src/metriport/fhir/types/naming_system_unique_id.py b/src/metriport/fhir/types/naming_system_unique_id.py index 3a4409c..27ae3f5 100644 --- a/src/metriport/fhir/types/naming_system_unique_id.py +++ b/src/metriport/fhir/types/naming_system_unique_id.py @@ -20,29 +20,34 @@ class NamingSystemUniqueId(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[NamingSystemUniqueIdType] = pydantic.Field( - description="Identifies the unique identifier scheme used for this particular identifier." + default=None, description="Identifies the unique identifier scheme used for this particular identifier." ) value: typing.Optional[str] = pydantic.Field( - description="The string that should be sent over the wire to identify the code system or identifier system." + default=None, + description="The string that should be sent over the wire to identify the code system or identifier system.", ) preferred: typing.Optional[bool] = pydantic.Field( - description='Indicates whether this identifier is the "preferred" identifier of this type.' + default=None, description='Indicates whether this identifier is the "preferred" identifier of this type.' ) comment: typing.Optional[str] = pydantic.Field( - description="Notes about the past or intended usage of this identifier." + default=None, description="Notes about the past or intended usage of this identifier." ) period: typing.Optional[Period] = pydantic.Field( - description="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic." + default=None, + description="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/narrative.py b/src/metriport/fhir/types/narrative.py index d5e038f..4ffce9b 100644 --- a/src/metriport/fhir/types/narrative.py +++ b/src/metriport/fhir/types/narrative.py @@ -20,13 +20,16 @@ class Narrative(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) status: typing.Optional[NarrativeStatus] = pydantic.Field( - description="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data." + default=None, + description="The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", ) div: Xhtml = pydantic.Field(description="The actual narrative content, a stripped down version of XHTML.") diff --git a/src/metriport/fhir/types/nutrition_order.py b/src/metriport/fhir/types/nutrition_order.py index 5f33085..35f3a95 100644 --- a/src/metriport/fhir/types/nutrition_order.py +++ b/src/metriport/fhir/types/nutrition_order.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,61 +28,75 @@ class NutritionOrder(BaseResource): A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. """ - resource_type: typing_extensions.Literal["NutritionOrder"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["NutritionOrder"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this order by the order sender or by the order receiver." + default=None, description="Identifiers assigned to this order by the order sender or by the order receiver." ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", ) instantiates: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder." + default=None, + description="The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", + ) + status: typing.Optional[Code] = pydantic.Field( + default=None, description="The workflow status of the nutrition order/request." ) - status: typing.Optional[Code] = pydantic.Field(description="The workflow status of the nutrition order/request.") intent: typing.Optional[Code] = pydantic.Field( - description="Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain." + default=None, + description="Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.", ) patient: Reference = pydantic.Field( description="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="An encounter that provides additional information about the healthcare context in which this request is made." + default=None, + description="An encounter that provides additional information about the healthcare context in which this request is made.", ) date_time: typing.Optional[DateTime] = pydantic.Field( - alias="dateTime", description="The date and time that this nutrition order was requested." + alias="dateTime", default=None, description="The date and time that this nutrition order was requested." ) orderer: typing.Optional[Reference] = pydantic.Field( - description="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." + default=None, + description="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", ) allergy_intolerance: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="allergyIntolerance", + default=None, description="A link to a record of allergies or intolerances which should be included in the nutrition order.", ) food_preference_modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="foodPreferenceModifier", + default=None, description="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", ) exclude_food_modifier: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="excludeFoodModifier", + default=None, description="This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", ) oral_diet: typing.Optional[NutritionOrderOralDiet] = pydantic.Field( - alias="oralDiet", description="Diet given orally in contrast to enteral (tube) feeding." + alias="oralDiet", default=None, description="Diet given orally in contrast to enteral (tube) feeding." ) supplement: typing.Optional[typing.List[NutritionOrderSupplement]] = pydantic.Field( - description="Oral nutritional products given in order to add further nutritional value to the patient's diet." + default=None, + description="Oral nutritional products given in order to add further nutritional value to the patient's diet.", ) enteral_formula: typing.Optional[NutritionOrderEnteralFormula] = pydantic.Field( alias="enteralFormula", + default=None, description="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the {{title}} by the requester, performer, subject or other participants." + default=None, + description="Comments made about the {{title}} by the requester, performer, subject or other participants.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/nutrition_order_administration.py b/src/metriport/fhir/types/nutrition_order_administration.py index 2d5694f..fb49e14 100644 --- a/src/metriport/fhir/types/nutrition_order_administration.py +++ b/src/metriport/fhir/types/nutrition_order_administration.py @@ -21,27 +21,34 @@ class NutritionOrderAdministration(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) schedule: typing.Optional[Timing] = pydantic.Field( - description="The time period and frequency at which the enteral formula should be delivered to the patient." + default=None, + description="The time period and frequency at which the enteral formula should be delivered to the patient.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The volume of formula to provide to the patient per the specified administration schedule." + default=None, + description="The volume of formula to provide to the patient per the specified administration schedule.", ) rate_quantity: typing.Optional[Quantity] = pydantic.Field( alias="rateQuantity", + default=None, description="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", ) rate_ratio: typing.Optional[Ratio] = pydantic.Field( alias="rateRatio", + default=None, description="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", ) diff --git a/src/metriport/fhir/types/nutrition_order_enteral_formula.py b/src/metriport/fhir/types/nutrition_order_enteral_formula.py index dfc5027..1a54048 100644 --- a/src/metriport/fhir/types/nutrition_order_enteral_formula.py +++ b/src/metriport/fhir/types/nutrition_order_enteral_formula.py @@ -21,48 +21,60 @@ class NutritionOrderEnteralFormula(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) base_formula_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="baseFormulaType", + default=None, description="The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", ) base_formula_product_name: typing.Optional[str] = pydantic.Field( alias="baseFormulaProductName", + default=None, description='The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".', ) additive_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="additiveType", + default=None, description="Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.", ) additive_product_name: typing.Optional[str] = pydantic.Field( alias="additiveProductName", + default=None, description="The product or brand name of the type of modular component to be added to the formula.", ) caloric_density: typing.Optional[Quantity] = pydantic.Field( alias="caloricDensity", + default=None, description="The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.", ) routeof_administration: typing.Optional[CodeableConcept] = pydantic.Field( alias="routeofAdministration", + default=None, description="The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", ) administration: typing.Optional[typing.List[NutritionOrderAdministration]] = pydantic.Field( - description="Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours." + default=None, + description="Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.", ) max_volume_to_deliver: typing.Optional[Quantity] = pydantic.Field( alias="maxVolumeToDeliver", + default=None, description="The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.", ) administration_instruction: typing.Optional[str] = pydantic.Field( alias="administrationInstruction", + default=None, description="Free text formula administration, feeding instructions or additional instructions or information.", ) diff --git a/src/metriport/fhir/types/nutrition_order_nutrient.py b/src/metriport/fhir/types/nutrition_order_nutrient.py index 2726f35..2641804 100644 --- a/src/metriport/fhir/types/nutrition_order_nutrient.py +++ b/src/metriport/fhir/types/nutrition_order_nutrient.py @@ -20,20 +20,23 @@ class NutritionOrderNutrient(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) modifier: typing.Optional[CodeableConcept] = pydantic.Field( - description="The nutrient that is being modified such as carbohydrate or sodium." + default=None, description="The nutrient that is being modified such as carbohydrate or sodium." ) amount: typing.Optional[Quantity] = pydantic.Field( - description="The quantity of the specified nutrient to include in diet." + default=None, description="The quantity of the specified nutrient to include in diet." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/nutrition_order_oral_diet.py b/src/metriport/fhir/types/nutrition_order_oral_diet.py index 2a17e43..bb7b9d3 100644 --- a/src/metriport/fhir/types/nutrition_order_oral_diet.py +++ b/src/metriport/fhir/types/nutrition_order_oral_diet.py @@ -22,33 +22,41 @@ class NutritionOrderOralDiet(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet." + default=None, + description="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.", ) schedule: typing.Optional[typing.List[Timing]] = pydantic.Field( - description="The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present." + default=None, + description="The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.", ) nutrient: typing.Optional[typing.List[NutritionOrderNutrient]] = pydantic.Field( - description="Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet." + default=None, + description="Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.", ) texture: typing.Optional[typing.List[NutritionOrderTexture]] = pydantic.Field( - description="Class that describes any texture modifications required for the patient to safely consume various types of solid foods." + default=None, + description="Class that describes any texture modifications required for the patient to safely consume various types of solid foods.", ) fluid_consistency_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="fluidConsistencyType", + default=None, description="The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.", ) instruction: typing.Optional[str] = pydantic.Field( - description="Free text or additional instructions or information pertaining to the oral diet." + default=None, description="Free text or additional instructions or information pertaining to the oral diet." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/nutrition_order_supplement.py b/src/metriport/fhir/types/nutrition_order_supplement.py index b7c802a..ed855f0 100644 --- a/src/metriport/fhir/types/nutrition_order_supplement.py +++ b/src/metriport/fhir/types/nutrition_order_supplement.py @@ -21,30 +21,37 @@ class NutritionOrderSupplement(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement." + default=None, + description="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", ) product_name: typing.Optional[str] = pydantic.Field( alias="productName", + default=None, description='The product or brand name of the nutritional supplement such as "Acme Protein Shake".', ) schedule: typing.Optional[typing.List[Timing]] = pydantic.Field( - description="The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present." + default=None, + description="The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The amount of the nutritional supplement to be given." + default=None, description="The amount of the nutritional supplement to be given." ) instruction: typing.Optional[str] = pydantic.Field( - description="Free text or additional instructions or information pertaining to the oral supplement." + default=None, + description="Free text or additional instructions or information pertaining to the oral supplement.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/nutrition_order_texture.py b/src/metriport/fhir/types/nutrition_order_texture.py index 3edcf8c..e284bad 100644 --- a/src/metriport/fhir/types/nutrition_order_texture.py +++ b/src/metriport/fhir/types/nutrition_order_texture.py @@ -19,20 +19,25 @@ class NutritionOrderTexture(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) modifier: typing.Optional[CodeableConcept] = pydantic.Field( - description="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed." + default=None, + description="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.", ) food_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="foodType", + default=None, description="The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.", ) diff --git a/src/metriport/fhir/types/observation.py b/src/metriport/fhir/types/observation.py index 6348a3f..236247f 100644 --- a/src/metriport/fhir/types/observation.py +++ b/src/metriport/fhir/types/observation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,135 +31,166 @@ class Observation(BaseResource): Measurements and simple assertions made about a patient, device or other subject. """ - resource_type: typing_extensions.Literal["Observation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Observation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this observation." + default=None, description="A unique identifier assigned to this observation." ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="partOf", + default=None, description="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.", ) - status: typing.Optional[ObservationStatus] = pydantic.Field(description="The status of the result value.") + status: typing.Optional[ObservationStatus] = pydantic.Field( + default=None, description="The status of the result value." + ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that classifies the general type of observation being made." + default=None, description="A code that classifies the general type of observation being made." ) code: CodeableConcept = pydantic.Field( description='Describes what was observed. Sometimes this is called the observation "name".' ) subject: typing.Optional[Reference] = pydantic.Field( - description="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." + default=None, + description="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.", ) focus: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." + default=None, + description="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." + default=None, + description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", ) effective_date_time: typing.Optional[str] = pydantic.Field( alias="effectiveDateTime", + default=None, description='The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.', ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description='The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.', ) effective_timing: typing.Optional[Timing] = pydantic.Field( alias="effectiveTiming", + default=None, description='The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.', ) effective_instant: typing.Optional[str] = pydantic.Field( alias="effectiveInstant", + default=None, description='The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.', ) issued: typing.Optional[Instant] = pydantic.Field( - description="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." + default=None, + description="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", ) performer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description='Who was responsible for asserting the observed value as "true".' + default=None, description='Who was responsible for asserting the observed value as "true".' ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_ratio: typing.Optional[Ratio] = pydantic.Field( alias="valueRatio", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="valueSampledData", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_time: typing.Optional[str] = pydantic.Field( alias="valueTime", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_period: typing.Optional[Period] = pydantic.Field( alias="valuePeriod", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) data_absent_reason: typing.Optional[CodeableConcept] = pydantic.Field( alias="dataAbsentReason", + default=None, description="Provides a reason why the expected value in the element Observation.value[x] is missing.", ) interpretation: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A categorical assessment of an observation value. For example, high, low, normal." + default=None, description="A categorical assessment of an observation value. For example, high, low, normal." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments about the observation or the results." + default=None, description="Comments about the observation or the results." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( alias="bodySite", + default=None, description="Indicates the site on the subject's body where the observation was made (i.e. the target site).", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates the mechanism used to perform the observation." + default=None, description="Indicates the mechanism used to perform the observation." ) specimen: typing.Optional[Reference] = pydantic.Field( - description="The specimen that was used when this observation was made." + default=None, description="The specimen that was used when this observation was made." + ) + device: typing.Optional[Reference] = pydantic.Field( + default=None, description="The device used to generate the observation data." ) - device: typing.Optional[Reference] = pydantic.Field(description="The device used to generate the observation data.") reference_range: typing.Optional[typing.List[ObservationReferenceRange]] = pydantic.Field( alias="referenceRange", + default=None, description='Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used.', ) has_member: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="hasMember", + default=None, description="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.", ) derived_from: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="derivedFrom", + default=None, description="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.", ) component: typing.Optional[typing.List[ObservationComponent]] = pydantic.Field( - description="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." + default=None, + description="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/observation_component.py b/src/metriport/fhir/types/observation_component.py index 814d9ea..40c6a28 100644 --- a/src/metriport/fhir/types/observation_component.py +++ b/src/metriport/fhir/types/observation_component.py @@ -25,13 +25,16 @@ class ObservationComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: CodeableConcept = pydantic.Field( @@ -39,57 +42,70 @@ class ObservationComponent(pydantic.BaseModel): ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_ratio: typing.Optional[Ratio] = pydantic.Field( alias="valueRatio", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="valueSampledData", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_time: typing.Optional[str] = pydantic.Field( alias="valueTime", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) value_period: typing.Optional[Period] = pydantic.Field( alias="valuePeriod", + default=None, description="The information determined as a result of making the observation, if the information has a simple value.", ) data_absent_reason: typing.Optional[CodeableConcept] = pydantic.Field( alias="dataAbsentReason", + default=None, description="Provides a reason why the expected value in the element Observation.component.value[x] is missing.", ) interpretation: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A categorical assessment of an observation value. For example, high, low, normal." + default=None, description="A categorical assessment of an observation value. For example, high, low, normal." ) reference_range: typing.Optional[typing.List[ObservationReferenceRange]] = pydantic.Field( alias="referenceRange", + default=None, description="Guidance on how to interpret the value by comparison to a normal or recommended range.", ) diff --git a/src/metriport/fhir/types/observation_definition.py b/src/metriport/fhir/types/observation_definition.py index 525b8ac..f428996 100644 --- a/src/metriport/fhir/types/observation_definition.py +++ b/src/metriport/fhir/types/observation_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -25,55 +23,65 @@ class ObservationDefinition(BaseResource): Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service. """ - resource_type: typing_extensions.Literal["ObservationDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ObservationDefinition"] = pydantic.Field(alias="resourceType") publisher: typing.Optional[Reference] = pydantic.Field( - description="The name of the individual or organization that published the ObservationDefinition." + default=None, description="The name of the individual or organization that published the ObservationDefinition." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that classifies the general type of observation." + default=None, description="A code that classifies the general type of observation." ) code: CodeableConcept = pydantic.Field( description='Describes what will be observed. Sometimes this is called the observation "name".' ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this ObservationDefinition artifact." + default=None, description="A unique identifier assigned to this ObservationDefinition artifact." ) permitted_data_type: typing.Optional[typing.List[ObservationDefinitionPermittedDataTypeItem]] = pydantic.Field( alias="permittedDataType", + default=None, description="The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.", ) multiple_results_allowed: typing.Optional[bool] = pydantic.Field( alias="multipleResultsAllowed", + default=None, description="Multiple results allowed for observations conforming to this ObservationDefinition.", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="The method or technique used to perform the observation." + default=None, description="The method or technique used to perform the observation." ) preferred_report_name: typing.Optional[str] = pydantic.Field( alias="preferredReportName", + default=None, description="The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.", ) quantitative_details: typing.Optional[ObservationDefinitionQuantitativeDetails] = pydantic.Field( - alias="quantitativeDetails", description="Characteristics for quantitative results of this observation." + alias="quantitativeDetails", + default=None, + description="Characteristics for quantitative results of this observation.", ) qualified_interval: typing.Optional[typing.List[ObservationDefinitionQualifiedInterval]] = pydantic.Field( alias="qualifiedInterval", + default=None, description="Multiple ranges of results qualified by different contexts for ordinal or continuous observations conforming to this ObservationDefinition.", ) valid_coded_value_set: typing.Optional[Reference] = pydantic.Field( alias="validCodedValueSet", + default=None, description="The set of valid coded results for the observations conforming to this ObservationDefinition.", ) normal_coded_value_set: typing.Optional[Reference] = pydantic.Field( alias="normalCodedValueSet", + default=None, description="The set of normal coded results for the observations conforming to this ObservationDefinition.", ) abnormal_coded_value_set: typing.Optional[Reference] = pydantic.Field( alias="abnormalCodedValueSet", + default=None, description="The set of abnormal coded results for the observation conforming to this ObservationDefinition.", ) critical_coded_value_set: typing.Optional[Reference] = pydantic.Field( alias="criticalCodedValueSet", + default=None, description="The set of critical coded results for the observation conforming to this ObservationDefinition.", ) diff --git a/src/metriport/fhir/types/observation_definition_qualified_interval.py b/src/metriport/fhir/types/observation_definition_qualified_interval.py index 68d5c46..ffbcbf0 100644 --- a/src/metriport/fhir/types/observation_definition_qualified_interval.py +++ b/src/metriport/fhir/types/observation_definition_qualified_interval.py @@ -22,39 +22,48 @@ class ObservationDefinitionQualifiedInterval(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: typing.Optional[ObservationDefinitionQualifiedIntervalCategory] = pydantic.Field( - description="The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition." + default=None, + description="The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.", ) range: typing.Optional[Range] = pydantic.Field( - description="The low and high values determining the interval. There may be only one of the two." + default=None, description="The low and high values determining the interval. There may be only one of the two." ) context: typing.Optional[CodeableConcept] = pydantic.Field( - description="Codes to indicate the health context the range applies to. For example, the normal or therapeutic range." + default=None, + description="Codes to indicate the health context the range applies to. For example, the normal or therapeutic range.", ) applies_to: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="appliesTo", description="Codes to indicate the target population this reference range applies to." + alias="appliesTo", + default=None, + description="Codes to indicate the target population this reference range applies to.", ) gender: typing.Optional[ObservationDefinitionQualifiedIntervalGender] = pydantic.Field( - description="Sex of the population the range applies to." + default=None, description="Sex of the population the range applies to." ) age: typing.Optional[Range] = pydantic.Field( - description="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." + default=None, + description="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", ) gestational_age: typing.Optional[Range] = pydantic.Field( alias="gestationalAge", + default=None, description="The gestational age to which this reference range is applicable, in the context of pregnancy.", ) condition: typing.Optional[str] = pydantic.Field( - description="Text based condition for which the reference range is valid." + default=None, description="Text based condition for which the reference range is valid." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/observation_definition_quantitative_details.py b/src/metriport/fhir/types/observation_definition_quantitative_details.py index 3e3c24b..67d9eff 100644 --- a/src/metriport/fhir/types/observation_definition_quantitative_details.py +++ b/src/metriport/fhir/types/observation_definition_quantitative_details.py @@ -20,28 +20,35 @@ class ObservationDefinitionQuantitativeDetails(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) customary_unit: typing.Optional[CodeableConcept] = pydantic.Field( alias="customaryUnit", + default=None, description="Customary unit used to report quantitative results of observations conforming to this ObservationDefinition.", ) unit: typing.Optional[CodeableConcept] = pydantic.Field( - description="SI unit used to report quantitative results of observations conforming to this ObservationDefinition." + default=None, + description="SI unit used to report quantitative results of observations conforming to this ObservationDefinition.", ) conversion_factor: typing.Optional[Decimal] = pydantic.Field( alias="conversionFactor", + default=None, description="Factor for converting value expressed with SI unit to value expressed with customary unit.", ) decimal_precision: typing.Optional[int] = pydantic.Field( alias="decimalPrecision", + default=None, description="Number of digits after decimal separator when the results of such observations are of type Quantity.", ) diff --git a/src/metriport/fhir/types/observation_reference_range.py b/src/metriport/fhir/types/observation_reference_range.py index 70996c0..bb24fba 100644 --- a/src/metriport/fhir/types/observation_reference_range.py +++ b/src/metriport/fhir/types/observation_reference_range.py @@ -21,33 +21,42 @@ class ObservationReferenceRange(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) low: typing.Optional[Quantity] = pydantic.Field( - description="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." + default=None, + description="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).", ) high: typing.Optional[Quantity] = pydantic.Field( - description="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." + default=None, + description="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." + default=None, + description="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", ) applies_to: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="appliesTo", + default=None, description='Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an "AND" of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used.', ) age: typing.Optional[Range] = pydantic.Field( - description="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." + default=None, + description="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", ) text: typing.Optional[str] = pydantic.Field( - description='Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals".' + default=None, + description='Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals".', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/operation_definition.py b/src/metriport/fhir/types/operation_definition.py index d193576..cecd9b8 100644 --- a/src/metriport/fhir/types/operation_definition.py +++ b/src/metriport/fhir/types/operation_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,86 +29,103 @@ class OperationDefinition(BaseResource): A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). """ - resource_type: typing_extensions.Literal["OperationDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OperationDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the operation definition." + default=None, description="A short, descriptive, user-friendly title for the operation definition." ) status: typing.Optional[OperationDefinitionStatus] = pydantic.Field( - description="The status of this operation definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this operation definition. Enables tracking the life-cycle of the content.", ) kind: typing.Optional[OperationDefinitionKind] = pydantic.Field( - description="Whether this is an operation or a named query." + default=None, description="Whether this is an operation or a named query." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes." + default=None, + description="The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the operation definition." + default=None, description="The name of the organization or individual that published the operation definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the operation definition from a consumer's perspective." + default=None, + description="A free text natural language description of the operation definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the operation definition is intended to be used." + default=None, + description="A legal or geographic region in which the operation definition is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this operation definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this operation definition is needed and why it has been designed as it has.", ) affects_state: typing.Optional[bool] = pydantic.Field( alias="affectsState", + default=None, description="Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting state'.", ) - code: typing.Optional[Code] = pydantic.Field(description="The name used to invoke the operation.") + code: typing.Optional[Code] = pydantic.Field(default=None, description="The name used to invoke the operation.") comment: typing.Optional[Markdown] = pydantic.Field( - description="Additional information about how to use this operation or named query." + default=None, description="Additional information about how to use this operation or named query." ) base: typing.Optional[Canonical] = pydantic.Field( - description="Indicates that this operation definition is a constraining profile on the base." + default=None, description="Indicates that this operation definition is a constraining profile on the base." ) resource: typing.Optional[typing.List[Code]] = pydantic.Field( - description="The types on which this operation can be executed." + default=None, description="The types on which this operation can be executed." ) system: typing.Optional[bool] = pydantic.Field( - description="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." + default=None, + description="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", ) type: typing.Optional[bool] = pydantic.Field( - description="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context)." + default=None, + description="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).", ) instance: typing.Optional[bool] = pydantic.Field( - description="Indicates whether this operation can be invoked on a particular instance of one of the given types." + default=None, + description="Indicates whether this operation can be invoked on a particular instance of one of the given types.", ) input_profile: typing.Optional[Canonical] = pydantic.Field( alias="inputProfile", + default=None, description="Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.", ) output_profile: typing.Optional[Canonical] = pydantic.Field( alias="outputProfile", + default=None, description="Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.", ) parameter: typing.Optional[typing.List[OperationDefinitionParameter]] = pydantic.Field( - description="The parameters for the operation/query." + default=None, description="The parameters for the operation/query." ) overload: typing.Optional[typing.List[OperationDefinitionOverload]] = pydantic.Field( - description="Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation." + default=None, + description="Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/operation_definition_binding.py b/src/metriport/fhir/types/operation_definition_binding.py index f062339..0c20624 100644 --- a/src/metriport/fhir/types/operation_definition_binding.py +++ b/src/metriport/fhir/types/operation_definition_binding.py @@ -20,17 +20,21 @@ class OperationDefinitionBinding(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) strength: typing.Optional[OperationDefinitionBindingStrength] = pydantic.Field( - description="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." + default=None, + description="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", ) value_set: Canonical = pydantic.Field( alias="valueSet", diff --git a/src/metriport/fhir/types/operation_definition_overload.py b/src/metriport/fhir/types/operation_definition_overload.py index d9149ef..39db222 100644 --- a/src/metriport/fhir/types/operation_definition_overload.py +++ b/src/metriport/fhir/types/operation_definition_overload.py @@ -18,19 +18,22 @@ class OperationDefinitionOverload(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) parameter_name: typing.Optional[typing.List[str]] = pydantic.Field( - alias="parameterName", description="Name of parameter to include in overload." + alias="parameterName", default=None, description="Name of parameter to include in overload." ) - comment: typing.Optional[str] = pydantic.Field(description="Comments to go on overload.") + comment: typing.Optional[str] = pydantic.Field(default=None, description="Comments to go on overload.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/operation_definition_parameter.py b/src/metriport/fhir/types/operation_definition_parameter.py index f20d9ae..2b89563 100644 --- a/src/metriport/fhir/types/operation_definition_parameter.py +++ b/src/metriport/fhir/types/operation_definition_parameter.py @@ -26,44 +26,55 @@ class OperationDefinitionParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[Code] = pydantic.Field(description="The name of used to identify the parameter.") + name: typing.Optional[Code] = pydantic.Field( + default=None, description="The name of used to identify the parameter." + ) use: typing.Optional[OperationDefinitionParameterUse] = pydantic.Field( - description="Whether this is an input or an output parameter." + default=None, description="Whether this is an input or an output parameter." ) min: typing.Optional[int] = pydantic.Field( - description="The minimum number of times this parameter SHALL appear in the request or response." + default=None, description="The minimum number of times this parameter SHALL appear in the request or response." ) max: typing.Optional[str] = pydantic.Field( - description="The maximum number of times this element is permitted to appear in the request or response." + default=None, + description="The maximum number of times this element is permitted to appear in the request or response.", + ) + documentation: typing.Optional[str] = pydantic.Field( + default=None, description="Describes the meaning or use of this parameter." ) - documentation: typing.Optional[str] = pydantic.Field(description="Describes the meaning or use of this parameter.") - type: typing.Optional[Code] = pydantic.Field(description="The type for this parameter.") + type: typing.Optional[Code] = pydantic.Field(default=None, description="The type for this parameter.") target_profile: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="targetProfile", + default=None, description='Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.', ) search_type: typing.Optional[OperationDefinitionParameterSearchType] = pydantic.Field( alias="searchType", + default=None, description="How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", ) binding: typing.Optional[OperationDefinitionBinding] = pydantic.Field( - description="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." + default=None, description="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." ) referenced_from: typing.Optional[typing.List[OperationDefinitionReferencedFrom]] = pydantic.Field( alias="referencedFrom", + default=None, description="Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.", ) part: typing.Optional[typing.List[OperationDefinitionParameter]] = pydantic.Field( - description="The parts of a nested Parameter." + default=None, description="The parts of a nested Parameter." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/operation_definition_referenced_from.py b/src/metriport/fhir/types/operation_definition_referenced_from.py index a869925..d1e9eb8 100644 --- a/src/metriport/fhir/types/operation_definition_referenced_from.py +++ b/src/metriport/fhir/types/operation_definition_referenced_from.py @@ -18,20 +18,25 @@ class OperationDefinitionReferencedFrom(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) source: typing.Optional[str] = pydantic.Field( - description="The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource." + default=None, + description="The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.", ) source_id: typing.Optional[str] = pydantic.Field( alias="sourceId", + default=None, description="The id of the element in the referencing resource that is expected to resolve to this resource.", ) diff --git a/src/metriport/fhir/types/operation_outcome.py b/src/metriport/fhir/types/operation_outcome.py index d6b5d6f..a955f89 100644 --- a/src/metriport/fhir/types/operation_outcome.py +++ b/src/metriport/fhir/types/operation_outcome.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .operation_outcome_issue import OperationOutcomeIssue @@ -20,11 +18,13 @@ class OperationOutcome(BaseResource): A collection of error, warning, or information messages that result from a system action. """ - resource_type: typing_extensions.Literal["OperationOutcome"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OperationOutcome"] = pydantic.Field(alias="resourceType") issue: typing.List[OperationOutcomeIssue] = pydantic.Field( description="An error, warning, or information message that results from a system action." ) - status: typing.Optional[int] = pydantic.Field(description="Optional HTTP status code returned by the operation.") + status: typing.Optional[int] = pydantic.Field( + default=None, description="Optional HTTP status code returned by the operation." + ) resource: typing.Any = pydantic.Field(description="Optional Resource created or modified by this operation.") def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/operation_outcome_issue.py b/src/metriport/fhir/types/operation_outcome_issue.py index 36ec8df..bd37838 100644 --- a/src/metriport/fhir/types/operation_outcome_issue.py +++ b/src/metriport/fhir/types/operation_outcome_issue.py @@ -21,30 +21,39 @@ class OperationOutcomeIssue(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) severity: typing.Optional[OperationOutcomeIssueSeverity] = pydantic.Field( - description="Indicates whether the issue indicates a variation from successful processing." + default=None, description="Indicates whether the issue indicates a variation from successful processing." ) code: typing.Optional[OperationOutcomeIssueCode] = pydantic.Field( - description="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element." + default=None, + description="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.", ) details: typing.Optional[CodeableConcept] = pydantic.Field( - description="Additional details about the error. This may be a text description of the error or a system code that identifies the error." + default=None, + description="Additional details about the error. This may be a text description of the error or a system code that identifies the error.", + ) + diagnostics: typing.Optional[str] = pydantic.Field( + default=None, description="Additional diagnostic information about the issue." ) - diagnostics: typing.Optional[str] = pydantic.Field(description="Additional diagnostic information about the issue.") location: typing.Optional[typing.List[str]] = pydantic.Field( - description='This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.' + default=None, + description='This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.', ) expression: typing.Optional[typing.List[str]] = pydantic.Field( - description="A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised." + default=None, + description="A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/organization.py b/src/metriport/fhir/types/organization.py index ff07b3f..3183203 100644 --- a/src/metriport/fhir/types/organization.py +++ b/src/metriport/fhir/types/organization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .base_resource import BaseResource @@ -25,32 +23,36 @@ class Organization(BaseResource): A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc. """ - resource_type: typing_extensions.Literal["Organization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Organization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for the organization that is used to identify the organization across multiple disparate systems." + default=None, + description="Identifier for the organization that is used to identify the organization across multiple disparate systems.", ) active: typing.Optional[bool] = pydantic.Field( - description="Whether the organization's record is still in active use." + default=None, description="Whether the organization's record is still in active use." ) type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The kind(s) of organization that this is." + default=None, description="The kind(s) of organization that this is." ) - name: typing.Optional[str] = pydantic.Field(description="A name associated with the organization.") + name: typing.Optional[str] = pydantic.Field(default=None, description="A name associated with the organization.") alias: typing.Optional[typing.List[str]] = pydantic.Field( - description="A list of alternate names that the organization is known as, or was known as in the past." + default=None, + description="A list of alternate names that the organization is known as, or was known as in the past.", ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail for the organization." + default=None, description="A contact detail for the organization." + ) + address: typing.Optional[typing.List[Address]] = pydantic.Field( + default=None, description="An address for the organization." ) - address: typing.Optional[typing.List[Address]] = pydantic.Field(description="An address for the organization.") part_of: typing.Optional[Reference] = pydantic.Field( - alias="partOf", description="The organization of which this organization forms a part." + alias="partOf", default=None, description="The organization of which this organization forms a part." ) contact: typing.Optional[typing.List[OrganizationContact]] = pydantic.Field( - description="Contact for the organization for a certain purpose." + default=None, description="Contact for the organization for a certain purpose." ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Technical endpoints providing access to services operated for the organization." + default=None, description="Technical endpoints providing access to services operated for the organization." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/organization_affiliation.py b/src/metriport/fhir/types/organization_affiliation.py index f035861..c2d6ade 100644 --- a/src/metriport/fhir/types/organization_affiliation.py +++ b/src/metriport/fhir/types/organization_affiliation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,43 +22,46 @@ class OrganizationAffiliation(BaseResource): Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship. """ - resource_type: typing_extensions.Literal["OrganizationAffiliation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OrganizationAffiliation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers that are specific to this role." + default=None, description="Business identifiers that are specific to this role." ) active: typing.Optional[bool] = pydantic.Field( - description="Whether this organization affiliation record is in active use." + default=None, description="Whether this organization affiliation record is in active use." ) period: typing.Optional[Period] = pydantic.Field( - description="The period during which the participatingOrganization is affiliated with the primary organization." + default=None, + description="The period during which the participatingOrganization is affiliated with the primary organization.", ) organization: typing.Optional[Reference] = pydantic.Field( - description="Organization where the role is available (primary organization/has members)." + default=None, description="Organization where the role is available (primary organization/has members)." ) participating_organization: typing.Optional[Reference] = pydantic.Field( alias="participatingOrganization", + default=None, description="The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).", ) network: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)." + default=None, + description="Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).", ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Definition of the role the participatingOrganization plays in the association." + default=None, description="Definition of the role the participatingOrganization plays in the association." ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Specific specialty of the participatingOrganization in the context of the role." + default=None, description="Specific specialty of the participatingOrganization in the context of the role." ) location: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The location(s) at which the role occurs." + default=None, description="The location(s) at which the role occurs." ) healthcare_service: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="healthcareService", description="Healthcare services provided through the role." + alias="healthcareService", default=None, description="Healthcare services provided through the role." ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details at the participatingOrganization relevant to this Affiliation." + default=None, description="Contact details at the participatingOrganization relevant to this Affiliation." ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Technical endpoints providing access to services operated for this role." + default=None, description="Technical endpoints providing access to services operated for this role." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/organization_contact.py b/src/metriport/fhir/types/organization_contact.py index eba3161..8036782 100644 --- a/src/metriport/fhir/types/organization_contact.py +++ b/src/metriport/fhir/types/organization_contact.py @@ -22,23 +22,29 @@ class OrganizationContact(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) purpose: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a purpose for which the contact can be reached." + default=None, description="Indicates a purpose for which the contact can be reached." ) - name: typing.Optional[HumanName] = pydantic.Field(description="A name associated with the contact.") + name: typing.Optional[HumanName] = pydantic.Field(default=None, description="A name associated with the contact.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." + default=None, + description="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", + ) + address: typing.Optional[Address] = pydantic.Field( + default=None, description="Visiting or postal addresses for the contact." ) - address: typing.Optional[Address] = pydantic.Field(description="Visiting or postal addresses for the contact.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/parameter_definition.py b/src/metriport/fhir/types/parameter_definition.py index 202e5ae..8afa2a7 100644 --- a/src/metriport/fhir/types/parameter_definition.py +++ b/src/metriport/fhir/types/parameter_definition.py @@ -21,27 +21,34 @@ class ParameterDefinition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) name: typing.Optional[Code] = pydantic.Field( - description="The name of the parameter used to allow access to the value of the parameter in evaluation contexts." + default=None, + description="The name of the parameter used to allow access to the value of the parameter in evaluation contexts.", + ) + use: typing.Optional[Code] = pydantic.Field( + default=None, description="Whether the parameter is input or output for the module." ) - use: typing.Optional[Code] = pydantic.Field(description="Whether the parameter is input or output for the module.") min: typing.Optional[int] = pydantic.Field( - description="The minimum number of times this parameter SHALL appear in the request or response." + default=None, description="The minimum number of times this parameter SHALL appear in the request or response." ) max: typing.Optional[str] = pydantic.Field( - description="The maximum number of times this element is permitted to appear in the request or response." + default=None, + description="The maximum number of times this element is permitted to appear in the request or response.", ) documentation: typing.Optional[str] = pydantic.Field( - description="A brief discussion of what the parameter is for and how it is used by the module." + default=None, description="A brief discussion of what the parameter is for and how it is used by the module." ) - type: typing.Optional[Code] = pydantic.Field(description="The type of the parameter.") + type: typing.Optional[Code] = pydantic.Field(default=None, description="The type of the parameter.") profile: typing.Optional[Canonical] = pydantic.Field( - description="If specified, this indicates a profile that the input data must conform to, or that the output data will conform to." + default=None, + description="If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/parameters.py b/src/metriport/fhir/types/parameters.py index cde208f..2d556bf 100644 --- a/src/metriport/fhir/types/parameters.py +++ b/src/metriport/fhir/types/parameters.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,20 +21,25 @@ class Parameters(pydantic.BaseModel): This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it. """ - resource_type: typing_extensions.Literal["Parameters"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Parameters"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) parameter: typing.Optional[typing.List[ParametersParameter]] = pydantic.Field( - description="A parameter passed to or received from the operation." + default=None, description="A parameter passed to or received from the operation." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/parameters_parameter.py b/src/metriport/fhir/types/parameters_parameter.py index ad57e23..14ec59f 100644 --- a/src/metriport/fhir/types/parameters_parameter.py +++ b/src/metriport/fhir/types/parameters_parameter.py @@ -51,153 +51,174 @@ class ParametersParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="The name of the parameter (reference to the operation definition)." + default=None, description="The name of the parameter (reference to the operation definition)." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( - alias="valueBase64Binary", description="If the parameter is a data type." + alias="valueBase64Binary", default=None, description="If the parameter is a data type." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="If the parameter is a data type." + alias="valueBoolean", default=None, description="If the parameter is a data type." ) value_canonical: typing.Optional[str] = pydantic.Field( - alias="valueCanonical", description="If the parameter is a data type." + alias="valueCanonical", default=None, description="If the parameter is a data type." + ) + value_code: typing.Optional[str] = pydantic.Field( + alias="valueCode", default=None, description="If the parameter is a data type." + ) + value_date: typing.Optional[str] = pydantic.Field( + alias="valueDate", default=None, description="If the parameter is a data type." ) - value_code: typing.Optional[str] = pydantic.Field(alias="valueCode", description="If the parameter is a data type.") - value_date: typing.Optional[str] = pydantic.Field(alias="valueDate", description="If the parameter is a data type.") value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="If the parameter is a data type." + alias="valueDateTime", default=None, description="If the parameter is a data type." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="If the parameter is a data type." + alias="valueDecimal", default=None, description="If the parameter is a data type." + ) + value_id: typing.Optional[str] = pydantic.Field( + alias="valueId", default=None, description="If the parameter is a data type." ) - value_id: typing.Optional[str] = pydantic.Field(alias="valueId", description="If the parameter is a data type.") value_instant: typing.Optional[str] = pydantic.Field( - alias="valueInstant", description="If the parameter is a data type." + alias="valueInstant", default=None, description="If the parameter is a data type." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="If the parameter is a data type." + alias="valueInteger", default=None, description="If the parameter is a data type." ) value_markdown: typing.Optional[str] = pydantic.Field( - alias="valueMarkdown", description="If the parameter is a data type." + alias="valueMarkdown", default=None, description="If the parameter is a data type." + ) + value_oid: typing.Optional[str] = pydantic.Field( + alias="valueOid", default=None, description="If the parameter is a data type." ) - value_oid: typing.Optional[str] = pydantic.Field(alias="valueOid", description="If the parameter is a data type.") value_positive_int: typing.Optional[float] = pydantic.Field( - alias="valuePositiveInt", description="If the parameter is a data type." + alias="valuePositiveInt", default=None, description="If the parameter is a data type." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="If the parameter is a data type." + alias="valueString", default=None, description="If the parameter is a data type." + ) + value_time: typing.Optional[str] = pydantic.Field( + alias="valueTime", default=None, description="If the parameter is a data type." ) - value_time: typing.Optional[str] = pydantic.Field(alias="valueTime", description="If the parameter is a data type.") value_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="valueUnsignedInt", description="If the parameter is a data type." + alias="valueUnsignedInt", default=None, description="If the parameter is a data type." + ) + value_uri: typing.Optional[str] = pydantic.Field( + alias="valueUri", default=None, description="If the parameter is a data type." + ) + value_url: typing.Optional[str] = pydantic.Field( + alias="valueUrl", default=None, description="If the parameter is a data type." + ) + value_uuid: typing.Optional[str] = pydantic.Field( + alias="valueUuid", default=None, description="If the parameter is a data type." ) - value_uri: typing.Optional[str] = pydantic.Field(alias="valueUri", description="If the parameter is a data type.") - value_url: typing.Optional[str] = pydantic.Field(alias="valueUrl", description="If the parameter is a data type.") - value_uuid: typing.Optional[str] = pydantic.Field(alias="valueUuid", description="If the parameter is a data type.") value_address: typing.Optional[Address] = pydantic.Field( - alias="valueAddress", description="If the parameter is a data type." + alias="valueAddress", default=None, description="If the parameter is a data type." + ) + value_age: typing.Optional[Age] = pydantic.Field( + alias="valueAge", default=None, description="If the parameter is a data type." ) - value_age: typing.Optional[Age] = pydantic.Field(alias="valueAge", description="If the parameter is a data type.") value_annotation: typing.Optional[Annotation] = pydantic.Field( - alias="valueAnnotation", description="If the parameter is a data type." + alias="valueAnnotation", default=None, description="If the parameter is a data type." ) value_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="valueAttachment", description="If the parameter is a data type." + alias="valueAttachment", default=None, description="If the parameter is a data type." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="If the parameter is a data type." + alias="valueCodeableConcept", default=None, description="If the parameter is a data type." ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="If the parameter is a data type." + alias="valueCoding", default=None, description="If the parameter is a data type." ) value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( - alias="valueContactPoint", description="If the parameter is a data type." + alias="valueContactPoint", default=None, description="If the parameter is a data type." ) value_count: typing.Optional[Count] = pydantic.Field( - alias="valueCount", description="If the parameter is a data type." + alias="valueCount", default=None, description="If the parameter is a data type." ) value_distance: typing.Optional[Distance] = pydantic.Field( - alias="valueDistance", description="If the parameter is a data type." + alias="valueDistance", default=None, description="If the parameter is a data type." ) value_duration: typing.Optional[Duration] = pydantic.Field( - alias="valueDuration", description="If the parameter is a data type." + alias="valueDuration", default=None, description="If the parameter is a data type." ) value_human_name: typing.Optional[HumanName] = pydantic.Field( - alias="valueHumanName", description="If the parameter is a data type." + alias="valueHumanName", default=None, description="If the parameter is a data type." ) value_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="valueIdentifier", description="If the parameter is a data type." + alias="valueIdentifier", default=None, description="If the parameter is a data type." ) value_money: typing.Optional[Money] = pydantic.Field( - alias="valueMoney", description="If the parameter is a data type." + alias="valueMoney", default=None, description="If the parameter is a data type." ) value_period: typing.Optional[Period] = pydantic.Field( - alias="valuePeriod", description="If the parameter is a data type." + alias="valuePeriod", default=None, description="If the parameter is a data type." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="If the parameter is a data type." + alias="valueQuantity", default=None, description="If the parameter is a data type." ) value_range: typing.Optional[Range] = pydantic.Field( - alias="valueRange", description="If the parameter is a data type." + alias="valueRange", default=None, description="If the parameter is a data type." ) value_ratio: typing.Optional[Ratio] = pydantic.Field( - alias="valueRatio", description="If the parameter is a data type." + alias="valueRatio", default=None, description="If the parameter is a data type." ) value_reference: typing.Optional[Reference] = pydantic.Field( - alias="valueReference", description="If the parameter is a data type." + alias="valueReference", default=None, description="If the parameter is a data type." ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( - alias="valueSampledData", description="If the parameter is a data type." + alias="valueSampledData", default=None, description="If the parameter is a data type." ) value_signature: typing.Optional[Signature] = pydantic.Field( - alias="valueSignature", description="If the parameter is a data type." + alias="valueSignature", default=None, description="If the parameter is a data type." ) value_timing: typing.Optional[Timing] = pydantic.Field( - alias="valueTiming", description="If the parameter is a data type." + alias="valueTiming", default=None, description="If the parameter is a data type." ) value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( - alias="valueContactDetail", description="If the parameter is a data type." + alias="valueContactDetail", default=None, description="If the parameter is a data type." ) value_contributor: typing.Optional[Contributor] = pydantic.Field( - alias="valueContributor", description="If the parameter is a data type." + alias="valueContributor", default=None, description="If the parameter is a data type." ) value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( - alias="valueDataRequirement", description="If the parameter is a data type." + alias="valueDataRequirement", default=None, description="If the parameter is a data type." ) value_expression: typing.Optional[Expression] = pydantic.Field( - alias="valueExpression", description="If the parameter is a data type." + alias="valueExpression", default=None, description="If the parameter is a data type." ) value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( - alias="valueParameterDefinition", description="If the parameter is a data type." + alias="valueParameterDefinition", default=None, description="If the parameter is a data type." ) value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( - alias="valueRelatedArtifact", description="If the parameter is a data type." + alias="valueRelatedArtifact", default=None, description="If the parameter is a data type." ) value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( - alias="valueTriggerDefinition", description="If the parameter is a data type." + alias="valueTriggerDefinition", default=None, description="If the parameter is a data type." ) value_usage_context: typing.Optional[UsageContext] = pydantic.Field( - alias="valueUsageContext", description="If the parameter is a data type." + alias="valueUsageContext", default=None, description="If the parameter is a data type." ) value_dosage: typing.Optional[Dosage] = pydantic.Field( - alias="valueDosage", description="If the parameter is a data type." + alias="valueDosage", default=None, description="If the parameter is a data type." ) value_meta: typing.Optional[Meta] = pydantic.Field( - alias="valueMeta", description="If the parameter is a data type." + alias="valueMeta", default=None, description="If the parameter is a data type." ) resource: typing.Any = pydantic.Field(description="If the parameter is a whole resource.") part: typing.Optional[typing.List[ParametersParameter]] = pydantic.Field( - description="A named part of a multi-part parameter." + default=None, description="A named part of a multi-part parameter." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/password_change_request.py b/src/metriport/fhir/types/password_change_request.py index 54bd5f4..facce6d 100644 --- a/src/metriport/fhir/types/password_change_request.py +++ b/src/metriport/fhir/types/password_change_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -24,28 +22,35 @@ class PasswordChangeRequest(pydantic.BaseModel): Password change request for the 'forgot password' flow. """ - resource_type: typing_extensions.Literal["PasswordChangeRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PasswordChangeRequest"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) type: typing.Optional[PasswordChangeRequestType] = pydantic.Field( - description="The type of password change request (invite or reset)." + default=None, description="The type of password change request (invite or reset)." ) user: Reference = pydantic.Field(description="The user requesting the password change.") secret: str = pydantic.Field(description="Secret string used to verify the identity of the user.") used: typing.Optional[bool] = pydantic.Field( - description="Whether this request has been used, and is therefore no longer valid." + default=None, description="Whether this request has been used, and is therefore no longer valid." ) redirect_uri: typing.Optional[Uri] = pydantic.Field( - alias="redirectUri", description="Redirect URI used when redirecting a client back to the client application." + alias="redirectUri", + default=None, + description="Redirect URI used when redirecting a client back to the client application.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/patient.py b/src/metriport/fhir/types/patient.py index a49f018..f7d3914 100644 --- a/src/metriport/fhir/types/patient.py +++ b/src/metriport/fhir/types/patient.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -30,54 +28,70 @@ class Patient(BaseResource): Demographics and other administrative information about an individual or animal receiving care or other health-related services. """ - resource_type: typing_extensions.Literal["Patient"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="An identifier for this patient.") + resource_type: typing.Literal["Patient"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="An identifier for this patient." + ) active: typing.Optional[bool] = pydantic.Field( - description="Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death." + default=None, + description="Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", + ) + name: typing.Optional[typing.List[HumanName]] = pydantic.Field( + default=None, description="A name associated with the individual." ) - name: typing.Optional[typing.List[HumanName]] = pydantic.Field(description="A name associated with the individual.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." + default=None, + description="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", ) gender: typing.Optional[PatientGender] = pydantic.Field( - description="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." + default=None, + description="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", ) birth_date: typing.Optional[dt.date] = pydantic.Field( - alias="birthDate", description="The date of birth for the individual." + alias="birthDate", default=None, description="The date of birth for the individual." ) deceased_boolean: typing.Optional[bool] = pydantic.Field( - alias="deceasedBoolean", description="Indicates if the individual is deceased or not." + alias="deceasedBoolean", default=None, description="Indicates if the individual is deceased or not." ) deceased_date_time: typing.Optional[str] = pydantic.Field( - alias="deceasedDateTime", description="Indicates if the individual is deceased or not." + alias="deceasedDateTime", default=None, description="Indicates if the individual is deceased or not." + ) + address: typing.Optional[typing.List[Address]] = pydantic.Field( + default=None, description="An address for the individual." ) - address: typing.Optional[typing.List[Address]] = pydantic.Field(description="An address for the individual.") marital_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="maritalStatus", description="This field contains a patient's most recent marital (civil) status." + alias="maritalStatus", + default=None, + description="This field contains a patient's most recent marital (civil) status.", ) multiple_birth_boolean: typing.Optional[bool] = pydantic.Field( alias="multipleBirthBoolean", + default=None, description="Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", ) multiple_birth_integer: typing.Optional[float] = pydantic.Field( alias="multipleBirthInteger", + default=None, description="Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", ) - photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(description="Image of the patient.") + photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(default=None, description="Image of the patient.") contact: typing.Optional[typing.List[PatientContact]] = pydantic.Field( - description="A contact party (e.g. guardian, partner, friend) for the patient." + default=None, description="A contact party (e.g. guardian, partner, friend) for the patient." ) communication: typing.Optional[typing.List[PatientCommunication]] = pydantic.Field( - description="A language which may be used to communicate with the patient about his or her health." + default=None, + description="A language which may be used to communicate with the patient about his or her health.", ) general_practitioner: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="generalPractitioner", description="Patient's nominated care provider." + alias="generalPractitioner", default=None, description="Patient's nominated care provider." ) managing_organization: typing.Optional[Reference] = pydantic.Field( - alias="managingOrganization", description="Organization that is the custodian of the patient record." + alias="managingOrganization", + default=None, + description="Organization that is the custodian of the patient record.", ) link: typing.Optional[typing.List[PatientLink]] = pydantic.Field( - description="Link to another patient resource that concerns the same actual patient." + default=None, description="Link to another patient resource that concerns the same actual patient." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/patient_communication.py b/src/metriport/fhir/types/patient_communication.py index cfec04e..f4d15d8 100644 --- a/src/metriport/fhir/types/patient_communication.py +++ b/src/metriport/fhir/types/patient_communication.py @@ -19,20 +19,24 @@ class PatientCommunication(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) language: CodeableConcept = pydantic.Field( description='The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.' ) preferred: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." + default=None, + description="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/patient_contact.py b/src/metriport/fhir/types/patient_contact.py index 9daed8e..e668015 100644 --- a/src/metriport/fhir/types/patient_contact.py +++ b/src/metriport/fhir/types/patient_contact.py @@ -25,31 +25,39 @@ class PatientContact(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) relationship: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The nature of the relationship between the patient and the contact person." + default=None, description="The nature of the relationship between the patient and the contact person." + ) + name: typing.Optional[HumanName] = pydantic.Field( + default=None, description="A name associated with the contact person." ) - name: typing.Optional[HumanName] = pydantic.Field(description="A name associated with the contact person.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail for the person, e.g. a telephone number or an email address." + default=None, description="A contact detail for the person, e.g. a telephone number or an email address." ) - address: typing.Optional[Address] = pydantic.Field(description="Address for the contact person.") + address: typing.Optional[Address] = pydantic.Field(default=None, description="Address for the contact person.") gender: typing.Optional[PatientContactGender] = pydantic.Field( - description="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." + default=None, + description="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", ) organization: typing.Optional[Reference] = pydantic.Field( - description="Organization on behalf of which the contact is acting or for which the contact is working." + default=None, + description="Organization on behalf of which the contact is acting or for which the contact is working.", ) period: typing.Optional[Period] = pydantic.Field( - description="The period during which this contact person or organization is valid to be contacted relating to this patient." + default=None, + description="The period during which this contact person or organization is valid to be contacted relating to this patient.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/patient_link.py b/src/metriport/fhir/types/patient_link.py index 1e5d99e..f73801f 100644 --- a/src/metriport/fhir/types/patient_link.py +++ b/src/metriport/fhir/types/patient_link.py @@ -20,18 +20,21 @@ class PatientLink(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) other: Reference = pydantic.Field(description="The other patient resource that the link refers to.") type: typing.Optional[PatientLinkType] = pydantic.Field( - description="The type of link between this patient resource and another patient resource." + default=None, description="The type of link between this patient resource and another patient resource." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/payment_notice.py b/src/metriport/fhir/types/payment_notice.py index bb1d2ca..cebe688 100644 --- a/src/metriport/fhir/types/payment_notice.py +++ b/src/metriport/fhir/types/payment_notice.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -25,32 +23,35 @@ class PaymentNotice(BaseResource): This resource provides the status of the payment for goods and services rendered, and the request and response resource references. """ - resource_type: typing_extensions.Literal["PaymentNotice"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PaymentNotice"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this payment notice." + default=None, description="A unique identifier assigned to this payment notice." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") request: typing.Optional[Reference] = pydantic.Field( - description="Reference of resource for which payment is being made." + default=None, description="Reference of resource for which payment is being made." ) response: typing.Optional[Reference] = pydantic.Field( - description="Reference of response to resource for which payment is being made." + default=None, description="Reference of response to resource for which payment is being made." + ) + created: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date when this resource was created." ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date when this resource was created.") provider: typing.Optional[Reference] = pydantic.Field( - description="The practitioner who is responsible for the services rendered to the patient." + default=None, description="The practitioner who is responsible for the services rendered to the patient." ) payment: Reference = pydantic.Field(description="A reference to the payment which is the subject of this notice.") payment_date: typing.Optional[dt.date] = pydantic.Field( - alias="paymentDate", description="The date when the above payment action occurred." + alias="paymentDate", default=None, description="The date when the above payment action occurred." ) payee: typing.Optional[Reference] = pydantic.Field( - description="The party who will receive or has received payment that is the subject of this notification." + default=None, + description="The party who will receive or has received payment that is the subject of this notification.", ) recipient: Reference = pydantic.Field(description="The party who is notified of the payment status.") amount: Money = pydantic.Field(description="The amount sent to the payee.") payment_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="paymentStatus", description="A code indicating whether payment has been sent or cleared." + alias="paymentStatus", default=None, description="A code indicating whether payment has been sent or cleared." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/payment_reconciliation.py b/src/metriport/fhir/types/payment_reconciliation.py index 0610d93..c437590 100644 --- a/src/metriport/fhir/types/payment_reconciliation.py +++ b/src/metriport/fhir/types/payment_reconciliation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,45 +27,52 @@ class PaymentReconciliation(BaseResource): This resource provides the details including amount of a payment and allocates the payment items being paid. """ - resource_type: typing_extensions.Literal["PaymentReconciliation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PaymentReconciliation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this payment reconciliation." + default=None, description="A unique identifier assigned to this payment reconciliation." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") period: typing.Optional[Period] = pydantic.Field( - description="The period of time for which payments have been gathered into this bulk payment for settlement." + default=None, + description="The period of time for which payments have been gathered into this bulk payment for settlement.", + ) + created: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The date when the resource was created." ) - created: typing.Optional[DateTime] = pydantic.Field(description="The date when the resource was created.") payment_issuer: typing.Optional[Reference] = pydantic.Field( - alias="paymentIssuer", description="The party who generated the payment." + alias="paymentIssuer", default=None, description="The party who generated the payment." + ) + request: typing.Optional[Reference] = pydantic.Field( + default=None, description="Original request resource reference." ) - request: typing.Optional[Reference] = pydantic.Field(description="Original request resource reference.") requestor: typing.Optional[Reference] = pydantic.Field( - description="The practitioner who is responsible for the services rendered to the patient." + default=None, description="The practitioner who is responsible for the services rendered to the patient." ) outcome: typing.Optional[PaymentReconciliationOutcome] = pydantic.Field( - description="The outcome of a request for a reconciliation." + default=None, description="The outcome of a request for a reconciliation." ) disposition: typing.Optional[str] = pydantic.Field( - description="A human readable description of the status of the request for the reconciliation." + default=None, description="A human readable description of the status of the request for the reconciliation." ) payment_date: typing.Optional[dt.date] = pydantic.Field( - alias="paymentDate", description="The date of payment as indicated on the financial instrument." + alias="paymentDate", default=None, description="The date of payment as indicated on the financial instrument." ) payment_amount: Money = pydantic.Field( alias="paymentAmount", description="Total payment amount as indicated on the financial instrument." ) payment_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="paymentIdentifier", description="Issuer's unique identifier for the payment instrument." + alias="paymentIdentifier", default=None, description="Issuer's unique identifier for the payment instrument." ) detail: typing.Optional[typing.List[PaymentReconciliationDetail]] = pydantic.Field( - description="Distribution of the payment amount for a previously acknowledged payable." + default=None, description="Distribution of the payment amount for a previously acknowledged payable." ) form_code: typing.Optional[CodeableConcept] = pydantic.Field( - alias="formCode", description="A code for the form to be used for printing the content." + alias="formCode", default=None, description="A code for the form to be used for printing the content." ) process_note: typing.Optional[typing.List[PaymentReconciliationProcessNote]] = pydantic.Field( - alias="processNote", description="A note that describes or explains the processing in a human readable form." + alias="processNote", + default=None, + description="A note that describes or explains the processing in a human readable form.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/payment_reconciliation_detail.py b/src/metriport/fhir/types/payment_reconciliation_detail.py index 130dcc6..3f22bc3 100644 --- a/src/metriport/fhir/types/payment_reconciliation_detail.py +++ b/src/metriport/fhir/types/payment_reconciliation_detail.py @@ -22,40 +22,46 @@ class PaymentReconciliationDetail(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Unique identifier for the current payment item for the referenced payable." + default=None, description="Unique identifier for the current payment item for the referenced payable." ) predecessor: typing.Optional[Identifier] = pydantic.Field( - description="Unique identifier for the prior payment item for the referenced payable." + default=None, description="Unique identifier for the prior payment item for the referenced payable." ) type: CodeableConcept = pydantic.Field(description="Code to indicate the nature of the payment.") request: typing.Optional[Reference] = pydantic.Field( - description="A resource, such as a Claim, the evaluation of which could lead to payment." + default=None, description="A resource, such as a Claim, the evaluation of which could lead to payment." ) submitter: typing.Optional[Reference] = pydantic.Field( - description="The party which submitted the claim or financial transaction." + default=None, description="The party which submitted the claim or financial transaction." ) response: typing.Optional[Reference] = pydantic.Field( - description="A resource, such as a ClaimResponse, which contains a commitment to payment." + default=None, description="A resource, such as a ClaimResponse, which contains a commitment to payment." ) date: typing.Optional[dt.date] = pydantic.Field( - description="The date from the response resource containing a commitment to pay." + default=None, description="The date from the response resource containing a commitment to pay." ) responsible: typing.Optional[Reference] = pydantic.Field( - description="A reference to the individual who is responsible for inquiries regarding the response and its payment." + default=None, + description="A reference to the individual who is responsible for inquiries regarding the response and its payment.", + ) + payee: typing.Optional[Reference] = pydantic.Field( + default=None, description="The party which is receiving the payment." ) - payee: typing.Optional[Reference] = pydantic.Field(description="The party which is receiving the payment.") amount: typing.Optional[Money] = pydantic.Field( - description="The monetary amount allocated from the total payment to the payable." + default=None, description="The monetary amount allocated from the total payment to the payable." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/payment_reconciliation_process_note.py b/src/metriport/fhir/types/payment_reconciliation_process_note.py index 12947d7..bbfd52e 100644 --- a/src/metriport/fhir/types/payment_reconciliation_process_note.py +++ b/src/metriport/fhir/types/payment_reconciliation_process_note.py @@ -19,20 +19,23 @@ class PaymentReconciliationProcessNote(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[PaymentReconciliationProcessNoteType] = pydantic.Field( - description="The business purpose of the note text." + default=None, description="The business purpose of the note text." ) text: typing.Optional[str] = pydantic.Field( - description="The explanation or description associated with the processing." + default=None, description="The explanation or description associated with the processing." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/period.py b/src/metriport/fhir/types/period.py index 2d89f3b..07b9fdc 100644 --- a/src/metriport/fhir/types/period.py +++ b/src/metriport/fhir/types/period.py @@ -20,14 +20,19 @@ class Period(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + ) + start: typing.Optional[DateTime] = pydantic.Field( + default=None, description="The start of the period. The boundary is inclusive." ) - start: typing.Optional[DateTime] = pydantic.Field(description="The start of the period. The boundary is inclusive.") end: typing.Optional[DateTime] = pydantic.Field( - description="The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." + default=None, + description="The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/person.py b/src/metriport/fhir/types/person.py index a229160..2914140 100644 --- a/src/metriport/fhir/types/person.py +++ b/src/metriport/fhir/types/person.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -27,28 +25,37 @@ class Person(BaseResource): Demographics and administrative information about a person independent of a specific health-related context. """ - resource_type: typing_extensions.Literal["Person"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Person"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for a person within a particular scope." + default=None, description="Identifier for a person within a particular scope." + ) + name: typing.Optional[typing.List[HumanName]] = pydantic.Field( + default=None, description="A name associated with the person." ) - name: typing.Optional[typing.List[HumanName]] = pydantic.Field(description="A name associated with the person.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail for the person, e.g. a telephone number or an email address." + default=None, description="A contact detail for the person, e.g. a telephone number or an email address." ) - gender: typing.Optional[PersonGender] = pydantic.Field(description="Administrative Gender.") + gender: typing.Optional[PersonGender] = pydantic.Field(default=None, description="Administrative Gender.") birth_date: typing.Optional[dt.date] = pydantic.Field( - alias="birthDate", description="The birth date for the person." + alias="birthDate", default=None, description="The birth date for the person." + ) + address: typing.Optional[typing.List[Address]] = pydantic.Field( + default=None, description="One or more addresses for the person." ) - address: typing.Optional[typing.List[Address]] = pydantic.Field(description="One or more addresses for the person.") photo: typing.Optional[Attachment] = pydantic.Field( - description="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual." + default=None, + description="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.", ) managing_organization: typing.Optional[Reference] = pydantic.Field( - alias="managingOrganization", description="The organization that is the custodian of the person record." + alias="managingOrganization", + default=None, + description="The organization that is the custodian of the person record.", + ) + active: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether this person's record is in active use." ) - active: typing.Optional[bool] = pydantic.Field(description="Whether this person's record is in active use.") link: typing.Optional[typing.List[PersonLink]] = pydantic.Field( - description="Link to a resource that concerns the same actual person." + default=None, description="Link to a resource that concerns the same actual person." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/person_link.py b/src/metriport/fhir/types/person_link.py index 5ea7052..cc76fd2 100644 --- a/src/metriport/fhir/types/person_link.py +++ b/src/metriport/fhir/types/person_link.py @@ -20,18 +20,21 @@ class PersonLink(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) target: Reference = pydantic.Field(description="The resource to which this actual person is associated.") assurance: typing.Optional[PersonLinkAssurance] = pydantic.Field( - description="Level of assurance that this link is associated with the target resource." + default=None, description="Level of assurance that this link is associated with the target resource." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition.py b/src/metriport/fhir/types/plan_definition.py index eb3422f..f90b5c2 100644 --- a/src/metriport/fhir/types/plan_definition.py +++ b/src/metriport/fhir/types/plan_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,109 +31,135 @@ class PlanDefinition(BaseResource): This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. """ - resource_type: typing_extensions.Literal["PlanDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PlanDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the plan definition." + default=None, description="A short, descriptive, user-friendly title for the plan definition." ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the plan definition giving additional information about its content." + default=None, + description="An explanatory or alternate title for the plan definition giving additional information about its content.", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition." + default=None, + description="A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.", ) status: typing.Optional[PlanDefinitionStatus] = pydantic.Field( - description="The status of this plan definition. Enables tracking the life-cycle of the content." + default=None, description="The status of this plan definition. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="A code or group definition that describes the intended subject of the plan definition.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="A code or group definition that describes the intended subject of the plan definition.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes." + default=None, + description="The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the plan definition." + default=None, description="The name of the organization or individual that published the plan definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the plan definition from a consumer's perspective." + default=None, + description="A free text natural language description of the plan definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the plan definition is intended to be used." + default=None, description="A legal or geographic region in which the plan definition is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this plan definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this plan definition is needed and why it has been designed as it has.", ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description of how the plan definition is used from a clinical perspective." + default=None, + description="A detailed description of how the plan definition is used from a clinical perspective.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition." + default=None, + description="A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the plan definition content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) library: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A reference to a Library resource containing any formal logic used by the plan definition." + default=None, + description="A reference to a Library resource containing any formal logic used by the plan definition.", ) goal: typing.Optional[typing.List[PlanDefinitionGoal]] = pydantic.Field( - description="Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc." + default=None, + description="Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.", ) action: typing.Optional[typing.List[PlanDefinitionAction]] = pydantic.Field( - description="An action or group of actions to be taken as part of the plan." + default=None, description="An action or group of actions to be taken as part of the plan." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_action.py b/src/metriport/fhir/types/plan_definition_action.py index 91f4f5d..173bf76 100644 --- a/src/metriport/fhir/types/plan_definition_action.py +++ b/src/metriport/fhir/types/plan_definition_action.py @@ -42,120 +42,154 @@ class PlanDefinitionAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - prefix: typing.Optional[str] = pydantic.Field(description="A user-visible prefix for the action.") - title: typing.Optional[str] = pydantic.Field(description="The title of the action displayed to a user.") + prefix: typing.Optional[str] = pydantic.Field(default=None, description="A user-visible prefix for the action.") + title: typing.Optional[str] = pydantic.Field( + default=None, description="The title of the action displayed to a user." + ) description: typing.Optional[str] = pydantic.Field( - description="A brief description of the action used to provide a summary to display to the user." + default=None, description="A brief description of the action used to provide a summary to display to the user." ) text_equivalent: typing.Optional[str] = pydantic.Field( alias="textEquivalent", + default=None, description="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the action should be addressed with respect to other actions." + default=None, description="Indicates how quickly the action should be addressed with respect to other actions." ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template." + default=None, + description="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.", ) reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A description of why this action is necessary or appropriate." + default=None, description="A description of why this action is necessary or appropriate." ) documentation: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( - description="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." + default=None, + description="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", ) goal_id: typing.Optional[typing.List[Id]] = pydantic.Field( alias="goalId", + default=None, description="Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="A code or group definition that describes the intended subject of the action and its children, if any.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="A code or group definition that describes the intended subject of the action and its children, if any.", ) trigger: typing.Optional[typing.List[TriggerDefinition]] = pydantic.Field( - description="A description of when the action should be triggered." + default=None, description="A description of when the action should be triggered." ) condition: typing.Optional[typing.List[PlanDefinitionCondition]] = pydantic.Field( - description="An expression that describes applicability criteria or start/stop conditions for the action." + default=None, + description="An expression that describes applicability criteria or start/stop conditions for the action.", ) input: typing.Optional[typing.List[DataRequirement]] = pydantic.Field( - description="Defines input data requirements for the action." + default=None, description="Defines input data requirements for the action." ) output: typing.Optional[typing.List[DataRequirement]] = pydantic.Field( - description="Defines the outputs of the action, if any." + default=None, description="Defines the outputs of the action, if any." ) related_action: typing.Optional[typing.List[PlanDefinitionRelatedAction]] = pydantic.Field( alias="relatedAction", + default=None, description='A relationship to another action such as "before" or "30-60 minutes after start of".', ) timing_date_time: typing.Optional[str] = pydantic.Field( - alias="timingDateTime", description="An optional value describing when the action should be performed." + alias="timingDateTime", + default=None, + description="An optional value describing when the action should be performed.", ) timing_age: typing.Optional[Age] = pydantic.Field( - alias="timingAge", description="An optional value describing when the action should be performed." + alias="timingAge", default=None, description="An optional value describing when the action should be performed." ) timing_period: typing.Optional[Period] = pydantic.Field( - alias="timingPeriod", description="An optional value describing when the action should be performed." + alias="timingPeriod", + default=None, + description="An optional value describing when the action should be performed.", ) timing_duration: typing.Optional[Duration] = pydantic.Field( - alias="timingDuration", description="An optional value describing when the action should be performed." + alias="timingDuration", + default=None, + description="An optional value describing when the action should be performed.", ) timing_range: typing.Optional[Range] = pydantic.Field( - alias="timingRange", description="An optional value describing when the action should be performed." + alias="timingRange", + default=None, + description="An optional value describing when the action should be performed.", ) timing_timing: typing.Optional[Timing] = pydantic.Field( - alias="timingTiming", description="An optional value describing when the action should be performed." + alias="timingTiming", + default=None, + description="An optional value describing when the action should be performed.", ) participant: typing.Optional[typing.List[PlanDefinitionParticipant]] = pydantic.Field( - description="Indicates who should participate in performing the action described." + default=None, description="Indicates who should participate in performing the action described." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of action to perform (create, update, remove)." + default=None, description="The type of action to perform (create, update, remove)." ) grouping_behavior: typing.Optional[PlanDefinitionActionGroupingBehavior] = pydantic.Field( - alias="groupingBehavior", description="Defines the grouping behavior for the action and its children." + alias="groupingBehavior", + default=None, + description="Defines the grouping behavior for the action and its children.", ) selection_behavior: typing.Optional[PlanDefinitionActionSelectionBehavior] = pydantic.Field( - alias="selectionBehavior", description="Defines the selection behavior for the action and its children." + alias="selectionBehavior", + default=None, + description="Defines the selection behavior for the action and its children.", ) required_behavior: typing.Optional[PlanDefinitionActionRequiredBehavior] = pydantic.Field( - alias="requiredBehavior", description="Defines the required behavior for the action." + alias="requiredBehavior", default=None, description="Defines the required behavior for the action." ) precheck_behavior: typing.Optional[PlanDefinitionActionPrecheckBehavior] = pydantic.Field( - alias="precheckBehavior", description="Defines whether the action should usually be preselected." + alias="precheckBehavior", default=None, description="Defines whether the action should usually be preselected." ) cardinality_behavior: typing.Optional[PlanDefinitionActionCardinalityBehavior] = pydantic.Field( - alias="cardinalityBehavior", description="Defines whether the action can be selected multiple times." + alias="cardinalityBehavior", + default=None, + description="Defines whether the action can be selected multiple times.", ) definition_canonical: typing.Optional[str] = pydantic.Field( alias="definitionCanonical", + default=None, description="A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", ) definition_uri: typing.Optional[str] = pydantic.Field( alias="definitionUri", + default=None, description="A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", ) transform: typing.Optional[Canonical] = pydantic.Field( - description="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input." + default=None, + description="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", ) dynamic_value: typing.Optional[typing.List[PlanDefinitionDynamicValue]] = pydantic.Field( alias="dynamicValue", + default=None, description="Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", ) action: typing.Optional[typing.List[PlanDefinitionAction]] = pydantic.Field( - description="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition." + default=None, + description="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_condition.py b/src/metriport/fhir/types/plan_definition_condition.py index f85ab51..e4bdd9f 100644 --- a/src/metriport/fhir/types/plan_definition_condition.py +++ b/src/metriport/fhir/types/plan_definition_condition.py @@ -20,18 +20,24 @@ class PlanDefinitionCondition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - kind: typing.Optional[PlanDefinitionConditionKind] = pydantic.Field(description="The kind of condition.") + kind: typing.Optional[PlanDefinitionConditionKind] = pydantic.Field( + default=None, description="The kind of condition." + ) expression: typing.Optional[Expression] = pydantic.Field( - description="An expression that returns true or false, indicating whether the condition is satisfied." + default=None, + description="An expression that returns true or false, indicating whether the condition is satisfied.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_dynamic_value.py b/src/metriport/fhir/types/plan_definition_dynamic_value.py index f8cc442..7c80ec4 100644 --- a/src/metriport/fhir/types/plan_definition_dynamic_value.py +++ b/src/metriport/fhir/types/plan_definition_dynamic_value.py @@ -19,20 +19,24 @@ class PlanDefinitionDynamicValue(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) path: typing.Optional[str] = pydantic.Field( - description="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)." + default=None, + description="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).", ) expression: typing.Optional[Expression] = pydantic.Field( - description="An expression specifying the value of the customized element." + default=None, description="An expression specifying the value of the customized element." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_goal.py b/src/metriport/fhir/types/plan_definition_goal.py index 9ad7528..15cbfe1 100644 --- a/src/metriport/fhir/types/plan_definition_goal.py +++ b/src/metriport/fhir/types/plan_definition_goal.py @@ -21,35 +21,41 @@ class PlanDefinitionGoal(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates a category the goal falls within." + default=None, description="Indicates a category the goal falls within." ) description: CodeableConcept = pydantic.Field( description='Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".' ) priority: typing.Optional[CodeableConcept] = pydantic.Field( - description="Identifies the expected level of importance associated with reaching/sustaining the defined goal." + default=None, + description="Identifies the expected level of importance associated with reaching/sustaining the defined goal.", ) start: typing.Optional[CodeableConcept] = pydantic.Field( - description="The event after which the goal should begin being pursued." + default=None, description="The event after which the goal should begin being pursued." ) addresses: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Identifies problems, conditions, issues, or concerns the goal is intended to address." + default=None, + description="Identifies problems, conditions, issues, or concerns the goal is intended to address.", ) documentation: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( - description="Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources." + default=None, + description="Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.", ) target: typing.Optional[typing.List[PlanDefinitionTarget]] = pydantic.Field( - description="Indicates what should be done and within what timeframe." + default=None, description="Indicates what should be done and within what timeframe." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_participant.py b/src/metriport/fhir/types/plan_definition_participant.py index e757c38..09c00b0 100644 --- a/src/metriport/fhir/types/plan_definition_participant.py +++ b/src/metriport/fhir/types/plan_definition_participant.py @@ -20,20 +20,23 @@ class PlanDefinitionParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[PlanDefinitionParticipantType] = pydantic.Field( - description="The type of participant in the action." + default=None, description="The type of participant in the action." ) role: typing.Optional[CodeableConcept] = pydantic.Field( - description="The role the participant should play in performing the described action." + default=None, description="The role the participant should play in performing the described action." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/plan_definition_related_action.py b/src/metriport/fhir/types/plan_definition_related_action.py index d30ac38..69ab5ed 100644 --- a/src/metriport/fhir/types/plan_definition_related_action.py +++ b/src/metriport/fhir/types/plan_definition_related_action.py @@ -22,27 +22,32 @@ class PlanDefinitionRelatedAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action_id: typing.Optional[Id] = pydantic.Field( - alias="actionId", description="The element id of the related action." + alias="actionId", default=None, description="The element id of the related action." ) relationship: typing.Optional[PlanDefinitionRelatedActionRelationship] = pydantic.Field( - description="The relationship of this action to the related action." + default=None, description="The relationship of this action to the related action." ) offset_duration: typing.Optional[Duration] = pydantic.Field( alias="offsetDuration", + default=None, description="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", ) offset_range: typing.Optional[Range] = pydantic.Field( alias="offsetRange", + default=None, description="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", ) diff --git a/src/metriport/fhir/types/plan_definition_target.py b/src/metriport/fhir/types/plan_definition_target.py index 7cad70f..2d0be30 100644 --- a/src/metriport/fhir/types/plan_definition_target.py +++ b/src/metriport/fhir/types/plan_definition_target.py @@ -22,32 +22,39 @@ class PlanDefinitionTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) measure: typing.Optional[CodeableConcept] = pydantic.Field( - description="The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." + default=None, + description="The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", ) detail_quantity: typing.Optional[Quantity] = pydantic.Field( alias="detailQuantity", + default=None, description="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", ) detail_range: typing.Optional[Range] = pydantic.Field( alias="detailRange", + default=None, description="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", ) detail_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="detailCodeableConcept", + default=None, description="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", ) due: typing.Optional[Duration] = pydantic.Field( - description="Indicates the timeframe after the start of the goal in which the goal should be met." + default=None, description="Indicates the timeframe after the start of the goal in which the goal should be met." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/population.py b/src/metriport/fhir/types/population.py index 879b023..87f676e 100644 --- a/src/metriport/fhir/types/population.py +++ b/src/metriport/fhir/types/population.py @@ -20,25 +20,33 @@ class Population(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) age_range: typing.Optional[Range] = pydantic.Field( - alias="ageRange", description="The age of the specific population." + alias="ageRange", default=None, description="The age of the specific population." ) age_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="ageCodeableConcept", description="The age of the specific population." + alias="ageCodeableConcept", default=None, description="The age of the specific population." + ) + gender: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The gender of the specific population." + ) + race: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Race of the specific population." ) - gender: typing.Optional[CodeableConcept] = pydantic.Field(description="The gender of the specific population.") - race: typing.Optional[CodeableConcept] = pydantic.Field(description="Race of the specific population.") physiological_condition: typing.Optional[CodeableConcept] = pydantic.Field( alias="physiologicalCondition", + default=None, description="The existing physiological conditions of the specific population to which this applies.", ) diff --git a/src/metriport/fhir/types/practitioner.py b/src/metriport/fhir/types/practitioner.py index 0b15f2d..44f6e59 100644 --- a/src/metriport/fhir/types/practitioner.py +++ b/src/metriport/fhir/types/practitioner.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -27,35 +25,40 @@ class Practitioner(BaseResource): A person who is directly or indirectly involved in the provisioning of healthcare. """ - resource_type: typing_extensions.Literal["Practitioner"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Practitioner"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="An identifier that applies to this person in this role." + default=None, description="An identifier that applies to this person in this role." + ) + active: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether this practitioner's record is in active use." ) - active: typing.Optional[bool] = pydantic.Field(description="Whether this practitioner's record is in active use.") name: typing.Optional[typing.List[HumanName]] = pydantic.Field( - description="The name(s) associated with the practitioner." + default=None, description="The name(s) associated with the practitioner." ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail for the practitioner, e.g. a telephone number or an email address." + default=None, description="A contact detail for the practitioner, e.g. a telephone number or an email address." ) address: typing.Optional[typing.List[Address]] = pydantic.Field( + default=None, description=( "Address(es) of the practitioner that are not role specific (typically home address).\n" "Work addresses are not typically entered in this property as they are usually role dependent.\n" - ) + ), ) gender: typing.Optional[PractitionerGender] = pydantic.Field( - description="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." + default=None, + description="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", ) birth_date: typing.Optional[dt.date] = pydantic.Field( - alias="birthDate", description="The date of birth for the practitioner." + alias="birthDate", default=None, description="The date of birth for the practitioner." ) - photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(description="Image of the person.") + photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(default=None, description="Image of the person.") qualification: typing.Optional[typing.List[PractitionerQualification]] = pydantic.Field( - description="The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality." + default=None, + description="The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.", ) communication: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A language the practitioner can use in patient communication." + default=None, description="A language the practitioner can use in patient communication." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/practitioner_qualification.py b/src/metriport/fhir/types/practitioner_qualification.py index 9f6191b..85ce27a 100644 --- a/src/metriport/fhir/types/practitioner_qualification.py +++ b/src/metriport/fhir/types/practitioner_qualification.py @@ -22,22 +22,27 @@ class PractitionerQualification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="An identifier that applies to this person's qualification in this role." + default=None, description="An identifier that applies to this person's qualification in this role." ) code: CodeableConcept = pydantic.Field(description="Coded representation of the qualification.") - period: typing.Optional[Period] = pydantic.Field(description="Period during which the qualification is valid.") + period: typing.Optional[Period] = pydantic.Field( + default=None, description="Period during which the qualification is valid." + ) issuer: typing.Optional[Reference] = pydantic.Field( - description="Organization that regulates and issues the qualification." + default=None, description="Organization that regulates and issues the qualification." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/practitioner_role.py b/src/metriport/fhir/types/practitioner_role.py index 13da77c..7736ba0 100644 --- a/src/metriport/fhir/types/practitioner_role.py +++ b/src/metriport/fhir/types/practitioner_role.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,52 +24,58 @@ class PractitionerRole(BaseResource): A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. """ - resource_type: typing_extensions.Literal["PractitionerRole"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PractitionerRole"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business Identifiers that are specific to a role/location." + default=None, description="Business Identifiers that are specific to a role/location." ) active: typing.Optional[bool] = pydantic.Field( - description="Whether this practitioner role record is in active use." + default=None, description="Whether this practitioner role record is in active use." ) period: typing.Optional[Period] = pydantic.Field( - description="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." + default=None, + description="The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", ) practitioner: typing.Optional[Reference] = pydantic.Field( - description="Practitioner that is able to provide the defined services for the organization." + default=None, description="Practitioner that is able to provide the defined services for the organization." ) organization: typing.Optional[Reference] = pydantic.Field( - description="The organization where the Practitioner performs the roles associated." + default=None, description="The organization where the Practitioner performs the roles associated." ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Roles which this practitioner is authorized to perform for the organization." + default=None, description="Roles which this practitioner is authorized to perform for the organization." ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Specific specialty of the practitioner." + default=None, description="Specific specialty of the practitioner." ) location: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The location(s) at which this practitioner provides care." + default=None, description="The location(s) at which this practitioner provides care." ) healthcare_service: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="healthcareService", + default=None, description="The list of healthcare services that this worker provides for this role's Organization/Location(s).", ) telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details that are specific to the role/location/service." + default=None, description="Contact details that are specific to the role/location/service." ) available_time: typing.Optional[typing.List[PractitionerRoleAvailableTime]] = pydantic.Field( alias="availableTime", + default=None, description="A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.", ) not_available: typing.Optional[typing.List[PractitionerRoleNotAvailable]] = pydantic.Field( alias="notAvailable", + default=None, description="The practitioner is not available or performing this role during this period of time due to the provided reason.", ) availability_exceptions: typing.Optional[str] = pydantic.Field( alias="availabilityExceptions", + default=None, description="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", ) endpoint: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Technical endpoints providing access to services operated for the practitioner with this role." + default=None, + description="Technical endpoints providing access to services operated for the practitioner with this role.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/practitioner_role_available_time.py b/src/metriport/fhir/types/practitioner_role_available_time.py index f181dfc..3210185 100644 --- a/src/metriport/fhir/types/practitioner_role_available_time.py +++ b/src/metriport/fhir/types/practitioner_role_available_time.py @@ -20,28 +20,36 @@ class PractitionerRoleAvailableTime(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) days_of_week: typing.Optional[typing.List[Code]] = pydantic.Field( alias="daysOfWeek", + default=None, description="Indicates which days of the week are available between the start and end Times.", ) all_day: typing.Optional[bool] = pydantic.Field( - alias="allDay", description="Is this always available? (hence times are irrelevant) e.g. 24 hour service." + alias="allDay", + default=None, + description="Is this always available? (hence times are irrelevant) e.g. 24 hour service.", ) available_start_time: typing.Optional[Time] = pydantic.Field( alias="availableStartTime", + default=None, description="The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", ) available_end_time: typing.Optional[Time] = pydantic.Field( alias="availableEndTime", + default=None, description="The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", ) diff --git a/src/metriport/fhir/types/practitioner_role_not_available.py b/src/metriport/fhir/types/practitioner_role_not_available.py index 6eb2906..4b30a72 100644 --- a/src/metriport/fhir/types/practitioner_role_not_available.py +++ b/src/metriport/fhir/types/practitioner_role_not_available.py @@ -19,20 +19,23 @@ class PractitionerRoleNotAvailable(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="The reason that can be presented to the user as to why this time is not available." + default=None, description="The reason that can be presented to the user as to why this time is not available." ) during: typing.Optional[Period] = pydantic.Field( - description="Service is not available (seasonally or for a public holiday) from this date." + default=None, description="Service is not available (seasonally or for a public holiday) from this date." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/procedure.py b/src/metriport/fhir/types/procedure.py index 5509896..8225531 100644 --- a/src/metriport/fhir/types/procedure.py +++ b/src/metriport/fhir/types/procedure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -31,114 +29,138 @@ class Procedure(BaseResource): An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy. """ - resource_type: typing_extensions.Literal["Procedure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Procedure"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server." + default=None, + description="Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="A reference to a resource that contains details of the request for this procedure.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger event of which this particular procedure is a component or step." + alias="partOf", + default=None, + description="A larger event of which this particular procedure is a component or step.", ) status: typing.Optional[Code] = pydantic.Field( - description="A code specifying the state of the procedure. Generally, this will be the in-progress or completed state." + default=None, + description="A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.", ) status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="Captures the reason for the current state of the procedure." + alias="statusReason", default=None, description="Captures the reason for the current state of the procedure." ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description='A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure").' + default=None, + description='A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure").', ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description='The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy").' + default=None, + description='The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy").', ) subject: Reference = pydantic.Field(description="The person, animal or group on which the procedure was performed.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.", ) performed_date_time: typing.Optional[str] = pydantic.Field( alias="performedDateTime", + default=None, description="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", ) performed_period: typing.Optional[Period] = pydantic.Field( alias="performedPeriod", + default=None, description="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", ) performed_string: typing.Optional[str] = pydantic.Field( alias="performedString", + default=None, description="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", ) performed_age: typing.Optional[Age] = pydantic.Field( alias="performedAge", + default=None, description="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", ) performed_range: typing.Optional[Range] = pydantic.Field( alias="performedRange", + default=None, description="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", ) recorder: typing.Optional[Reference] = pydantic.Field( - description="Individual who recorded the record and takes responsibility for its content." + default=None, description="Individual who recorded the record and takes responsibility for its content." ) asserter: typing.Optional[Reference] = pydantic.Field( - description="Individual who is making the procedure statement." + default=None, description="Individual who is making the procedure statement." ) performer: typing.Optional[typing.List[ProcedurePerformer]] = pydantic.Field( - description='Limited to "real" people rather than equipment.' + default=None, description='Limited to "real" people rather than equipment.' ) location: typing.Optional[Reference] = pydantic.Field( - description="The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant." + default=None, + description="The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="The justification of why the procedure was performed." + alias="reasonReference", default=None, description="The justification of why the procedure was performed." ) body_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="bodySite", + default=None, description="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.", ) outcome: typing.Optional[CodeableConcept] = pydantic.Field( - description="The outcome of the procedure - did it resolve the reasons for the procedure being performed?" + default=None, + description="The outcome of the procedure - did it resolve the reasons for the procedure being performed?", ) report: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="This could be a histology result, pathology report, surgical report, etc." + default=None, description="This could be a histology result, pathology report, surgical report, etc." ) complication: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues." + default=None, + description="Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", ) complication_detail: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="complicationDetail", + default=None, description="Any complications that occurred during the procedure, or in the immediate post-performance period.", ) follow_up: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="followUp", + default=None, description="If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Any other notes and comments about the procedure." + default=None, description="Any other notes and comments about the procedure." ) focal_device: typing.Optional[typing.List[ProcedureFocalDevice]] = pydantic.Field( alias="focalDevice", + default=None, description="A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.", ) used_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="usedReference", + default=None, description="Identifies medications, devices and any other substance used as part of the procedure.", ) used_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="usedCode", description="Identifies coded items that were used as part of the procedure." + alias="usedCode", default=None, description="Identifies coded items that were used as part of the procedure." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/procedure_focal_device.py b/src/metriport/fhir/types/procedure_focal_device.py index fd08ef8..c12ba7f 100644 --- a/src/metriport/fhir/types/procedure_focal_device.py +++ b/src/metriport/fhir/types/procedure_focal_device.py @@ -20,17 +20,20 @@ class ProcedureFocalDevice(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of change that happened to the device during the procedure." + default=None, description="The kind of change that happened to the device during the procedure." ) manipulated: Reference = pydantic.Field( description="The device that was manipulated (changed) during the procedure." diff --git a/src/metriport/fhir/types/procedure_performer.py b/src/metriport/fhir/types/procedure_performer.py index 8f134b0..104c375 100644 --- a/src/metriport/fhir/types/procedure_performer.py +++ b/src/metriport/fhir/types/procedure_performer.py @@ -20,21 +20,27 @@ class ProcedurePerformer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) function: typing.Optional[CodeableConcept] = pydantic.Field( - description="Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist." + default=None, + description="Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.", ) actor: Reference = pydantic.Field(description="The practitioner who was involved in the procedure.") on_behalf_of: typing.Optional[Reference] = pydantic.Field( - alias="onBehalfOf", description="The organization the device or practitioner was acting on behalf of." + alias="onBehalfOf", + default=None, + description="The organization the device or practitioner was acting on behalf of.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/prod_characteristic.py b/src/metriport/fhir/types/prod_characteristic.py index 8feeb2d..d3ac812 100644 --- a/src/metriport/fhir/types/prod_characteristic.py +++ b/src/metriport/fhir/types/prod_characteristic.py @@ -21,49 +21,62 @@ class ProdCharacteristic(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) height: typing.Optional[Quantity] = pydantic.Field( - description="Where applicable, the height can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used." + default=None, + description="Where applicable, the height can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) width: typing.Optional[Quantity] = pydantic.Field( - description="Where applicable, the width can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used." + default=None, + description="Where applicable, the width can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) depth: typing.Optional[Quantity] = pydantic.Field( - description="Where applicable, the depth can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used." + default=None, + description="Where applicable, the depth can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) weight: typing.Optional[Quantity] = pydantic.Field( - description="Where applicable, the weight can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used." + default=None, + description="Where applicable, the weight can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) nominal_volume: typing.Optional[Quantity] = pydantic.Field( alias="nominalVolume", + default=None, description="Where applicable, the nominal volume can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) external_diameter: typing.Optional[Quantity] = pydantic.Field( alias="externalDiameter", + default=None, description="Where applicable, the external diameter can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.", ) shape: typing.Optional[str] = pydantic.Field( - description="Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used." + default=None, + description="Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.", ) color: typing.Optional[typing.List[str]] = pydantic.Field( - description="Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used." + default=None, + description="Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.", ) imprint: typing.Optional[typing.List[str]] = pydantic.Field( - description="Where applicable, the imprint can be specified as text." + default=None, description="Where applicable, the imprint can be specified as text." ) image: typing.Optional[typing.List[Attachment]] = pydantic.Field( - description="Where applicable, the image can be provided The format of the image attachment shall be specified by regional implementations." + default=None, + description="Where applicable, the image can be provided The format of the image attachment shall be specified by regional implementations.", ) scoring: typing.Optional[CodeableConcept] = pydantic.Field( - description="Where applicable, the scoring can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used." + default=None, + description="Where applicable, the scoring can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/product_shelf_life.py b/src/metriport/fhir/types/product_shelf_life.py index 096e671..0eb560a 100644 --- a/src/metriport/fhir/types/product_shelf_life.py +++ b/src/metriport/fhir/types/product_shelf_life.py @@ -21,17 +21,20 @@ class ProductShelfLife(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Unique identifier for the packaged Medicinal Product." + default=None, description="Unique identifier for the packaged Medicinal Product." ) type: CodeableConcept = pydantic.Field( description="This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified." @@ -41,6 +44,7 @@ class ProductShelfLife(pydantic.BaseModel): ) special_precautions_for_storage: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="specialPrecautionsForStorage", + default=None, description="Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.", ) diff --git a/src/metriport/fhir/types/project.py b/src/metriport/fhir/types/project.py index 4bea5be..b4e63bc 100644 --- a/src/metriport/fhir/types/project.py +++ b/src/metriport/fhir/types/project.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -26,46 +24,54 @@ class Project(pydantic.BaseModel): Encapsulation of resources for a specific project or organization. """ - resource_type: typing_extensions.Literal["Project"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Project"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - name: typing.Optional[str] = pydantic.Field(description="A name associated with the Project.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="A name associated with the Project.") description: typing.Optional[str] = pydantic.Field( - description="A summary, characterization or explanation of the Project." + default=None, description="A summary, characterization or explanation of the Project." ) super_admin: typing.Optional[bool] = pydantic.Field( alias="superAdmin", + default=None, description="Whether this project is the super administrator project. A super administrator is a user who has complete access to all resources in all projects.", ) strict_mode: typing.Optional[bool] = pydantic.Field( - alias="strictMode", description="Whether this project uses strict FHIR validation." + alias="strictMode", default=None, description="Whether this project uses strict FHIR validation." ) check_references_on_write: typing.Optional[bool] = pydantic.Field( alias="checkReferencesOnWrite", + default=None, description="Whether this project uses referential integrity on write operations such as 'create' and 'update'.", ) - owner: typing.Optional[Reference] = pydantic.Field(description="The user who owns the project.") + owner: typing.Optional[Reference] = pydantic.Field(default=None, description="The user who owns the project.") features: typing.Optional[typing.List[ProjectFeaturesItem]] = pydantic.Field( - description="A list of optional features that are enabled for the project." + default=None, description="A list of optional features that are enabled for the project." ) default_patient_access_policy: typing.Optional[Reference] = pydantic.Field( alias="defaultPatientAccessPolicy", + default=None, description="The default access policy for patients using open registration.", ) secret: typing.Optional[typing.List[ProjectSecret]] = pydantic.Field( - description="Secure environment variable that can be used to store secrets for bots." + default=None, description="Secure environment variable that can be used to store secrets for bots." ) site: typing.Optional[typing.List[ProjectSite]] = pydantic.Field( - description="Web application or web site that is associated with the project." + default=None, description="Web application or web site that is associated with the project." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/project_membership.py b/src/metriport/fhir/types/project_membership.py index 51ed87e..46ce536 100644 --- a/src/metriport/fhir/types/project_membership.py +++ b/src/metriport/fhir/types/project_membership.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -24,21 +22,26 @@ class ProjectMembership(pydantic.BaseModel): Medplum project membership. A project membership grants a user access to a project. """ - resource_type: typing_extensions.Literal["ProjectMembership"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ProjectMembership"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) project: Reference = pydantic.Field(description="Project where the memberships are available.") invited_by: typing.Optional[Reference] = pydantic.Field( - alias="invitedBy", description="The project administrator who invited the user to the project." + alias="invitedBy", default=None, description="The project administrator who invited the user to the project." ) user: Reference = pydantic.Field(description="User that is granted access to the project.") profile: Reference = pydantic.Field( @@ -46,19 +49,23 @@ class ProjectMembership(pydantic.BaseModel): ) external_id: typing.Optional[str] = pydantic.Field( alias="externalId", + default=None, description='A String that is an identifier for the resource as defined by the provisioning client. The "externalId" may simplify identification of a resource between the provisioning client and the service provider by allowing the client to use a filter to locate the resource with an identifier from the provisioning domain, obviating the need to store a local mapping between the provisioning domain\'s identifier of the resource and the identifier used by the service provider. Each resource MAY include a non-empty "externalId" value. The value of the "externalId" attribute is always issued by the provisioning client and MUST NOT be specified by the service provider. The service provider MUST always interpret the externalId as scoped to the provisioning domain.', ) access_policy: typing.Optional[Reference] = pydantic.Field( - alias="accessPolicy", description="The access policy for the user within the project memebership." + alias="accessPolicy", default=None, description="The access policy for the user within the project memebership." ) access: typing.Optional[typing.List[ProjectMembershipAccess]] = pydantic.Field( - description="Extended access configuration using parameterized access policies." + default=None, description="Extended access configuration using parameterized access policies." ) user_configuration: typing.Optional[Reference] = pydantic.Field( alias="userConfiguration", + default=None, description="The user configuration for the user within the project memebership such as menu links, saved searches, and features.", ) - admin: typing.Optional[bool] = pydantic.Field(description="Whether this user is a project administrator.") + admin: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether this user is a project administrator." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/project_membership_access.py b/src/metriport/fhir/types/project_membership_access.py index ee8d345..69fd1b3 100644 --- a/src/metriport/fhir/types/project_membership_access.py +++ b/src/metriport/fhir/types/project_membership_access.py @@ -22,7 +22,7 @@ class ProjectMembershipAccess(pydantic.BaseModel): description="The base access policy used as a template. Variables in the template access policy are replaced by the values in the parameter." ) parameter: typing.Optional[typing.List[ProjectMembershipAccessParameter]] = pydantic.Field( - description="User options that control the display of the application." + default=None, description="User options that control the display of the application." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/project_membership_access_parameter.py b/src/metriport/fhir/types/project_membership_access_parameter.py index e590984..d806127 100644 --- a/src/metriport/fhir/types/project_membership_access_parameter.py +++ b/src/metriport/fhir/types/project_membership_access_parameter.py @@ -21,10 +21,12 @@ class ProjectMembershipAccessParameter(pydantic.BaseModel): name: Code = pydantic.Field(description="The unique name of the parameter.") value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Value of the parameter - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="Value of the parameter - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) diff --git a/src/metriport/fhir/types/project_secret.py b/src/metriport/fhir/types/project_secret.py index b507b86..c3c3bb1 100644 --- a/src/metriport/fhir/types/project_secret.py +++ b/src/metriport/fhir/types/project_secret.py @@ -18,10 +18,18 @@ class ProjectSecret(pydantic.BaseModel): """ name: str = pydantic.Field(description="The secret name.") - value_string: typing.Optional[str] = pydantic.Field(alias="valueString", description="The secret value.") - value_boolean: typing.Optional[bool] = pydantic.Field(alias="valueBoolean", description="The secret value.") - value_decimal: typing.Optional[Decimal] = pydantic.Field(alias="valueDecimal", description="The secret value.") - value_integer: typing.Optional[int] = pydantic.Field(alias="valueInteger", description="The secret value.") + value_string: typing.Optional[str] = pydantic.Field( + alias="valueString", default=None, description="The secret value." + ) + value_boolean: typing.Optional[bool] = pydantic.Field( + alias="valueBoolean", default=None, description="The secret value." + ) + value_decimal: typing.Optional[Decimal] = pydantic.Field( + alias="valueDecimal", default=None, description="The secret value." + ) + value_integer: typing.Optional[int] = pydantic.Field( + alias="valueInteger", default=None, description="The secret value." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/project_site.py b/src/metriport/fhir/types/project_site.py index 8a0b4fa..0149836 100644 --- a/src/metriport/fhir/types/project_site.py +++ b/src/metriport/fhir/types/project_site.py @@ -24,18 +24,22 @@ class ProjectSite(pydantic.BaseModel): ) google_client_id: typing.Optional[str] = pydantic.Field( alias="googleClientId", + default=None, description="The publicly visible Google Client ID for the site. This is used to authenticate users with Google. This value is available in the Google Developer Console.", ) google_client_secret: typing.Optional[str] = pydantic.Field( alias="googleClientSecret", + default=None, description="The private Google Client Secret for the site. This value is available in the Google Developer Console.", ) recaptcha_site_key: typing.Optional[str] = pydantic.Field( alias="recaptchaSiteKey", + default=None, description="The publicly visible reCAPTCHA site key. This value is generated when you create a new reCAPTCHA site in the reCAPTCHA admin console. Use this site key in the HTML code your site serves to users.", ) recaptcha_secret_key: typing.Optional[str] = pydantic.Field( alias="recaptchaSecretKey", + default=None, description="The private reCAPTCHA secret key. This value is generated when you create a new reCAPTCHA site in the reCAPTCHA admin console. Use this secret key for communication between your site and reCAPTCHA.", ) diff --git a/src/metriport/fhir/types/provenance.py b/src/metriport/fhir/types/provenance.py index 85becfe..a8b9810 100644 --- a/src/metriport/fhir/types/provenance.py +++ b/src/metriport/fhir/types/provenance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,37 +25,42 @@ class Provenance(BaseResource): Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. """ - resource_type: typing_extensions.Literal["Provenance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Provenance"] = pydantic.Field(alias="resourceType") target: typing.List[Reference] = pydantic.Field( description="The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) occurred_period: typing.Optional[Period] = pydantic.Field( - alias="occurredPeriod", description="The period during which the activity occurred." + alias="occurredPeriod", default=None, description="The period during which the activity occurred." ) occurred_date_time: typing.Optional[str] = pydantic.Field( - alias="occurredDateTime", description="The period during which the activity occurred." + alias="occurredDateTime", default=None, description="The period during which the activity occurred." ) recorded: typing.Optional[Instant] = pydantic.Field( - description="The instant of time at which the activity was recorded." + default=None, description="The instant of time at which the activity was recorded." ) policy: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc." + default=None, + description="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", + ) + location: typing.Optional[Reference] = pydantic.Field( + default=None, description="Where the activity occurred, if relevant." ) - location: typing.Optional[Reference] = pydantic.Field(description="Where the activity occurred, if relevant.") reason: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The reason that the activity was taking place." + default=None, description="The reason that the activity was taking place." ) activity: typing.Optional[CodeableConcept] = pydantic.Field( - description="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities." + default=None, + description="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", ) agent: typing.List[ProvenanceAgent] = pydantic.Field( description="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) entity: typing.Optional[typing.List[ProvenanceEntity]] = pydantic.Field( - description="An entity used in this activity." + default=None, description="An entity used in this activity." ) signature: typing.Optional[typing.List[Signature]] = pydantic.Field( - description="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated." + default=None, + description="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/provenance_agent.py b/src/metriport/fhir/types/provenance_agent.py index 8597fe7..2557383 100644 --- a/src/metriport/fhir/types/provenance_agent.py +++ b/src/metriport/fhir/types/provenance_agent.py @@ -20,26 +20,32 @@ class ProvenanceAgent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The participation the agent had with respect to the activity." + default=None, description="The participation the agent had with respect to the activity." ) role: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity." + default=None, + description="The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.", ) who: Reference = pydantic.Field( description="The individual, device or organization that participated in the event." ) on_behalf_of: typing.Optional[Reference] = pydantic.Field( - alias="onBehalfOf", description="The individual, device, or organization for whom the change was made." + alias="onBehalfOf", + default=None, + description="The individual, device, or organization for whom the change was made.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/provenance_entity.py b/src/metriport/fhir/types/provenance_entity.py index a9e984d..723f7a3 100644 --- a/src/metriport/fhir/types/provenance_entity.py +++ b/src/metriport/fhir/types/provenance_entity.py @@ -21,23 +21,27 @@ class ProvenanceEntity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) role: typing.Optional[ProvenanceEntityRole] = pydantic.Field( - description="How the entity was used during the activity." + default=None, description="How the entity was used during the activity." ) what: Reference = pydantic.Field( description="Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative." ) agent: typing.Optional[typing.List[ProvenanceAgent]] = pydantic.Field( - description="The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity." + default=None, + description="The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/quantity.py b/src/metriport/fhir/types/quantity.py index dfcb8d2..48ea52d 100644 --- a/src/metriport/fhir/types/quantity.py +++ b/src/metriport/fhir/types/quantity.py @@ -23,23 +23,27 @@ class Quantity(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) value: typing.Optional[Decimal] = pydantic.Field( - description="The value of the measured amount. The value includes an implicit precision in the presentation of the value." + default=None, + description="The value of the measured amount. The value includes an implicit precision in the presentation of the value.", ) comparator: typing.Optional[QuantityComparator] = pydantic.Field( - description='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.' + default=None, + description='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.', ) - unit: typing.Optional[str] = pydantic.Field(description="A human-readable form of the unit.") + unit: typing.Optional[str] = pydantic.Field(default=None, description="A human-readable form of the unit.") system: typing.Optional[Uri] = pydantic.Field( - description="The identification of the system that provides the coded form of the unit." + default=None, description="The identification of the system that provides the coded form of the unit." ) code: typing.Optional[Code] = pydantic.Field( - description="A computer processable form of the unit in some unit representation system." + default=None, description="A computer processable form of the unit in some unit representation system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire.py b/src/metriport/fhir/types/questionnaire.py index d3c8a0e..11de6eb 100644 --- a/src/metriport/fhir/types/questionnaire.py +++ b/src/metriport/fhir/types/questionnaire.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -32,77 +30,93 @@ class Questionnaire(BaseResource): A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. """ - resource_type: typing_extensions.Literal["Questionnaire"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Questionnaire"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers." + default=None, + description="An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the questionnaire." + default=None, description="A short, descriptive, user-friendly title for the questionnaire." ) derived_from: typing.Optional[typing.List[Canonical]] = pydantic.Field( - alias="derivedFrom", description="The URL of a Questionnaire that this Questionnaire is based on." + alias="derivedFrom", default=None, description="The URL of a Questionnaire that this Questionnaire is based on." ) status: typing.Optional[QuestionnaireStatus] = pydantic.Field( - description="The status of this questionnaire. Enables tracking the life-cycle of the content." + default=None, description="The status of this questionnaire. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_type: typing.Optional[typing.List[Code]] = pydantic.Field( alias="subjectType", + default=None, description="The types of subjects that can be the subject of responses created for the questionnaire.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes." + default=None, + description="The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the questionnaire." + default=None, description="The name of the organization or individual that published the questionnaire." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the questionnaire from a consumer's perspective." + default=None, + description="A free text natural language description of the questionnaire from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the questionnaire is intended to be used." + default=None, description="A legal or geographic region in which the questionnaire is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this questionnaire is needed and why it has been designed as it has." + default=None, + description="Explanation of why this questionnaire is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire." + default=None, + description="A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the questionnaire content was or is planned to be in active use.", ) code: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="An identifier for this question or group of questions in a particular terminology such as LOINC." + default=None, + description="An identifier for this question or group of questions in a particular terminology such as LOINC.", ) item: typing.Optional[typing.List[QuestionnaireItem]] = pydantic.Field( - description="A particular question, question grouping or display text that is part of the questionnaire." + default=None, + description="A particular question, question grouping or display text that is part of the questionnaire.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire_answer_option.py b/src/metriport/fhir/types/questionnaire_answer_option.py index bf9a5e1..6a8c159 100644 --- a/src/metriport/fhir/types/questionnaire_answer_option.py +++ b/src/metriport/fhir/types/questionnaire_answer_option.py @@ -20,35 +20,47 @@ class QuestionnaireAnswerOption(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="A potential answer that's allowed as the answer to this question." + alias="valueInteger", + default=None, + description="A potential answer that's allowed as the answer to this question.", ) value_date: typing.Optional[str] = pydantic.Field( - alias="valueDate", description="A potential answer that's allowed as the answer to this question." + alias="valueDate", default=None, description="A potential answer that's allowed as the answer to this question." ) value_time: typing.Optional[str] = pydantic.Field( - alias="valueTime", description="A potential answer that's allowed as the answer to this question." + alias="valueTime", default=None, description="A potential answer that's allowed as the answer to this question." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="A potential answer that's allowed as the answer to this question." + alias="valueString", + default=None, + description="A potential answer that's allowed as the answer to this question.", ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="A potential answer that's allowed as the answer to this question." + alias="valueCoding", + default=None, + description="A potential answer that's allowed as the answer to this question.", ) value_reference: typing.Optional[Reference] = pydantic.Field( - alias="valueReference", description="A potential answer that's allowed as the answer to this question." + alias="valueReference", + default=None, + description="A potential answer that's allowed as the answer to this question.", ) initial_selected: typing.Optional[bool] = pydantic.Field( alias="initialSelected", + default=None, description="Indicates whether the answer value is selected when the list of possible answers is initially shown.", ) diff --git a/src/metriport/fhir/types/questionnaire_enable_when.py b/src/metriport/fhir/types/questionnaire_enable_when.py index dd6f229..7e742ca 100644 --- a/src/metriport/fhir/types/questionnaire_enable_when.py +++ b/src/metriport/fhir/types/questionnaire_enable_when.py @@ -22,59 +22,73 @@ class QuestionnaireEnableWhen(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) question: typing.Optional[str] = pydantic.Field( - description="The linkId for the question whose answer (or lack of answer) governs whether this item is enabled." + default=None, + description="The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.", ) operator: typing.Optional[QuestionnaireEnableWhenOperator] = pydantic.Field( - description="Specifies the criteria by which the question is enabled." + default=None, description="Specifies the criteria by which the question is enabled." ) answer_boolean: typing.Optional[bool] = pydantic.Field( alias="answerBoolean", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_decimal: typing.Optional[float] = pydantic.Field( alias="answerDecimal", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_integer: typing.Optional[float] = pydantic.Field( alias="answerInteger", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_date: typing.Optional[str] = pydantic.Field( alias="answerDate", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_date_time: typing.Optional[str] = pydantic.Field( alias="answerDateTime", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_time: typing.Optional[str] = pydantic.Field( alias="answerTime", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_string: typing.Optional[str] = pydantic.Field( alias="answerString", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_coding: typing.Optional[Coding] = pydantic.Field( alias="answerCoding", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_quantity: typing.Optional[Quantity] = pydantic.Field( alias="answerQuantity", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) answer_reference: typing.Optional[Reference] = pydantic.Field( alias="answerReference", + default=None, description="A value that the referenced question is tested using the specified operator in order for the item to be enabled.", ) diff --git a/src/metriport/fhir/types/questionnaire_initial.py b/src/metriport/fhir/types/questionnaire_initial.py index 6fa3b1c..31ea0e9 100644 --- a/src/metriport/fhir/types/questionnaire_initial.py +++ b/src/metriport/fhir/types/questionnaire_initial.py @@ -22,50 +22,53 @@ class QuestionnaireInitial(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The actual value to for an initial answer." + alias="valueBoolean", default=None, description="The actual value to for an initial answer." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="The actual value to for an initial answer." + alias="valueDecimal", default=None, description="The actual value to for an initial answer." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="The actual value to for an initial answer." + alias="valueInteger", default=None, description="The actual value to for an initial answer." ) value_date: typing.Optional[str] = pydantic.Field( - alias="valueDate", description="The actual value to for an initial answer." + alias="valueDate", default=None, description="The actual value to for an initial answer." ) value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="The actual value to for an initial answer." + alias="valueDateTime", default=None, description="The actual value to for an initial answer." ) value_time: typing.Optional[str] = pydantic.Field( - alias="valueTime", description="The actual value to for an initial answer." + alias="valueTime", default=None, description="The actual value to for an initial answer." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="The actual value to for an initial answer." + alias="valueString", default=None, description="The actual value to for an initial answer." ) value_uri: typing.Optional[str] = pydantic.Field( - alias="valueUri", description="The actual value to for an initial answer." + alias="valueUri", default=None, description="The actual value to for an initial answer." ) value_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="valueAttachment", description="The actual value to for an initial answer." + alias="valueAttachment", default=None, description="The actual value to for an initial answer." ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="The actual value to for an initial answer." + alias="valueCoding", default=None, description="The actual value to for an initial answer." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The actual value to for an initial answer." + alias="valueQuantity", default=None, description="The actual value to for an initial answer." ) value_reference: typing.Optional[Reference] = pydantic.Field( - alias="valueReference", description="The actual value to for an initial answer." + alias="valueReference", default=None, description="The actual value to for an initial answer." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire_item.py b/src/metriport/fhir/types/questionnaire_item.py index 261973f..1c4410e 100644 --- a/src/metriport/fhir/types/questionnaire_item.py +++ b/src/metriport/fhir/types/questionnaire_item.py @@ -28,68 +28,86 @@ class QuestionnaireItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) link_id: typing.Optional[str] = pydantic.Field( alias="linkId", + default=None, description="An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", ) definition: typing.Optional[Uri] = pydantic.Field( - description="This element is a URI that refers to an [[[ElementDefinition]]] that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: _ code (ElementDefinition.code) _ type (ElementDefinition.type) _ required (ElementDefinition.min) _ repeats (ElementDefinition.max) _ maxLength (ElementDefinition.maxLength) _ answerValueSet (ElementDefinition.binding) \* options (ElementDefinition.binding)." + default=None, + description="This element is a URI that refers to an [[[ElementDefinition]]] that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: _ code (ElementDefinition.code) _ type (ElementDefinition.type) _ required (ElementDefinition.min) _ repeats (ElementDefinition.max) _ maxLength (ElementDefinition.maxLength) _ answerValueSet (ElementDefinition.binding) \* options (ElementDefinition.binding).", ) code: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers)." + default=None, + description="A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).", ) prefix: typing.Optional[str] = pydantic.Field( - description="A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire." + default=None, + description="A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.", ) text: typing.Optional[str] = pydantic.Field( - description="The name of a section, the text of a question or text content for a display item." + default=None, description="The name of a section, the text of a question or text content for a display item." ) type: typing.Optional[QuestionnaireItemType] = pydantic.Field( - description="The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.)." + default=None, + description="The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).", ) enable_when: typing.Optional[typing.List[QuestionnaireEnableWhen]] = pydantic.Field( alias="enableWhen", + default=None, description="A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.", ) enable_behavior: typing.Optional[QuestionnaireItemEnableBehavior] = pydantic.Field( alias="enableBehavior", + default=None, description="Controls how multiple enableWhen values are interpreted - whether all or any must be true.", ) required: typing.Optional[bool] = pydantic.Field( - description='An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.' + default=None, + description='An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.', ) repeats: typing.Optional[bool] = pydantic.Field( - description="An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups." + default=None, + description="An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.", ) read_only: typing.Optional[bool] = pydantic.Field( alias="readOnly", + default=None, description="An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.", ) max_length: typing.Optional[int] = pydantic.Field( alias="maxLength", + default=None, description='The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.', ) answer_value_set: typing.Optional[Canonical] = pydantic.Field( alias="answerValueSet", + default=None, description='A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.', ) answer_option: typing.Optional[typing.List[QuestionnaireAnswerOption]] = pydantic.Field( - alias="answerOption", description='One of the permitted answers for a "choice" or "open-choice" question.' + alias="answerOption", + default=None, + description='One of the permitted answers for a "choice" or "open-choice" question.', ) initial: typing.Optional[typing.List[QuestionnaireInitial]] = pydantic.Field( - description="One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input." + default=None, + description="One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.", ) item: typing.Optional[typing.List[QuestionnaireItem]] = pydantic.Field( - description="Text, questions and other groups to be nested beneath a question or group." + default=None, description="Text, questions and other groups to be nested beneath a question or group." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire_response.py b/src/metriport/fhir/types/questionnaire_response.py index 1430be7..7f13608 100644 --- a/src/metriport/fhir/types/questionnaire_response.py +++ b/src/metriport/fhir/types/questionnaire_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -25,41 +23,49 @@ class QuestionnaireResponse(BaseResource): A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to. """ - resource_type: typing_extensions.Literal["QuestionnaireResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["QuestionnaireResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="A business identifier assigned to a particular completed (or partially completed) questionnaire." + default=None, + description="A business identifier assigned to a particular completed (or partially completed) questionnaire.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description="The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="partOf", + default=None, description="A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.", ) questionnaire: typing.Optional[Canonical] = pydantic.Field( - description="The Questionnaire that defines and organizes the questions for which answers are being provided." + default=None, + description="The Questionnaire that defines and organizes the questions for which answers are being provided.", ) status: typing.Optional[QuestionnaireResponseStatus] = pydantic.Field( - description="The position of the questionnaire response within its overall lifecycle." + default=None, description="The position of the questionnaire response within its overall lifecycle." ) subject: typing.Optional[Reference] = pydantic.Field( - description="The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information." + default=None, + description="The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated." + default=None, + description="The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.", ) authored: typing.Optional[DateTime] = pydantic.Field( - description="The date and/or time that this set of answers were last changed." + default=None, description="The date and/or time that this set of answers were last changed." ) author: typing.Optional[Reference] = pydantic.Field( - description="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system." + default=None, + description="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", ) source: typing.Optional[Reference] = pydantic.Field( - description="The person who answered the questions about the subject." + default=None, description="The person who answered the questions about the subject." ) item: typing.Optional[typing.List[QuestionnaireResponseItem]] = pydantic.Field( - description="A group or question item from the original questionnaire for which answers are provided." + default=None, + description="A group or question item from the original questionnaire for which answers are provided.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire_response_answer.py b/src/metriport/fhir/types/questionnaire_response_answer.py index 4f7f7ef..d9c8689 100644 --- a/src/metriport/fhir/types/questionnaire_response_answer.py +++ b/src/metriport/fhir/types/questionnaire_response_answer.py @@ -24,62 +24,80 @@ class QuestionnaireResponseAnswer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_decimal: typing.Optional[float] = pydantic.Field( alias="valueDecimal", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_integer: typing.Optional[float] = pydantic.Field( alias="valueInteger", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_date: typing.Optional[str] = pydantic.Field( - alias="valueDate", description="The answer (or one of the answers) provided by the respondent to the question." + alias="valueDate", + default=None, + description="The answer (or one of the answers) provided by the respondent to the question.", ) value_date_time: typing.Optional[str] = pydantic.Field( alias="valueDateTime", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_time: typing.Optional[str] = pydantic.Field( - alias="valueTime", description="The answer (or one of the answers) provided by the respondent to the question." + alias="valueTime", + default=None, + description="The answer (or one of the answers) provided by the respondent to the question.", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_uri: typing.Optional[str] = pydantic.Field( - alias="valueUri", description="The answer (or one of the answers) provided by the respondent to the question." + alias="valueUri", + default=None, + description="The answer (or one of the answers) provided by the respondent to the question.", ) value_attachment: typing.Optional[Attachment] = pydantic.Field( alias="valueAttachment", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_coding: typing.Optional[Coding] = pydantic.Field( alias="valueCoding", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="The answer (or one of the answers) provided by the respondent to the question.", ) item: typing.Optional[typing.List[QuestionnaireResponseItem]] = pydantic.Field( - description="Nested groups and/or questions found within this particular answer." + default=None, description="Nested groups and/or questions found within this particular answer." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/questionnaire_response_item.py b/src/metriport/fhir/types/questionnaire_response_item.py index 689ca41..a63bb86 100644 --- a/src/metriport/fhir/types/questionnaire_response_item.py +++ b/src/metriport/fhir/types/questionnaire_response_item.py @@ -21,30 +21,35 @@ class QuestionnaireResponseItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) link_id: typing.Optional[str] = pydantic.Field( alias="linkId", + default=None, description="The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", ) definition: typing.Optional[Uri] = pydantic.Field( - description="A reference to an [[[ElementDefinition]]] that provides the details for the item." + default=None, description="A reference to an [[[ElementDefinition]]] that provides the details for the item." ) text: typing.Optional[str] = pydantic.Field( - description="Text that is displayed above the contents of the group or as the text of the question being answered." + default=None, + description="Text that is displayed above the contents of the group or as the text of the question being answered.", ) answer: typing.Optional[typing.List[QuestionnaireResponseAnswer]] = pydantic.Field( - description="The respondent's answer(s) to the question." + default=None, description="The respondent's answer(s) to the question." ) item: typing.Optional[typing.List[QuestionnaireResponseItem]] = pydantic.Field( - description="Questions or sub-groups nested beneath a question or group." + default=None, description="Questions or sub-groups nested beneath a question or group." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/range.py b/src/metriport/fhir/types/range.py index e1dfc66..1c1a488 100644 --- a/src/metriport/fhir/types/range.py +++ b/src/metriport/fhir/types/range.py @@ -19,13 +19,19 @@ class Range(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + ) + low: typing.Optional[Quantity] = pydantic.Field( + default=None, description="The low limit. The boundary is inclusive." + ) + high: typing.Optional[Quantity] = pydantic.Field( + default=None, description="The high limit. The boundary is inclusive." ) - low: typing.Optional[Quantity] = pydantic.Field(description="The low limit. The boundary is inclusive.") - high: typing.Optional[Quantity] = pydantic.Field(description="The high limit. The boundary is inclusive.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/ratio.py b/src/metriport/fhir/types/ratio.py index 25cae1d..67aac2f 100644 --- a/src/metriport/fhir/types/ratio.py +++ b/src/metriport/fhir/types/ratio.py @@ -19,13 +19,15 @@ class Ratio(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) - numerator: typing.Optional[Quantity] = pydantic.Field(description="The value of the numerator.") - denominator: typing.Optional[Quantity] = pydantic.Field(description="The value of the denominator.") + numerator: typing.Optional[Quantity] = pydantic.Field(default=None, description="The value of the numerator.") + denominator: typing.Optional[Quantity] = pydantic.Field(default=None, description="The value of the denominator.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/reference.py b/src/metriport/fhir/types/reference.py index f7d0f5e..ccf8073 100644 --- a/src/metriport/fhir/types/reference.py +++ b/src/metriport/fhir/types/reference.py @@ -20,22 +20,28 @@ class Reference(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) reference: typing.Optional[str] = pydantic.Field( - description="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." + default=None, + description="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", ) type: typing.Optional[Uri] = pydantic.Field( - description='The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).' + default=None, + description='The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).', ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." + default=None, + description="An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", ) display: typing.Optional[str] = pydantic.Field( - description="Plain text narrative that identifies the resource in addition to the resource reference." + default=None, + description="Plain text narrative that identifies the resource in addition to the resource reference.", ) resource: typing.Any = pydantic.Field(description="Optional Resource referred to by this reference.") diff --git a/src/metriport/fhir/types/related_artifact.py b/src/metriport/fhir/types/related_artifact.py index 24ca105..fed3afe 100644 --- a/src/metriport/fhir/types/related_artifact.py +++ b/src/metriport/fhir/types/related_artifact.py @@ -23,31 +23,38 @@ class RelatedArtifact(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) type: typing.Optional[RelatedArtifactType] = pydantic.Field( - description="The type of relationship to the related artifact." + default=None, description="The type of relationship to the related artifact." ) label: typing.Optional[str] = pydantic.Field( - description="A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index." + default=None, + description="A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.", ) display: typing.Optional[str] = pydantic.Field( - description="A brief description of the document or knowledge resource being referenced, suitable for display to a consumer." + default=None, + description="A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.", ) citation: typing.Optional[Markdown] = pydantic.Field( - description="A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format." + default=None, + description="A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.", ) url: typing.Optional[Url] = pydantic.Field( - description="A url for the artifact that can be followed to access the actual content." + default=None, description="A url for the artifact that can be followed to access the actual content." ) document: typing.Optional[Attachment] = pydantic.Field( - description="The document being referenced, represented as an attachment. This is exclusive with the resource element." + default=None, + description="The document being referenced, represented as an attachment. This is exclusive with the resource element.", ) resource: typing.Optional[Canonical] = pydantic.Field( - description="The related resource, such as a library, value set, profile, or other knowledge resource." + default=None, + description="The related resource, such as a library, value set, profile, or other knowledge resource.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/related_person.py b/src/metriport/fhir/types/related_person.py index 12d8074..a45852e 100644 --- a/src/metriport/fhir/types/related_person.py +++ b/src/metriport/fhir/types/related_person.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -29,34 +27,40 @@ class RelatedPerson(BaseResource): Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. """ - resource_type: typing_extensions.Literal["RelatedPerson"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RelatedPerson"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for a person within a particular scope." + default=None, description="Identifier for a person within a particular scope." + ) + active: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether this related person record is in active use." ) - active: typing.Optional[bool] = pydantic.Field(description="Whether this related person record is in active use.") patient: Reference = pydantic.Field(description="The patient this person is related to.") relationship: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The nature of the relationship between a patient and the related person." + default=None, description="The nature of the relationship between a patient and the related person." + ) + name: typing.Optional[typing.List[HumanName]] = pydantic.Field( + default=None, description="A name associated with the person." ) - name: typing.Optional[typing.List[HumanName]] = pydantic.Field(description="A name associated with the person.") telecom: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="A contact detail for the person, e.g. a telephone number or an email address." + default=None, description="A contact detail for the person, e.g. a telephone number or an email address." ) gender: typing.Optional[RelatedPersonGender] = pydantic.Field( - description="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." + default=None, + description="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", ) birth_date: typing.Optional[dt.date] = pydantic.Field( - alias="birthDate", description="The date on which the related person was born." + alias="birthDate", default=None, description="The date on which the related person was born." ) address: typing.Optional[typing.List[Address]] = pydantic.Field( - description="Address where the related person can be contacted or visited." + default=None, description="Address where the related person can be contacted or visited." ) - photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(description="Image of the person.") + photo: typing.Optional[typing.List[Attachment]] = pydantic.Field(default=None, description="Image of the person.") period: typing.Optional[Period] = pydantic.Field( - description="The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown." + default=None, + description="The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.", ) communication: typing.Optional[typing.List[RelatedPersonCommunication]] = pydantic.Field( - description="A language which may be used to communicate with about the patient's health." + default=None, description="A language which may be used to communicate with about the patient's health." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/related_person_communication.py b/src/metriport/fhir/types/related_person_communication.py index 2876ec3..07afc0d 100644 --- a/src/metriport/fhir/types/related_person_communication.py +++ b/src/metriport/fhir/types/related_person_communication.py @@ -19,20 +19,24 @@ class RelatedPersonCommunication(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) language: CodeableConcept = pydantic.Field( description='The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.' ) preferred: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." + default=None, + description="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/request_group.py b/src/metriport/fhir/types/request_group.py index 465b168..973881a 100644 --- a/src/metriport/fhir/types/request_group.py +++ b/src/metriport/fhir/types/request_group.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,63 +26,75 @@ class RequestGroup(BaseResource): A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". """ - resource_type: typing_extensions.Literal["RequestGroup"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RequestGroup"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Allows a service to provide a unique, business identifier for the request." + default=None, description="Allows a service to provide a unique, business identifier for the request." ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A plan, proposal or order that is fulfilled in whole or in part by this request." + alias="basedOn", + default=None, + description="A plan, proposal or order that is fulfilled in whole or in part by this request.", ) replaces: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Completed or terminated request(s) whose function is taken by this new request." + default=None, description="Completed or terminated request(s) whose function is taken by this new request." ) group_identifier: typing.Optional[Identifier] = pydantic.Field( alias="groupIdentifier", + default=None, description="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", ) status: typing.Optional[Code] = pydantic.Field( - description="The current state of the request. For request groups, the status reflects the status of all the requests in the group." + default=None, + description="The current state of the request. For request groups, the status reflects the status of all the requests in the group.", ) intent: typing.Optional[Code] = pydantic.Field( - description="Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain." + default=None, + description="Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the request should be addressed with respect to other requests." + default=None, + description="Indicates how quickly the request should be addressed with respect to other requests.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that identifies what the overall request group is." + default=None, description="A code that identifies what the overall request group is." ) subject: typing.Optional[Reference] = pydantic.Field( - description="The subject for which the request group was created." + default=None, description="The subject for which the request group was created." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="Describes the context of the request group, if any." + default=None, description="Describes the context of the request group, if any." ) authored_on: typing.Optional[DateTime] = pydantic.Field( - alias="authoredOn", description="Indicates when the request group was created." + alias="authoredOn", default=None, description="Indicates when the request group was created." ) author: typing.Optional[Reference] = pydantic.Field( - description="Provides a reference to the author of the request group." + default=None, description="Provides a reference to the author of the request group." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="Describes the reason for the request group in coded or textual form." + alias="reasonCode", + default=None, + description="Describes the reason for the request group in coded or textual form.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Indicates another resource whose existence justifies this request group." + alias="reasonReference", + default=None, + description="Indicates another resource whose existence justifies this request group.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Provides a mechanism to communicate additional information about the response." + default=None, description="Provides a mechanism to communicate additional information about the response." ) action: typing.Optional[typing.List[RequestGroupAction]] = pydantic.Field( - description="The actions, if any, produced by the evaluation of the artifact." + default=None, description="The actions, if any, produced by the evaluation of the artifact." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/request_group_action.py b/src/metriport/fhir/types/request_group_action.py index 5ec84eb..e365e70 100644 --- a/src/metriport/fhir/types/request_group_action.py +++ b/src/metriport/fhir/types/request_group_action.py @@ -31,83 +31,109 @@ class RequestGroupAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - prefix: typing.Optional[str] = pydantic.Field(description="A user-visible prefix for the action.") - title: typing.Optional[str] = pydantic.Field(description="The title of the action displayed to a user.") + prefix: typing.Optional[str] = pydantic.Field(default=None, description="A user-visible prefix for the action.") + title: typing.Optional[str] = pydantic.Field( + default=None, description="The title of the action displayed to a user." + ) description: typing.Optional[str] = pydantic.Field( - description="A short description of the action used to provide a summary to display to the user." + default=None, description="A short description of the action used to provide a summary to display to the user." ) text_equivalent: typing.Optional[str] = pydantic.Field( alias="textEquivalent", + default=None, description="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the action should be addressed with respect to other actions." + default=None, description="Indicates how quickly the action should be addressed with respect to other actions." ) code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template." + default=None, + description="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.", ) documentation: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( - description="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." + default=None, + description="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", ) condition: typing.Optional[typing.List[RequestGroupCondition]] = pydantic.Field( - description="An expression that describes applicability criteria, or start/stop conditions for the action." + default=None, + description="An expression that describes applicability criteria, or start/stop conditions for the action.", ) related_action: typing.Optional[typing.List[RequestGroupRelatedAction]] = pydantic.Field( alias="relatedAction", + default=None, description='A relationship to another action such as "before" or "30-60 minutes after start of".', ) timing_date_time: typing.Optional[str] = pydantic.Field( - alias="timingDateTime", description="An optional value describing when the action should be performed." + alias="timingDateTime", + default=None, + description="An optional value describing when the action should be performed.", ) timing_age: typing.Optional[Age] = pydantic.Field( - alias="timingAge", description="An optional value describing when the action should be performed." + alias="timingAge", default=None, description="An optional value describing when the action should be performed." ) timing_period: typing.Optional[Period] = pydantic.Field( - alias="timingPeriod", description="An optional value describing when the action should be performed." + alias="timingPeriod", + default=None, + description="An optional value describing when the action should be performed.", ) timing_duration: typing.Optional[Duration] = pydantic.Field( - alias="timingDuration", description="An optional value describing when the action should be performed." + alias="timingDuration", + default=None, + description="An optional value describing when the action should be performed.", ) timing_range: typing.Optional[Range] = pydantic.Field( - alias="timingRange", description="An optional value describing when the action should be performed." + alias="timingRange", + default=None, + description="An optional value describing when the action should be performed.", ) timing_timing: typing.Optional[Timing] = pydantic.Field( - alias="timingTiming", description="An optional value describing when the action should be performed." + alias="timingTiming", + default=None, + description="An optional value describing when the action should be performed.", ) participant: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The participant that should perform or be responsible for this action." + default=None, description="The participant that should perform or be responsible for this action." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of action to perform (create, update, remove)." + default=None, description="The type of action to perform (create, update, remove)." ) grouping_behavior: typing.Optional[Code] = pydantic.Field( - alias="groupingBehavior", description="Defines the grouping behavior for the action and its children." + alias="groupingBehavior", + default=None, + description="Defines the grouping behavior for the action and its children.", ) selection_behavior: typing.Optional[Code] = pydantic.Field( - alias="selectionBehavior", description="Defines the selection behavior for the action and its children." + alias="selectionBehavior", + default=None, + description="Defines the selection behavior for the action and its children.", ) required_behavior: typing.Optional[Code] = pydantic.Field( - alias="requiredBehavior", description="Defines expectations around whether an action is required." + alias="requiredBehavior", default=None, description="Defines expectations around whether an action is required." ) precheck_behavior: typing.Optional[Code] = pydantic.Field( - alias="precheckBehavior", description="Defines whether the action should usually be preselected." + alias="precheckBehavior", default=None, description="Defines whether the action should usually be preselected." ) cardinality_behavior: typing.Optional[Code] = pydantic.Field( - alias="cardinalityBehavior", description="Defines whether the action can be selected multiple times." + alias="cardinalityBehavior", + default=None, + description="Defines whether the action can be selected multiple times.", ) resource: typing.Optional[Reference] = pydantic.Field( - description="The resource that is the target of the action (e.g. CommunicationRequest)." + default=None, description="The resource that is the target of the action (e.g. CommunicationRequest)." ) - action: typing.Optional[typing.List[RequestGroupAction]] = pydantic.Field(description="Sub actions.") + action: typing.Optional[typing.List[RequestGroupAction]] = pydantic.Field(default=None, description="Sub actions.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/request_group_condition.py b/src/metriport/fhir/types/request_group_condition.py index e1292e3..502a7da 100644 --- a/src/metriport/fhir/types/request_group_condition.py +++ b/src/metriport/fhir/types/request_group_condition.py @@ -20,18 +20,22 @@ class RequestGroupCondition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - kind: typing.Optional[Code] = pydantic.Field(description="The kind of condition.") + kind: typing.Optional[Code] = pydantic.Field(default=None, description="The kind of condition.") expression: typing.Optional[Expression] = pydantic.Field( - description="An expression that returns true or false, indicating whether or not the condition is satisfied." + default=None, + description="An expression that returns true or false, indicating whether or not the condition is satisfied.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/request_group_related_action.py b/src/metriport/fhir/types/request_group_related_action.py index 38850a0..7c2ed8b 100644 --- a/src/metriport/fhir/types/request_group_related_action.py +++ b/src/metriport/fhir/types/request_group_related_action.py @@ -22,27 +22,32 @@ class RequestGroupRelatedAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action_id: typing.Optional[Id] = pydantic.Field( - alias="actionId", description="The element id of the action this is related to." + alias="actionId", default=None, description="The element id of the action this is related to." ) relationship: typing.Optional[Code] = pydantic.Field( - description="The relationship of this action to the related action." + default=None, description="The relationship of this action to the related action." ) offset_duration: typing.Optional[Duration] = pydantic.Field( alias="offsetDuration", + default=None, description="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", ) offset_range: typing.Optional[Range] = pydantic.Field( alias="offsetRange", + default=None, description="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", ) diff --git a/src/metriport/fhir/types/research_definition.py b/src/metriport/fhir/types/research_definition.py index c5b4f35..0471706 100644 --- a/src/metriport/fhir/types/research_definition.py +++ b/src/metriport/fhir/types/research_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,120 +29,150 @@ class ResearchDefinition(BaseResource): The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["ResearchDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the research definition." + default=None, description="A short, descriptive, user-friendly title for the research definition." ) short_title: typing.Optional[str] = pydantic.Field( alias="shortTitle", + default=None, description="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the ResearchDefinition giving additional information about its content." + default=None, + description="An explanatory or alternate title for the ResearchDefinition giving additional information about its content.", ) status: typing.Optional[ResearchDefinitionStatus] = pydantic.Field( - description="The status of this research definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this research definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes." + default=None, + description="The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the research definition." + default=None, description="The name of the organization or individual that published the research definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the research definition from a consumer's perspective." + default=None, + description="A free text natural language description of the research definition from a consumer's perspective.", ) comment: typing.Optional[typing.List[str]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the research definition is intended to be used." + default=None, + description="A legal or geographic region in which the research definition is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this research definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this research definition is needed and why it has been designed as it has.", ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description, from a clinical perspective, of how the ResearchDefinition is used." + default=None, + description="A detailed description, from a clinical perspective, of how the ResearchDefinition is used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition." + default=None, + description="A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the research definition content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) library: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A reference to a Library resource containing the formal logic used by the ResearchDefinition." + default=None, + description="A reference to a Library resource containing the formal logic used by the ResearchDefinition.", ) population: Reference = pydantic.Field( description="A reference to a ResearchElementDefinition resource that defines the population for the research." ) exposure: typing.Optional[Reference] = pydantic.Field( - description="A reference to a ResearchElementDefinition resource that defines the exposure for the research." + default=None, + description="A reference to a ResearchElementDefinition resource that defines the exposure for the research.", ) exposure_alternative: typing.Optional[Reference] = pydantic.Field( alias="exposureAlternative", + default=None, description="A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.", ) outcome: typing.Optional[Reference] = pydantic.Field( - description="A reference to a ResearchElementDefinition resomece that defines the outcome for the research." + default=None, + description="A reference to a ResearchElementDefinition resomece that defines the outcome for the research.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/research_element_definition.py b/src/metriport/fhir/types/research_element_definition.py index 8f606ad..dbc95bc 100644 --- a/src/metriport/fhir/types/research_element_definition.py +++ b/src/metriport/fhir/types/research_element_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -34,113 +32,143 @@ class ResearchElementDefinition(BaseResource): The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["ResearchElementDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchElementDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." + default=None, + description="The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the research element definition." + default=None, description="A short, descriptive, user-friendly title for the research element definition." ) short_title: typing.Optional[str] = pydantic.Field( alias="shortTitle", + default=None, description="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", ) subtitle: typing.Optional[str] = pydantic.Field( - description="An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content." + default=None, + description="An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.", ) status: typing.Optional[ResearchElementDefinitionStatus] = pydantic.Field( - description="The status of this research element definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this research element definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) subject_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="subjectCodeableConcept", + default=None, description="The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", ) subject_reference: typing.Optional[Reference] = pydantic.Field( alias="subjectReference", + default=None, description="The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes." + default=None, + description="The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the research element definition." + default=None, + description="The name of the organization or individual that published the research element definition.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the research element definition from a consumer's perspective." + default=None, + description="A free text natural language description of the research element definition from a consumer's perspective.", ) comment: typing.Optional[typing.List[str]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research element definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the research element definition is intended to be used." + default=None, + description="A legal or geographic region in which the research element definition is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this research element definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this research element definition is needed and why it has been designed as it has.", ) usage: typing.Optional[str] = pydantic.Field( - description="A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used." + default=None, + description="A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition." + default=None, + description="A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the research element definition content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) library: typing.Optional[typing.List[Canonical]] = pydantic.Field( - description="A reference to a Library resource containing the formal logic used by the ResearchElementDefinition." + default=None, + description="A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.", ) type: typing.Optional[ResearchElementDefinitionType] = pydantic.Field( - description="The type of research element, a population, an exposure, or an outcome." + default=None, description="The type of research element, a population, an exposure, or an outcome." ) variable_type: typing.Optional[ResearchElementDefinitionVariableType] = pydantic.Field( - alias="variableType", description="The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive)." + alias="variableType", + default=None, + description="The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).", ) characteristic: typing.List[ResearchElementDefinitionCharacteristic] = pydantic.Field( description='A characteristic that defines the members of the research element. Multiple characteristics are applied with "and" semantics.' diff --git a/src/metriport/fhir/types/research_element_definition_characteristic.py b/src/metriport/fhir/types/research_element_definition_characteristic.py index db399ef..88daf9f 100644 --- a/src/metriport/fhir/types/research_element_definition_characteristic.py +++ b/src/metriport/fhir/types/research_element_definition_characteristic.py @@ -31,88 +31,111 @@ class ResearchElementDefinitionCharacteristic(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) definition_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="definitionCodeableConcept", + default=None, description="Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_canonical: typing.Optional[str] = pydantic.Field( alias="definitionCanonical", + default=None, description="Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_expression: typing.Optional[Expression] = pydantic.Field( alias="definitionExpression", + default=None, description="Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) definition_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="definitionDataRequirement", + default=None, description="Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", ) usage_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="usageContext", + default=None, description="Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.", ) exclude: typing.Optional[bool] = pydantic.Field( - description="When true, members with this characteristic are excluded from the element." + default=None, description="When true, members with this characteristic are excluded from the element." ) unit_of_measure: typing.Optional[CodeableConcept] = pydantic.Field( - alias="unitOfMeasure", description="Specifies the UCUM unit for the outcome." + alias="unitOfMeasure", default=None, description="Specifies the UCUM unit for the outcome." ) study_effective_description: typing.Optional[str] = pydantic.Field( - alias="studyEffectiveDescription", description="A narrative description of the time period the study covers." + alias="studyEffectiveDescription", + default=None, + description="A narrative description of the time period the study covers.", ) study_effective_date_time: typing.Optional[str] = pydantic.Field( - alias="studyEffectiveDateTime", description="Indicates what effective period the study covers." + alias="studyEffectiveDateTime", default=None, description="Indicates what effective period the study covers." ) study_effective_period: typing.Optional[Period] = pydantic.Field( - alias="studyEffectivePeriod", description="Indicates what effective period the study covers." + alias="studyEffectivePeriod", default=None, description="Indicates what effective period the study covers." ) study_effective_duration: typing.Optional[Duration] = pydantic.Field( - alias="studyEffectiveDuration", description="Indicates what effective period the study covers." + alias="studyEffectiveDuration", default=None, description="Indicates what effective period the study covers." ) study_effective_timing: typing.Optional[Timing] = pydantic.Field( - alias="studyEffectiveTiming", description="Indicates what effective period the study covers." + alias="studyEffectiveTiming", default=None, description="Indicates what effective period the study covers." ) study_effective_time_from_start: typing.Optional[Duration] = pydantic.Field( - alias="studyEffectiveTimeFromStart", description="Indicates duration from the study initiation." + alias="studyEffectiveTimeFromStart", default=None, description="Indicates duration from the study initiation." ) study_effective_group_measure: typing.Optional[ ResearchElementDefinitionCharacteristicStudyEffectiveGroupMeasure ] = pydantic.Field( alias="studyEffectiveGroupMeasure", + default=None, description="Indicates how elements are aggregated within the study effective period.", ) participant_effective_description: typing.Optional[str] = pydantic.Field( alias="participantEffectiveDescription", + default=None, description="A narrative description of the time period the study covers.", ) participant_effective_date_time: typing.Optional[str] = pydantic.Field( - alias="participantEffectiveDateTime", description="Indicates what effective period the study covers." + alias="participantEffectiveDateTime", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_period: typing.Optional[Period] = pydantic.Field( - alias="participantEffectivePeriod", description="Indicates what effective period the study covers." + alias="participantEffectivePeriod", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_duration: typing.Optional[Duration] = pydantic.Field( - alias="participantEffectiveDuration", description="Indicates what effective period the study covers." + alias="participantEffectiveDuration", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_timing: typing.Optional[Timing] = pydantic.Field( - alias="participantEffectiveTiming", description="Indicates what effective period the study covers." + alias="participantEffectiveTiming", + default=None, + description="Indicates what effective period the study covers.", ) participant_effective_time_from_start: typing.Optional[Duration] = pydantic.Field( - alias="participantEffectiveTimeFromStart", description="Indicates duration from the participant's study entry." + alias="participantEffectiveTimeFromStart", + default=None, + description="Indicates duration from the participant's study entry.", ) participant_effective_group_measure: typing.Optional[ ResearchElementDefinitionCharacteristicParticipantEffectiveGroupMeasure ] = pydantic.Field( alias="participantEffectiveGroupMeasure", + default=None, description="Indicates how elements are aggregated within the study effective period.", ) diff --git a/src/metriport/fhir/types/research_study.py b/src/metriport/fhir/types/research_study.py index 1d29f72..16ad50a 100644 --- a/src/metriport/fhir/types/research_study.py +++ b/src/metriport/fhir/types/research_study.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,77 +28,95 @@ class ResearchStudy(BaseResource): A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. """ - resource_type: typing_extensions.Literal["ResearchStudy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchStudy"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this research study by the sponsor or other systems." + default=None, description="Identifiers assigned to this research study by the sponsor or other systems." + ) + title: typing.Optional[str] = pydantic.Field( + default=None, description="A short, descriptive user-friendly label for the study." ) - title: typing.Optional[str] = pydantic.Field(description="A short, descriptive user-friendly label for the study.") protocol: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The set of steps expected to be performed as part of the execution of the study." + default=None, description="The set of steps expected to be performed as part of the execution of the study." ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger research study of which this particular study is a component or step." + alias="partOf", + default=None, + description="A larger research study of which this particular study is a component or step.", + ) + status: typing.Optional[ResearchStudyStatus] = pydantic.Field( + default=None, description="The current state of the study." ) - status: typing.Optional[ResearchStudyStatus] = pydantic.Field(description="The current state of the study.") primary_purpose_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="primaryPurposeType", + default=None, description="The type of study based upon the intent of the study's activities. A classification of the intent of the study.", ) phase: typing.Optional[CodeableConcept] = pydantic.Field( - description="The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation." + default=None, + description="The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.", ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc." + default=None, + description="Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.", ) focus: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about." + default=None, + description="The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.", ) condition: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='The condition that is the focus of the study. For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion "healthy volunteer", but the target condition code would be a Lupus SNOMED code.' + default=None, + description='The condition that is the focus of the study. For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion "healthy volunteer", but the target condition code would be a Lupus SNOMED code.', ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in learning more about or engaging with the study." + default=None, description="Contact details to assist a user in learning more about or engaging with the study." ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( - alias="relatedArtifact", description="Citations, references and other related documents." + alias="relatedArtifact", default=None, description="Citations, references and other related documents." ) keyword: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Key terms to aid in searching for or filtering the study." + default=None, description="Key terms to aid in searching for or filtering the study." ) location: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Indicates a country, state or other region where the study is taking place." + default=None, description="Indicates a country, state or other region where the study is taking place." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A full description of how the study is being conducted." + default=None, description="A full description of how the study is being conducted." ) enrollment: typing.Optional[typing.List[Reference]] = pydantic.Field( - description='Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. " 200 female Europeans between the ages of 20 and 45 with early onset diabetes".' + default=None, + description='Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. " 200 female Europeans between the ages of 20 and 45 with early onset diabetes".', ) period: typing.Optional[Period] = pydantic.Field( - description="Identifies the start date and the expected (or actual, depending on status) end date for the study." + default=None, + description="Identifies the start date and the expected (or actual, depending on status) end date for the study.", ) sponsor: typing.Optional[Reference] = pydantic.Field( - description="An organization that initiates the investigation and is legally responsible for the study." + default=None, + description="An organization that initiates the investigation and is legally responsible for the study.", ) principal_investigator: typing.Optional[Reference] = pydantic.Field( alias="principalInvestigator", + default=None, description="A researcher in a study who oversees multiple aspects of the study, such as concept development, protocol writing, protocol submission for IRB approval, participant recruitment, informed consent, data collection, analysis, interpretation and presentation.", ) site: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="A facility in which study activities are conducted." + default=None, description="A facility in which study activities are conducted." ) reason_stopped: typing.Optional[CodeableConcept] = pydantic.Field( alias="reasonStopped", + default=None, description="A description and/or code explaining the premature termination of the study.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Comments made about the study by the performer, subject or other participants." + default=None, description="Comments made about the study by the performer, subject or other participants." ) arm: typing.Optional[typing.List[ResearchStudyArm]] = pydantic.Field( - description="Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up." + default=None, + description="Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.", ) objective: typing.Optional[typing.List[ResearchStudyObjective]] = pydantic.Field( - description="A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study." + default=None, + description="A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/research_study_arm.py b/src/metriport/fhir/types/research_study_arm.py index 30a9525..62ba5a0 100644 --- a/src/metriport/fhir/types/research_study_arm.py +++ b/src/metriport/fhir/types/research_study_arm.py @@ -19,21 +19,28 @@ class ResearchStudyArm(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Unique, human-readable label for this arm of the study.") + name: typing.Optional[str] = pydantic.Field( + default=None, description="Unique, human-readable label for this arm of the study." + ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Categorization of study arm, e.g. experimental, active comparator, placebo comparater." + default=None, + description="Categorization of study arm, e.g. experimental, active comparator, placebo comparater.", ) description: typing.Optional[str] = pydantic.Field( - description="A succinct description of the path through the study that would be followed by a subject adhering to this arm." + default=None, + description="A succinct description of the path through the study that would be followed by a subject adhering to this arm.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/research_study_objective.py b/src/metriport/fhir/types/research_study_objective.py index 7868504..fe59075 100644 --- a/src/metriport/fhir/types/research_study_objective.py +++ b/src/metriport/fhir/types/research_study_objective.py @@ -19,19 +19,22 @@ class ResearchStudyObjective(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="Unique, human-readable label for this objective of the study." + default=None, description="Unique, human-readable label for this objective of the study." ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="The kind of study objective.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The kind of study objective.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/research_subject.py b/src/metriport/fhir/types/research_subject.py index 58a67ae..9db9151 100644 --- a/src/metriport/fhir/types/research_subject.py +++ b/src/metriport/fhir/types/research_subject.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .identifier import Identifier @@ -23,13 +21,15 @@ class ResearchSubject(BaseResource): A physical entity which is the primary unit of operational and/or administrative interest in a study. """ - resource_type: typing_extensions.Literal["ResearchSubject"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchSubject"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this research subject for a study." + default=None, description="Identifiers assigned to this research subject for a study." + ) + status: typing.Optional[ResearchSubjectStatus] = pydantic.Field( + default=None, description="The current state of the subject." ) - status: typing.Optional[ResearchSubjectStatus] = pydantic.Field(description="The current state of the subject.") period: typing.Optional[Period] = pydantic.Field( - description="The dates the subject began and ended their participation in the study." + default=None, description="The dates the subject began and ended their participation in the study." ) study: Reference = pydantic.Field(description="Reference to the study the subject is participating in.") individual: Reference = pydantic.Field( @@ -37,14 +37,16 @@ class ResearchSubject(BaseResource): ) assigned_arm: typing.Optional[str] = pydantic.Field( alias="assignedArm", + default=None, description="The name of the arm in the study the subject is expected to follow as part of this study.", ) actual_arm: typing.Optional[str] = pydantic.Field( alias="actualArm", + default=None, description="The name of the arm in the study the subject actually followed as part of this study.", ) consent: typing.Optional[Reference] = pydantic.Field( - description="A record of the patient's informed agreement to participate in the study." + default=None, description="A record of the patient's informed agreement to participate in the study." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_assessment.py b/src/metriport/fhir/types/risk_assessment.py index f0c8155..b9a8a27 100644 --- a/src/metriport/fhir/types/risk_assessment.py +++ b/src/metriport/fhir/types/risk_assessment.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -26,56 +24,68 @@ class RiskAssessment(BaseResource): An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. """ - resource_type: typing_extensions.Literal["RiskAssessment"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RiskAssessment"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifier assigned to the risk assessment." + default=None, description="Business identifier assigned to the risk assessment." ) based_on: typing.Optional[Reference] = pydantic.Field( - alias="basedOn", description="A reference to the request that is fulfilled by this risk assessment." + alias="basedOn", + default=None, + description="A reference to the request that is fulfilled by this risk assessment.", ) parent: typing.Optional[Reference] = pydantic.Field( - description="A reference to a resource that this risk assessment is part of, such as a Procedure." + default=None, description="A reference to a resource that this risk assessment is part of, such as a Procedure." ) status: typing.Optional[Code] = pydantic.Field( - description="The status of the RiskAssessment, using the same statuses as an Observation." + default=None, description="The status of the RiskAssessment, using the same statuses as an Observation." ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="The algorithm, process or mechanism used to evaluate the risk." + default=None, description="The algorithm, process or mechanism used to evaluate the risk." + ) + code: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The type of the risk assessment performed." ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of the risk assessment performed.") subject: Reference = pydantic.Field(description="The patient or group the risk assessment applies to.") encounter: typing.Optional[Reference] = pydantic.Field( - description="The encounter where the assessment was performed." + default=None, description="The encounter where the assessment was performed." ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="The date (and possibly time) the risk assessment was performed." + alias="occurrenceDateTime", + default=None, + description="The date (and possibly time) the risk assessment was performed.", ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="The date (and possibly time) the risk assessment was performed." + alias="occurrencePeriod", + default=None, + description="The date (and possibly time) the risk assessment was performed.", ) condition: typing.Optional[Reference] = pydantic.Field( - description="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." + default=None, + description="For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", ) performer: typing.Optional[Reference] = pydantic.Field( - description="The provider or software application that performed the assessment." + default=None, description="The provider or software application that performed the assessment." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="The reason the risk assessment was performed." + alias="reasonCode", default=None, description="The reason the risk assessment was performed." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="Resources supporting the reason the risk assessment was performed." + alias="reasonReference", + default=None, + description="Resources supporting the reason the risk assessment was performed.", ) basis: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.)." + default=None, + description="Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).", ) prediction: typing.Optional[typing.List[RiskAssessmentPrediction]] = pydantic.Field( - description="Describes the expected outcome for the subject." + default=None, description="Describes the expected outcome for the subject." ) mitigation: typing.Optional[str] = pydantic.Field( - description="A description of the steps that might be taken to reduce the identified risk(s)." + default=None, description="A description of the steps that might be taken to reduce the identified risk(s)." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Additional comments about the risk assessment." + default=None, description="Additional comments about the risk assessment." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_assessment_prediction.py b/src/metriport/fhir/types/risk_assessment_prediction.py index 52a3994..a7432d6 100644 --- a/src/metriport/fhir/types/risk_assessment_prediction.py +++ b/src/metriport/fhir/types/risk_assessment_prediction.py @@ -22,42 +22,54 @@ class RiskAssessmentPrediction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) outcome: typing.Optional[CodeableConcept] = pydantic.Field( - description="One of the potential outcomes for the patient (e.g. remission, death, a particular condition)." + default=None, + description="One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", ) probability_decimal: typing.Optional[float] = pydantic.Field( - alias="probabilityDecimal", description="Indicates how likely the outcome is (in the specified timeframe)." + alias="probabilityDecimal", + default=None, + description="Indicates how likely the outcome is (in the specified timeframe).", ) probability_range: typing.Optional[Range] = pydantic.Field( - alias="probabilityRange", description="Indicates how likely the outcome is (in the specified timeframe)." + alias="probabilityRange", + default=None, + description="Indicates how likely the outcome is (in the specified timeframe).", ) qualitative_risk: typing.Optional[CodeableConcept] = pydantic.Field( alias="qualitativeRisk", + default=None, description="Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).", ) relative_risk: typing.Optional[Decimal] = pydantic.Field( alias="relativeRisk", + default=None, description="Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).", ) when_period: typing.Optional[Period] = pydantic.Field( alias="whenPeriod", + default=None, description="Indicates the period of time or age range of the subject to which the specified probability applies.", ) when_range: typing.Optional[Range] = pydantic.Field( alias="whenRange", + default=None, description="Indicates the period of time or age range of the subject to which the specified probability applies.", ) rationale: typing.Optional[str] = pydantic.Field( - description="Additional information explaining the basis for the prediction." + default=None, description="Additional information explaining the basis for the prediction." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_evidence_synthesis.py b/src/metriport/fhir/types/risk_evidence_synthesis.py index 864fb3c..a63b6c1 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -34,104 +32,127 @@ class RiskEvidenceSynthesis(BaseResource): The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies. """ - resource_type: typing_extensions.Literal["RiskEvidenceSynthesis"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RiskEvidenceSynthesis"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers." + default=None, + description="An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this risk evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this risk evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the risk evidence synthesis." + default=None, description="A short, descriptive, user-friendly title for the risk evidence synthesis." ) status: typing.Optional[RiskEvidenceSynthesisStatus] = pydantic.Field( - description="The status of this risk evidence synthesis. Enables tracking the life-cycle of the content." + default=None, + description="The status of this risk evidence synthesis. Enables tracking the life-cycle of the content.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes." + default=None, + description="The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the risk evidence synthesis." + default=None, + description="The name of the organization or individual that published the risk evidence synthesis.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the risk evidence synthesis from a consumer's perspective." + default=None, + description="A free text natural language description of the risk evidence synthesis from a consumer's perspective.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate risk evidence synthesis instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the risk evidence synthesis is intended to be used." + default=None, + description="A legal or geographic region in which the risk evidence synthesis is intended to be used.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis." + default=None, + description="A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis.", ) approval_date: typing.Optional[dt.date] = pydantic.Field( alias="approvalDate", + default=None, description="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", ) last_review_date: typing.Optional[dt.date] = pydantic.Field( alias="lastReviewDate", + default=None, description="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", ) effective_period: typing.Optional[Period] = pydantic.Field( alias="effectivePeriod", + default=None, description="The period during which the risk evidence synthesis content was or is planned to be in active use.", ) topic: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Descriptive topics related to the content of the RiskEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching." + default=None, + description="Descriptive topics related to the content of the RiskEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.", ) author: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individiual or organization primarily involved in the creation and maintenance of the content." + default=None, + description="An individiual or organization primarily involved in the creation and maintenance of the content.", ) editor: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for internal coherence of the content." + default=None, + description="An individual or organization primarily responsible for internal coherence of the content.", ) reviewer: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization primarily responsible for review of some aspect of the content." + default=None, + description="An individual or organization primarily responsible for review of some aspect of the content.", ) endorser: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="An individual or organization responsible for officially endorsing the content for use in some setting." + default=None, + description="An individual or organization responsible for officially endorsing the content for use in some setting.", ) related_artifact: typing.Optional[typing.List[RelatedArtifact]] = pydantic.Field( alias="relatedArtifact", + default=None, description="Related artifacts such as additional documentation, justification, or bibliographic references.", ) synthesis_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="synthesisType", description="Type of synthesis eg meta-analysis." + alias="synthesisType", default=None, description="Type of synthesis eg meta-analysis." ) study_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="studyType", description="Type of study eg randomized trial." + alias="studyType", default=None, description="Type of study eg randomized trial." ) population: Reference = pydantic.Field( description="A reference to a EvidenceVariable resource that defines the population for the research." ) exposure: typing.Optional[Reference] = pydantic.Field( - description="A reference to a EvidenceVariable resource that defines the exposure for the research." + default=None, + description="A reference to a EvidenceVariable resource that defines the exposure for the research.", ) outcome: Reference = pydantic.Field( description="A reference to a EvidenceVariable resomece that defines the outcome for the research." ) sample_size: typing.Optional[RiskEvidenceSynthesisSampleSize] = pydantic.Field( - alias="sampleSize", description="A description of the size of the sample involved in the synthesis." + alias="sampleSize", + default=None, + description="A description of the size of the sample involved in the synthesis.", ) risk_estimate: typing.Optional[RiskEvidenceSynthesisRiskEstimate] = pydantic.Field( - alias="riskEstimate", description="The estimated risk of the outcome." + alias="riskEstimate", default=None, description="The estimated risk of the outcome." ) certainty: typing.Optional[typing.List[RiskEvidenceSynthesisCertainty]] = pydantic.Field( - description="A description of the certainty of the risk estimate." + default=None, description="A description of the certainty of the risk estimate." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_evidence_synthesis_certainty.py b/src/metriport/fhir/types/risk_evidence_synthesis_certainty.py index aaefc9f..fe532ef 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis_certainty.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis_certainty.py @@ -21,23 +21,28 @@ class RiskEvidenceSynthesisCertainty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) rating: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A rating of the certainty of the effect estimate." + default=None, description="A rating of the certainty of the effect estimate." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) certainty_subcomponent: typing.Optional[typing.List[RiskEvidenceSynthesisCertaintySubcomponent]] = pydantic.Field( - alias="certaintySubcomponent", description="A description of a component of the overall certainty." + alias="certaintySubcomponent", + default=None, + description="A description of a component of the overall certainty.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_evidence_synthesis_certainty_subcomponent.py b/src/metriport/fhir/types/risk_evidence_synthesis_certainty_subcomponent.py index 0abc747..0accd14 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis_certainty_subcomponent.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis_certainty_subcomponent.py @@ -20,21 +20,26 @@ class RiskEvidenceSynthesisCertaintySubcomponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Type of subcomponent of certainty rating.") + type: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Type of subcomponent of certainty rating." + ) rating: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A rating of a subcomponent of rating certainty." + default=None, description="A rating of a subcomponent of rating certainty." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="A human-readable string to clarify or explain concepts about the resource." + default=None, description="A human-readable string to clarify or explain concepts about the resource." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_evidence_synthesis_precision_estimate.py b/src/metriport/fhir/types/risk_evidence_synthesis_precision_estimate.py index 5b9e398..6944c3a 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis_precision_estimate.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis_precision_estimate.py @@ -20,21 +20,26 @@ class RiskEvidenceSynthesisPrecisionEstimate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Examples include confidence interval and interquartile range." + default=None, description="Examples include confidence interval and interquartile range." ) - level: typing.Optional[Decimal] = pydantic.Field(description="Use 95 for a 95% confidence interval.") - from_: typing.Optional[Decimal] = pydantic.Field(alias="from", description="Lower bound of confidence interval.") - to: typing.Optional[Decimal] = pydantic.Field(description="Upper bound of confidence interval.") + level: typing.Optional[Decimal] = pydantic.Field(default=None, description="Use 95 for a 95% confidence interval.") + from_: typing.Optional[Decimal] = pydantic.Field( + alias="from", default=None, description="Lower bound of confidence interval." + ) + to: typing.Optional[Decimal] = pydantic.Field(default=None, description="Upper bound of confidence interval.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/risk_evidence_synthesis_risk_estimate.py b/src/metriport/fhir/types/risk_evidence_synthesis_risk_estimate.py index 2b502b9..5540ade 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis_risk_estimate.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis_risk_estimate.py @@ -21,29 +21,42 @@ class RiskEvidenceSynthesisRiskEstimate(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Human-readable summary of risk estimate.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Examples include proportion and mean.") - value: typing.Optional[Decimal] = pydantic.Field(description="The point estimate of the risk estimate.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human-readable summary of risk estimate." + ) + type: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Examples include proportion and mean." + ) + value: typing.Optional[Decimal] = pydantic.Field( + default=None, description="The point estimate of the risk estimate." + ) unit_of_measure: typing.Optional[CodeableConcept] = pydantic.Field( - alias="unitOfMeasure", description="Specifies the UCUM unit for the outcome." + alias="unitOfMeasure", default=None, description="Specifies the UCUM unit for the outcome." ) denominator_count: typing.Optional[int] = pydantic.Field( - alias="denominatorCount", description="The sample size for the group that was measured for this risk estimate." + alias="denominatorCount", + default=None, + description="The sample size for the group that was measured for this risk estimate.", ) numerator_count: typing.Optional[int] = pydantic.Field( - alias="numeratorCount", description="The number of group members with the outcome of interest." + alias="numeratorCount", default=None, description="The number of group members with the outcome of interest." ) precision_estimate: typing.Optional[typing.List[RiskEvidenceSynthesisPrecisionEstimate]] = pydantic.Field( - alias="precisionEstimate", description="A description of the precision of the estimate for the effect." + alias="precisionEstimate", + default=None, + description="A description of the precision of the estimate for the effect.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/risk_evidence_synthesis_sample_size.py b/src/metriport/fhir/types/risk_evidence_synthesis_sample_size.py index 839cc5c..fb14f29 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis_sample_size.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis_sample_size.py @@ -18,21 +18,28 @@ class RiskEvidenceSynthesisSampleSize(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Human-readable summary of sample size.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="Human-readable summary of sample size." + ) number_of_studies: typing.Optional[int] = pydantic.Field( - alias="numberOfStudies", description="Number of studies included in this evidence synthesis." + alias="numberOfStudies", default=None, description="Number of studies included in this evidence synthesis." ) number_of_participants: typing.Optional[int] = pydantic.Field( - alias="numberOfParticipants", description="Number of participants included in this evidence synthesis." + alias="numberOfParticipants", + default=None, + description="Number of participants included in this evidence synthesis.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/sampled_data.py b/src/metriport/fhir/types/sampled_data.py index eb7d4b8..2d23447 100644 --- a/src/metriport/fhir/types/sampled_data.py +++ b/src/metriport/fhir/types/sampled_data.py @@ -21,33 +21,40 @@ class SampledData(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) origin: Quantity = pydantic.Field( description="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." ) period: typing.Optional[Decimal] = pydantic.Field( - description="The length of time between sampling times, measured in milliseconds." + default=None, description="The length of time between sampling times, measured in milliseconds." ) factor: typing.Optional[Decimal] = pydantic.Field( - description="A correction factor that is applied to the sampled data points before they are added to the origin." + default=None, + description="A correction factor that is applied to the sampled data points before they are added to the origin.", ) lower_limit: typing.Optional[Decimal] = pydantic.Field( alias="lowerLimit", + default=None, description='The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit).', ) upper_limit: typing.Optional[Decimal] = pydantic.Field( alias="upperLimit", + default=None, description='The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit).', ) dimensions: typing.Optional[PositiveInt] = pydantic.Field( - description="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." + default=None, + description="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.", ) data: typing.Optional[str] = pydantic.Field( - description='A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value.' + default=None, + description='A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value.', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/schedule.py b/src/metriport/fhir/types/schedule.py index ac8039a..2196ae4 100644 --- a/src/metriport/fhir/types/schedule.py +++ b/src/metriport/fhir/types/schedule.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,30 +21,39 @@ class Schedule(BaseResource): A container for slots of time that may be available for booking appointments. """ - resource_type: typing_extensions.Literal["Schedule"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="External Ids for this item.") + resource_type: typing.Literal["Schedule"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="External Ids for this item." + ) active: typing.Optional[bool] = pydantic.Field( - description="Whether this schedule record is in active use or should not be used (such as was entered in error)." + default=None, + description="Whether this schedule record is in active use or should not be used (such as was entered in error).", ) service_category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceCategory", + default=None, description="A broad categorization of the service that is to be performed during this appointment.", ) service_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="serviceType", description="The specific service that is to be performed during this appointment." + alias="serviceType", + default=None, + description="The specific service that is to be performed during this appointment.", ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The specialty of a practitioner that would be required to perform the service requested in this appointment." + default=None, + description="The specialty of a practitioner that would be required to perform the service requested in this appointment.", ) actor: typing.List[Reference] = pydantic.Field( description="Slots that reference this schedule resource provide the availability details to these referenced resource(s)." ) planning_horizon: typing.Optional[Period] = pydantic.Field( alias="planningHorizon", + default=None, description='The period of time that the slots that reference this Schedule resource cover (even if none exist). These cover the amount of time that an organization\'s planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates.', ) comment: typing.Optional[str] = pydantic.Field( - description="Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated." + default=None, + description="Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/search_parameter.py b/src/metriport/fhir/types/search_parameter.py index 8206cab..29c3233 100644 --- a/src/metriport/fhir/types/search_parameter.py +++ b/src/metriport/fhir/types/search_parameter.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,87 +31,101 @@ class SearchParameter(BaseResource): A search parameter that defines a named search item that can be used to search/filter on a resource. """ - resource_type: typing_extensions.Literal["SearchParameter"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SearchParameter"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers." + default=None, + description="An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) derived_from: typing.Optional[Canonical] = pydantic.Field( alias="derivedFrom", + default=None, description="Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.", ) status: typing.Optional[SearchParameterStatus] = pydantic.Field( - description="The status of this search parameter. Enables tracking the life-cycle of the content." + default=None, description="The status of this search parameter. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes." + default=None, + description="The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the search parameter." + default=None, description="The name of the organization or individual that published the search parameter." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) - description: typing.Optional[Markdown] = pydantic.Field(description="And how it used.") + description: typing.Optional[Markdown] = pydantic.Field(default=None, description="And how it used.") use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the search parameter is intended to be used." + default=None, description="A legal or geographic region in which the search parameter is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this search parameter is needed and why it has been designed as it has." + default=None, + description="Explanation of why this search parameter is needed and why it has been designed as it has.", ) code: typing.Optional[Code] = pydantic.Field( - description="The code used in the URL or the parameter name in a parameters resource for this search parameter." + default=None, + description="The code used in the URL or the parameter name in a parameters resource for this search parameter.", ) base: typing.Optional[typing.List[Code]] = pydantic.Field( - description="The base resource type(s) that this search parameter can be used against." + default=None, description="The base resource type(s) that this search parameter can be used against." ) type: typing.Optional[SearchParameterType] = pydantic.Field( - description="The type of value that a search parameter may contain, and how the content is interpreted." + default=None, + description="The type of value that a search parameter may contain, and how the content is interpreted.", ) expression: typing.Optional[str] = pydantic.Field( - description="A FHIRPath expression that returns a set of elements for the search parameter." + default=None, description="A FHIRPath expression that returns a set of elements for the search parameter." ) xpath: typing.Optional[str] = pydantic.Field( - description="An XPath expression that returns a set of elements for the search parameter." + default=None, description="An XPath expression that returns a set of elements for the search parameter." ) xpath_usage: typing.Optional[SearchParameterXpathUsage] = pydantic.Field( alias="xpathUsage", + default=None, description="How the search parameter relates to the set of elements returned by evaluating the xpath query.", ) target: typing.Optional[typing.List[Code]] = pydantic.Field( - description="Types of resource (if a resource is referenced)." + default=None, description="Types of resource (if a resource is referenced)." ) multiple_or: typing.Optional[bool] = pydantic.Field( alias="multipleOr", + default=None, description="Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.", ) multiple_and: typing.Optional[bool] = pydantic.Field( alias="multipleAnd", + default=None, description="Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.", ) comparator: typing.Optional[typing.List[SearchParameterComparatorItem]] = pydantic.Field( - description="Comparators supported for the search parameter." + default=None, description="Comparators supported for the search parameter." ) modifier: typing.Optional[typing.List[SearchParameterModifierItem]] = pydantic.Field( - description="A modifier supported for the search parameter." + default=None, description="A modifier supported for the search parameter." ) chain: typing.Optional[typing.List[str]] = pydantic.Field( - description="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type." + default=None, + description="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.", ) component: typing.Optional[typing.List[SearchParameterComponent]] = pydantic.Field( - description="Used to define the parts of a composite search parameter." + default=None, description="Used to define the parts of a composite search parameter." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/search_parameter_component.py b/src/metriport/fhir/types/search_parameter_component.py index d2aa11a..504c529 100644 --- a/src/metriport/fhir/types/search_parameter_component.py +++ b/src/metriport/fhir/types/search_parameter_component.py @@ -19,20 +19,24 @@ class SearchParameterComponent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) definition: Canonical = pydantic.Field( description="The definition of the search parameter that describes this part." ) expression: typing.Optional[str] = pydantic.Field( - description="A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression." + default=None, + description="A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/service_request.py b/src/metriport/fhir/types/service_request.py index 6eadc0d..25f0f08 100644 --- a/src/metriport/fhir/types/service_request.py +++ b/src/metriport/fhir/types/service_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,133 +30,161 @@ class ServiceRequest(BaseResource): A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. """ - resource_type: typing_extensions.Literal["ServiceRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ServiceRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." + default=None, + description="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", ) instantiates_canonical: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", ) instantiates_uri: typing.Optional[typing.List[Uri]] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="Plan/proposal/order fulfilled by this request." + alias="basedOn", default=None, description="Plan/proposal/order fulfilled by this request." ) replaces: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The request takes the place of the referenced completed or terminated request(s)." + default=None, description="The request takes the place of the referenced completed or terminated request(s)." ) requisition: typing.Optional[Identifier] = pydantic.Field( - description="A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier." + default=None, + description="A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.", ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the order.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the order.") intent: typing.Optional[Code] = pydantic.Field( - description="Whether the request is a proposal, plan, an original order or a reflex order." + default=None, description="Whether the request is a proposal, plan, an original order or a reflex order." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description='A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").' + default=None, + description='A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").', ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the ServiceRequest should be addressed with respect to other requests." + default=None, + description="Indicates how quickly the ServiceRequest should be addressed with respect to other requests.", ) do_not_perform: typing.Optional[bool] = pydantic.Field( alias="doNotPerform", + default=None, description="Set this to true if the record is saying that the service/procedure should NOT be performed.", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested." + default=None, + description="A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.", ) order_detail: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="orderDetail", + default=None, description="Additional details and instructions about the how the services are to be delivered. For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.", ) quantity_quantity: typing.Optional[Quantity] = pydantic.Field( alias="quantityQuantity", + default=None, description="An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", ) quantity_ratio: typing.Optional[Ratio] = pydantic.Field( alias="quantityRatio", + default=None, description="An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", ) quantity_range: typing.Optional[Range] = pydantic.Field( alias="quantityRange", + default=None, description="An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", ) subject: Reference = pydantic.Field( description="On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="An encounter that provides additional information about the healthcare context in which this request is made." + default=None, + description="An encounter that provides additional information about the healthcare context in which this request is made.", ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="The date/time at which the requested service should occur." + alias="occurrenceDateTime", + default=None, + description="The date/time at which the requested service should occur.", ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="The date/time at which the requested service should occur." + alias="occurrencePeriod", default=None, description="The date/time at which the requested service should occur." ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( - alias="occurrenceTiming", description="The date/time at which the requested service should occur." + alias="occurrenceTiming", default=None, description="The date/time at which the requested service should occur." ) as_needed_boolean: typing.Optional[bool] = pydantic.Field( alias="asNeededBoolean", + default=None, description='If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example "pain", "on flare-up", etc.', ) as_needed_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="asNeededCodeableConcept", + default=None, description='If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example "pain", "on flare-up", etc.', ) authored_on: typing.Optional[DateTime] = pydantic.Field( - alias="authoredOn", description="When the request transitioned to being actionable." + alias="authoredOn", default=None, description="When the request transitioned to being actionable." ) requester: typing.Optional[Reference] = pydantic.Field( - description="The individual who initiated the request and has responsibility for its activation." + default=None, description="The individual who initiated the request and has responsibility for its activation." ) performer_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="performerType", description="Desired type of performer for doing the requested service." + alias="performerType", default=None, description="Desired type of performer for doing the requested service." ) performer: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="The desired performer for doing the requested service. For example, the surgeon, dermatopathologist, endoscopist, etc." + default=None, + description="The desired performer for doing the requested service. For example, the surgeon, dermatopathologist, endoscopist, etc.", ) location_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="locationCode", + default=None, description="The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.", ) location_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="locationReference", + default=None, description="A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center.", ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="reasonCode", + default=None, description="An explanation or justification for why this service is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in `supportingInfo`.", ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="reasonReference", + default=None, description="Indicates another resource that provides a justification for why this service is being requested. May relate to the resources referred to in `supportingInfo`.", ) insurance: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service." + default=None, + description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.", ) supporting_info: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="supportingInfo", + default=None, description='Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as "ask at order entry questions (AOEs)". This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.', ) specimen: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="One or more specimens that the laboratory procedure will use." + default=None, description="One or more specimens that the laboratory procedure will use." ) body_site: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="bodySite", + default=None, description="Anatomic location where the procedure should be performed. This is the target site.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Any other notes and comments made about the service request. For example, internal billing notes." + default=None, + description="Any other notes and comments made about the service request. For example, internal billing notes.", ) patient_instruction: typing.Optional[str] = pydantic.Field( - alias="patientInstruction", description="Instructions in terms that are understood by the patient or consumer." + alias="patientInstruction", + default=None, + description="Instructions in terms that are understood by the patient or consumer.", ) relevant_history: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="relevantHistory", description="Key events in the history of the request." + alias="relevantHistory", default=None, description="Key events in the history of the request." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/signature.py b/src/metriport/fhir/types/signature.py index 055af1c..3f917ad 100644 --- a/src/metriport/fhir/types/signature.py +++ b/src/metriport/fhir/types/signature.py @@ -22,32 +22,38 @@ class Signature(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) type: typing.List[Coding] = pydantic.Field( description="An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document." ) - when: typing.Optional[Instant] = pydantic.Field(description="When the digital signature was signed.") + when: typing.Optional[Instant] = pydantic.Field(default=None, description="When the digital signature was signed.") who: Reference = pydantic.Field( description="A reference to an application-usable description of the identity that signed (e.g. the signature used their private key)." ) on_behalf_of: typing.Optional[Reference] = pydantic.Field( alias="onBehalfOf", + default=None, description="A reference to an application-usable description of the identity that is represented by the signature.", ) target_format: typing.Optional[Code] = pydantic.Field( alias="targetFormat", + default=None, description="A mime type that indicates the technical format of the target resources signed by the signature.", ) sig_format: typing.Optional[Code] = pydantic.Field( alias="sigFormat", + default=None, description="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/\* for a graphical image of a signature, etc.", ) data: typing.Optional[Base64Binary] = pydantic.Field( - description="The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty." + default=None, + description="The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/slot.py b/src/metriport/fhir/types/slot.py index d0c3212..35dda47 100644 --- a/src/metriport/fhir/types/slot.py +++ b/src/metriport/fhir/types/slot.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,36 +22,45 @@ class Slot(BaseResource): A slot of time on a schedule that may be available for booking appointments. """ - resource_type: typing_extensions.Literal["Slot"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="External Ids for this item.") + resource_type: typing.Literal["Slot"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( + default=None, description="External Ids for this item." + ) service_category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceCategory", + default=None, description="A broad categorization of the service that is to be performed during this appointment.", ) service_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceType", + default=None, description="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.", ) specialty: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The specialty of a practitioner that would be required to perform the service requested in this appointment." + default=None, + description="The specialty of a practitioner that would be required to perform the service requested in this appointment.", ) appointment_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="appointmentType", + default=None, description="The style of appointment or patient that may be booked in the slot (not service type).", ) schedule: Reference = pydantic.Field( description="The schedule resource that this slot defines an interval of status information." ) status: typing.Optional[SlotStatus] = pydantic.Field( - description=("busy \n" " free \n" " busy-unavailable \n" " busy-tentative \n" " entered-in-error.\n") + default=None, + description=("busy \n" " free \n" " busy-unavailable \n" " busy-tentative \n" " entered-in-error.\n"), ) - start: typing.Optional[Instant] = pydantic.Field(description="Date/Time that the slot is to begin.") - end: typing.Optional[Instant] = pydantic.Field(description="Date/Time that the slot is to conclude.") + start: typing.Optional[Instant] = pydantic.Field(default=None, description="Date/Time that the slot is to begin.") + end: typing.Optional[Instant] = pydantic.Field(default=None, description="Date/Time that the slot is to conclude.") overbooked: typing.Optional[bool] = pydantic.Field( - description="This slot has already been overbooked, appointments are unlikely to be accepted for this time." + default=None, + description="This slot has already been overbooked, appointments are unlikely to be accepted for this time.", ) comment: typing.Optional[str] = pydantic.Field( - description="Comments on the slot to describe any extended information. Such as custom constraints on the slot." + default=None, + description="Comments on the slot to describe any extended information. Such as custom constraints on the slot.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/smart_app_launch.py b/src/metriport/fhir/types/smart_app_launch.py index 3ff07b0..65fb3fc 100644 --- a/src/metriport/fhir/types/smart_app_launch.py +++ b/src/metriport/fhir/types/smart_app_launch.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,23 +21,28 @@ class SmartAppLaunch(pydantic.BaseModel): This resource contains context details for a SMART App Launch. """ - resource_type: typing_extensions.Literal["SmartAppLaunch"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SmartAppLaunch"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) patient: typing.Optional[Reference] = pydantic.Field( - description="Optional patient indicating that the app was launched in the patient context." + default=None, description="Optional patient indicating that the app was launched in the patient context." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="Optional encounter indicating that the app was launched in the encounter context." + default=None, description="Optional encounter indicating that the app was launched in the encounter context." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen.py b/src/metriport/fhir/types/specimen.py index ccfaa30..60aaa7c 100644 --- a/src/metriport/fhir/types/specimen.py +++ b/src/metriport/fhir/types/specimen.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,40 +26,49 @@ class Specimen(BaseResource): A sample to be used for analysis. """ - resource_type: typing_extensions.Literal["Specimen"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="Id for specimen.") + resource_type: typing.Literal["Specimen"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(default=None, description="Id for specimen.") accession_identifier: typing.Optional[Identifier] = pydantic.Field( alias="accessionIdentifier", + default=None, description="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", ) - status: typing.Optional[SpecimenStatus] = pydantic.Field(description="The availability of the specimen.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="The kind of material that forms the specimen.") + status: typing.Optional[SpecimenStatus] = pydantic.Field( + default=None, description="The availability of the specimen." + ) + type: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The kind of material that forms the specimen." + ) subject: typing.Optional[Reference] = pydantic.Field( - description="Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device." + default=None, + description="Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.", ) received_time: typing.Optional[DateTime] = pydantic.Field( - alias="receivedTime", description="Time when specimen was received for processing or testing." + alias="receivedTime", default=None, description="Time when specimen was received for processing or testing." ) parent: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen." + default=None, + description="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", ) request: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Details concerning a service request that required a specimen to be collected." + default=None, description="Details concerning a service request that required a specimen to be collected." ) collection: typing.Optional[SpecimenCollection] = pydantic.Field( - description="Details concerning the specimen collection." + default=None, description="Details concerning the specimen collection." ) processing: typing.Optional[typing.List[SpecimenProcessing]] = pydantic.Field( - description="Details concerning processing and processing steps for the specimen." + default=None, description="Details concerning processing and processing steps for the specimen." ) container: typing.Optional[typing.List[SpecimenContainer]] = pydantic.Field( - description="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." + default=None, + description="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.", ) condition: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A mode or state of being that describes the nature of the specimen." + default=None, description="A mode or state of being that describes the nature of the specimen." ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen)." + default=None, + description="To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen_collection.py b/src/metriport/fhir/types/specimen_collection.py index 824e345..f78a3d6 100644 --- a/src/metriport/fhir/types/specimen_collection.py +++ b/src/metriport/fhir/types/specimen_collection.py @@ -23,43 +23,54 @@ class SpecimenCollection(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - collector: typing.Optional[Reference] = pydantic.Field(description="Person who collected the specimen.") + collector: typing.Optional[Reference] = pydantic.Field( + default=None, description="Person who collected the specimen." + ) collected_date_time: typing.Optional[str] = pydantic.Field( alias="collectedDateTime", + default=None, description="Time when specimen was collected from subject - the physiologically relevant time.", ) collected_period: typing.Optional[Period] = pydantic.Field( alias="collectedPeriod", + default=None, description="Time when specimen was collected from subject - the physiologically relevant time.", ) duration: typing.Optional[Duration] = pydantic.Field( - description="The span of time over which the collection of a specimen occurred." + default=None, description="The span of time over which the collection of a specimen occurred." ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample." + default=None, + description="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="A coded value specifying the technique that is used to perform the procedure." + default=None, description="A coded value specifying the technique that is used to perform the procedure." ) body_site: typing.Optional[CodeableConcept] = pydantic.Field( alias="bodySite", + default=None, description="Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.", ) fasting_status_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="fastingStatusCodeableConcept", + default=None, description="Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", ) fasting_status_duration: typing.Optional[Duration] = pydantic.Field( alias="fastingStatusDuration", + default=None, description="Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", ) diff --git a/src/metriport/fhir/types/specimen_container.py b/src/metriport/fhir/types/specimen_container.py index 271ce5d..f8922d8 100644 --- a/src/metriport/fhir/types/specimen_container.py +++ b/src/metriport/fhir/types/specimen_container.py @@ -22,35 +22,44 @@ class SpecimenContainer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances." + default=None, + description="Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + ) + description: typing.Optional[str] = pydantic.Field( + default=None, description="Textual description of the container." ) - description: typing.Optional[str] = pydantic.Field(description="Textual description of the container.") type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of container associated with the specimen (e.g. slide, aliquot, etc.)." + default=None, description="The type of container associated with the specimen (e.g. slide, aliquot, etc.)." ) capacity: typing.Optional[Quantity] = pydantic.Field( - description="The capacity (volume or other measure) the container may contain." + default=None, description="The capacity (volume or other measure) the container may contain." ) specimen_quantity: typing.Optional[Quantity] = pydantic.Field( alias="specimenQuantity", + default=None, description="The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.", ) additive_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="additiveCodeableConcept", + default=None, description="Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", ) additive_reference: typing.Optional[Reference] = pydantic.Field( alias="additiveReference", + default=None, description="Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", ) diff --git a/src/metriport/fhir/types/specimen_definition.py b/src/metriport/fhir/types/specimen_definition.py index 0735a43..5b78768 100644 --- a/src/metriport/fhir/types/specimen_definition.py +++ b/src/metriport/fhir/types/specimen_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,24 +20,26 @@ class SpecimenDefinition(BaseResource): A kind of specimen with associated set of requirements. """ - resource_type: typing_extensions.Literal["SpecimenDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SpecimenDefinition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="A business identifier associated with the kind of specimen." + default=None, description="A business identifier associated with the kind of specimen." ) type_collected: typing.Optional[CodeableConcept] = pydantic.Field( - alias="typeCollected", description="The kind of material to be collected." + alias="typeCollected", default=None, description="The kind of material to be collected." ) patient_preparation: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="patientPreparation", description="Preparation of the patient for specimen collection." + alias="patientPreparation", default=None, description="Preparation of the patient for specimen collection." ) time_aspect: typing.Optional[str] = pydantic.Field( - alias="timeAspect", description="Time aspect of specimen collection (duration or offset)." + alias="timeAspect", default=None, description="Time aspect of specimen collection (duration or offset)." ) collection: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The action to be performed for collecting the specimen." + default=None, description="The action to be performed for collecting the specimen." ) type_tested: typing.Optional[typing.List[SpecimenDefinitionTypeTested]] = pydantic.Field( - alias="typeTested", description="Specimen conditioned in a container as expected by the testing laboratory." + alias="typeTested", + default=None, + description="Specimen conditioned in a container as expected by the testing laboratory.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen_definition_additive.py b/src/metriport/fhir/types/specimen_definition_additive.py index 53b3d3a..2c85f4e 100644 --- a/src/metriport/fhir/types/specimen_definition_additive.py +++ b/src/metriport/fhir/types/specimen_definition_additive.py @@ -20,21 +20,26 @@ class SpecimenDefinitionAdditive(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) additive_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="additiveCodeableConcept", + default=None, description="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", ) additive_reference: typing.Optional[Reference] = pydantic.Field( alias="additiveReference", + default=None, description="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", ) diff --git a/src/metriport/fhir/types/specimen_definition_container.py b/src/metriport/fhir/types/specimen_definition_container.py index c394658..e74df90 100644 --- a/src/metriport/fhir/types/specimen_definition_container.py +++ b/src/metriport/fhir/types/specimen_definition_container.py @@ -21,35 +21,46 @@ class SpecimenDefinitionContainer(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - material: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of material of the container.") + material: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The type of material of the container." + ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of container used to contain this kind of specimen." + default=None, description="The type of container used to contain this kind of specimen." + ) + cap: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Color of container cap.") + description: typing.Optional[str] = pydantic.Field( + default=None, description="The textual description of the kind of container." ) - cap: typing.Optional[CodeableConcept] = pydantic.Field(description="Color of container cap.") - description: typing.Optional[str] = pydantic.Field(description="The textual description of the kind of container.") capacity: typing.Optional[Quantity] = pydantic.Field( - description="The capacity (volume or other measure) of this kind of container." + default=None, description="The capacity (volume or other measure) of this kind of container." ) minimum_volume_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="minimumVolumeQuantity", description="The minimum volume to be conditioned in the container." + alias="minimumVolumeQuantity", + default=None, + description="The minimum volume to be conditioned in the container.", ) minimum_volume_string: typing.Optional[str] = pydantic.Field( - alias="minimumVolumeString", description="The minimum volume to be conditioned in the container." + alias="minimumVolumeString", default=None, description="The minimum volume to be conditioned in the container." ) additive: typing.Optional[typing.List[SpecimenDefinitionAdditive]] = pydantic.Field( - description="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." + default=None, + description="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", ) preparation: typing.Optional[str] = pydantic.Field( - description="Special processing that should be applied to the container for this kind of specimen." + default=None, + description="Special processing that should be applied to the container for this kind of specimen.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen_definition_handling.py b/src/metriport/fhir/types/specimen_definition_handling.py index 35493ca..a81940d 100644 --- a/src/metriport/fhir/types/specimen_definition_handling.py +++ b/src/metriport/fhir/types/specimen_definition_handling.py @@ -21,28 +21,36 @@ class SpecimenDefinitionHandling(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) temperature_qualifier: typing.Optional[CodeableConcept] = pydantic.Field( alias="temperatureQualifier", + default=None, description="It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.", ) temperature_range: typing.Optional[Range] = pydantic.Field( - alias="temperatureRange", description="The temperature interval for this set of handling instructions." + alias="temperatureRange", + default=None, + description="The temperature interval for this set of handling instructions.", ) max_duration: typing.Optional[Duration] = pydantic.Field( alias="maxDuration", + default=None, description="The maximum time interval of preservation of the specimen with these conditions.", ) instruction: typing.Optional[str] = pydantic.Field( - description="Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'." + default=None, + description="Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen_definition_type_tested.py b/src/metriport/fhir/types/specimen_definition_type_tested.py index f207e42..a909294 100644 --- a/src/metriport/fhir/types/specimen_definition_type_tested.py +++ b/src/metriport/fhir/types/specimen_definition_type_tested.py @@ -23,36 +23,46 @@ class SpecimenDefinitionTypeTested(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - is_derived: typing.Optional[bool] = pydantic.Field(alias="isDerived", description="Primary of secondary specimen.") + is_derived: typing.Optional[bool] = pydantic.Field( + alias="isDerived", default=None, description="Primary of secondary specimen." + ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kind of specimen conditioned for testing expected by lab." + default=None, description="The kind of specimen conditioned for testing expected by lab." ) preference: typing.Optional[SpecimenDefinitionTypeTestedPreference] = pydantic.Field( - description="The preference for this type of conditioned specimen." + default=None, description="The preference for this type of conditioned specimen." + ) + container: typing.Optional[SpecimenDefinitionContainer] = pydantic.Field( + default=None, description="The specimen's container." ) - container: typing.Optional[SpecimenDefinitionContainer] = pydantic.Field(description="The specimen's container.") requirement: typing.Optional[str] = pydantic.Field( - description="Requirements for delivery and special handling of this kind of conditioned specimen." + default=None, description="Requirements for delivery and special handling of this kind of conditioned specimen." ) retention_time: typing.Optional[Duration] = pydantic.Field( alias="retentionTime", + default=None, description="The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.", ) rejection_criterion: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="rejectionCriterion", + default=None, description="Criterion for rejection of the specimen in its container by the laboratory.", ) handling: typing.Optional[typing.List[SpecimenDefinitionHandling]] = pydantic.Field( - description="Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process." + default=None, + description="Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/specimen_processing.py b/src/metriport/fhir/types/specimen_processing.py index 2a8a165..900d91a 100644 --- a/src/metriport/fhir/types/specimen_processing.py +++ b/src/metriport/fhir/types/specimen_processing.py @@ -21,28 +21,33 @@ class SpecimenProcessing(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - description: typing.Optional[str] = pydantic.Field(description="Textual description of procedure.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Textual description of procedure.") procedure: typing.Optional[CodeableConcept] = pydantic.Field( - description="A coded value specifying the procedure used to process the specimen." + default=None, description="A coded value specifying the procedure used to process the specimen." ) additive: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Material used in the processing step." + default=None, description="Material used in the processing step." ) time_date_time: typing.Optional[str] = pydantic.Field( alias="timeDateTime", + default=None, description="A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", ) time_period: typing.Optional[Period] = pydantic.Field( alias="timePeriod", + default=None, description="A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", ) diff --git a/src/metriport/fhir/types/structure_definition.py b/src/metriport/fhir/types/structure_definition.py index 1172ffe..c213e1d 100644 --- a/src/metriport/fhir/types/structure_definition.py +++ b/src/metriport/fhir/types/structure_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -36,91 +34,112 @@ class StructureDefinition(BaseResource): A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. """ - resource_type: typing_extensions.Literal["StructureDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["StructureDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers." + default=None, + description="An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the structure definition." + default=None, description="A short, descriptive, user-friendly title for the structure definition." ) status: typing.Optional[StructureDefinitionStatus] = pydantic.Field( - description="The status of this structure definition. Enables tracking the life-cycle of the content." + default=None, + description="The status of this structure definition. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes." + default=None, + description="The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the structure definition." + default=None, description="The name of the organization or individual that published the structure definition." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the structure definition from a consumer's perspective." + default=None, + description="A free text natural language description of the structure definition from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the structure definition is intended to be used." + default=None, + description="A legal or geographic region in which the structure definition is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this structure definition is needed and why it has been designed as it has." + default=None, + description="Explanation of why this structure definition is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition." + default=None, + description="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.", ) keyword: typing.Optional[typing.List[Coding]] = pydantic.Field( - description="A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes." + default=None, + description="A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.", ) fhir_version: typing.Optional[StructureDefinitionFhirVersion] = pydantic.Field( alias="fhirVersion", + default=None, description="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version.", ) mapping: typing.Optional[typing.List[StructureDefinitionMapping]] = pydantic.Field( - description="An external specification that the content is mapped to." + default=None, description="An external specification that the content is mapped to." ) kind: typing.Optional[StructureDefinitionKind] = pydantic.Field( - description="Defines the kind of structure that this definition is describing." + default=None, description="Defines the kind of structure that this definition is describing." ) abstract: typing.Optional[bool] = pydantic.Field( - description="Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems." + default=None, + description="Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.", ) context: typing.Optional[typing.List[StructureDefinitionContext]] = pydantic.Field( - description="Identifies the types of resource or data type elements to which the extension can be applied." + default=None, + description="Identifies the types of resource or data type elements to which the extension can be applied.", ) context_invariant: typing.Optional[typing.List[str]] = pydantic.Field( alias="contextInvariant", + default=None, description="A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.", ) type: typing.Optional[Uri] = pydantic.Field( - description="The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models." + default=None, + description="The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", ) base_definition: typing.Optional[Canonical] = pydantic.Field( alias="baseDefinition", + default=None, description="An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.", ) derivation: typing.Optional[StructureDefinitionDerivation] = pydantic.Field( - description="How the type relates to the baseDefinition." + default=None, description="How the type relates to the baseDefinition." ) snapshot: typing.Optional[StructureDefinitionSnapshot] = pydantic.Field( - description="A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition." + default=None, + description="A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.", ) differential: typing.Optional[StructureDefinitionDifferential] = pydantic.Field( - description="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies." + default=None, + description="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/structure_definition_context.py b/src/metriport/fhir/types/structure_definition_context.py index 2a7acb2..ea0a550 100644 --- a/src/metriport/fhir/types/structure_definition_context.py +++ b/src/metriport/fhir/types/structure_definition_context.py @@ -19,20 +19,24 @@ class StructureDefinitionContext(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[StructureDefinitionContextType] = pydantic.Field( - description="Defines how to interpret the expression that defines what the context of the extension is." + default=None, + description="Defines how to interpret the expression that defines what the context of the extension is.", ) expression: typing.Optional[str] = pydantic.Field( - description="An expression that defines where an extension can be used in resources." + default=None, description="An expression that defines where an extension can be used in resources." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/structure_definition_differential.py b/src/metriport/fhir/types/structure_definition_differential.py index 582b91b..3df0da0 100644 --- a/src/metriport/fhir/types/structure_definition_differential.py +++ b/src/metriport/fhir/types/structure_definition_differential.py @@ -19,13 +19,16 @@ class StructureDefinitionDifferential(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) element: typing.List[ElementDefinition] = pydantic.Field( diff --git a/src/metriport/fhir/types/structure_definition_mapping.py b/src/metriport/fhir/types/structure_definition_mapping.py index dbcb27d..6aefc4d 100644 --- a/src/metriport/fhir/types/structure_definition_mapping.py +++ b/src/metriport/fhir/types/structure_definition_mapping.py @@ -20,24 +20,31 @@ class StructureDefinitionMapping(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identity: typing.Optional[Id] = pydantic.Field( - description="An Internal id that is used to identify this mapping set when specific mappings are made." + default=None, + description="An Internal id that is used to identify this mapping set when specific mappings are made.", ) uri: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that identifies the specification that this mapping is expressed to." + default=None, description="An absolute URI that identifies the specification that this mapping is expressed to." + ) + name: typing.Optional[str] = pydantic.Field( + default=None, description="A name for the specification that is being mapped to." ) - name: typing.Optional[str] = pydantic.Field(description="A name for the specification that is being mapped to.") comment: typing.Optional[str] = pydantic.Field( - description="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." + default=None, + description="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/structure_definition_snapshot.py b/src/metriport/fhir/types/structure_definition_snapshot.py index 84fb24d..a182bd5 100644 --- a/src/metriport/fhir/types/structure_definition_snapshot.py +++ b/src/metriport/fhir/types/structure_definition_snapshot.py @@ -19,13 +19,16 @@ class StructureDefinitionSnapshot(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) element: typing.List[ElementDefinition] = pydantic.Field( diff --git a/src/metriport/fhir/types/structure_map.py b/src/metriport/fhir/types/structure_map.py index b134296..4cd71f4 100644 --- a/src/metriport/fhir/types/structure_map.py +++ b/src/metriport/fhir/types/structure_map.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -30,58 +28,69 @@ class StructureMap(BaseResource): A Map of relationships between 2 structures that can be used to transform data. """ - resource_type: typing_extensions.Literal["StructureMap"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["StructureMap"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers." + default=None, + description="An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the structure map." + default=None, description="A short, descriptive, user-friendly title for the structure map." ) status: typing.Optional[StructureMapStatus] = pydantic.Field( - description="The status of this structure map. Enables tracking the life-cycle of the content." + default=None, description="The status of this structure map. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes." + default=None, + description="The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the structure map." + default=None, description="The name of the organization or individual that published the structure map." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the structure map from a consumer's perspective." + default=None, + description="A free text natural language description of the structure map from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the structure map is intended to be used." + default=None, description="A legal or geographic region in which the structure map is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this structure map is needed and why it has been designed as it has." + default=None, + description="Explanation of why this structure map is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map." + default=None, + description="A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.", ) structure: typing.Optional[typing.List[StructureMapStructure]] = pydantic.Field( - description="A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced." + default=None, + description="A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.", ) import_: typing.Optional[typing.List[Canonical]] = pydantic.Field( - alias="import", description="Other maps used by this map (canonical URLs)." + alias="import", default=None, description="Other maps used by this map (canonical URLs)." ) group: typing.List[StructureMapGroup] = pydantic.Field( description="Organizes the mapping into manageable chunks for human review/ease of maintenance." diff --git a/src/metriport/fhir/types/structure_map_dependent.py b/src/metriport/fhir/types/structure_map_dependent.py index 558a673..5b08954 100644 --- a/src/metriport/fhir/types/structure_map_dependent.py +++ b/src/metriport/fhir/types/structure_map_dependent.py @@ -19,17 +19,22 @@ class StructureMapDependent(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[Id] = pydantic.Field(description="Name of a rule or group to apply.") - variable: typing.Optional[typing.List[str]] = pydantic.Field(description="Variable to pass to the rule or group.") + name: typing.Optional[Id] = pydantic.Field(default=None, description="Name of a rule or group to apply.") + variable: typing.Optional[typing.List[str]] = pydantic.Field( + default=None, description="Variable to pass to the rule or group." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/structure_map_group.py b/src/metriport/fhir/types/structure_map_group.py index 405feac..0224918 100644 --- a/src/metriport/fhir/types/structure_map_group.py +++ b/src/metriport/fhir/types/structure_map_group.py @@ -22,25 +22,32 @@ class StructureMapGroup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[Id] = pydantic.Field( - description="A unique name for the group for the convenience of human readers." + default=None, description="A unique name for the group for the convenience of human readers." + ) + extends: typing.Optional[Id] = pydantic.Field( + default=None, description="Another group that this group adds rules to." ) - extends: typing.Optional[Id] = pydantic.Field(description="Another group that this group adds rules to.") type_mode: typing.Optional[StructureMapGroupTypeMode] = pydantic.Field( alias="typeMode", + default=None, description="If this is the default rule set to apply for the source type or this combination of types.", ) documentation: typing.Optional[str] = pydantic.Field( - description="Additional supporting documentation that explains the purpose of the group and the types of mappings within it." + default=None, + description="Additional supporting documentation that explains the purpose of the group and the types of mappings within it.", ) input: typing.List[StructureMapInput] = pydantic.Field( description="A name assigned to an instance of data. The instance must be provided when the mapping is invoked." diff --git a/src/metriport/fhir/types/structure_map_input.py b/src/metriport/fhir/types/structure_map_input.py index c36e2a8..bf2005d 100644 --- a/src/metriport/fhir/types/structure_map_input.py +++ b/src/metriport/fhir/types/structure_map_input.py @@ -20,19 +20,26 @@ class StructureMapInput(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[Id] = pydantic.Field(description="Name for this instance of data.") - type: typing.Optional[str] = pydantic.Field(description="Type for this instance of data.") - mode: typing.Optional[StructureMapInputMode] = pydantic.Field(description="Mode for this instance of data.") - documentation: typing.Optional[str] = pydantic.Field(description="Documentation for this instance of data.") + name: typing.Optional[Id] = pydantic.Field(default=None, description="Name for this instance of data.") + type: typing.Optional[str] = pydantic.Field(default=None, description="Type for this instance of data.") + mode: typing.Optional[StructureMapInputMode] = pydantic.Field( + default=None, description="Mode for this instance of data." + ) + documentation: typing.Optional[str] = pydantic.Field( + default=None, description="Documentation for this instance of data." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/structure_map_parameter.py b/src/metriport/fhir/types/structure_map_parameter.py index 3c4504e..469c1bb 100644 --- a/src/metriport/fhir/types/structure_map_parameter.py +++ b/src/metriport/fhir/types/structure_map_parameter.py @@ -18,29 +18,32 @@ class StructureMapParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) value_id: typing.Optional[str] = pydantic.Field( - alias="valueId", description="Parameter value - variable or literal." + alias="valueId", default=None, description="Parameter value - variable or literal." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="Parameter value - variable or literal." + alias="valueString", default=None, description="Parameter value - variable or literal." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="Parameter value - variable or literal." + alias="valueBoolean", default=None, description="Parameter value - variable or literal." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="Parameter value - variable or literal." + alias="valueInteger", default=None, description="Parameter value - variable or literal." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="Parameter value - variable or literal." + alias="valueDecimal", default=None, description="Parameter value - variable or literal." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/structure_map_rule.py b/src/metriport/fhir/types/structure_map_rule.py index 87c6e02..5d5ead7 100644 --- a/src/metriport/fhir/types/structure_map_rule.py +++ b/src/metriport/fhir/types/structure_map_rule.py @@ -24,25 +24,32 @@ class StructureMapRule(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[Id] = pydantic.Field(description="Name of the rule for internal references.") + name: typing.Optional[Id] = pydantic.Field(default=None, description="Name of the rule for internal references.") source: typing.List[StructureMapSource] = pydantic.Field(description="Source inputs to the mapping.") target: typing.Optional[typing.List[StructureMapTarget]] = pydantic.Field( - description="Content to create because of this mapping rule." + default=None, description="Content to create because of this mapping rule." + ) + rule: typing.Optional[typing.List[StructureMapRule]] = pydantic.Field( + default=None, description="Rules contained in this rule." ) - rule: typing.Optional[typing.List[StructureMapRule]] = pydantic.Field(description="Rules contained in this rule.") dependent: typing.Optional[typing.List[StructureMapDependent]] = pydantic.Field( - description="Which other rules to apply in the context of this rule." + default=None, description="Which other rules to apply in the context of this rule." + ) + documentation: typing.Optional[str] = pydantic.Field( + default=None, description="Documentation for this instance of data." ) - documentation: typing.Optional[str] = pydantic.Field(description="Documentation for this instance of data.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/structure_map_source.py b/src/metriport/fhir/types/structure_map_source.py index 08db244..b665b01 100644 --- a/src/metriport/fhir/types/structure_map_source.py +++ b/src/metriport/fhir/types/structure_map_source.py @@ -51,201 +51,298 @@ class StructureMapSource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - context: typing.Optional[Id] = pydantic.Field(description="Type or variable this rule applies to.") + context: typing.Optional[Id] = pydantic.Field(default=None, description="Type or variable this rule applies to.") min: typing.Optional[int] = pydantic.Field( - description="Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content." + default=None, + description="Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.", ) max: typing.Optional[str] = pydantic.Field( - description='Specified maximum cardinality for the element - a number or a "_". This is optional; if present, it acts an implicit check on the input content (_ just serves as documentation; it\'s the default value).' + default=None, + description='Specified maximum cardinality for the element - a number or a "_". This is optional; if present, it acts an implicit check on the input content (_ just serves as documentation; it\'s the default value).', ) type: typing.Optional[str] = pydantic.Field( - description="Specified type for the element. This works as a condition on the mapping - use for polymorphic elements." + default=None, + description="Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.", ) default_value_base_64_binary: typing.Optional[str] = pydantic.Field( alias="defaultValueBase64Binary", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_boolean: typing.Optional[bool] = pydantic.Field( - alias="defaultValueBoolean", description="A value to use if there is no existing value in the source object." + alias="defaultValueBoolean", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_canonical: typing.Optional[str] = pydantic.Field( - alias="defaultValueCanonical", description="A value to use if there is no existing value in the source object." + alias="defaultValueCanonical", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_code: typing.Optional[str] = pydantic.Field( - alias="defaultValueCode", description="A value to use if there is no existing value in the source object." + alias="defaultValueCode", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_date: typing.Optional[str] = pydantic.Field( - alias="defaultValueDate", description="A value to use if there is no existing value in the source object." + alias="defaultValueDate", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_date_time: typing.Optional[str] = pydantic.Field( - alias="defaultValueDateTime", description="A value to use if there is no existing value in the source object." + alias="defaultValueDateTime", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_decimal: typing.Optional[float] = pydantic.Field( - alias="defaultValueDecimal", description="A value to use if there is no existing value in the source object." + alias="defaultValueDecimal", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_id: typing.Optional[str] = pydantic.Field( - alias="defaultValueId", description="A value to use if there is no existing value in the source object." + alias="defaultValueId", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_instant: typing.Optional[str] = pydantic.Field( - alias="defaultValueInstant", description="A value to use if there is no existing value in the source object." + alias="defaultValueInstant", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_integer: typing.Optional[float] = pydantic.Field( - alias="defaultValueInteger", description="A value to use if there is no existing value in the source object." + alias="defaultValueInteger", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_markdown: typing.Optional[str] = pydantic.Field( - alias="defaultValueMarkdown", description="A value to use if there is no existing value in the source object." + alias="defaultValueMarkdown", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_oid: typing.Optional[str] = pydantic.Field( - alias="defaultValueOid", description="A value to use if there is no existing value in the source object." + alias="defaultValueOid", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_positive_int: typing.Optional[float] = pydantic.Field( alias="defaultValuePositiveInt", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_string: typing.Optional[str] = pydantic.Field( - alias="defaultValueString", description="A value to use if there is no existing value in the source object." + alias="defaultValueString", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_time: typing.Optional[str] = pydantic.Field( - alias="defaultValueTime", description="A value to use if there is no existing value in the source object." + alias="defaultValueTime", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_unsigned_int: typing.Optional[float] = pydantic.Field( alias="defaultValueUnsignedInt", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_uri: typing.Optional[str] = pydantic.Field( - alias="defaultValueUri", description="A value to use if there is no existing value in the source object." + alias="defaultValueUri", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_url: typing.Optional[str] = pydantic.Field( - alias="defaultValueUrl", description="A value to use if there is no existing value in the source object." + alias="defaultValueUrl", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_uuid: typing.Optional[str] = pydantic.Field( - alias="defaultValueUuid", description="A value to use if there is no existing value in the source object." + alias="defaultValueUuid", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_address: typing.Optional[Address] = pydantic.Field( - alias="defaultValueAddress", description="A value to use if there is no existing value in the source object." + alias="defaultValueAddress", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_age: typing.Optional[Age] = pydantic.Field( - alias="defaultValueAge", description="A value to use if there is no existing value in the source object." + alias="defaultValueAge", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_annotation: typing.Optional[Annotation] = pydantic.Field( - alias="defaultValueAnnotation", description="A value to use if there is no existing value in the source object." + alias="defaultValueAnnotation", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="defaultValueAttachment", description="A value to use if there is no existing value in the source object." + alias="defaultValueAttachment", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="defaultValueCodeableConcept", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_coding: typing.Optional[Coding] = pydantic.Field( - alias="defaultValueCoding", description="A value to use if there is no existing value in the source object." + alias="defaultValueCoding", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( alias="defaultValueContactPoint", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_count: typing.Optional[Count] = pydantic.Field( - alias="defaultValueCount", description="A value to use if there is no existing value in the source object." + alias="defaultValueCount", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_distance: typing.Optional[Distance] = pydantic.Field( - alias="defaultValueDistance", description="A value to use if there is no existing value in the source object." + alias="defaultValueDistance", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_duration: typing.Optional[Duration] = pydantic.Field( - alias="defaultValueDuration", description="A value to use if there is no existing value in the source object." + alias="defaultValueDuration", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_human_name: typing.Optional[HumanName] = pydantic.Field( - alias="defaultValueHumanName", description="A value to use if there is no existing value in the source object." + alias="defaultValueHumanName", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="defaultValueIdentifier", description="A value to use if there is no existing value in the source object." + alias="defaultValueIdentifier", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_money: typing.Optional[Money] = pydantic.Field( - alias="defaultValueMoney", description="A value to use if there is no existing value in the source object." + alias="defaultValueMoney", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_period: typing.Optional[Period] = pydantic.Field( - alias="defaultValuePeriod", description="A value to use if there is no existing value in the source object." + alias="defaultValuePeriod", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="defaultValueQuantity", description="A value to use if there is no existing value in the source object." + alias="defaultValueQuantity", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_range: typing.Optional[Range] = pydantic.Field( - alias="defaultValueRange", description="A value to use if there is no existing value in the source object." + alias="defaultValueRange", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_ratio: typing.Optional[Ratio] = pydantic.Field( - alias="defaultValueRatio", description="A value to use if there is no existing value in the source object." + alias="defaultValueRatio", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_reference: typing.Optional[Reference] = pydantic.Field( - alias="defaultValueReference", description="A value to use if there is no existing value in the source object." + alias="defaultValueReference", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_sampled_data: typing.Optional[SampledData] = pydantic.Field( alias="defaultValueSampledData", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_signature: typing.Optional[Signature] = pydantic.Field( - alias="defaultValueSignature", description="A value to use if there is no existing value in the source object." + alias="defaultValueSignature", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_timing: typing.Optional[Timing] = pydantic.Field( - alias="defaultValueTiming", description="A value to use if there is no existing value in the source object." + alias="defaultValueTiming", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( alias="defaultValueContactDetail", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_contributor: typing.Optional[Contributor] = pydantic.Field( alias="defaultValueContributor", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( alias="defaultValueDataRequirement", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_expression: typing.Optional[Expression] = pydantic.Field( - alias="defaultValueExpression", description="A value to use if there is no existing value in the source object." + alias="defaultValueExpression", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( alias="defaultValueParameterDefinition", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( alias="defaultValueRelatedArtifact", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( alias="defaultValueTriggerDefinition", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_usage_context: typing.Optional[UsageContext] = pydantic.Field( alias="defaultValueUsageContext", + default=None, description="A value to use if there is no existing value in the source object.", ) default_value_dosage: typing.Optional[Dosage] = pydantic.Field( - alias="defaultValueDosage", description="A value to use if there is no existing value in the source object." + alias="defaultValueDosage", + default=None, + description="A value to use if there is no existing value in the source object.", ) default_value_meta: typing.Optional[Meta] = pydantic.Field( - alias="defaultValueMeta", description="A value to use if there is no existing value in the source object." + alias="defaultValueMeta", + default=None, + description="A value to use if there is no existing value in the source object.", ) - element: typing.Optional[str] = pydantic.Field(description="Optional field for this source.") + element: typing.Optional[str] = pydantic.Field(default=None, description="Optional field for this source.") list_mode: typing.Optional[StructureMapSourceListMode] = pydantic.Field( - alias="listMode", description="How to handle the list mode for this element." + alias="listMode", default=None, description="How to handle the list mode for this element." + ) + variable: typing.Optional[Id] = pydantic.Field( + default=None, description="Named context for field, if a field is specified." ) - variable: typing.Optional[Id] = pydantic.Field(description="Named context for field, if a field is specified.") condition: typing.Optional[str] = pydantic.Field( - description="FHIRPath expression - must be true or the rule does not apply." + default=None, description="FHIRPath expression - must be true or the rule does not apply." ) check: typing.Optional[str] = pydantic.Field( - description="FHIRPath expression - must be true or the mapping engine throws an error instead of completing." + default=None, + description="FHIRPath expression - must be true or the mapping engine throws an error instead of completing.", ) log_message: typing.Optional[str] = pydantic.Field( alias="logMessage", + default=None, description="A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.", ) diff --git a/src/metriport/fhir/types/structure_map_structure.py b/src/metriport/fhir/types/structure_map_structure.py index e3408b8..c1cf810 100644 --- a/src/metriport/fhir/types/structure_map_structure.py +++ b/src/metriport/fhir/types/structure_map_structure.py @@ -20,22 +20,25 @@ class StructureMapStructure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) url: Canonical = pydantic.Field(description="The canonical reference to the structure.") mode: typing.Optional[StructureMapStructureMode] = pydantic.Field( - description="How the referenced structure is used in this mapping." + default=None, description="How the referenced structure is used in this mapping." ) - alias: typing.Optional[str] = pydantic.Field(description="The name used for this type in the map.") + alias: typing.Optional[str] = pydantic.Field(default=None, description="The name used for this type in the map.") documentation: typing.Optional[str] = pydantic.Field( - description="Documentation that describes how the structure is used in the mapping." + default=None, description="Documentation that describes how the structure is used in the mapping." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/structure_map_target.py b/src/metriport/fhir/types/structure_map_target.py index 2e72b33..4aafdf3 100644 --- a/src/metriport/fhir/types/structure_map_target.py +++ b/src/metriport/fhir/types/structure_map_target.py @@ -23,34 +23,37 @@ class StructureMapTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - context: typing.Optional[Id] = pydantic.Field(description="Type or variable this rule applies to.") + context: typing.Optional[Id] = pydantic.Field(default=None, description="Type or variable this rule applies to.") context_type: typing.Optional[StructureMapTargetContextType] = pydantic.Field( - alias="contextType", description="How to interpret the context." + alias="contextType", default=None, description="How to interpret the context." ) - element: typing.Optional[str] = pydantic.Field(description="Field to create in the context.") + element: typing.Optional[str] = pydantic.Field(default=None, description="Field to create in the context.") variable: typing.Optional[Id] = pydantic.Field( - description="Named context for field, if desired, and a field is specified." + default=None, description="Named context for field, if desired, and a field is specified." ) list_mode: typing.Optional[typing.List[StructureMapTargetListModeItem]] = pydantic.Field( - alias="listMode", description="If field is a list, how to manage the list." + alias="listMode", default=None, description="If field is a list, how to manage the list." ) list_rule_id: typing.Optional[Id] = pydantic.Field( - alias="listRuleId", description="Internal rule reference for shared list items." + alias="listRuleId", default=None, description="Internal rule reference for shared list items." ) transform: typing.Optional[StructureMapTargetTransform] = pydantic.Field( - description="How the data is copied / created." + default=None, description="How the data is copied / created." ) parameter: typing.Optional[typing.List[StructureMapParameter]] = pydantic.Field( - description="Parameters to the transform." + default=None, description="Parameters to the transform." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/subscription.py b/src/metriport/fhir/types/subscription.py index 4b06550..0e2eda1 100644 --- a/src/metriport/fhir/types/subscription.py +++ b/src/metriport/fhir/types/subscription.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .contact_point import ContactPoint @@ -23,20 +21,27 @@ class Subscription(BaseResource): The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action. """ - resource_type: typing_extensions.Literal["Subscription"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Subscription"] = pydantic.Field(alias="resourceType") status: typing.Optional[SubscriptionStatus] = pydantic.Field( - description="The status of the subscription, which marks the server state for managing the subscription." + default=None, + description="The status of the subscription, which marks the server state for managing the subscription.", ) contact: typing.Optional[typing.List[ContactPoint]] = pydantic.Field( - description="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting." + default=None, + description="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.", + ) + end: typing.Optional[Instant] = pydantic.Field( + default=None, description="The time for the server to turn the subscription off." + ) + reason: typing.Optional[str] = pydantic.Field( + default=None, description="A description of why this subscription is defined." ) - end: typing.Optional[Instant] = pydantic.Field(description="The time for the server to turn the subscription off.") - reason: typing.Optional[str] = pydantic.Field(description="A description of why this subscription is defined.") criteria: typing.Optional[str] = pydantic.Field( - description="The rules that the server should use to determine when to generate notifications for this subscription." + default=None, + description="The rules that the server should use to determine when to generate notifications for this subscription.", ) error: typing.Optional[str] = pydantic.Field( - description="A record of the last error that occurred when the server processed a notification." + default=None, description="A record of the last error that occurred when the server processed a notification." ) channel: SubscriptionChannel = pydantic.Field( description="Details where to send notifications when resources are received that meet the criteria." diff --git a/src/metriport/fhir/types/subscription_channel.py b/src/metriport/fhir/types/subscription_channel.py index 2a1469f..4d42721 100644 --- a/src/metriport/fhir/types/subscription_channel.py +++ b/src/metriport/fhir/types/subscription_channel.py @@ -21,26 +21,30 @@ class SubscriptionChannel(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[SubscriptionChannelType] = pydantic.Field( - description="The type of channel to send notifications on." + default=None, description="The type of channel to send notifications on." ) endpoint: typing.Optional[Url] = pydantic.Field( - description="The url that describes the actual end-point to send messages to." + default=None, description="The url that describes the actual end-point to send messages to." ) payload: typing.Optional[Code] = pydantic.Field( - description='The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type "text/plain" may also be used for Email and SMS subscriptions.' + default=None, + description='The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type "text/plain" may also be used for Email and SMS subscriptions.', ) header: typing.Optional[typing.List[str]] = pydantic.Field( - description="Additional headers / information to send as part of the notification." + default=None, description="Additional headers / information to send as part of the notification." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance.py b/src/metriport/fhir/types/substance.py index 95b48b9..a33a15c 100644 --- a/src/metriport/fhir/types/substance.py +++ b/src/metriport/fhir/types/substance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,25 +22,28 @@ class Substance(BaseResource): A homogeneous material with a definite composition. """ - resource_type: typing_extensions.Literal["Substance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Substance"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Unique identifier for the substance." + default=None, description="Unique identifier for the substance." ) status: typing.Optional[SubstanceStatus] = pydantic.Field( - description="A code to indicate if the substance is actively used." + default=None, description="A code to indicate if the substance is actively used." ) category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A code that classifies the general type of substance. This is used for searching, sorting and display purposes." + default=None, + description="A code that classifies the general type of substance. This is used for searching, sorting and display purposes.", ) code: CodeableConcept = pydantic.Field(description="A code (or set of codes) that identify this substance.") description: typing.Optional[str] = pydantic.Field( - description="A description of the substance - its appearance, handling requirements, and other usage notes." + default=None, + description="A description of the substance - its appearance, handling requirements, and other usage notes.", ) instance: typing.Optional[typing.List[SubstanceInstance]] = pydantic.Field( - description="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." + default=None, + description="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.", ) ingredient: typing.Optional[typing.List[SubstanceIngredient]] = pydantic.Field( - description="A substance can be composed of other substances." + default=None, description="A substance can be composed of other substances." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_amount.py b/src/metriport/fhir/types/substance_amount.py index 1c9a5bb..30da675 100644 --- a/src/metriport/fhir/types/substance_amount.py +++ b/src/metriport/fhir/types/substance_amount.py @@ -22,36 +22,43 @@ class SubstanceAmount(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) amount_quantity: typing.Optional[Quantity] = pydantic.Field( alias="amountQuantity", + default=None, description="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.", ) amount_range: typing.Optional[Range] = pydantic.Field( alias="amountRange", + default=None, description="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.", ) amount_string: typing.Optional[str] = pydantic.Field( alias="amountString", + default=None, description="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.", ) amount_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="amountType", + default=None, description="Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.", ) amount_text: typing.Optional[str] = pydantic.Field( - alias="amountText", description="A textual comment on a numeric value." + alias="amountText", default=None, description="A textual comment on a numeric value." ) reference_range: typing.Optional[SubstanceAmountReferenceRange] = pydantic.Field( - alias="referenceRange", description="Reference range of possible or expected values." + alias="referenceRange", default=None, description="Reference range of possible or expected values." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_amount_reference_range.py b/src/metriport/fhir/types/substance_amount_reference_range.py index 5e4719e..2aeadba 100644 --- a/src/metriport/fhir/types/substance_amount_reference_range.py +++ b/src/metriport/fhir/types/substance_amount_reference_range.py @@ -19,20 +19,23 @@ class SubstanceAmountReferenceRange(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) low_limit: typing.Optional[Quantity] = pydantic.Field( - alias="lowLimit", description="Lower limit possible or expected." + alias="lowLimit", default=None, description="Lower limit possible or expected." ) high_limit: typing.Optional[Quantity] = pydantic.Field( - alias="highLimit", description="Upper limit possible or expected." + alias="highLimit", default=None, description="Upper limit possible or expected." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_ingredient.py b/src/metriport/fhir/types/substance_ingredient.py index 38590aa..110119b 100644 --- a/src/metriport/fhir/types/substance_ingredient.py +++ b/src/metriport/fhir/types/substance_ingredient.py @@ -21,23 +21,28 @@ class SubstanceIngredient(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) quantity: typing.Optional[Ratio] = pydantic.Field( - description="The amount of the ingredient in the substance - a concentration ratio." + default=None, description="The amount of the ingredient in the substance - a concentration ratio." ) substance_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="substanceCodeableConcept", description="Another substance that is a component of this substance." + alias="substanceCodeableConcept", + default=None, + description="Another substance that is a component of this substance.", ) substance_reference: typing.Optional[Reference] = pydantic.Field( - alias="substanceReference", description="Another substance that is a component of this substance." + alias="substanceReference", default=None, description="Another substance that is a component of this substance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_instance.py b/src/metriport/fhir/types/substance_instance.py index cb8853d..cd1dd28 100644 --- a/src/metriport/fhir/types/substance_instance.py +++ b/src/metriport/fhir/types/substance_instance.py @@ -21,22 +21,26 @@ class SubstanceInstance(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Identifier associated with the package/container (usually a label affixed directly)." + default=None, description="Identifier associated with the package/container (usually a label affixed directly)." ) expiry: typing.Optional[DateTime] = pydantic.Field( - description="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry." + default=None, + description="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.", ) - quantity: typing.Optional[Quantity] = pydantic.Field(description="The amount of the substance.") + quantity: typing.Optional[Quantity] = pydantic.Field(default=None, description="The amount of the substance.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_nucleic_acid.py b/src/metriport/fhir/types/substance_nucleic_acid.py index 3c6ff26..e5881bd 100644 --- a/src/metriport/fhir/types/substance_nucleic_acid.py +++ b/src/metriport/fhir/types/substance_nucleic_acid.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -21,24 +19,28 @@ class SubstanceNucleicAcid(BaseResource): Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction. """ - resource_type: typing_extensions.Literal["SubstanceNucleicAcid"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceNucleicAcid"] = pydantic.Field(alias="resourceType") sequence_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="sequenceType", + default=None, description="The type of the sequence shall be specified based on a controlled vocabulary.", ) number_of_subunits: typing.Optional[int] = pydantic.Field( alias="numberOfSubunits", + default=None, description="The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.", ) area_of_hybridisation: typing.Optional[str] = pydantic.Field( alias="areaOfHybridisation", + default=None, description="The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.", ) oligo_nucleotide_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="oligoNucleotideType", description="(TBC)." + alias="oligoNucleotideType", default=None, description="(TBC)." ) subunit: typing.Optional[typing.List[SubstanceNucleicAcidSubunit]] = pydantic.Field( - description="Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times." + default=None, + description="Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_nucleic_acid_linkage.py b/src/metriport/fhir/types/substance_nucleic_acid_linkage.py index 9ac145d..33fcf61 100644 --- a/src/metriport/fhir/types/substance_nucleic_acid_linkage.py +++ b/src/metriport/fhir/types/substance_nucleic_acid_linkage.py @@ -19,26 +19,31 @@ class SubstanceNucleicAcidLinkage(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) connectivity: typing.Optional[str] = pydantic.Field( - description="The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified." + default=None, + description="The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Each linkage will be registered as a fragment and have an ID." + default=None, description="Each linkage will be registered as a fragment and have an ID." ) name: typing.Optional[str] = pydantic.Field( - description="Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage." + default=None, + description="Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.", ) residue_site: typing.Optional[str] = pydantic.Field( - alias="residueSite", description="Residues shall be captured as described in 5.3.6.8.3." + alias="residueSite", default=None, description="Residues shall be captured as described in 5.3.6.8.3." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_nucleic_acid_subunit.py b/src/metriport/fhir/types/substance_nucleic_acid_subunit.py index e233561..e3f2230 100644 --- a/src/metriport/fhir/types/substance_nucleic_acid_subunit.py +++ b/src/metriport/fhir/types/substance_nucleic_acid_subunit.py @@ -22,36 +22,47 @@ class SubstanceNucleicAcidSubunit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) subunit: typing.Optional[int] = pydantic.Field( - description="Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts." + default=None, + description="Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.", ) sequence: typing.Optional[str] = pydantic.Field( - description="Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured." + default=None, + description="Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured.", + ) + length: typing.Optional[int] = pydantic.Field( + default=None, description="The length of the sequence shall be captured." + ) + sequence_attachment: typing.Optional[Attachment] = pydantic.Field( + alias="sequenceAttachment", default=None, description="(TBC)." ) - length: typing.Optional[int] = pydantic.Field(description="The length of the sequence shall be captured.") - sequence_attachment: typing.Optional[Attachment] = pydantic.Field(alias="sequenceAttachment", description="(TBC).") five_prime: typing.Optional[CodeableConcept] = pydantic.Field( alias="fivePrime", + default=None, description="The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant.", ) three_prime: typing.Optional[CodeableConcept] = pydantic.Field( alias="threePrime", + default=None, description="The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant.", ) linkage: typing.Optional[typing.List[SubstanceNucleicAcidLinkage]] = pydantic.Field( - description="The linkages between sugar residues will also be captured." + default=None, description="The linkages between sugar residues will also be captured." ) sugar: typing.Optional[typing.List[SubstanceNucleicAcidSugar]] = pydantic.Field( - description="5.3.6.8.1 Sugar ID (Mandatory)." + default=None, description="5.3.6.8.1 Sugar ID (Mandatory)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_nucleic_acid_sugar.py b/src/metriport/fhir/types/substance_nucleic_acid_sugar.py index e197697..77588f3 100644 --- a/src/metriport/fhir/types/substance_nucleic_acid_sugar.py +++ b/src/metriport/fhir/types/substance_nucleic_acid_sugar.py @@ -19,23 +19,27 @@ class SubstanceNucleicAcidSugar(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="The Substance ID of the sugar or sugar-like component that make up the nucleotide." + default=None, description="The Substance ID of the sugar or sugar-like component that make up the nucleotide." ) name: typing.Optional[str] = pydantic.Field( - description="The name of the sugar or sugar-like component that make up the nucleotide." + default=None, description="The name of the sugar or sugar-like component that make up the nucleotide." ) residue_site: typing.Optional[str] = pydantic.Field( alias="residueSite", + default=None, description="The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.", ) diff --git a/src/metriport/fhir/types/substance_polymer.py b/src/metriport/fhir/types/substance_polymer.py index b993b09..2c6a294 100644 --- a/src/metriport/fhir/types/substance_polymer.py +++ b/src/metriport/fhir/types/substance_polymer.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,17 +20,17 @@ class SubstancePolymer(BaseResource): Todo. """ - resource_type: typing_extensions.Literal["SubstancePolymer"] = pydantic.Field(alias="resourceType") - class_: typing.Optional[CodeableConcept] = pydantic.Field(alias="class", description="Todo.") - geometry: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") + resource_type: typing.Literal["SubstancePolymer"] = pydantic.Field(alias="resourceType") + class_: typing.Optional[CodeableConcept] = pydantic.Field(alias="class", default=None, description="Todo.") + geometry: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") copolymer_connectivity: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="copolymerConnectivity", description="Todo." + alias="copolymerConnectivity", default=None, description="Todo." ) - modification: typing.Optional[typing.List[str]] = pydantic.Field(description="Todo.") + modification: typing.Optional[typing.List[str]] = pydantic.Field(default=None, description="Todo.") monomer_set: typing.Optional[typing.List[SubstancePolymerMonomerSet]] = pydantic.Field( - alias="monomerSet", description="Todo." + alias="monomerSet", default=None, description="Todo." ) - repeat: typing.Optional[typing.List[SubstancePolymerRepeat]] = pydantic.Field(description="Todo.") + repeat: typing.Optional[typing.List[SubstancePolymerRepeat]] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_polymer_degree_of_polymerisation.py b/src/metriport/fhir/types/substance_polymer_degree_of_polymerisation.py index 0959ce1..71cce56 100644 --- a/src/metriport/fhir/types/substance_polymer_degree_of_polymerisation.py +++ b/src/metriport/fhir/types/substance_polymer_degree_of_polymerisation.py @@ -20,17 +20,20 @@ class SubstancePolymerDegreeOfPolymerisation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - degree: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - amount: typing.Optional[SubstanceAmount] = pydantic.Field(description="Todo.") + degree: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + amount: typing.Optional[SubstanceAmount] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_polymer_monomer_set.py b/src/metriport/fhir/types/substance_polymer_monomer_set.py index 30ee780..b6f80b2 100644 --- a/src/metriport/fhir/types/substance_polymer_monomer_set.py +++ b/src/metriport/fhir/types/substance_polymer_monomer_set.py @@ -20,18 +20,21 @@ class SubstancePolymerMonomerSet(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - ratio_type: typing.Optional[CodeableConcept] = pydantic.Field(alias="ratioType", description="Todo.") + ratio_type: typing.Optional[CodeableConcept] = pydantic.Field(alias="ratioType", default=None, description="Todo.") starting_material: typing.Optional[typing.List[SubstancePolymerStartingMaterial]] = pydantic.Field( - alias="startingMaterial", description="Todo." + alias="startingMaterial", default=None, description="Todo." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_polymer_repeat.py b/src/metriport/fhir/types/substance_polymer_repeat.py index 73097ba..585fa38 100644 --- a/src/metriport/fhir/types/substance_polymer_repeat.py +++ b/src/metriport/fhir/types/substance_polymer_repeat.py @@ -20,24 +20,27 @@ class SubstancePolymerRepeat(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - number_of_units: typing.Optional[int] = pydantic.Field(alias="numberOfUnits", description="Todo.") + number_of_units: typing.Optional[int] = pydantic.Field(alias="numberOfUnits", default=None, description="Todo.") average_molecular_formula: typing.Optional[str] = pydantic.Field( - alias="averageMolecularFormula", description="Todo." + alias="averageMolecularFormula", default=None, description="Todo." ) repeat_unit_amount_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="repeatUnitAmountType", description="Todo." + alias="repeatUnitAmountType", default=None, description="Todo." ) repeat_unit: typing.Optional[typing.List[SubstancePolymerRepeatUnit]] = pydantic.Field( - alias="repeatUnit", description="Todo." + alias="repeatUnit", default=None, description="Todo." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_polymer_repeat_unit.py b/src/metriport/fhir/types/substance_polymer_repeat_unit.py index 1ed78e9..46c5b51 100644 --- a/src/metriport/fhir/types/substance_polymer_repeat_unit.py +++ b/src/metriport/fhir/types/substance_polymer_repeat_unit.py @@ -22,25 +22,28 @@ class SubstancePolymerRepeatUnit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) orientation_of_polymerisation: typing.Optional[CodeableConcept] = pydantic.Field( - alias="orientationOfPolymerisation", description="Todo." + alias="orientationOfPolymerisation", default=None, description="Todo." ) - repeat_unit: typing.Optional[str] = pydantic.Field(alias="repeatUnit", description="Todo.") - amount: typing.Optional[SubstanceAmount] = pydantic.Field(description="Todo.") + repeat_unit: typing.Optional[str] = pydantic.Field(alias="repeatUnit", default=None, description="Todo.") + amount: typing.Optional[SubstanceAmount] = pydantic.Field(default=None, description="Todo.") degree_of_polymerisation: typing.Optional[typing.List[SubstancePolymerDegreeOfPolymerisation]] = pydantic.Field( - alias="degreeOfPolymerisation", description="Todo." + alias="degreeOfPolymerisation", default=None, description="Todo." ) structural_representation: typing.Optional[typing.List[SubstancePolymerStructuralRepresentation]] = pydantic.Field( - alias="structuralRepresentation", description="Todo." + alias="structuralRepresentation", default=None, description="Todo." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_polymer_starting_material.py b/src/metriport/fhir/types/substance_polymer_starting_material.py index b06657c..5052d8e 100644 --- a/src/metriport/fhir/types/substance_polymer_starting_material.py +++ b/src/metriport/fhir/types/substance_polymer_starting_material.py @@ -20,19 +20,22 @@ class SubstancePolymerStartingMaterial(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - material: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - is_defining: typing.Optional[bool] = pydantic.Field(alias="isDefining", description="Todo.") - amount: typing.Optional[SubstanceAmount] = pydantic.Field(description="Todo.") + material: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + is_defining: typing.Optional[bool] = pydantic.Field(alias="isDefining", default=None, description="Todo.") + amount: typing.Optional[SubstanceAmount] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_polymer_structural_representation.py b/src/metriport/fhir/types/substance_polymer_structural_representation.py index 8653195..8cbda44 100644 --- a/src/metriport/fhir/types/substance_polymer_structural_representation.py +++ b/src/metriport/fhir/types/substance_polymer_structural_representation.py @@ -20,18 +20,21 @@ class SubstancePolymerStructuralRepresentation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - representation: typing.Optional[str] = pydantic.Field(description="Todo.") - attachment: typing.Optional[Attachment] = pydantic.Field(description="Todo.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + representation: typing.Optional[str] = pydantic.Field(default=None, description="Todo.") + attachment: typing.Optional[Attachment] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_protein.py b/src/metriport/fhir/types/substance_protein.py index d448087..3b69e5e 100644 --- a/src/metriport/fhir/types/substance_protein.py +++ b/src/metriport/fhir/types/substance_protein.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -21,21 +19,25 @@ class SubstanceProtein(BaseResource): A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators. """ - resource_type: typing_extensions.Literal["SubstanceProtein"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceProtein"] = pydantic.Field(alias="resourceType") sequence_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="sequenceType", + default=None, description="The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence.", ) number_of_subunits: typing.Optional[int] = pydantic.Field( alias="numberOfSubunits", + default=None, description="Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.", ) disulfide_linkage: typing.Optional[typing.List[str]] = pydantic.Field( alias="disulfideLinkage", + default=None, description="The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.", ) subunit: typing.Optional[typing.List[SubstanceProteinSubunit]] = pydantic.Field( - description="This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times." + default=None, + description="This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_protein_subunit.py b/src/metriport/fhir/types/substance_protein_subunit.py index 11a5dc4..e91fede 100644 --- a/src/metriport/fhir/types/substance_protein_subunit.py +++ b/src/metriport/fhir/types/substance_protein_subunit.py @@ -20,42 +20,53 @@ class SubstanceProteinSubunit(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) subunit: typing.Optional[int] = pydantic.Field( - description="Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts." + default=None, + description="Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.", ) sequence: typing.Optional[str] = pydantic.Field( - description="The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence." + default=None, + description="The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.", ) length: typing.Optional[int] = pydantic.Field( - description="Length of linear sequences of amino acids contained in the subunit." + default=None, description="Length of linear sequences of amino acids contained in the subunit." ) sequence_attachment: typing.Optional[Attachment] = pydantic.Field( alias="sequenceAttachment", + default=None, description="The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.", ) n_terminal_modification_id: typing.Optional[Identifier] = pydantic.Field( alias="nTerminalModificationId", + default=None, description="Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.", ) n_terminal_modification: typing.Optional[str] = pydantic.Field( alias="nTerminalModification", + default=None, description="The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.", ) c_terminal_modification_id: typing.Optional[Identifier] = pydantic.Field( alias="cTerminalModificationId", + default=None, description="Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.", ) c_terminal_modification: typing.Optional[str] = pydantic.Field( - alias="cTerminalModification", description="The modification at the C-terminal shall be specified." + alias="cTerminalModification", + default=None, + description="The modification at the C-terminal shall be specified.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_reference_information.py b/src/metriport/fhir/types/substance_reference_information.py index dfe87e5..ccae558 100644 --- a/src/metriport/fhir/types/substance_reference_information.py +++ b/src/metriport/fhir/types/substance_reference_information.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .substance_reference_information_classification import SubstanceReferenceInformationClassification @@ -23,16 +21,20 @@ class SubstanceReferenceInformation(BaseResource): Todo. """ - resource_type: typing_extensions.Literal["SubstanceReferenceInformation"] = pydantic.Field(alias="resourceType") - comment: typing.Optional[str] = pydantic.Field(description="Todo.") - gene: typing.Optional[typing.List[SubstanceReferenceInformationGene]] = pydantic.Field(description="Todo.") + resource_type: typing.Literal["SubstanceReferenceInformation"] = pydantic.Field(alias="resourceType") + comment: typing.Optional[str] = pydantic.Field(default=None, description="Todo.") + gene: typing.Optional[typing.List[SubstanceReferenceInformationGene]] = pydantic.Field( + default=None, description="Todo." + ) gene_element: typing.Optional[typing.List[SubstanceReferenceInformationGeneElement]] = pydantic.Field( - alias="geneElement", description="Todo." + alias="geneElement", default=None, description="Todo." ) classification: typing.Optional[typing.List[SubstanceReferenceInformationClassification]] = pydantic.Field( - description="Todo." + default=None, description="Todo." + ) + target: typing.Optional[typing.List[SubstanceReferenceInformationTarget]] = pydantic.Field( + default=None, description="Todo." ) - target: typing.Optional[typing.List[SubstanceReferenceInformationTarget]] = pydantic.Field(description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_reference_information_classification.py b/src/metriport/fhir/types/substance_reference_information_classification.py index 305945c..9cbac13 100644 --- a/src/metriport/fhir/types/substance_reference_information_classification.py +++ b/src/metriport/fhir/types/substance_reference_information_classification.py @@ -20,19 +20,22 @@ class SubstanceReferenceInformationClassification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - domain: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - classification: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - subtype: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field(description="Todo.") - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Todo.") + domain: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + classification: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + subtype: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field(default=None, description="Todo.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_reference_information_gene.py b/src/metriport/fhir/types/substance_reference_information_gene.py index 36176c1..6c256a2 100644 --- a/src/metriport/fhir/types/substance_reference_information_gene.py +++ b/src/metriport/fhir/types/substance_reference_information_gene.py @@ -20,20 +20,23 @@ class SubstanceReferenceInformationGene(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) gene_sequence_origin: typing.Optional[CodeableConcept] = pydantic.Field( - alias="geneSequenceOrigin", description="Todo." + alias="geneSequenceOrigin", default=None, description="Todo." ) - gene: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Todo.") + gene: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_reference_information_gene_element.py b/src/metriport/fhir/types/substance_reference_information_gene_element.py index 9e4765d..38a6c02 100644 --- a/src/metriport/fhir/types/substance_reference_information_gene_element.py +++ b/src/metriport/fhir/types/substance_reference_information_gene_element.py @@ -21,18 +21,21 @@ class SubstanceReferenceInformationGeneElement(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - element: typing.Optional[Identifier] = pydantic.Field(description="Todo.") - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Todo.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + element: typing.Optional[Identifier] = pydantic.Field(default=None, description="Todo.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_reference_information_target.py b/src/metriport/fhir/types/substance_reference_information_target.py index c34d774..0cf506d 100644 --- a/src/metriport/fhir/types/substance_reference_information_target.py +++ b/src/metriport/fhir/types/substance_reference_information_target.py @@ -23,25 +23,34 @@ class SubstanceReferenceInformationTarget(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - target: typing.Optional[Identifier] = pydantic.Field(description="Todo.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - interaction: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - organism: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") - organism_type: typing.Optional[CodeableConcept] = pydantic.Field(alias="organismType", description="Todo.") - amount_quantity: typing.Optional[Quantity] = pydantic.Field(alias="amountQuantity", description="Todo.") - amount_range: typing.Optional[Range] = pydantic.Field(alias="amountRange", description="Todo.") - amount_string: typing.Optional[str] = pydantic.Field(alias="amountString", description="Todo.") - amount_type: typing.Optional[CodeableConcept] = pydantic.Field(alias="amountType", description="Todo.") - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Todo.") + target: typing.Optional[Identifier] = pydantic.Field(default=None, description="Todo.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + interaction: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + organism: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Todo.") + organism_type: typing.Optional[CodeableConcept] = pydantic.Field( + alias="organismType", default=None, description="Todo." + ) + amount_quantity: typing.Optional[Quantity] = pydantic.Field( + alias="amountQuantity", default=None, description="Todo." + ) + amount_range: typing.Optional[Range] = pydantic.Field(alias="amountRange", default=None, description="Todo.") + amount_string: typing.Optional[str] = pydantic.Field(alias="amountString", default=None, description="Todo.") + amount_type: typing.Optional[CodeableConcept] = pydantic.Field( + alias="amountType", default=None, description="Todo." + ) + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Todo.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_source_material.py b/src/metriport/fhir/types/substance_source_material.py index 2fc0ec1..de86382 100644 --- a/src/metriport/fhir/types/substance_source_material.py +++ b/src/metriport/fhir/types/substance_source_material.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,54 +22,66 @@ class SubstanceSourceMaterial(BaseResource): Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex. """ - resource_type: typing_extensions.Literal["SubstanceSourceMaterial"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceSourceMaterial"] = pydantic.Field(alias="resourceType") source_material_class: typing.Optional[CodeableConcept] = pydantic.Field( alias="sourceMaterialClass", + default=None, description="General high level classification of the source material specific to the origin of the material.", ) source_material_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="sourceMaterialType", + default=None, description="The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.", ) source_material_state: typing.Optional[CodeableConcept] = pydantic.Field( - alias="sourceMaterialState", description="The state of the source material when extracted." + alias="sourceMaterialState", default=None, description="The state of the source material when extracted." ) organism_id: typing.Optional[Identifier] = pydantic.Field( alias="organismId", + default=None, description="The unique identifier associated with the source material parent organism shall be specified.", ) organism_name: typing.Optional[str] = pydantic.Field( alias="organismName", + default=None, description="The organism accepted Scientific name shall be provided based on the organism taxonomy.", ) parent_substance_id: typing.Optional[typing.List[Identifier]] = pydantic.Field( alias="parentSubstanceId", + default=None, description="The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).", ) parent_substance_name: typing.Optional[typing.List[str]] = pydantic.Field( - alias="parentSubstanceName", description="The parent substance of the Herbal Drug, or Herbal preparation." + alias="parentSubstanceName", + default=None, + description="The parent substance of the Herbal Drug, or Herbal preparation.", ) country_of_origin: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="countryOfOrigin", + default=None, description="The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.", ) geographical_location: typing.Optional[typing.List[str]] = pydantic.Field( alias="geographicalLocation", + default=None, description="The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.", ) development_stage: typing.Optional[CodeableConcept] = pydantic.Field( alias="developmentStage", + default=None, description="Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).", ) fraction_description: typing.Optional[typing.List[SubstanceSourceMaterialFractionDescription]] = pydantic.Field( alias="fractionDescription", + default=None, description="Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.", ) organism: typing.Optional[SubstanceSourceMaterialOrganism] = pydantic.Field( - description="This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf." + default=None, + description="This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.", ) part_description: typing.Optional[typing.List[SubstanceSourceMaterialPartDescription]] = pydantic.Field( - alias="partDescription", description="To do." + alias="partDescription", default=None, description="To do." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_source_material_author.py b/src/metriport/fhir/types/substance_source_material_author.py index f2fa62f..5569929 100644 --- a/src/metriport/fhir/types/substance_source_material_author.py +++ b/src/metriport/fhir/types/substance_source_material_author.py @@ -19,21 +19,26 @@ class SubstanceSourceMaterialAuthor(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) author_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="authorType", + default=None, description="The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.", ) author_description: typing.Optional[str] = pydantic.Field( alias="authorDescription", + default=None, description="The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).", ) diff --git a/src/metriport/fhir/types/substance_source_material_fraction_description.py b/src/metriport/fhir/types/substance_source_material_fraction_description.py index bd0c5bd..6d87493 100644 --- a/src/metriport/fhir/types/substance_source_material_fraction_description.py +++ b/src/metriport/fhir/types/substance_source_material_fraction_description.py @@ -19,20 +19,25 @@ class SubstanceSourceMaterialFractionDescription(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) fraction: typing.Optional[str] = pydantic.Field( - description="This element is capturing information about the fraction of a plant part, or human plasma for fractionation." + default=None, + description="This element is capturing information about the fraction of a plant part, or human plasma for fractionation.", ) material_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="materialType", + default=None, description="The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.", ) diff --git a/src/metriport/fhir/types/substance_source_material_hybrid.py b/src/metriport/fhir/types/substance_source_material_hybrid.py index 44254f5..9f4772c 100644 --- a/src/metriport/fhir/types/substance_source_material_hybrid.py +++ b/src/metriport/fhir/types/substance_source_material_hybrid.py @@ -19,33 +19,40 @@ class SubstanceSourceMaterialHybrid(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) maternal_organism_id: typing.Optional[str] = pydantic.Field( alias="maternalOrganismId", + default=None, description="The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", ) maternal_organism_name: typing.Optional[str] = pydantic.Field( alias="maternalOrganismName", + default=None, description="The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", ) paternal_organism_id: typing.Optional[str] = pydantic.Field( alias="paternalOrganismId", + default=None, description="The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.", ) paternal_organism_name: typing.Optional[str] = pydantic.Field( alias="paternalOrganismName", + default=None, description="The name of the paternal species constituting the hybrid organism shall be specified.", ) hybrid_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="hybridType", description="The hybrid type of an organism shall be specified." + alias="hybridType", default=None, description="The hybrid type of an organism shall be specified." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_source_material_organism.py b/src/metriport/fhir/types/substance_source_material_organism.py index 9b80dbd..13c7923 100644 --- a/src/metriport/fhir/types/substance_source_material_organism.py +++ b/src/metriport/fhir/types/substance_source_material_organism.py @@ -22,39 +22,45 @@ class SubstanceSourceMaterialOrganism(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) family: typing.Optional[CodeableConcept] = pydantic.Field( - description="The family of an organism shall be specified." + default=None, description="The family of an organism shall be specified." ) genus: typing.Optional[CodeableConcept] = pydantic.Field( - description="The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies." + default=None, + description="The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.", ) species: typing.Optional[CodeableConcept] = pydantic.Field( - description="The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies." + default=None, + description="The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.", ) intraspecific_type: typing.Optional[CodeableConcept] = pydantic.Field( - alias="intraspecificType", description="The Intraspecific type of an organism shall be specified." + alias="intraspecificType", default=None, description="The Intraspecific type of an organism shall be specified." ) intraspecific_description: typing.Optional[str] = pydantic.Field( alias="intraspecificDescription", + default=None, description="The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.", ) author: typing.Optional[typing.List[SubstanceSourceMaterialAuthor]] = pydantic.Field( - description="4.9.13.6.1 Author type (Conditional)." + default=None, description="4.9.13.6.1 Author type (Conditional)." ) hybrid: typing.Optional[SubstanceSourceMaterialHybrid] = pydantic.Field( - description="4.9.13.8.1 Hybrid species maternal organism ID (Optional)." + default=None, description="4.9.13.8.1 Hybrid species maternal organism ID (Optional)." ) organism_general: typing.Optional[SubstanceSourceMaterialOrganismGeneral] = pydantic.Field( - alias="organismGeneral", description="4.9.13.7.1 Kingdom (Conditional)." + alias="organismGeneral", default=None, description="4.9.13.7.1 Kingdom (Conditional)." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_source_material_organism_general.py b/src/metriport/fhir/types/substance_source_material_organism_general.py index 217d9e2..47e3b96 100644 --- a/src/metriport/fhir/types/substance_source_material_organism_general.py +++ b/src/metriport/fhir/types/substance_source_material_organism_general.py @@ -19,26 +19,29 @@ class SubstanceSourceMaterialOrganismGeneral(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) kingdom: typing.Optional[CodeableConcept] = pydantic.Field( - description="The kingdom of an organism shall be specified." + default=None, description="The kingdom of an organism shall be specified." ) phylum: typing.Optional[CodeableConcept] = pydantic.Field( - description="The phylum of an organism shall be specified." + default=None, description="The phylum of an organism shall be specified." ) class_: typing.Optional[CodeableConcept] = pydantic.Field( - alias="class", description="The class of an organism shall be specified." + alias="class", default=None, description="The class of an organism shall be specified." ) order: typing.Optional[CodeableConcept] = pydantic.Field( - description="The order of an organism shall be specified,." + default=None, description="The order of an organism shall be specified,." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_source_material_part_description.py b/src/metriport/fhir/types/substance_source_material_part_description.py index 674384c..0537548 100644 --- a/src/metriport/fhir/types/substance_source_material_part_description.py +++ b/src/metriport/fhir/types/substance_source_material_part_description.py @@ -19,20 +19,24 @@ class SubstanceSourceMaterialPartDescription(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) part: typing.Optional[CodeableConcept] = pydantic.Field( - description="Entity of anatomical origin of source material within an organism." + default=None, description="Entity of anatomical origin of source material within an organism." ) part_location: typing.Optional[CodeableConcept] = pydantic.Field( alias="partLocation", + default=None, description="The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.", ) diff --git a/src/metriport/fhir/types/substance_specification.py b/src/metriport/fhir/types/substance_specification.py index 7646488..3b1075c 100644 --- a/src/metriport/fhir/types/substance_specification.py +++ b/src/metriport/fhir/types/substance_specification.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -29,50 +27,60 @@ class SubstanceSpecification(BaseResource): The detailed description of a substance, typically at a level beyond what is used for prescribing. """ - resource_type: typing_extensions.Literal["SubstanceSpecification"] = pydantic.Field(alias="resourceType") - identifier: typing.Optional[Identifier] = pydantic.Field(description="Identifier by which this substance is known.") + resource_type: typing.Literal["SubstanceSpecification"] = pydantic.Field(alias="resourceType") + identifier: typing.Optional[Identifier] = pydantic.Field( + default=None, description="Identifier by which this substance is known." + ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="High level categorization, e.g. polymer or nucleic acid." + default=None, description="High level categorization, e.g. polymer or nucleic acid." ) status: typing.Optional[CodeableConcept] = pydantic.Field( - description="Status of substance within the catalogue e.g. approved." + default=None, description="Status of substance within the catalogue e.g. approved." ) domain: typing.Optional[CodeableConcept] = pydantic.Field( - description="If the substance applies to only human or veterinary use." + default=None, description="If the substance applies to only human or veterinary use." + ) + description: typing.Optional[str] = pydantic.Field( + default=None, description="Textual description of the substance." + ) + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Supporting literature.") + comment: typing.Optional[str] = pydantic.Field( + default=None, description="Textual comment about this record of a substance." ) - description: typing.Optional[str] = pydantic.Field(description="Textual description of the substance.") - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Supporting literature.") - comment: typing.Optional[str] = pydantic.Field(description="Textual comment about this record of a substance.") moiety: typing.Optional[typing.List[SubstanceSpecificationMoiety]] = pydantic.Field( - description="Moiety, for structural modifications." + default=None, description="Moiety, for structural modifications." ) property: typing.Optional[typing.List[SubstanceSpecificationProperty]] = pydantic.Field( - description="General specifications for this substance, including how it is related to other substances." + default=None, + description="General specifications for this substance, including how it is related to other substances.", ) reference_information: typing.Optional[Reference] = pydantic.Field( - alias="referenceInformation", description="General information detailing this substance." + alias="referenceInformation", default=None, description="General information detailing this substance." + ) + structure: typing.Optional[SubstanceSpecificationStructure] = pydantic.Field( + default=None, description="Structural information." ) - structure: typing.Optional[SubstanceSpecificationStructure] = pydantic.Field(description="Structural information.") code: typing.Optional[typing.List[SubstanceSpecificationCode]] = pydantic.Field( - description="Codes associated with the substance." + default=None, description="Codes associated with the substance." ) name: typing.Optional[typing.List[SubstanceSpecificationName]] = pydantic.Field( - description="Names applicable to this substance." + default=None, description="Names applicable to this substance." ) molecular_weight: typing.Optional[typing.List[SubstanceSpecificationMolecularWeight]] = pydantic.Field( alias="molecularWeight", + default=None, description="The molecular weight or weight range (for proteins, polymers or nucleic acids).", ) relationship: typing.Optional[typing.List[SubstanceSpecificationRelationship]] = pydantic.Field( - description="A link between this substance and another, with details of the relationship." + default=None, description="A link between this substance and another, with details of the relationship." ) nucleic_acid: typing.Optional[Reference] = pydantic.Field( - alias="nucleicAcid", description="Data items specific to nucleic acids." + alias="nucleicAcid", default=None, description="Data items specific to nucleic acids." ) - polymer: typing.Optional[Reference] = pydantic.Field(description="Data items specific to polymers.") - protein: typing.Optional[Reference] = pydantic.Field(description="Data items specific to proteins.") + polymer: typing.Optional[Reference] = pydantic.Field(default=None, description="Data items specific to polymers.") + protein: typing.Optional[Reference] = pydantic.Field(default=None, description="Data items specific to proteins.") source_material: typing.Optional[Reference] = pydantic.Field( - alias="sourceMaterial", description="Material or taxonomic/anatomical source for the substance." + alias="sourceMaterial", default=None, description="Material or taxonomic/anatomical source for the substance." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_specification_code.py b/src/metriport/fhir/types/substance_specification_code.py index 36960f5..63b0bd4 100644 --- a/src/metriport/fhir/types/substance_specification_code.py +++ b/src/metriport/fhir/types/substance_specification_code.py @@ -21,25 +21,31 @@ class SubstanceSpecificationCode(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[CodeableConcept] = pydantic.Field(description="The specific code.") - status: typing.Optional[CodeableConcept] = pydantic.Field(description="Status of the code assignment.") + code: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The specific code.") + status: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Status of the code assignment." + ) status_date: typing.Optional[DateTime] = pydantic.Field( alias="statusDate", + default=None, description="The date at which the code status is changed as part of the terminology maintenance.", ) comment: typing.Optional[str] = pydantic.Field( - description="Any comment can be provided in this field, if necessary." + default=None, description="Any comment can be provided in this field, if necessary." ) - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Supporting literature.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Supporting literature.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_specification_isotope.py b/src/metriport/fhir/types/substance_specification_isotope.py index e2fcfcd..e0467f5 100644 --- a/src/metriport/fhir/types/substance_specification_isotope.py +++ b/src/metriport/fhir/types/substance_specification_isotope.py @@ -22,29 +22,33 @@ class SubstanceSpecificationIsotope(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Substance identifier for each non-natural or radioisotope." + default=None, description="Substance identifier for each non-natural or radioisotope." ) name: typing.Optional[CodeableConcept] = pydantic.Field( - description="Substance name for each non-natural or radioisotope." + default=None, description="Substance name for each non-natural or radioisotope." ) substitution: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of isotopic substitution present in a single substance." + default=None, description="The type of isotopic substitution present in a single substance." ) half_life: typing.Optional[Quantity] = pydantic.Field( - alias="halfLife", description="Half life - for a non-natural nuclide." + alias="halfLife", default=None, description="Half life - for a non-natural nuclide." ) molecular_weight: typing.Optional[SubstanceSpecificationMolecularWeight] = pydantic.Field( alias="molecularWeight", + default=None, description="The molecular weight or weight range (for proteins, polymers or nucleic acids).", ) diff --git a/src/metriport/fhir/types/substance_specification_moiety.py b/src/metriport/fhir/types/substance_specification_moiety.py index 92c35fd..81f6f5f 100644 --- a/src/metriport/fhir/types/substance_specification_moiety.py +++ b/src/metriport/fhir/types/substance_specification_moiety.py @@ -21,30 +21,39 @@ class SubstanceSpecificationMoiety(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - role: typing.Optional[CodeableConcept] = pydantic.Field(description="Role that the moiety is playing.") + role: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Role that the moiety is playing." + ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="Identifier by which this moiety substance is known." + default=None, description="Identifier by which this moiety substance is known." + ) + name: typing.Optional[str] = pydantic.Field(default=None, description="Textual name for this moiety substance.") + stereochemistry: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Stereochemistry type." ) - name: typing.Optional[str] = pydantic.Field(description="Textual name for this moiety substance.") - stereochemistry: typing.Optional[CodeableConcept] = pydantic.Field(description="Stereochemistry type.") optical_activity: typing.Optional[CodeableConcept] = pydantic.Field( - alias="opticalActivity", description="Optical activity type." + alias="opticalActivity", default=None, description="Optical activity type." + ) + molecular_formula: typing.Optional[str] = pydantic.Field( + alias="molecularFormula", default=None, description="Molecular formula." ) - molecular_formula: typing.Optional[str] = pydantic.Field(alias="molecularFormula", description="Molecular formula.") amount_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="amountQuantity", description="Quantitative value for this moiety." + alias="amountQuantity", default=None, description="Quantitative value for this moiety." ) amount_string: typing.Optional[str] = pydantic.Field( - alias="amountString", description="Quantitative value for this moiety." + alias="amountString", default=None, description="Quantitative value for this moiety." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_specification_molecular_weight.py b/src/metriport/fhir/types/substance_specification_molecular_weight.py index b51efc3..643e356 100644 --- a/src/metriport/fhir/types/substance_specification_molecular_weight.py +++ b/src/metriport/fhir/types/substance_specification_molecular_weight.py @@ -20,23 +20,28 @@ class SubstanceSpecificationMolecularWeight(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) method: typing.Optional[CodeableConcept] = pydantic.Field( - description="The method by which the molecular weight was determined." + default=None, description="The method by which the molecular weight was determined." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Type of molecular weight such as exact, average (also known as. number average), weight average." + default=None, + description="Type of molecular weight such as exact, average (also known as. number average), weight average.", ) amount: typing.Optional[Quantity] = pydantic.Field( - description="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field." + default=None, + description="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_specification_name.py b/src/metriport/fhir/types/substance_specification_name.py index 50ee205..aee97d3 100644 --- a/src/metriport/fhir/types/substance_specification_name.py +++ b/src/metriport/fhir/types/substance_specification_name.py @@ -23,36 +23,44 @@ class SubstanceSpecificationName(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="The actual name.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="Name type.") - status: typing.Optional[CodeableConcept] = pydantic.Field(description="The status of the name.") - preferred: typing.Optional[bool] = pydantic.Field(description="If this is the preferred name for this substance.") - language: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field(description="Language of the name.") + name: typing.Optional[str] = pydantic.Field(default=None, description="The actual name.") + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="Name type.") + status: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The status of the name.") + preferred: typing.Optional[bool] = pydantic.Field( + default=None, description="If this is the preferred name for this substance." + ) + language: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( + default=None, description="Language of the name." + ) domain: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive." + default=None, + description="The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="The jurisdiction where this name applies." + default=None, description="The jurisdiction where this name applies." ) synonym: typing.Optional[typing.List[SubstanceSpecificationName]] = pydantic.Field( - description="A synonym of this name." + default=None, description="A synonym of this name." ) translation: typing.Optional[typing.List[SubstanceSpecificationName]] = pydantic.Field( - description="A translation for this name." + default=None, description="A translation for this name." ) official: typing.Optional[typing.List[SubstanceSpecificationOfficial]] = pydantic.Field( - description="Details of the official nature of this name." + default=None, description="Details of the official nature of this name." ) - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Supporting literature.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Supporting literature.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_specification_official.py b/src/metriport/fhir/types/substance_specification_official.py index 78ff4d3..506b26c 100644 --- a/src/metriport/fhir/types/substance_specification_official.py +++ b/src/metriport/fhir/types/substance_specification_official.py @@ -20,18 +20,25 @@ class SubstanceSpecificationOfficial(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - authority: typing.Optional[CodeableConcept] = pydantic.Field(description="Which authority uses this official name.") - status: typing.Optional[CodeableConcept] = pydantic.Field(description="The status of the official name.") - date: typing.Optional[DateTime] = pydantic.Field(description="Date of official name change.") + authority: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Which authority uses this official name." + ) + status: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="The status of the official name." + ) + date: typing.Optional[DateTime] = pydantic.Field(default=None, description="Date of official name change.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_specification_property.py b/src/metriport/fhir/types/substance_specification_property.py index 2d17bf8..916b1ec 100644 --- a/src/metriport/fhir/types/substance_specification_property.py +++ b/src/metriport/fhir/types/substance_specification_property.py @@ -21,37 +21,43 @@ class SubstanceSpecificationProperty(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) category: typing.Optional[CodeableConcept] = pydantic.Field( - description="A category for this property, e.g. Physical, Chemical, Enzymatic." + default=None, description="A category for this property, e.g. Physical, Chemical, Enzymatic." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="Property type e.g. viscosity, pH, isoelectric point." + default=None, description="Property type e.g. viscosity, pH, isoelectric point." ) parameters: typing.Optional[str] = pydantic.Field( - description="Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1)." + default=None, + description="Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1).", ) defining_substance_reference: typing.Optional[Reference] = pydantic.Field( alias="definingSubstanceReference", + default=None, description="A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).", ) defining_substance_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="definingSubstanceCodeableConcept", + default=None, description="A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).", ) amount_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="amountQuantity", description="Quantitative value for this property." + alias="amountQuantity", default=None, description="Quantitative value for this property." ) amount_string: typing.Optional[str] = pydantic.Field( - alias="amountString", description="Quantitative value for this property." + alias="amountString", default=None, description="Quantitative value for this property." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_specification_relationship.py b/src/metriport/fhir/types/substance_specification_relationship.py index 712c439..7424b4a 100644 --- a/src/metriport/fhir/types/substance_specification_relationship.py +++ b/src/metriport/fhir/types/substance_specification_relationship.py @@ -23,54 +23,65 @@ class SubstanceSpecificationRelationship(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) substance_reference: typing.Optional[Reference] = pydantic.Field( alias="substanceReference", + default=None, description="A pointer to another substance, as a resource or just a representational code.", ) substance_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="substanceCodeableConcept", + default=None, description="A pointer to another substance, as a resource or just a representational code.", ) relationship: typing.Optional[CodeableConcept] = pydantic.Field( - description='For example "salt to parent", "active moiety", "starting material".' + default=None, description='For example "salt to parent", "active moiety", "starting material".' ) is_defining: typing.Optional[bool] = pydantic.Field( alias="isDefining", + default=None, description="For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.", ) amount_quantity: typing.Optional[Quantity] = pydantic.Field( alias="amountQuantity", + default=None, description="A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.", ) amount_range: typing.Optional[Range] = pydantic.Field( alias="amountRange", + default=None, description="A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.", ) amount_ratio: typing.Optional[Ratio] = pydantic.Field( alias="amountRatio", + default=None, description="A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.", ) amount_string: typing.Optional[str] = pydantic.Field( alias="amountString", + default=None, description="A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.", ) amount_ratio_low_limit: typing.Optional[Ratio] = pydantic.Field( - alias="amountRatioLowLimit", description="For use when the numeric." + alias="amountRatioLowLimit", default=None, description="For use when the numeric." ) amount_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="amountType", + default=None, description='An operator for the amount, for example "average", "approximately", "less than".', ) - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Supporting literature.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Supporting literature.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/substance_specification_representation.py b/src/metriport/fhir/types/substance_specification_representation.py index 8c68268..2d2488d 100644 --- a/src/metriport/fhir/types/substance_specification_representation.py +++ b/src/metriport/fhir/types/substance_specification_representation.py @@ -20,23 +20,27 @@ class SubstanceSpecificationRepresentation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="The type of structure (e.g. Full, Partial, Representative)." + default=None, description="The type of structure (e.g. Full, Partial, Representative)." ) representation: typing.Optional[str] = pydantic.Field( - description="The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX." + default=None, + description="The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX.", ) attachment: typing.Optional[Attachment] = pydantic.Field( - description="An attached file with the structural representation." + default=None, description="An attached file with the structural representation." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/substance_specification_structure.py b/src/metriport/fhir/types/substance_specification_structure.py index efdfeed..4826464 100644 --- a/src/metriport/fhir/types/substance_specification_structure.py +++ b/src/metriport/fhir/types/substance_specification_structure.py @@ -23,34 +23,44 @@ class SubstanceSpecificationStructure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - stereochemistry: typing.Optional[CodeableConcept] = pydantic.Field(description="Stereochemistry type.") + stereochemistry: typing.Optional[CodeableConcept] = pydantic.Field( + default=None, description="Stereochemistry type." + ) optical_activity: typing.Optional[CodeableConcept] = pydantic.Field( - alias="opticalActivity", description="Optical activity type." + alias="opticalActivity", default=None, description="Optical activity type." + ) + molecular_formula: typing.Optional[str] = pydantic.Field( + alias="molecularFormula", default=None, description="Molecular formula." ) - molecular_formula: typing.Optional[str] = pydantic.Field(alias="molecularFormula", description="Molecular formula.") molecular_formula_by_moiety: typing.Optional[str] = pydantic.Field( alias="molecularFormulaByMoiety", + default=None, description="Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.", ) isotope: typing.Optional[typing.List[SubstanceSpecificationIsotope]] = pydantic.Field( - description="Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio." + default=None, + description="Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio.", ) molecular_weight: typing.Optional[SubstanceSpecificationMolecularWeight] = pydantic.Field( alias="molecularWeight", + default=None, description="The molecular weight or weight range (for proteins, polymers or nucleic acids).", ) - source: typing.Optional[typing.List[Reference]] = pydantic.Field(description="Supporting literature.") + source: typing.Optional[typing.List[Reference]] = pydantic.Field(default=None, description="Supporting literature.") representation: typing.Optional[typing.List[SubstanceSpecificationRepresentation]] = pydantic.Field( - description="Molecular structural representation." + default=None, description="Molecular structural representation." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/supply_delivery.py b/src/metriport/fhir/types/supply_delivery.py index b080851..ed2ca8d 100644 --- a/src/metriport/fhir/types/supply_delivery.py +++ b/src/metriport/fhir/types/supply_delivery.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,45 +24,52 @@ class SupplyDelivery(BaseResource): Record of delivery of what is supplied. """ - resource_type: typing_extensions.Literal["SupplyDelivery"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SupplyDelivery"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Identifier for the supply delivery event that is used to identify it across multiple disparate systems." + default=None, + description="Identifier for the supply delivery event that is used to identify it across multiple disparate systems.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="basedOn", description="A plan, proposal or order that is fulfilled in whole or in part by this event." + alias="basedOn", + default=None, + description="A plan, proposal or order that is fulfilled in whole or in part by this event.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="A larger event of which this particular event is a component or step." + alias="partOf", + default=None, + description="A larger event of which this particular event is a component or step.", ) status: typing.Optional[SupplyDeliveryStatus] = pydantic.Field( - description="A code specifying the state of the dispense event." + default=None, description="A code specifying the state of the dispense event." ) patient: typing.Optional[Reference] = pydantic.Field( - description="A link to a resource representing the person whom the delivered item is for." + default=None, description="A link to a resource representing the person whom the delivered item is for." ) type: typing.Optional[CodeableConcept] = pydantic.Field( - description="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." + default=None, + description="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", ) supplied_item: typing.Optional[SupplyDeliverySuppliedItem] = pydantic.Field( - alias="suppliedItem", description="The item that is being delivered or has been supplied." + alias="suppliedItem", default=None, description="The item that is being delivered or has been supplied." ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="The date or time(s) the activity occurred." + alias="occurrenceDateTime", default=None, description="The date or time(s) the activity occurred." ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="The date or time(s) the activity occurred." + alias="occurrencePeriod", default=None, description="The date or time(s) the activity occurred." ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( - alias="occurrenceTiming", description="The date or time(s) the activity occurred." + alias="occurrenceTiming", default=None, description="The date or time(s) the activity occurred." ) supplier: typing.Optional[Reference] = pydantic.Field( - description="The individual responsible for dispensing the medication, supplier or device." + default=None, description="The individual responsible for dispensing the medication, supplier or device." ) destination: typing.Optional[Reference] = pydantic.Field( - description="Identification of the facility/location where the Supply was shipped to, as part of the dispense event." + default=None, + description="Identification of the facility/location where the Supply was shipped to, as part of the dispense event.", ) receiver: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Identifies the person who picked up the Supply." + default=None, description="Identifies the person who picked up the Supply." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/supply_delivery_supplied_item.py b/src/metriport/fhir/types/supply_delivery_supplied_item.py index 3a93b96..48e7fc7 100644 --- a/src/metriport/fhir/types/supply_delivery_supplied_item.py +++ b/src/metriport/fhir/types/supply_delivery_supplied_item.py @@ -21,24 +21,29 @@ class SupplyDeliverySuppliedItem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) quantity: typing.Optional[Quantity] = pydantic.Field( - description="The amount of supply that has been dispensed. Includes unit of measure." + default=None, description="The amount of supply that has been dispensed. Includes unit of measure." ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="itemCodeableConcept", + default=None, description="Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", ) item_reference: typing.Optional[Reference] = pydantic.Field( alias="itemReference", + default=None, description="Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", ) diff --git a/src/metriport/fhir/types/supply_request.py b/src/metriport/fhir/types/supply_request.py index dd5f5fc..f38392a 100644 --- a/src/metriport/fhir/types/supply_request.py +++ b/src/metriport/fhir/types/supply_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,58 +27,66 @@ class SupplyRequest(BaseResource): A record of a request for a medication, substance or device used in the healthcare setting. """ - resource_type: typing_extensions.Literal["SupplyRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SupplyRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server." + default=None, + description="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.", + ) + status: typing.Optional[SupplyRequestStatus] = pydantic.Field( + default=None, description="Status of the supply request." ) - status: typing.Optional[SupplyRequestStatus] = pydantic.Field(description="Status of the supply request.") category: typing.Optional[CodeableConcept] = pydantic.Field( - description="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process." + default=None, + description="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.", ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly this SupplyRequest should be addressed with respect to other requests." + default=None, + description="Indicates how quickly this SupplyRequest should be addressed with respect to other requests.", ) item_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="itemCodeableConcept", + default=None, description="The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", ) item_reference: typing.Optional[Reference] = pydantic.Field( alias="itemReference", + default=None, description="The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", ) quantity: Quantity = pydantic.Field(description="The amount that is being ordered of the indicated item.") parameter: typing.Optional[typing.List[SupplyRequestParameter]] = pydantic.Field( - description="Specific parameters for the ordered item. For example, the size of the indicated item." + default=None, + description="Specific parameters for the ordered item. For example, the size of the indicated item.", ) occurrence_date_time: typing.Optional[str] = pydantic.Field( - alias="occurrenceDateTime", description="When the request should be fulfilled." + alias="occurrenceDateTime", default=None, description="When the request should be fulfilled." ) occurrence_period: typing.Optional[Period] = pydantic.Field( - alias="occurrencePeriod", description="When the request should be fulfilled." + alias="occurrencePeriod", default=None, description="When the request should be fulfilled." ) occurrence_timing: typing.Optional[Timing] = pydantic.Field( - alias="occurrenceTiming", description="When the request should be fulfilled." + alias="occurrenceTiming", default=None, description="When the request should be fulfilled." ) authored_on: typing.Optional[DateTime] = pydantic.Field( - alias="authoredOn", description="When the request was made." + alias="authoredOn", default=None, description="When the request was made." ) requester: typing.Optional[Reference] = pydantic.Field( - description="The device, practitioner, etc. who initiated the request." + default=None, description="The device, practitioner, etc. who initiated the request." ) supplier: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Who is intended to fulfill the request." + default=None, description="Who is intended to fulfill the request." ) reason_code: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="reasonCode", description="The reason why the supply item was requested." + alias="reasonCode", default=None, description="The reason why the supply item was requested." ) reason_reference: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="reasonReference", description="The reason why the supply item was requested." + alias="reasonReference", default=None, description="The reason why the supply item was requested." ) deliver_from: typing.Optional[Reference] = pydantic.Field( - alias="deliverFrom", description="Where the supply is expected to come from." + alias="deliverFrom", default=None, description="Where the supply is expected to come from." ) deliver_to: typing.Optional[Reference] = pydantic.Field( - alias="deliverTo", description="Where the supply is destined to go." + alias="deliverTo", default=None, description="Where the supply is destined to go." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/supply_request_parameter.py b/src/metriport/fhir/types/supply_request_parameter.py index 3743cae..1fe425c 100644 --- a/src/metriport/fhir/types/supply_request_parameter.py +++ b/src/metriport/fhir/types/supply_request_parameter.py @@ -21,29 +21,32 @@ class SupplyRequestParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code or string that identifies the device detail being asserted." + default=None, description="A code or string that identifies the device detail being asserted." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="The value of the device detail." + alias="valueCodeableConcept", default=None, description="The value of the device detail." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The value of the device detail." + alias="valueQuantity", default=None, description="The value of the device detail." ) value_range: typing.Optional[Range] = pydantic.Field( - alias="valueRange", description="The value of the device detail." + alias="valueRange", default=None, description="The value of the device detail." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of the device detail." + alias="valueBoolean", default=None, description="The value of the device detail." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/task.py b/src/metriport/fhir/types/task.py index d8d3db0..e063dca 100644 --- a/src/metriport/fhir/types/task.py +++ b/src/metriport/fhir/types/task.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,101 +31,120 @@ class Task(BaseResource): A task to be performed. """ - resource_type: typing_extensions.Literal["Task"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Task"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="The business identifier for this task." + default=None, description="The business identifier for this task." ) instantiates_canonical: typing.Optional[Canonical] = pydantic.Field( alias="instantiatesCanonical", + default=None, description="The URL pointing to a _FHIR_-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", ) instantiates_uri: typing.Optional[Uri] = pydantic.Field( alias="instantiatesUri", + default=None, description="The URL pointing to an _externally_ maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", ) based_on: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="basedOn", + default=None, description='BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.', ) group_identifier: typing.Optional[Identifier] = pydantic.Field( alias="groupIdentifier", + default=None, description="An identifier that links together multiple tasks and other requests that were created in the same context.", ) part_of: typing.Optional[typing.List[Reference]] = pydantic.Field( - alias="partOf", description="Task that this particular task is part of." + alias="partOf", default=None, description="Task that this particular task is part of." ) - status: typing.Optional[TaskStatus] = pydantic.Field(description="The current status of the task.") + status: typing.Optional[TaskStatus] = pydantic.Field(default=None, description="The current status of the task.") status_reason: typing.Optional[CodeableConcept] = pydantic.Field( - alias="statusReason", description="An explanation as to why this task is held, failed, was refused, etc." + alias="statusReason", + default=None, + description="An explanation as to why this task is held, failed, was refused, etc.", ) business_status: typing.Optional[CodeableConcept] = pydantic.Field( - alias="businessStatus", description="Contains business-specific nuances of the business state." + alias="businessStatus", default=None, description="Contains business-specific nuances of the business state." ) intent: typing.Optional[TaskIntent] = pydantic.Field( - description='Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.' + default=None, + description='Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.', ) priority: typing.Optional[Code] = pydantic.Field( - description="Indicates how quickly the Task should be addressed with respect to other requests." + default=None, description="Indicates how quickly the Task should be addressed with respect to other requests." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A name or code (or both) briefly describing what the task involves." + default=None, description="A name or code (or both) briefly describing what the task involves." ) description: typing.Optional[str] = pydantic.Field( - description="A free-text description of what is to be performed." + default=None, description="A free-text description of what is to be performed." ) focus: typing.Optional[Reference] = pydantic.Field( - description="The request being actioned or the resource being manipulated by this task." + default=None, description="The request being actioned or the resource being manipulated by this task." ) for_: typing.Optional[Reference] = pydantic.Field( alias="for", + default=None, description="The entity who benefits from the performance of the service specified in the task (e.g., the patient).", ) encounter: typing.Optional[Reference] = pydantic.Field( - description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created." + default=None, + description="The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.", ) execution_period: typing.Optional[Period] = pydantic.Field( alias="executionPeriod", + default=None, description="Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).", ) authored_on: typing.Optional[DateTime] = pydantic.Field( - alias="authoredOn", description="The date and time this task was created." + alias="authoredOn", default=None, description="The date and time this task was created." ) last_modified: typing.Optional[DateTime] = pydantic.Field( - alias="lastModified", description="The date and time of last modification to this task." + alias="lastModified", default=None, description="The date and time of last modification to this task." ) - requester: typing.Optional[Reference] = pydantic.Field(description="The creator of the task.") + requester: typing.Optional[Reference] = pydantic.Field(default=None, description="The creator of the task.") performer_type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="performerType", description="The kind of participant that should perform the task." + alias="performerType", default=None, description="The kind of participant that should perform the task." ) owner: typing.Optional[Reference] = pydantic.Field( - description="Individual organization or Device currently responsible for task execution." + default=None, description="Individual organization or Device currently responsible for task execution." ) location: typing.Optional[Reference] = pydantic.Field( - description="Principal physical location where the this task is performed." + default=None, description="Principal physical location where the this task is performed." ) reason_code: typing.Optional[CodeableConcept] = pydantic.Field( - alias="reasonCode", description="A description or code indicating why this task needs to be performed." + alias="reasonCode", + default=None, + description="A description or code indicating why this task needs to be performed.", ) reason_reference: typing.Optional[Reference] = pydantic.Field( - alias="reasonReference", description="A resource reference indicating why this task needs to be performed." + alias="reasonReference", + default=None, + description="A resource reference indicating why this task needs to be performed.", ) insurance: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task." + default=None, + description="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.", ) note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Free-text information captured about the task as it progresses." + default=None, description="Free-text information captured about the task as it progresses." ) relevant_history: typing.Optional[typing.List[Reference]] = pydantic.Field( alias="relevantHistory", + default=None, description="Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.", ) restriction: typing.Optional[TaskRestriction] = pydantic.Field( - description="If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned." + default=None, + description="If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", ) input: typing.Optional[typing.List[TaskInput]] = pydantic.Field( - description="Additional information that may be needed in the execution of the task." + default=None, description="Additional information that may be needed in the execution of the task." + ) + output: typing.Optional[typing.List[TaskOutput]] = pydantic.Field( + default=None, description="Outputs produced by the Task." ) - output: typing.Optional[typing.List[TaskOutput]] = pydantic.Field(description="Outputs produced by the Task.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/task_input.py b/src/metriport/fhir/types/task_input.py index cc022db..150ecdb 100644 --- a/src/metriport/fhir/types/task_input.py +++ b/src/metriport/fhir/types/task_input.py @@ -49,167 +49,170 @@ class TaskInput(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field( description="A code or description indicating how the input is intended to be used as part of the task execution." ) value_base_64_binary: typing.Optional[str] = pydantic.Field( - alias="valueBase64Binary", description="The value of the input parameter as a basic type." + alias="valueBase64Binary", default=None, description="The value of the input parameter as a basic type." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of the input parameter as a basic type." + alias="valueBoolean", default=None, description="The value of the input parameter as a basic type." ) value_canonical: typing.Optional[str] = pydantic.Field( - alias="valueCanonical", description="The value of the input parameter as a basic type." + alias="valueCanonical", default=None, description="The value of the input parameter as a basic type." ) value_code: typing.Optional[str] = pydantic.Field( - alias="valueCode", description="The value of the input parameter as a basic type." + alias="valueCode", default=None, description="The value of the input parameter as a basic type." ) value_date: typing.Optional[str] = pydantic.Field( - alias="valueDate", description="The value of the input parameter as a basic type." + alias="valueDate", default=None, description="The value of the input parameter as a basic type." ) value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="The value of the input parameter as a basic type." + alias="valueDateTime", default=None, description="The value of the input parameter as a basic type." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="The value of the input parameter as a basic type." + alias="valueDecimal", default=None, description="The value of the input parameter as a basic type." ) value_id: typing.Optional[str] = pydantic.Field( - alias="valueId", description="The value of the input parameter as a basic type." + alias="valueId", default=None, description="The value of the input parameter as a basic type." ) value_instant: typing.Optional[str] = pydantic.Field( - alias="valueInstant", description="The value of the input parameter as a basic type." + alias="valueInstant", default=None, description="The value of the input parameter as a basic type." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="The value of the input parameter as a basic type." + alias="valueInteger", default=None, description="The value of the input parameter as a basic type." ) value_markdown: typing.Optional[str] = pydantic.Field( - alias="valueMarkdown", description="The value of the input parameter as a basic type." + alias="valueMarkdown", default=None, description="The value of the input parameter as a basic type." ) value_oid: typing.Optional[str] = pydantic.Field( - alias="valueOid", description="The value of the input parameter as a basic type." + alias="valueOid", default=None, description="The value of the input parameter as a basic type." ) value_positive_int: typing.Optional[float] = pydantic.Field( - alias="valuePositiveInt", description="The value of the input parameter as a basic type." + alias="valuePositiveInt", default=None, description="The value of the input parameter as a basic type." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="The value of the input parameter as a basic type." + alias="valueString", default=None, description="The value of the input parameter as a basic type." ) value_time: typing.Optional[str] = pydantic.Field( - alias="valueTime", description="The value of the input parameter as a basic type." + alias="valueTime", default=None, description="The value of the input parameter as a basic type." ) value_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="valueUnsignedInt", description="The value of the input parameter as a basic type." + alias="valueUnsignedInt", default=None, description="The value of the input parameter as a basic type." ) value_uri: typing.Optional[str] = pydantic.Field( - alias="valueUri", description="The value of the input parameter as a basic type." + alias="valueUri", default=None, description="The value of the input parameter as a basic type." ) value_url: typing.Optional[str] = pydantic.Field( - alias="valueUrl", description="The value of the input parameter as a basic type." + alias="valueUrl", default=None, description="The value of the input parameter as a basic type." ) value_uuid: typing.Optional[str] = pydantic.Field( - alias="valueUuid", description="The value of the input parameter as a basic type." + alias="valueUuid", default=None, description="The value of the input parameter as a basic type." ) value_address: typing.Optional[Address] = pydantic.Field( - alias="valueAddress", description="The value of the input parameter as a basic type." + alias="valueAddress", default=None, description="The value of the input parameter as a basic type." ) value_age: typing.Optional[Age] = pydantic.Field( - alias="valueAge", description="The value of the input parameter as a basic type." + alias="valueAge", default=None, description="The value of the input parameter as a basic type." ) value_annotation: typing.Optional[Annotation] = pydantic.Field( - alias="valueAnnotation", description="The value of the input parameter as a basic type." + alias="valueAnnotation", default=None, description="The value of the input parameter as a basic type." ) value_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="valueAttachment", description="The value of the input parameter as a basic type." + alias="valueAttachment", default=None, description="The value of the input parameter as a basic type." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="The value of the input parameter as a basic type." + alias="valueCodeableConcept", default=None, description="The value of the input parameter as a basic type." ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="The value of the input parameter as a basic type." + alias="valueCoding", default=None, description="The value of the input parameter as a basic type." ) value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( - alias="valueContactPoint", description="The value of the input parameter as a basic type." + alias="valueContactPoint", default=None, description="The value of the input parameter as a basic type." ) value_count: typing.Optional[Count] = pydantic.Field( - alias="valueCount", description="The value of the input parameter as a basic type." + alias="valueCount", default=None, description="The value of the input parameter as a basic type." ) value_distance: typing.Optional[Distance] = pydantic.Field( - alias="valueDistance", description="The value of the input parameter as a basic type." + alias="valueDistance", default=None, description="The value of the input parameter as a basic type." ) value_duration: typing.Optional[Duration] = pydantic.Field( - alias="valueDuration", description="The value of the input parameter as a basic type." + alias="valueDuration", default=None, description="The value of the input parameter as a basic type." ) value_human_name: typing.Optional[HumanName] = pydantic.Field( - alias="valueHumanName", description="The value of the input parameter as a basic type." + alias="valueHumanName", default=None, description="The value of the input parameter as a basic type." ) value_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="valueIdentifier", description="The value of the input parameter as a basic type." + alias="valueIdentifier", default=None, description="The value of the input parameter as a basic type." ) value_money: typing.Optional[Money] = pydantic.Field( - alias="valueMoney", description="The value of the input parameter as a basic type." + alias="valueMoney", default=None, description="The value of the input parameter as a basic type." ) value_period: typing.Optional[Period] = pydantic.Field( - alias="valuePeriod", description="The value of the input parameter as a basic type." + alias="valuePeriod", default=None, description="The value of the input parameter as a basic type." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The value of the input parameter as a basic type." + alias="valueQuantity", default=None, description="The value of the input parameter as a basic type." ) value_range: typing.Optional[Range] = pydantic.Field( - alias="valueRange", description="The value of the input parameter as a basic type." + alias="valueRange", default=None, description="The value of the input parameter as a basic type." ) value_ratio: typing.Optional[Ratio] = pydantic.Field( - alias="valueRatio", description="The value of the input parameter as a basic type." + alias="valueRatio", default=None, description="The value of the input parameter as a basic type." ) value_reference: typing.Optional[Reference] = pydantic.Field( - alias="valueReference", description="The value of the input parameter as a basic type." + alias="valueReference", default=None, description="The value of the input parameter as a basic type." ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( - alias="valueSampledData", description="The value of the input parameter as a basic type." + alias="valueSampledData", default=None, description="The value of the input parameter as a basic type." ) value_signature: typing.Optional[Signature] = pydantic.Field( - alias="valueSignature", description="The value of the input parameter as a basic type." + alias="valueSignature", default=None, description="The value of the input parameter as a basic type." ) value_timing: typing.Optional[Timing] = pydantic.Field( - alias="valueTiming", description="The value of the input parameter as a basic type." + alias="valueTiming", default=None, description="The value of the input parameter as a basic type." ) value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( - alias="valueContactDetail", description="The value of the input parameter as a basic type." + alias="valueContactDetail", default=None, description="The value of the input parameter as a basic type." ) value_contributor: typing.Optional[Contributor] = pydantic.Field( - alias="valueContributor", description="The value of the input parameter as a basic type." + alias="valueContributor", default=None, description="The value of the input parameter as a basic type." ) value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( - alias="valueDataRequirement", description="The value of the input parameter as a basic type." + alias="valueDataRequirement", default=None, description="The value of the input parameter as a basic type." ) value_expression: typing.Optional[Expression] = pydantic.Field( - alias="valueExpression", description="The value of the input parameter as a basic type." + alias="valueExpression", default=None, description="The value of the input parameter as a basic type." ) value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( - alias="valueParameterDefinition", description="The value of the input parameter as a basic type." + alias="valueParameterDefinition", default=None, description="The value of the input parameter as a basic type." ) value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( - alias="valueRelatedArtifact", description="The value of the input parameter as a basic type." + alias="valueRelatedArtifact", default=None, description="The value of the input parameter as a basic type." ) value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( - alias="valueTriggerDefinition", description="The value of the input parameter as a basic type." + alias="valueTriggerDefinition", default=None, description="The value of the input parameter as a basic type." ) value_usage_context: typing.Optional[UsageContext] = pydantic.Field( - alias="valueUsageContext", description="The value of the input parameter as a basic type." + alias="valueUsageContext", default=None, description="The value of the input parameter as a basic type." ) value_dosage: typing.Optional[Dosage] = pydantic.Field( - alias="valueDosage", description="The value of the input parameter as a basic type." + alias="valueDosage", default=None, description="The value of the input parameter as a basic type." ) value_meta: typing.Optional[Meta] = pydantic.Field( - alias="valueMeta", description="The value of the input parameter as a basic type." + alias="valueMeta", default=None, description="The value of the input parameter as a basic type." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/task_output.py b/src/metriport/fhir/types/task_output.py index 9055a43..303694c 100644 --- a/src/metriport/fhir/types/task_output.py +++ b/src/metriport/fhir/types/task_output.py @@ -49,165 +49,168 @@ class TaskOutput(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) type: CodeableConcept = pydantic.Field(description="The name of the Output parameter.") value_base_64_binary: typing.Optional[str] = pydantic.Field( - alias="valueBase64Binary", description="The value of the Output parameter as a basic type." + alias="valueBase64Binary", default=None, description="The value of the Output parameter as a basic type." ) value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of the Output parameter as a basic type." + alias="valueBoolean", default=None, description="The value of the Output parameter as a basic type." ) value_canonical: typing.Optional[str] = pydantic.Field( - alias="valueCanonical", description="The value of the Output parameter as a basic type." + alias="valueCanonical", default=None, description="The value of the Output parameter as a basic type." ) value_code: typing.Optional[str] = pydantic.Field( - alias="valueCode", description="The value of the Output parameter as a basic type." + alias="valueCode", default=None, description="The value of the Output parameter as a basic type." ) value_date: typing.Optional[str] = pydantic.Field( - alias="valueDate", description="The value of the Output parameter as a basic type." + alias="valueDate", default=None, description="The value of the Output parameter as a basic type." ) value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="The value of the Output parameter as a basic type." + alias="valueDateTime", default=None, description="The value of the Output parameter as a basic type." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="The value of the Output parameter as a basic type." + alias="valueDecimal", default=None, description="The value of the Output parameter as a basic type." ) value_id: typing.Optional[str] = pydantic.Field( - alias="valueId", description="The value of the Output parameter as a basic type." + alias="valueId", default=None, description="The value of the Output parameter as a basic type." ) value_instant: typing.Optional[str] = pydantic.Field( - alias="valueInstant", description="The value of the Output parameter as a basic type." + alias="valueInstant", default=None, description="The value of the Output parameter as a basic type." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="The value of the Output parameter as a basic type." + alias="valueInteger", default=None, description="The value of the Output parameter as a basic type." ) value_markdown: typing.Optional[str] = pydantic.Field( - alias="valueMarkdown", description="The value of the Output parameter as a basic type." + alias="valueMarkdown", default=None, description="The value of the Output parameter as a basic type." ) value_oid: typing.Optional[str] = pydantic.Field( - alias="valueOid", description="The value of the Output parameter as a basic type." + alias="valueOid", default=None, description="The value of the Output parameter as a basic type." ) value_positive_int: typing.Optional[float] = pydantic.Field( - alias="valuePositiveInt", description="The value of the Output parameter as a basic type." + alias="valuePositiveInt", default=None, description="The value of the Output parameter as a basic type." ) value_string: typing.Optional[str] = pydantic.Field( - alias="valueString", description="The value of the Output parameter as a basic type." + alias="valueString", default=None, description="The value of the Output parameter as a basic type." ) value_time: typing.Optional[str] = pydantic.Field( - alias="valueTime", description="The value of the Output parameter as a basic type." + alias="valueTime", default=None, description="The value of the Output parameter as a basic type." ) value_unsigned_int: typing.Optional[float] = pydantic.Field( - alias="valueUnsignedInt", description="The value of the Output parameter as a basic type." + alias="valueUnsignedInt", default=None, description="The value of the Output parameter as a basic type." ) value_uri: typing.Optional[str] = pydantic.Field( - alias="valueUri", description="The value of the Output parameter as a basic type." + alias="valueUri", default=None, description="The value of the Output parameter as a basic type." ) value_url: typing.Optional[str] = pydantic.Field( - alias="valueUrl", description="The value of the Output parameter as a basic type." + alias="valueUrl", default=None, description="The value of the Output parameter as a basic type." ) value_uuid: typing.Optional[str] = pydantic.Field( - alias="valueUuid", description="The value of the Output parameter as a basic type." + alias="valueUuid", default=None, description="The value of the Output parameter as a basic type." ) value_address: typing.Optional[Address] = pydantic.Field( - alias="valueAddress", description="The value of the Output parameter as a basic type." + alias="valueAddress", default=None, description="The value of the Output parameter as a basic type." ) value_age: typing.Optional[Age] = pydantic.Field( - alias="valueAge", description="The value of the Output parameter as a basic type." + alias="valueAge", default=None, description="The value of the Output parameter as a basic type." ) value_annotation: typing.Optional[Annotation] = pydantic.Field( - alias="valueAnnotation", description="The value of the Output parameter as a basic type." + alias="valueAnnotation", default=None, description="The value of the Output parameter as a basic type." ) value_attachment: typing.Optional[Attachment] = pydantic.Field( - alias="valueAttachment", description="The value of the Output parameter as a basic type." + alias="valueAttachment", default=None, description="The value of the Output parameter as a basic type." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( - alias="valueCodeableConcept", description="The value of the Output parameter as a basic type." + alias="valueCodeableConcept", default=None, description="The value of the Output parameter as a basic type." ) value_coding: typing.Optional[Coding] = pydantic.Field( - alias="valueCoding", description="The value of the Output parameter as a basic type." + alias="valueCoding", default=None, description="The value of the Output parameter as a basic type." ) value_contact_point: typing.Optional[ContactPoint] = pydantic.Field( - alias="valueContactPoint", description="The value of the Output parameter as a basic type." + alias="valueContactPoint", default=None, description="The value of the Output parameter as a basic type." ) value_count: typing.Optional[Count] = pydantic.Field( - alias="valueCount", description="The value of the Output parameter as a basic type." + alias="valueCount", default=None, description="The value of the Output parameter as a basic type." ) value_distance: typing.Optional[Distance] = pydantic.Field( - alias="valueDistance", description="The value of the Output parameter as a basic type." + alias="valueDistance", default=None, description="The value of the Output parameter as a basic type." ) value_duration: typing.Optional[Duration] = pydantic.Field( - alias="valueDuration", description="The value of the Output parameter as a basic type." + alias="valueDuration", default=None, description="The value of the Output parameter as a basic type." ) value_human_name: typing.Optional[HumanName] = pydantic.Field( - alias="valueHumanName", description="The value of the Output parameter as a basic type." + alias="valueHumanName", default=None, description="The value of the Output parameter as a basic type." ) value_identifier: typing.Optional[Identifier] = pydantic.Field( - alias="valueIdentifier", description="The value of the Output parameter as a basic type." + alias="valueIdentifier", default=None, description="The value of the Output parameter as a basic type." ) value_money: typing.Optional[Money] = pydantic.Field( - alias="valueMoney", description="The value of the Output parameter as a basic type." + alias="valueMoney", default=None, description="The value of the Output parameter as a basic type." ) value_period: typing.Optional[Period] = pydantic.Field( - alias="valuePeriod", description="The value of the Output parameter as a basic type." + alias="valuePeriod", default=None, description="The value of the Output parameter as a basic type." ) value_quantity: typing.Optional[Quantity] = pydantic.Field( - alias="valueQuantity", description="The value of the Output parameter as a basic type." + alias="valueQuantity", default=None, description="The value of the Output parameter as a basic type." ) value_range: typing.Optional[Range] = pydantic.Field( - alias="valueRange", description="The value of the Output parameter as a basic type." + alias="valueRange", default=None, description="The value of the Output parameter as a basic type." ) value_ratio: typing.Optional[Ratio] = pydantic.Field( - alias="valueRatio", description="The value of the Output parameter as a basic type." + alias="valueRatio", default=None, description="The value of the Output parameter as a basic type." ) value_reference: typing.Optional[Reference] = pydantic.Field( - alias="valueReference", description="The value of the Output parameter as a basic type." + alias="valueReference", default=None, description="The value of the Output parameter as a basic type." ) value_sampled_data: typing.Optional[SampledData] = pydantic.Field( - alias="valueSampledData", description="The value of the Output parameter as a basic type." + alias="valueSampledData", default=None, description="The value of the Output parameter as a basic type." ) value_signature: typing.Optional[Signature] = pydantic.Field( - alias="valueSignature", description="The value of the Output parameter as a basic type." + alias="valueSignature", default=None, description="The value of the Output parameter as a basic type." ) value_timing: typing.Optional[Timing] = pydantic.Field( - alias="valueTiming", description="The value of the Output parameter as a basic type." + alias="valueTiming", default=None, description="The value of the Output parameter as a basic type." ) value_contact_detail: typing.Optional[ContactDetail] = pydantic.Field( - alias="valueContactDetail", description="The value of the Output parameter as a basic type." + alias="valueContactDetail", default=None, description="The value of the Output parameter as a basic type." ) value_contributor: typing.Optional[Contributor] = pydantic.Field( - alias="valueContributor", description="The value of the Output parameter as a basic type." + alias="valueContributor", default=None, description="The value of the Output parameter as a basic type." ) value_data_requirement: typing.Optional[DataRequirement] = pydantic.Field( - alias="valueDataRequirement", description="The value of the Output parameter as a basic type." + alias="valueDataRequirement", default=None, description="The value of the Output parameter as a basic type." ) value_expression: typing.Optional[Expression] = pydantic.Field( - alias="valueExpression", description="The value of the Output parameter as a basic type." + alias="valueExpression", default=None, description="The value of the Output parameter as a basic type." ) value_parameter_definition: typing.Optional[ParameterDefinition] = pydantic.Field( - alias="valueParameterDefinition", description="The value of the Output parameter as a basic type." + alias="valueParameterDefinition", default=None, description="The value of the Output parameter as a basic type." ) value_related_artifact: typing.Optional[RelatedArtifact] = pydantic.Field( - alias="valueRelatedArtifact", description="The value of the Output parameter as a basic type." + alias="valueRelatedArtifact", default=None, description="The value of the Output parameter as a basic type." ) value_trigger_definition: typing.Optional[TriggerDefinition] = pydantic.Field( - alias="valueTriggerDefinition", description="The value of the Output parameter as a basic type." + alias="valueTriggerDefinition", default=None, description="The value of the Output parameter as a basic type." ) value_usage_context: typing.Optional[UsageContext] = pydantic.Field( - alias="valueUsageContext", description="The value of the Output parameter as a basic type." + alias="valueUsageContext", default=None, description="The value of the Output parameter as a basic type." ) value_dosage: typing.Optional[Dosage] = pydantic.Field( - alias="valueDosage", description="The value of the Output parameter as a basic type." + alias="valueDosage", default=None, description="The value of the Output parameter as a basic type." ) value_meta: typing.Optional[Meta] = pydantic.Field( - alias="valueMeta", description="The value of the Output parameter as a basic type." + alias="valueMeta", default=None, description="The value of the Output parameter as a basic type." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/task_restriction.py b/src/metriport/fhir/types/task_restriction.py index e688cc0..93dffeb 100644 --- a/src/metriport/fhir/types/task_restriction.py +++ b/src/metriport/fhir/types/task_restriction.py @@ -21,21 +21,27 @@ class TaskRestriction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) repetitions: typing.Optional[PositiveInt] = pydantic.Field( - description="Indicates the number of times the requested action should occur." + default=None, description="Indicates the number of times the requested action should occur." + ) + period: typing.Optional[Period] = pydantic.Field( + default=None, description="Over what time-period is fulfillment sought." ) - period: typing.Optional[Period] = pydantic.Field(description="Over what time-period is fulfillment sought.") recipient: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?" + default=None, + description="For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities.py b/src/metriport/fhir/types/terminology_capabilities.py index c6fc4f3..25206d0 100644 --- a/src/metriport/fhir/types/terminology_capabilities.py +++ b/src/metriport/fhir/types/terminology_capabilities.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -35,82 +33,101 @@ class TerminologyCapabilities(BaseResource): A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. """ - resource_type: typing_extensions.Literal["TerminologyCapabilities"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TerminologyCapabilities"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers." + default=None, + description="An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the terminology capabilities." + default=None, description="A short, descriptive, user-friendly title for the terminology capabilities." ) status: typing.Optional[TerminologyCapabilitiesStatus] = pydantic.Field( - description="The status of this terminology capabilities. Enables tracking the life-cycle of the content." + default=None, + description="The status of this terminology capabilities. Enables tracking the life-cycle of the content.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes." + default=None, + description="The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the terminology capabilities." + default=None, + description="The name of the organization or individual that published the terminology capabilities.", ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." + default=None, + description="A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the terminology capabilities is intended to be used." + default=None, + description="A legal or geographic region in which the terminology capabilities is intended to be used.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this terminology capabilities is needed and why it has been designed as it has." + default=None, + description="Explanation of why this terminology capabilities is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities." + default=None, + description="A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.", ) kind: typing.Optional[Code] = pydantic.Field( - description="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase)." + default=None, + description="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).", ) software: typing.Optional[TerminologyCapabilitiesSoftware] = pydantic.Field( - description="Software that is covered by this terminology capability statement. It is used when the statement describes the capabilities of a particular software version, independent of an installation." + default=None, + description="Software that is covered by this terminology capability statement. It is used when the statement describes the capabilities of a particular software version, independent of an installation.", ) implementation: typing.Optional[TerminologyCapabilitiesImplementation] = pydantic.Field( - description="Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program." + default=None, + description="Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program.", ) locked_date: typing.Optional[bool] = pydantic.Field( - alias="lockedDate", description="Whether the server supports lockedDate." + alias="lockedDate", default=None, description="Whether the server supports lockedDate." ) code_system: typing.Optional[typing.List[TerminologyCapabilitiesCodeSystem]] = pydantic.Field( alias="codeSystem", + default=None, description="Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource.", ) expansion: typing.Optional[TerminologyCapabilitiesExpansion] = pydantic.Field( - description="Information about the [ValueSet/$expand](valueset-operation-expand.html) operation." + default=None, description="Information about the [ValueSet/$expand](valueset-operation-expand.html) operation." ) code_search: typing.Optional[TerminologyCapabilitiesCodeSearch] = pydantic.Field( alias="codeSearch", + default=None, description="The degree to which the server supports the code search parameter on ValueSet, if it is supported.", ) validate_code: typing.Optional[TerminologyCapabilitiesValidateCode] = pydantic.Field( alias="validateCode", + default=None, description="Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.", ) translation: typing.Optional[TerminologyCapabilitiesTranslation] = pydantic.Field( - description="Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation." + default=None, + description="Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.", ) closure: typing.Optional[TerminologyCapabilitiesClosure] = pydantic.Field( - description="Whether the $closure operation is supported." + default=None, description="Whether the $closure operation is supported." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities_closure.py b/src/metriport/fhir/types/terminology_capabilities_closure.py index 69cb62d..8a6b8d6 100644 --- a/src/metriport/fhir/types/terminology_capabilities_closure.py +++ b/src/metriport/fhir/types/terminology_capabilities_closure.py @@ -18,16 +18,21 @@ class TerminologyCapabilitiesClosure(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - translation: typing.Optional[bool] = pydantic.Field(description="If cross-system closure is supported.") + translation: typing.Optional[bool] = pydantic.Field( + default=None, description="If cross-system closure is supported." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/terminology_capabilities_code_system.py b/src/metriport/fhir/types/terminology_capabilities_code_system.py index a46b29f..2bee28f 100644 --- a/src/metriport/fhir/types/terminology_capabilities_code_system.py +++ b/src/metriport/fhir/types/terminology_capabilities_code_system.py @@ -20,21 +20,24 @@ class TerminologyCapabilitiesCodeSystem(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - uri: typing.Optional[Canonical] = pydantic.Field(description="URI for the Code System.") + uri: typing.Optional[Canonical] = pydantic.Field(default=None, description="URI for the Code System.") version: typing.Optional[typing.List[TerminologyCapabilitiesVersion]] = pydantic.Field( - description="For the code system, a list of versions that are supported by the server." + default=None, description="For the code system, a list of versions that are supported by the server." ) subsumption: typing.Optional[bool] = pydantic.Field( - description="True if subsumption is supported for this version of the code system." + default=None, description="True if subsumption is supported for this version of the code system." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities_expansion.py b/src/metriport/fhir/types/terminology_capabilities_expansion.py index 9bf5c84..847a144 100644 --- a/src/metriport/fhir/types/terminology_capabilities_expansion.py +++ b/src/metriport/fhir/types/terminology_capabilities_expansion.py @@ -20,23 +20,32 @@ class TerminologyCapabilitiesExpansion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - hierarchical: typing.Optional[bool] = pydantic.Field(description="Whether the server can return nested value sets.") - paging: typing.Optional[bool] = pydantic.Field(description="Whether the server supports paging on expansion.") - incomplete: typing.Optional[bool] = pydantic.Field(description="Allow request for incomplete expansions?") + hierarchical: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether the server can return nested value sets." + ) + paging: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether the server supports paging on expansion." + ) + incomplete: typing.Optional[bool] = pydantic.Field( + default=None, description="Allow request for incomplete expansions?" + ) parameter: typing.Optional[typing.List[TerminologyCapabilitiesParameter]] = pydantic.Field( - description="Supported expansion parameter." + default=None, description="Supported expansion parameter." ) text_filter: typing.Optional[Markdown] = pydantic.Field( - alias="textFilter", description="Documentation about text searching works." + alias="textFilter", default=None, description="Documentation about text searching works." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities_filter.py b/src/metriport/fhir/types/terminology_capabilities_filter.py index b6ee190..fc9052b 100644 --- a/src/metriport/fhir/types/terminology_capabilities_filter.py +++ b/src/metriport/fhir/types/terminology_capabilities_filter.py @@ -19,17 +19,22 @@ class TerminologyCapabilitiesFilter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - code: typing.Optional[Code] = pydantic.Field(description="Code of the property supported.") - op: typing.Optional[typing.List[Code]] = pydantic.Field(description="Operations supported for the property.") + code: typing.Optional[Code] = pydantic.Field(default=None, description="Code of the property supported.") + op: typing.Optional[typing.List[Code]] = pydantic.Field( + default=None, description="Operations supported for the property." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/terminology_capabilities_implementation.py b/src/metriport/fhir/types/terminology_capabilities_implementation.py index 5f95dd2..f744b6a 100644 --- a/src/metriport/fhir/types/terminology_capabilities_implementation.py +++ b/src/metriport/fhir/types/terminology_capabilities_implementation.py @@ -19,19 +19,23 @@ class TerminologyCapabilitiesImplementation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) description: typing.Optional[str] = pydantic.Field( - description="Information about the specific installation that this terminology capability statement relates to." + default=None, + description="Information about the specific installation that this terminology capability statement relates to.", ) - url: typing.Optional[Url] = pydantic.Field(description="An absolute base URL for the implementation.") + url: typing.Optional[Url] = pydantic.Field(default=None, description="An absolute base URL for the implementation.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/terminology_capabilities_parameter.py b/src/metriport/fhir/types/terminology_capabilities_parameter.py index 17f6e39..06076a0 100644 --- a/src/metriport/fhir/types/terminology_capabilities_parameter.py +++ b/src/metriport/fhir/types/terminology_capabilities_parameter.py @@ -19,17 +19,22 @@ class TerminologyCapabilitiesParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[Code] = pydantic.Field(description="Expansion Parameter name.") - documentation: typing.Optional[str] = pydantic.Field(description="Description of support for parameter.") + name: typing.Optional[Code] = pydantic.Field(default=None, description="Expansion Parameter name.") + documentation: typing.Optional[str] = pydantic.Field( + default=None, description="Description of support for parameter." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/terminology_capabilities_software.py b/src/metriport/fhir/types/terminology_capabilities_software.py index bee0fa7..6a6912d 100644 --- a/src/metriport/fhir/types/terminology_capabilities_software.py +++ b/src/metriport/fhir/types/terminology_capabilities_software.py @@ -18,18 +18,21 @@ class TerminologyCapabilitiesSoftware(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Name the software is known by.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Name the software is known by.") version: typing.Optional[str] = pydantic.Field( - description="The version identifier for the software covered by this statement." + default=None, description="The version identifier for the software covered by this statement." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities_translation.py b/src/metriport/fhir/types/terminology_capabilities_translation.py index d744743..495cd48 100644 --- a/src/metriport/fhir/types/terminology_capabilities_translation.py +++ b/src/metriport/fhir/types/terminology_capabilities_translation.py @@ -18,17 +18,20 @@ class TerminologyCapabilitiesTranslation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) needs_map: typing.Optional[bool] = pydantic.Field( - alias="needsMap", description="Whether the client must identify the map." + alias="needsMap", default=None, description="Whether the client must identify the map." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/terminology_capabilities_validate_code.py b/src/metriport/fhir/types/terminology_capabilities_validate_code.py index f9b0213..2b02f71 100644 --- a/src/metriport/fhir/types/terminology_capabilities_validate_code.py +++ b/src/metriport/fhir/types/terminology_capabilities_validate_code.py @@ -18,16 +18,21 @@ class TerminologyCapabilitiesValidateCode(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - translations: typing.Optional[bool] = pydantic.Field(description="Whether translations are validated.") + translations: typing.Optional[bool] = pydantic.Field( + default=None, description="Whether translations are validated." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/terminology_capabilities_version.py b/src/metriport/fhir/types/terminology_capabilities_version.py index 6fe6c17..9fe1d81 100644 --- a/src/metriport/fhir/types/terminology_capabilities_version.py +++ b/src/metriport/fhir/types/terminology_capabilities_version.py @@ -20,29 +20,36 @@ class TerminologyCapabilitiesVersion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[str] = pydantic.Field( - description="For version-less code systems, there should be a single version with no identifier." + default=None, description="For version-less code systems, there should be a single version with no identifier." ) is_default: typing.Optional[bool] = pydantic.Field( - alias="isDefault", description="If this is the default version for this code system." + alias="isDefault", default=None, description="If this is the default version for this code system." ) compositional: typing.Optional[bool] = pydantic.Field( - description="If the compositional grammar defined by the code system is supported." + default=None, description="If the compositional grammar defined by the code system is supported." + ) + language: typing.Optional[typing.List[Code]] = pydantic.Field( + default=None, description="Language Displays supported." ) - language: typing.Optional[typing.List[Code]] = pydantic.Field(description="Language Displays supported.") filter: typing.Optional[typing.List[TerminologyCapabilitiesFilter]] = pydantic.Field( - description="Filter Properties supported." + default=None, description="Filter Properties supported." + ) + property: typing.Optional[typing.List[Code]] = pydantic.Field( + default=None, description="Properties supported for $lookup." ) - property: typing.Optional[typing.List[Code]] = pydantic.Field(description="Properties supported for $lookup.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_report.py b/src/metriport/fhir/types/test_report.py index d6c5c12..1598fe6 100644 --- a/src/metriport/fhir/types/test_report.py +++ b/src/metriport/fhir/types/test_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .date_time import DateTime @@ -29,41 +27,48 @@ class TestReport(BaseResource): A summary of information based on the results of executing a TestScript. """ - resource_type: typing_extensions.Literal["TestReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TestReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( - description="Identifier for the TestScript assigned for external purposes outside the context of FHIR." + default=None, + description="Identifier for the TestScript assigned for external purposes outside the context of FHIR.", ) name: typing.Optional[str] = pydantic.Field( - description="A free text natural language name identifying the executed TestScript." + default=None, description="A free text natural language name identifying the executed TestScript." + ) + status: typing.Optional[TestReportStatus] = pydantic.Field( + default=None, description="The current state of this test report." ) - status: typing.Optional[TestReportStatus] = pydantic.Field(description="The current state of this test report.") test_script: Reference = pydantic.Field( alias="testScript", description="Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.", ) result: typing.Optional[TestReportResult] = pydantic.Field( - description="The overall result from the execution of the TestScript." + default=None, description="The overall result from the execution of the TestScript." ) score: typing.Optional[Decimal] = pydantic.Field( - description="The final score (percentage of tests passed) resulting from the execution of the TestScript." + default=None, + description="The final score (percentage of tests passed) resulting from the execution of the TestScript.", ) tester: typing.Optional[str] = pydantic.Field( - description="Name of the tester producing this report (Organization or individual)." + default=None, description="Name of the tester producing this report (Organization or individual)." ) issued: typing.Optional[DateTime] = pydantic.Field( - description="When the TestScript was executed and this TestReport was generated." + default=None, description="When the TestScript was executed and this TestReport was generated." ) participant: typing.Optional[typing.List[TestReportParticipant]] = pydantic.Field( - description="A participant in the test execution, either the execution engine, a client, or a server." + default=None, + description="A participant in the test execution, either the execution engine, a client, or a server.", ) setup: typing.Optional[TestReportSetup] = pydantic.Field( - description="The results of the series of required setup operations before the tests were executed." + default=None, + description="The results of the series of required setup operations before the tests were executed.", ) test: typing.Optional[typing.List[TestReportTest]] = pydantic.Field( - description="A test executed from the test script." + default=None, description="A test executed from the test script." ) teardown: typing.Optional[TestReportTeardown] = pydantic.Field( - description="The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise)." + default=None, + description="The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/test_report_action.py b/src/metriport/fhir/types/test_report_action.py index 8fb0012..a31e32b 100644 --- a/src/metriport/fhir/types/test_report_action.py +++ b/src/metriport/fhir/types/test_report_action.py @@ -20,18 +20,23 @@ class TestReportAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - operation: typing.Optional[TestReportOperation] = pydantic.Field(description="The operation performed.") + operation: typing.Optional[TestReportOperation] = pydantic.Field( + default=None, description="The operation performed." + ) assert_: typing.Optional[TestReportAssert] = pydantic.Field( - alias="assert", description="The results of the assertion performed on the previous operations." + alias="assert", default=None, description="The results of the assertion performed on the previous operations." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/test_report_action_1.py b/src/metriport/fhir/types/test_report_action_1.py index a4e564e..2d9c1ab 100644 --- a/src/metriport/fhir/types/test_report_action_1.py +++ b/src/metriport/fhir/types/test_report_action_1.py @@ -20,20 +20,23 @@ class TestReportAction1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) operation: typing.Optional[TestReportOperation] = pydantic.Field( - description="An operation would involve a REST request to a server." + default=None, description="An operation would involve a REST request to a server." ) assert_: typing.Optional[TestReportAssert] = pydantic.Field( - alias="assert", description="The results of the assertion performed on the previous operations." + alias="assert", default=None, description="The results of the assertion performed on the previous operations." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/test_report_action_2.py b/src/metriport/fhir/types/test_report_action_2.py index b2b4adf..130c766 100644 --- a/src/metriport/fhir/types/test_report_action_2.py +++ b/src/metriport/fhir/types/test_report_action_2.py @@ -19,13 +19,16 @@ class TestReportAction2(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) operation: TestReportOperation = pydantic.Field( diff --git a/src/metriport/fhir/types/test_report_assert.py b/src/metriport/fhir/types/test_report_assert.py index d3fa98f..ae1f4af 100644 --- a/src/metriport/fhir/types/test_report_assert.py +++ b/src/metriport/fhir/types/test_report_assert.py @@ -20,20 +20,25 @@ class TestReportAssert(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - result: typing.Optional[TestReportAssertResult] = pydantic.Field(description="The result of this assertion.") + result: typing.Optional[TestReportAssertResult] = pydantic.Field( + default=None, description="The result of this assertion." + ) message: typing.Optional[Markdown] = pydantic.Field( - description="An explanatory message associated with the result." + default=None, description="An explanatory message associated with the result." ) - detail: typing.Optional[str] = pydantic.Field(description="A link to further details on the result.") + detail: typing.Optional[str] = pydantic.Field(default=None, description="A link to further details on the result.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_report_operation.py b/src/metriport/fhir/types/test_report_operation.py index c779608..4dc7619 100644 --- a/src/metriport/fhir/types/test_report_operation.py +++ b/src/metriport/fhir/types/test_report_operation.py @@ -21,20 +21,25 @@ class TestReportOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - result: typing.Optional[TestReportOperationResult] = pydantic.Field(description="The result of this operation.") + result: typing.Optional[TestReportOperationResult] = pydantic.Field( + default=None, description="The result of this operation." + ) message: typing.Optional[Markdown] = pydantic.Field( - description="An explanatory message associated with the result." + default=None, description="An explanatory message associated with the result." ) - detail: typing.Optional[Uri] = pydantic.Field(description="A link to further details on the result.") + detail: typing.Optional[Uri] = pydantic.Field(default=None, description="A link to further details on the result.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_report_participant.py b/src/metriport/fhir/types/test_report_participant.py index 29b1ad8..4baa7e9 100644 --- a/src/metriport/fhir/types/test_report_participant.py +++ b/src/metriport/fhir/types/test_report_participant.py @@ -20,18 +20,25 @@ class TestReportParticipant(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[TestReportParticipantType] = pydantic.Field(description="The type of participant.") - uri: typing.Optional[Uri] = pydantic.Field(description="The uri of the participant. An absolute URL is preferred.") - display: typing.Optional[str] = pydantic.Field(description="The display name of the participant.") + type: typing.Optional[TestReportParticipantType] = pydantic.Field( + default=None, description="The type of participant." + ) + uri: typing.Optional[Uri] = pydantic.Field( + default=None, description="The uri of the participant. An absolute URL is preferred." + ) + display: typing.Optional[str] = pydantic.Field(default=None, description="The display name of the participant.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_report_setup.py b/src/metriport/fhir/types/test_report_setup.py index 71ba779..c8d94b4 100644 --- a/src/metriport/fhir/types/test_report_setup.py +++ b/src/metriport/fhir/types/test_report_setup.py @@ -19,13 +19,16 @@ class TestReportSetup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: typing.List[TestReportAction] = pydantic.Field( diff --git a/src/metriport/fhir/types/test_report_teardown.py b/src/metriport/fhir/types/test_report_teardown.py index cb390cb..195b7b8 100644 --- a/src/metriport/fhir/types/test_report_teardown.py +++ b/src/metriport/fhir/types/test_report_teardown.py @@ -19,13 +19,16 @@ class TestReportTeardown(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: typing.List[TestReportAction2] = pydantic.Field( diff --git a/src/metriport/fhir/types/test_report_test.py b/src/metriport/fhir/types/test_report_test.py index 273d4d6..0673a43 100644 --- a/src/metriport/fhir/types/test_report_test.py +++ b/src/metriport/fhir/types/test_report_test.py @@ -19,20 +19,24 @@ class TestReportTest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="The name of this test used for tracking/logging purposes by test engines." + default=None, description="The name of this test used for tracking/logging purposes by test engines." ) description: typing.Optional[str] = pydantic.Field( - description="A short description of the test used by test engines for tracking and reporting purposes." + default=None, + description="A short description of the test used by test engines for tracking and reporting purposes.", ) action: typing.List[TestReportAction1] = pydantic.Field( description="Action would contain either an operation or an assertion." diff --git a/src/metriport/fhir/types/test_script.py b/src/metriport/fhir/types/test_script.py index effa4a9..f5281dd 100644 --- a/src/metriport/fhir/types/test_script.py +++ b/src/metriport/fhir/types/test_script.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -36,77 +34,94 @@ class TestScript(BaseResource): A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification. """ - resource_type: typing_extensions.Literal["TestScript"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TestScript"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers." + default=None, + description="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.", ) identifier: typing.Optional[Identifier] = pydantic.Field( - description="A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the test script." + default=None, description="A short, descriptive, user-friendly title for the test script." ) status: typing.Optional[TestScriptStatus] = pydantic.Field( - description="The status of this test script. Enables tracking the life-cycle of the content." + default=None, description="The status of this test script. Enables tracking the life-cycle of the content." ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes." + default=None, + description="The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the test script." + default=None, description="The name of the organization or individual that published the test script." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the test script from a consumer's perspective." + default=None, + description="A free text natural language description of the test script from a consumer's perspective.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the test script is intended to be used." + default=None, description="A legal or geographic region in which the test script is intended to be used." ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this test script is needed and why it has been designed as it has." + default=None, + description="Explanation of why this test script is needed and why it has been designed as it has.", ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script." + default=None, + description="A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.", ) origin: typing.Optional[typing.List[TestScriptOrigin]] = pydantic.Field( - description="An abstract server used in operations within this test script in the origin element." + default=None, description="An abstract server used in operations within this test script in the origin element." ) destination: typing.Optional[typing.List[TestScriptDestination]] = pydantic.Field( - description="An abstract server used in operations within this test script in the destination element." + default=None, + description="An abstract server used in operations within this test script in the destination element.", ) metadata: typing.Optional[TestScriptMetadata] = pydantic.Field( - description="The required capability must exist and are assumed to function correctly on the FHIR server being tested." + default=None, + description="The required capability must exist and are assumed to function correctly on the FHIR server being tested.", ) fixture: typing.Optional[typing.List[TestScriptFixture]] = pydantic.Field( - description="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute." + default=None, + description="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", ) profile: typing.Optional[typing.List[Reference]] = pydantic.Field( - description="Reference to the profile to be used for validation." + default=None, description="Reference to the profile to be used for validation." ) variable: typing.Optional[typing.List[TestScriptVariable]] = pydantic.Field( - description="Variable is set based either on element value in response body or on header field value in the response headers." + default=None, + description="Variable is set based either on element value in response body or on header field value in the response headers.", ) setup: typing.Optional[TestScriptSetup] = pydantic.Field( - description="A series of required setup operations before tests are executed." + default=None, description="A series of required setup operations before tests are executed." + ) + test: typing.Optional[typing.List[TestScriptTest]] = pydantic.Field( + default=None, description="A test in this script." ) - test: typing.Optional[typing.List[TestScriptTest]] = pydantic.Field(description="A test in this script.") teardown: typing.Optional[TestScriptTeardown] = pydantic.Field( - description="A series of operations required to clean up after all the tests are executed (successfully or otherwise)." + default=None, + description="A series of operations required to clean up after all the tests are executed (successfully or otherwise).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/test_script_action.py b/src/metriport/fhir/types/test_script_action.py index c09b2c9..f94c127 100644 --- a/src/metriport/fhir/types/test_script_action.py +++ b/src/metriport/fhir/types/test_script_action.py @@ -20,18 +20,24 @@ class TestScriptAction(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - operation: typing.Optional[TestScriptOperation] = pydantic.Field(description="The operation to perform.") + operation: typing.Optional[TestScriptOperation] = pydantic.Field( + default=None, description="The operation to perform." + ) assert_: typing.Optional[TestScriptAssert] = pydantic.Field( alias="assert", + default=None, description="Evaluates the results of previous operations to determine if the server under test behaves appropriately.", ) diff --git a/src/metriport/fhir/types/test_script_action_1.py b/src/metriport/fhir/types/test_script_action_1.py index 8a9eded..2490a7b 100644 --- a/src/metriport/fhir/types/test_script_action_1.py +++ b/src/metriport/fhir/types/test_script_action_1.py @@ -20,20 +20,24 @@ class TestScriptAction1(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) operation: typing.Optional[TestScriptOperation] = pydantic.Field( - description="An operation would involve a REST request to a server." + default=None, description="An operation would involve a REST request to a server." ) assert_: typing.Optional[TestScriptAssert] = pydantic.Field( alias="assert", + default=None, description="Evaluates the results of previous operations to determine if the server under test behaves appropriately.", ) diff --git a/src/metriport/fhir/types/test_script_action_2.py b/src/metriport/fhir/types/test_script_action_2.py index 8009998..c334618 100644 --- a/src/metriport/fhir/types/test_script_action_2.py +++ b/src/metriport/fhir/types/test_script_action_2.py @@ -19,13 +19,16 @@ class TestScriptAction2(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) operation: TestScriptOperation = pydantic.Field( diff --git a/src/metriport/fhir/types/test_script_assert.py b/src/metriport/fhir/types/test_script_assert.py index a5a71d7..fb06929 100644 --- a/src/metriport/fhir/types/test_script_assert.py +++ b/src/metriport/fhir/types/test_script_assert.py @@ -24,71 +24,87 @@ class TestScriptAssert(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) label: typing.Optional[str] = pydantic.Field( - description="The label would be used for tracking/logging purposes by test engines." + default=None, description="The label would be used for tracking/logging purposes by test engines." ) description: typing.Optional[str] = pydantic.Field( - description="The description would be used by test engines for tracking and reporting purposes." + default=None, description="The description would be used by test engines for tracking and reporting purposes." ) direction: typing.Optional[TestScriptAssertDirection] = pydantic.Field( - description="The direction to use for the assertion." + default=None, description="The direction to use for the assertion." ) compare_to_source_id: typing.Optional[str] = pydantic.Field( alias="compareToSourceId", + default=None, description='Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.', ) compare_to_source_expression: typing.Optional[str] = pydantic.Field( alias="compareToSourceExpression", + default=None, description="The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", ) compare_to_source_path: typing.Optional[str] = pydantic.Field( alias="compareToSourcePath", + default=None, description="XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", ) content_type: typing.Optional[Code] = pydantic.Field( alias="contentType", + default=None, description="The mime-type contents to compare against the request or response message 'Content-Type' header.", ) expression: typing.Optional[str] = pydantic.Field( - description="The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload." + default=None, + description="The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.", ) header_field: typing.Optional[str] = pydantic.Field( - alias="headerField", description="The HTTP header field name e.g. 'Location'." + alias="headerField", default=None, description="The HTTP header field name e.g. 'Location'." ) minimum_id: typing.Optional[str] = pydantic.Field( alias="minimumId", + default=None, description="The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", ) navigation_links: typing.Optional[bool] = pydantic.Field( alias="navigationLinks", + default=None, description="Whether or not the test execution performs validation on the bundle navigation links.", ) operator: typing.Optional[TestScriptAssertOperator] = pydantic.Field( - description="The operator type defines the conditional behavior of the assert. If not defined, the default is equals." + default=None, + description="The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", ) path: typing.Optional[str] = pydantic.Field( - description="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." + default=None, + description="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", ) request_method: typing.Optional[TestScriptAssertRequestMethod] = pydantic.Field( alias="requestMethod", + default=None, description="The request method or HTTP operation code to compare against that used by the client system under test.", ) request_url: typing.Optional[str] = pydantic.Field( - alias="requestURL", description="The value to use in a comparison against the request URL path string." + alias="requestURL", + default=None, + description="The value to use in a comparison against the request URL path string.", ) resource: typing.Optional[Code] = pydantic.Field( - description="The type of the resource. See http://build.fhir.org/resourcelist.html." + default=None, description="The type of the resource. See http://build.fhir.org/resourcelist.html." ) response: typing.Optional[TestScriptAssertResponse] = pydantic.Field( + default=None, description=( "okay \n" " created \n" @@ -102,20 +118,23 @@ class TestScriptAssert(pydantic.BaseModel): " gone \n" " preconditionFailed \n" " unprocessable.\n" - ) + ), ) response_code: typing.Optional[str] = pydantic.Field( - alias="responseCode", description="The value of the HTTP response code to be tested." + alias="responseCode", default=None, description="The value of the HTTP response code to be tested." ) source_id: typing.Optional[Id] = pydantic.Field( - alias="sourceId", description="Fixture to evaluate the XPath/JSONPath expression or the headerField against." + alias="sourceId", + default=None, + description="Fixture to evaluate the XPath/JSONPath expression or the headerField against.", ) validate_profile_id: typing.Optional[Id] = pydantic.Field( - alias="validateProfileId", description="The ID of the Profile to validate against." + alias="validateProfileId", default=None, description="The ID of the Profile to validate against." ) - value: typing.Optional[str] = pydantic.Field(description="The value to compare to.") + value: typing.Optional[str] = pydantic.Field(default=None, description="The value to compare to.") warning_only: typing.Optional[bool] = pydantic.Field( alias="warningOnly", + default=None, description="Whether or not the test execution will produce a warning only on error for this assert.", ) diff --git a/src/metriport/fhir/types/test_script_capability.py b/src/metriport/fhir/types/test_script_capability.py index 3ff738a..8b8f71c 100644 --- a/src/metriport/fhir/types/test_script_capability.py +++ b/src/metriport/fhir/types/test_script_capability.py @@ -20,30 +20,39 @@ class TestScriptCapability(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) required: typing.Optional[bool] = pydantic.Field( - description="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute." + default=None, + description="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", ) validated: typing.Optional[bool] = pydantic.Field( - description="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute." + default=None, + description="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", ) description: typing.Optional[str] = pydantic.Field( - description="Description of the capabilities that this test script is requiring the server to support." + default=None, + description="Description of the capabilities that this test script is requiring the server to support.", ) origin: typing.Optional[typing.List[int]] = pydantic.Field( - description="Which origin server these requirements apply to." + default=None, description="Which origin server these requirements apply to." + ) + destination: typing.Optional[int] = pydantic.Field( + default=None, description="Which server these requirements apply to." ) - destination: typing.Optional[int] = pydantic.Field(description="Which server these requirements apply to.") link: typing.Optional[typing.List[Uri]] = pydantic.Field( - description="Links to the FHIR specification that describes this interaction and the resources involved in more detail." + default=None, + description="Links to the FHIR specification that describes this interaction and the resources involved in more detail.", ) capabilities: Canonical = pydantic.Field( description="Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped." diff --git a/src/metriport/fhir/types/test_script_destination.py b/src/metriport/fhir/types/test_script_destination.py index dfd9d3c..c214826 100644 --- a/src/metriport/fhir/types/test_script_destination.py +++ b/src/metriport/fhir/types/test_script_destination.py @@ -19,17 +19,21 @@ class TestScriptDestination(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) index: typing.Optional[int] = pydantic.Field( - description="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1." + default=None, + description="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", ) profile: Coding = pydantic.Field(description="The type of destination profile the test system supports.") diff --git a/src/metriport/fhir/types/test_script_fixture.py b/src/metriport/fhir/types/test_script_fixture.py index 29fdcb2..09e0b64 100644 --- a/src/metriport/fhir/types/test_script_fixture.py +++ b/src/metriport/fhir/types/test_script_fixture.py @@ -19,23 +19,29 @@ class TestScriptFixture(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) autocreate: typing.Optional[bool] = pydantic.Field( - description="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section." + default=None, + description="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", ) autodelete: typing.Optional[bool] = pydantic.Field( - description="Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section." + default=None, + description="Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", ) resource: typing.Optional[Reference] = pydantic.Field( - description="Reference to the resource (containing the contents of the resource needed for operations)." + default=None, + description="Reference to the resource (containing the contents of the resource needed for operations).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/test_script_link.py b/src/metriport/fhir/types/test_script_link.py index cea5fd2..d55b2c8 100644 --- a/src/metriport/fhir/types/test_script_link.py +++ b/src/metriport/fhir/types/test_script_link.py @@ -19,19 +19,22 @@ class TestScriptLink(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) url: typing.Optional[Uri] = pydantic.Field( - description="URL to a particular requirement or feature within the FHIR specification." + default=None, description="URL to a particular requirement or feature within the FHIR specification." ) - description: typing.Optional[str] = pydantic.Field(description="Short description of the link.") + description: typing.Optional[str] = pydantic.Field(default=None, description="Short description of the link.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_script_metadata.py b/src/metriport/fhir/types/test_script_metadata.py index 73c7b06..33c8e58 100644 --- a/src/metriport/fhir/types/test_script_metadata.py +++ b/src/metriport/fhir/types/test_script_metadata.py @@ -20,17 +20,20 @@ class TestScriptMetadata(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) link: typing.Optional[typing.List[TestScriptLink]] = pydantic.Field( - description="A link to the FHIR specification that this test is covering." + default=None, description="A link to the FHIR specification that this test is covering." ) capability: typing.List[TestScriptCapability] = pydantic.Field( description="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." diff --git a/src/metriport/fhir/types/test_script_operation.py b/src/metriport/fhir/types/test_script_operation.py index 5448eed..ddc5a8a 100644 --- a/src/metriport/fhir/types/test_script_operation.py +++ b/src/metriport/fhir/types/test_script_operation.py @@ -23,63 +23,74 @@ class TestScriptOperation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - type: typing.Optional[Coding] = pydantic.Field(description="Server interaction or operation type.") + type: typing.Optional[Coding] = pydantic.Field(default=None, description="Server interaction or operation type.") resource: typing.Optional[Code] = pydantic.Field( - description="The type of the resource. See http://build.fhir.org/resourcelist.html." + default=None, description="The type of the resource. See http://build.fhir.org/resourcelist.html." ) label: typing.Optional[str] = pydantic.Field( - description="The label would be used for tracking/logging purposes by test engines." + default=None, description="The label would be used for tracking/logging purposes by test engines." ) description: typing.Optional[str] = pydantic.Field( - description="The description would be used by test engines for tracking and reporting purposes." + default=None, description="The description would be used by test engines for tracking and reporting purposes." ) accept: typing.Optional[Code] = pydantic.Field( - description="The mime-type to use for RESTful operation in the 'Accept' header." + default=None, description="The mime-type to use for RESTful operation in the 'Accept' header." ) content_type: typing.Optional[Code] = pydantic.Field( - alias="contentType", description="The mime-type to use for RESTful operation in the 'Content-Type' header." + alias="contentType", + default=None, + description="The mime-type to use for RESTful operation in the 'Content-Type' header.", ) destination: typing.Optional[int] = pydantic.Field( - description="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section." + default=None, + description="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", ) encode_request_url: typing.Optional[bool] = pydantic.Field( alias="encodeRequestUrl", + default=None, description="Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", ) method: typing.Optional[TestScriptOperationMethod] = pydantic.Field( - description="The HTTP method the test engine MUST use for this operation regardless of any other operation details." + default=None, + description="The HTTP method the test engine MUST use for this operation regardless of any other operation details.", ) origin: typing.Optional[int] = pydantic.Field( - description="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section." + default=None, + description="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", ) params: typing.Optional[str] = pydantic.Field( - description="Path plus parameters after [type]. Used to set parts of the request URL explicitly." + default=None, description="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) request_header: typing.Optional[typing.List[TestScriptRequestHeader]] = pydantic.Field( - alias="requestHeader", description="Header elements would be used to set HTTP headers." + alias="requestHeader", default=None, description="Header elements would be used to set HTTP headers." ) request_id: typing.Optional[Id] = pydantic.Field( - alias="requestId", description="The fixture id (maybe new) to map to the request." + alias="requestId", default=None, description="The fixture id (maybe new) to map to the request." ) response_id: typing.Optional[Id] = pydantic.Field( - alias="responseId", description="The fixture id (maybe new) to map to the response." + alias="responseId", default=None, description="The fixture id (maybe new) to map to the response." ) source_id: typing.Optional[Id] = pydantic.Field( - alias="sourceId", description="The id of the fixture used as the body of a PUT or POST request." + alias="sourceId", default=None, description="The id of the fixture used as the body of a PUT or POST request." ) target_id: typing.Optional[Id] = pydantic.Field( - alias="targetId", description="Id of fixture used for extracting the [id], [type], and [vid] for GET requests." + alias="targetId", + default=None, + description="Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", ) - url: typing.Optional[str] = pydantic.Field(description="Complete request URL.") + url: typing.Optional[str] = pydantic.Field(default=None, description="Complete request URL.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_script_origin.py b/src/metriport/fhir/types/test_script_origin.py index a424ee0..7502896 100644 --- a/src/metriport/fhir/types/test_script_origin.py +++ b/src/metriport/fhir/types/test_script_origin.py @@ -19,17 +19,21 @@ class TestScriptOrigin(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) index: typing.Optional[int] = pydantic.Field( - description="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1." + default=None, + description="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", ) profile: Coding = pydantic.Field(description="The type of origin profile the test system supports.") diff --git a/src/metriport/fhir/types/test_script_request_header.py b/src/metriport/fhir/types/test_script_request_header.py index 23a5462..b81a4a4 100644 --- a/src/metriport/fhir/types/test_script_request_header.py +++ b/src/metriport/fhir/types/test_script_request_header.py @@ -18,17 +18,22 @@ class TestScriptRequestHeader(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - field: typing.Optional[str] = pydantic.Field(description='The HTTP header field e.g. "Accept".') - value: typing.Optional[str] = pydantic.Field(description='The value of the header e.g. "application/fhir+xml".') + field: typing.Optional[str] = pydantic.Field(default=None, description='The HTTP header field e.g. "Accept".') + value: typing.Optional[str] = pydantic.Field( + default=None, description='The value of the header e.g. "application/fhir+xml".' + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/test_script_setup.py b/src/metriport/fhir/types/test_script_setup.py index 7eec546..a9f0008 100644 --- a/src/metriport/fhir/types/test_script_setup.py +++ b/src/metriport/fhir/types/test_script_setup.py @@ -19,13 +19,16 @@ class TestScriptSetup(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: typing.List[TestScriptAction] = pydantic.Field( diff --git a/src/metriport/fhir/types/test_script_teardown.py b/src/metriport/fhir/types/test_script_teardown.py index f63cb95..5145615 100644 --- a/src/metriport/fhir/types/test_script_teardown.py +++ b/src/metriport/fhir/types/test_script_teardown.py @@ -19,13 +19,16 @@ class TestScriptTeardown(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) action: typing.List[TestScriptAction2] = pydantic.Field( diff --git a/src/metriport/fhir/types/test_script_test.py b/src/metriport/fhir/types/test_script_test.py index c2b4483..a65796f 100644 --- a/src/metriport/fhir/types/test_script_test.py +++ b/src/metriport/fhir/types/test_script_test.py @@ -19,20 +19,24 @@ class TestScriptTest(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="The name of this test used for tracking/logging purposes by test engines." + default=None, description="The name of this test used for tracking/logging purposes by test engines." ) description: typing.Optional[str] = pydantic.Field( - description="A short description of the test used by test engines for tracking and reporting purposes." + default=None, + description="A short description of the test used by test engines for tracking and reporting purposes.", ) action: typing.List[TestScriptAction1] = pydantic.Field( description="Action would contain either an operation or an assertion." diff --git a/src/metriport/fhir/types/test_script_variable.py b/src/metriport/fhir/types/test_script_variable.py index 9d981fd..06b1bcb 100644 --- a/src/metriport/fhir/types/test_script_variable.py +++ b/src/metriport/fhir/types/test_script_variable.py @@ -19,37 +19,47 @@ class TestScriptVariable(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - name: typing.Optional[str] = pydantic.Field(description="Descriptive name for this variable.") + name: typing.Optional[str] = pydantic.Field(default=None, description="Descriptive name for this variable.") default_value: typing.Optional[str] = pydantic.Field( - alias="defaultValue", description="A default, hard-coded, or user-defined value for this variable." + alias="defaultValue", + default=None, + description="A default, hard-coded, or user-defined value for this variable.", ) description: typing.Optional[str] = pydantic.Field( - description="A free text natural language description of the variable and its purpose." + default=None, description="A free text natural language description of the variable and its purpose." ) expression: typing.Optional[str] = pydantic.Field( - description="The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." + default=None, + description="The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", ) header_field: typing.Optional[str] = pydantic.Field( alias="headerField", + default=None, description="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", ) hint: typing.Optional[str] = pydantic.Field( - description="Displayable text string with hint help information to the user when entering a default value." + default=None, + description="Displayable text string with hint help information to the user when entering a default value.", ) path: typing.Optional[str] = pydantic.Field( - description="XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." + default=None, + description="XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", ) source_id: typing.Optional[Id] = pydantic.Field( alias="sourceId", + default=None, description="Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", ) diff --git a/src/metriport/fhir/types/timing.py b/src/metriport/fhir/types/timing.py index d097538..9bf36a7 100644 --- a/src/metriport/fhir/types/timing.py +++ b/src/metriport/fhir/types/timing.py @@ -20,23 +20,27 @@ class Timing(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) event: typing.Optional[typing.List[DateTime]] = pydantic.Field( - description="Identifies specific times when the event occurs." + default=None, description="Identifies specific times when the event occurs." ) repeat: typing.Optional[TimingRepeat] = pydantic.Field( - description="A set of rules that describe when the event is scheduled." + default=None, description="A set of rules that describe when the event is scheduled." ) code: typing.Optional[CodeableConcept] = pydantic.Field( - description="A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code)." + default=None, + description="A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/timing_repeat.py b/src/metriport/fhir/types/timing_repeat.py index 4aab459..ab44ab7 100644 --- a/src/metriport/fhir/types/timing_repeat.py +++ b/src/metriport/fhir/types/timing_repeat.py @@ -27,73 +27,90 @@ class TimingRepeat(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) bounds_duration: typing.Optional[Duration] = pydantic.Field( alias="boundsDuration", + default=None, description="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.", ) bounds_range: typing.Optional[Range] = pydantic.Field( alias="boundsRange", + default=None, description="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.", ) bounds_period: typing.Optional[Period] = pydantic.Field( alias="boundsPeriod", + default=None, description="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.", ) count: typing.Optional[PositiveInt] = pydantic.Field( - description="A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values." + default=None, + description="A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.", ) count_max: typing.Optional[PositiveInt] = pydantic.Field( alias="countMax", + default=None, description="If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.", ) duration: typing.Optional[Decimal] = pydantic.Field( - description="How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration." + default=None, + description="How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.", ) duration_max: typing.Optional[Decimal] = pydantic.Field( alias="durationMax", + default=None, description="If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.", ) duration_unit: typing.Optional[TimingRepeatDurationUnit] = pydantic.Field( - alias="durationUnit", description="The units of time for the duration, in UCUM units." + alias="durationUnit", default=None, description="The units of time for the duration, in UCUM units." ) frequency: typing.Optional[PositiveInt] = pydantic.Field( - description="The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency." + default=None, + description="The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.", ) frequency_max: typing.Optional[PositiveInt] = pydantic.Field( alias="frequencyMax", + default=None, description="If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.", ) period: typing.Optional[Decimal] = pydantic.Field( - description='Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.' + default=None, + description='Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.', ) period_max: typing.Optional[Decimal] = pydantic.Field( alias="periodMax", + default=None, description='If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days.', ) period_unit: typing.Optional[TimingRepeatPeriodUnit] = pydantic.Field( - alias="periodUnit", description="The units of time for the period in UCUM units." + alias="periodUnit", default=None, description="The units of time for the period in UCUM units." ) day_of_week: typing.Optional[typing.List[Code]] = pydantic.Field( alias="dayOfWeek", + default=None, description="If one or more days of week is provided, then the action happens only on the specified day(s).", ) time_of_day: typing.Optional[typing.List[Time]] = pydantic.Field( - alias="timeOfDay", description="Specified time of day for action to take place." + alias="timeOfDay", default=None, description="Specified time of day for action to take place." ) when: typing.Optional[typing.List[TimingRepeatWhenItem]] = pydantic.Field( - description="An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur." + default=None, + description="An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.", ) offset: typing.Optional[UnsignedInt] = pydantic.Field( - description="The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event." + default=None, + description="The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/trigger_definition.py b/src/metriport/fhir/types/trigger_definition.py index e2f8cb7..9781a59 100644 --- a/src/metriport/fhir/types/trigger_definition.py +++ b/src/metriport/fhir/types/trigger_definition.py @@ -20,32 +20,39 @@ class TriggerDefinition(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + ) + type: typing.Optional[TriggerDefinitionType] = pydantic.Field( + default=None, description="The type of triggering event." ) - type: typing.Optional[TriggerDefinitionType] = pydantic.Field(description="The type of triggering event.") name: typing.Optional[str] = pydantic.Field( - description="A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context." + default=None, + description="A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.", ) timing_timing: typing.Optional[Timing] = pydantic.Field( - alias="timingTiming", description="The timing of the event (if this is a periodic trigger)." + alias="timingTiming", default=None, description="The timing of the event (if this is a periodic trigger)." ) timing_reference: typing.Optional[Reference] = pydantic.Field( - alias="timingReference", description="The timing of the event (if this is a periodic trigger)." + alias="timingReference", default=None, description="The timing of the event (if this is a periodic trigger)." ) timing_date: typing.Optional[str] = pydantic.Field( - alias="timingDate", description="The timing of the event (if this is a periodic trigger)." + alias="timingDate", default=None, description="The timing of the event (if this is a periodic trigger)." ) timing_date_time: typing.Optional[str] = pydantic.Field( - alias="timingDateTime", description="The timing of the event (if this is a periodic trigger)." + alias="timingDateTime", default=None, description="The timing of the event (if this is a periodic trigger)." ) data: typing.Optional[typing.List[DataRequirement]] = pydantic.Field( - description="The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true." + default=None, + description="The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.", ) condition: typing.Optional[Expression] = pydantic.Field( - description="A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires." + default=None, + description="A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/usage_context.py b/src/metriport/fhir/types/usage_context.py index a34e5b1..9ee17f1 100644 --- a/src/metriport/fhir/types/usage_context.py +++ b/src/metriport/fhir/types/usage_context.py @@ -19,28 +19,34 @@ class UsageContext(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) code: Coding = pydantic.Field( description="A code that identifies the type of context being specified by this usage context." ) value_codeable_concept: typing.Optional[CodeableConcept] = pydantic.Field( alias="valueCodeableConcept", + default=None, description="A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.", ) value_quantity: typing.Optional[Quantity] = pydantic.Field( alias="valueQuantity", + default=None, description="A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.", ) value_range: typing.Optional[Range] = pydantic.Field( alias="valueRange", + default=None, description="A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.", ) value_reference: typing.Optional[Reference] = pydantic.Field( alias="valueReference", + default=None, description="A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.", ) diff --git a/src/metriport/fhir/types/user.py b/src/metriport/fhir/types/user.py index 25c9bba..6e29ed7 100644 --- a/src/metriport/fhir/types/user.py +++ b/src/metriport/fhir/types/user.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,18 +21,23 @@ class User(pydantic.BaseModel): Representation of a human user of the system. """ - resource_type: typing_extensions.Literal["User"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["User"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) first_name: str = pydantic.Field( alias="firstName", description="The first name or given name of the user. This is the value as entered when the user is created. It is used to populate the profile resource.", @@ -44,25 +47,29 @@ class User(pydantic.BaseModel): description="The last name or family name of the user. This is the value as entered when the user is created. It is used to populate the profile resource.", ) external_id: typing.Optional[str] = pydantic.Field( - alias="externalId", description="DEPRECATED Replaced by ProjectMembership.externalId." + alias="externalId", default=None, description="DEPRECATED Replaced by ProjectMembership.externalId." + ) + email: typing.Optional[str] = pydantic.Field( + default=None, description="The email address that uniquely identifies the user." ) - email: typing.Optional[str] = pydantic.Field(description="The email address that uniquely identifies the user.") email_verified: typing.Optional[bool] = pydantic.Field( alias="emailVerified", + default=None, description="Whether the system has verified that the user has access to the email address.", ) - admin: typing.Optional[bool] = pydantic.Field(description="DEPRECATED") + admin: typing.Optional[bool] = pydantic.Field(default=None, description="DEPRECATED") password_hash: typing.Optional[str] = pydantic.Field( - alias="passwordHash", description="Encrypted hash of the user's password." + alias="passwordHash", default=None, description="Encrypted hash of the user's password." ) mfa_secret: typing.Optional[str] = pydantic.Field( - alias="mfaSecret", description="Shared secret for MFA authenticator applications." + alias="mfaSecret", default=None, description="Shared secret for MFA authenticator applications." ) mfa_enrolled: typing.Optional[bool] = pydantic.Field( - alias="mfaEnrolled", description="Whether the user has completed MFA enrollment." + alias="mfaEnrolled", default=None, description="Whether the user has completed MFA enrollment." ) project: typing.Optional[Reference] = pydantic.Field( - description="Optional project if the user only exists for the project. This is used for the project-specific user database." + default=None, + description="Optional project if the user only exists for the project. This is used for the project-specific user database.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/user_configuration.py b/src/metriport/fhir/types/user_configuration.py index f4c3c2c..8e5755c 100644 --- a/src/metriport/fhir/types/user_configuration.py +++ b/src/metriport/fhir/types/user_configuration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -25,27 +23,34 @@ class UserConfiguration(pydantic.BaseModel): User specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["UserConfiguration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["UserConfiguration"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( - description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." + default=None, + description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", ) meta: typing.Optional[Meta] = pydantic.Field( - description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." + default=None, + description="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", ) implicit_rules: typing.Optional[Uri] = pydantic.Field( alias="implicitRules", + default=None, description="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", ) - language: typing.Optional[Code] = pydantic.Field(description="The base language in which the resource is written.") - name: typing.Optional[str] = pydantic.Field(description="A name associated with the UserConfiguration.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The base language in which the resource is written." + ) + name: typing.Optional[str] = pydantic.Field( + default=None, description="A name associated with the UserConfiguration." + ) menu: typing.Optional[typing.List[UserConfigurationMenu]] = pydantic.Field( - description="Optional menu of shortcuts to URLs." + default=None, description="Optional menu of shortcuts to URLs." ) search: typing.Optional[typing.List[UserConfigurationSearch]] = pydantic.Field( - description="Shortcut links to URLs." + default=None, description="Shortcut links to URLs." ) option: typing.Optional[typing.List[UserConfigurationOption]] = pydantic.Field( - description="User options that control the display of the application." + default=None, description="User options that control the display of the application." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/user_configuration_menu.py b/src/metriport/fhir/types/user_configuration_menu.py index 9c4c57b..63a3422 100644 --- a/src/metriport/fhir/types/user_configuration_menu.py +++ b/src/metriport/fhir/types/user_configuration_menu.py @@ -19,7 +19,7 @@ class UserConfigurationMenu(pydantic.BaseModel): title: str = pydantic.Field(description="Title of the menu.") link: typing.Optional[typing.List[UserConfigurationMenuLink]] = pydantic.Field( - description="Shortcut links to URLs." + default=None, description="Shortcut links to URLs." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/user_configuration_option.py b/src/metriport/fhir/types/user_configuration_option.py index 46555a0..fcebb70 100644 --- a/src/metriport/fhir/types/user_configuration_option.py +++ b/src/metriport/fhir/types/user_configuration_option.py @@ -22,22 +22,27 @@ class UserConfigurationOption(pydantic.BaseModel): id: Id = pydantic.Field(description="The unique identifier of the option.") value_boolean: typing.Optional[bool] = pydantic.Field( alias="valueBoolean", + default=None, description="Value of option - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_code: typing.Optional[Code] = pydantic.Field( alias="valueCode", + default=None, description="Value of option - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_decimal: typing.Optional[Decimal] = pydantic.Field( alias="valueDecimal", + default=None, description="Value of option - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_integer: typing.Optional[int] = pydantic.Field( alias="valueInteger", + default=None, description="Value of option - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) value_string: typing.Optional[str] = pydantic.Field( alias="valueString", + default=None, description="Value of option - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", ) diff --git a/src/metriport/fhir/types/value_set.py b/src/metriport/fhir/types/value_set.py index 921eaad..c61b0b5 100644 --- a/src/metriport/fhir/types/value_set.py +++ b/src/metriport/fhir/types/value_set.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -29,61 +27,74 @@ class ValueSet(BaseResource): A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html). """ - resource_type: typing_extensions.Literal["ValueSet"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ValueSet"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers." + default=None, + description="An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.", ) identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance." + default=None, + description="A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", ) version: typing.Optional[str] = pydantic.Field( - description="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." + default=None, + description="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", ) name: typing.Optional[str] = pydantic.Field( - description="A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation." + default=None, + description="A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.", ) title: typing.Optional[str] = pydantic.Field( - description="A short, descriptive, user-friendly title for the value set." + default=None, description="A short, descriptive, user-friendly title for the value set." ) status: typing.Optional[ValueSetStatus] = pydantic.Field( - description="The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state." + default=None, + description="The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.", ) experimental: typing.Optional[bool] = pydantic.Field( - description="A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." + default=None, + description="A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", ) date: typing.Optional[DateTime] = pydantic.Field( - description="The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition')." + default=None, + description="The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", ) publisher: typing.Optional[str] = pydantic.Field( - description="The name of the organization or individual that published the value set." + default=None, description="The name of the organization or individual that published the value set." ) contact: typing.Optional[typing.List[ContactDetail]] = pydantic.Field( - description="Contact details to assist a user in finding and communicating with the publisher." + default=None, description="Contact details to assist a user in finding and communicating with the publisher." ) description: typing.Optional[Markdown] = pydantic.Field( - description="A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set." + default=None, + description="A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", ) use_context: typing.Optional[typing.List[UsageContext]] = pydantic.Field( alias="useContext", + default=None, description="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.", ) jurisdiction: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="A legal or geographic region in which the value set is intended to be used." + default=None, description="A legal or geographic region in which the value set is intended to be used." ) immutable: typing.Optional[bool] = pydantic.Field( - description="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change." + default=None, + description="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", ) purpose: typing.Optional[Markdown] = pydantic.Field( - description="Explanation of why this value set is needed and why it has been designed as it has." + default=None, description="Explanation of why this value set is needed and why it has been designed as it has." ) copyright: typing.Optional[Markdown] = pydantic.Field( - description="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set." + default=None, + description="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", ) compose: typing.Optional[ValueSetCompose] = pydantic.Field( - description="A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD)." + default=None, + description="A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).", ) expansion: typing.Optional[ValueSetExpansion] = pydantic.Field( - description='A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.' + default=None, + description='A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.', ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_compose.py b/src/metriport/fhir/types/value_set_compose.py index 280af12..01881f5 100644 --- a/src/metriport/fhir/types/value_set_compose.py +++ b/src/metriport/fhir/types/value_set_compose.py @@ -19,27 +19,33 @@ class ValueSetCompose(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) locked_date: typing.Optional[dt.date] = pydantic.Field( alias="lockedDate", + default=None, description="The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.", ) inactive: typing.Optional[bool] = pydantic.Field( - description="Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included)." + default=None, + description="Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).", ) include: typing.List[ValueSetInclude] = pydantic.Field( description="Include one or more codes from a code system or other value set(s)." ) exclude: typing.Optional[typing.List[ValueSetInclude]] = pydantic.Field( - description="Exclude one or more codes from the value set based on code system filters and/or other value sets." + default=None, + description="Exclude one or more codes from the value set based on code system filters and/or other value sets.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_concept.py b/src/metriport/fhir/types/value_set_concept.py index 696ade6..41638c1 100644 --- a/src/metriport/fhir/types/value_set_concept.py +++ b/src/metriport/fhir/types/value_set_concept.py @@ -20,23 +20,28 @@ class ValueSetConcept(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) code: typing.Optional[Code] = pydantic.Field( - description="Specifies a code for the concept to be included or excluded." + default=None, description="Specifies a code for the concept to be included or excluded." ) display: typing.Optional[str] = pydantic.Field( - description="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system." + default=None, + description="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", ) designation: typing.Optional[typing.List[ValueSetDesignation]] = pydantic.Field( - description="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc." + default=None, + description="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_contains.py b/src/metriport/fhir/types/value_set_contains.py index 547cd64..2289cff 100644 --- a/src/metriport/fhir/types/value_set_contains.py +++ b/src/metriport/fhir/types/value_set_contains.py @@ -23,38 +23,47 @@ class ValueSetContains(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) system: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI which is the code system in which the code for this item in the expansion is defined." + default=None, + description="An absolute URI which is the code system in which the code for this item in the expansion is defined.", ) abstract: typing.Optional[bool] = pydantic.Field( - description="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value." + default=None, + description="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", ) inactive: typing.Optional[bool] = pydantic.Field( - description="If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use)." + default=None, + description="If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).", ) version: typing.Optional[str] = pydantic.Field( - description="The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." + default=None, + description="The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", ) code: typing.Optional[Code] = pydantic.Field( - description="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set." + default=None, + description="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", ) display: typing.Optional[str] = pydantic.Field( - description="The recommended display for this item in the expansion." + default=None, description="The recommended display for this item in the expansion." ) designation: typing.Optional[typing.List[ValueSetDesignation]] = pydantic.Field( - description="Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation." + default=None, + description="Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.", ) contains: typing.Optional[typing.List[ValueSetContains]] = pydantic.Field( - description="Other codes and entries contained under this entry in the hierarchy." + default=None, description="Other codes and entries contained under this entry in the hierarchy." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_designation.py b/src/metriport/fhir/types/value_set_designation.py index 6e53841..4e81134 100644 --- a/src/metriport/fhir/types/value_set_designation.py +++ b/src/metriport/fhir/types/value_set_designation.py @@ -20,18 +20,25 @@ class ValueSetDesignation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - language: typing.Optional[Code] = pydantic.Field(description="The language this designation is defined for.") - use: typing.Optional[Coding] = pydantic.Field(description="A code that represents types of uses of designations.") - value: typing.Optional[str] = pydantic.Field(description="The text value for this designation.") + language: typing.Optional[Code] = pydantic.Field( + default=None, description="The language this designation is defined for." + ) + use: typing.Optional[Coding] = pydantic.Field( + default=None, description="A code that represents types of uses of designations." + ) + value: typing.Optional[str] = pydantic.Field(default=None, description="The text value for this designation.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/fhir/types/value_set_expansion.py b/src/metriport/fhir/types/value_set_expansion.py index 0dd8893..f35d628 100644 --- a/src/metriport/fhir/types/value_set_expansion.py +++ b/src/metriport/fhir/types/value_set_expansion.py @@ -22,32 +22,39 @@ class ValueSetExpansion(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) identifier: typing.Optional[Uri] = pydantic.Field( - description="An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier." + default=None, + description="An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.", ) timestamp: typing.Optional[DateTime] = pydantic.Field( - description="The time at which the expansion was produced by the expanding system." + default=None, description="The time at which the expansion was produced by the expanding system." ) total: typing.Optional[int] = pydantic.Field( - description="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter." + default=None, + description="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", ) offset: typing.Optional[int] = pydantic.Field( - description="If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present." + default=None, + description="If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.", ) parameter: typing.Optional[typing.List[ValueSetParameter]] = pydantic.Field( - description="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion." + default=None, + description="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", ) contains: typing.Optional[typing.List[ValueSetContains]] = pydantic.Field( - description="The codes that are contained in the value set expansion." + default=None, description="The codes that are contained in the value set expansion." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_filter.py b/src/metriport/fhir/types/value_set_filter.py index 91d1889..7d660d8 100644 --- a/src/metriport/fhir/types/value_set_filter.py +++ b/src/metriport/fhir/types/value_set_filter.py @@ -20,23 +20,27 @@ class ValueSetFilter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) property: typing.Optional[Code] = pydantic.Field( - description="A code that identifies a property or a filter defined in the code system." + default=None, description="A code that identifies a property or a filter defined in the code system." ) op: typing.Optional[ValueSetFilterOp] = pydantic.Field( - description="The kind of operation to perform as a part of the filter criteria." + default=None, description="The kind of operation to perform as a part of the filter criteria." ) value: typing.Optional[str] = pydantic.Field( - description="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'." + default=None, + description="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/value_set_include.py b/src/metriport/fhir/types/value_set_include.py index 650ff93..f75967b 100644 --- a/src/metriport/fhir/types/value_set_include.py +++ b/src/metriport/fhir/types/value_set_include.py @@ -22,29 +22,35 @@ class ValueSetInclude(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) system: typing.Optional[Uri] = pydantic.Field( - description="An absolute URI which is the code system from which the selected codes come from." + default=None, description="An absolute URI which is the code system from which the selected codes come from." ) version: typing.Optional[str] = pydantic.Field( - description="The version of the code system that the codes are selected from, or the special version '\*' for all versions." + default=None, + description="The version of the code system that the codes are selected from, or the special version '\*' for all versions.", ) concept: typing.Optional[typing.List[ValueSetConcept]] = pydantic.Field( - description="Specifies a concept to be included or excluded." + default=None, description="Specifies a concept to be included or excluded." ) filter: typing.Optional[typing.List[ValueSetFilter]] = pydantic.Field( - description="Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true." + default=None, + description="Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.", ) value_set: typing.Optional[typing.List[Canonical]] = pydantic.Field( alias="valueSet", + default=None, description="Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.", ) diff --git a/src/metriport/fhir/types/value_set_parameter.py b/src/metriport/fhir/types/value_set_parameter.py index f8a64c6..623d95b 100644 --- a/src/metriport/fhir/types/value_set_parameter.py +++ b/src/metriport/fhir/types/value_set_parameter.py @@ -18,32 +18,42 @@ class ValueSetParameter(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) name: typing.Optional[str] = pydantic.Field( - description="Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process." + default=None, + description="Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.", + ) + value_string: typing.Optional[str] = pydantic.Field( + alias="valueString", default=None, description="The value of the parameter." ) - value_string: typing.Optional[str] = pydantic.Field(alias="valueString", description="The value of the parameter.") value_boolean: typing.Optional[bool] = pydantic.Field( - alias="valueBoolean", description="The value of the parameter." + alias="valueBoolean", default=None, description="The value of the parameter." ) value_integer: typing.Optional[float] = pydantic.Field( - alias="valueInteger", description="The value of the parameter." + alias="valueInteger", default=None, description="The value of the parameter." ) value_decimal: typing.Optional[float] = pydantic.Field( - alias="valueDecimal", description="The value of the parameter." + alias="valueDecimal", default=None, description="The value of the parameter." + ) + value_uri: typing.Optional[str] = pydantic.Field( + alias="valueUri", default=None, description="The value of the parameter." + ) + value_code: typing.Optional[str] = pydantic.Field( + alias="valueCode", default=None, description="The value of the parameter." ) - value_uri: typing.Optional[str] = pydantic.Field(alias="valueUri", description="The value of the parameter.") - value_code: typing.Optional[str] = pydantic.Field(alias="valueCode", description="The value of the parameter.") value_date_time: typing.Optional[str] = pydantic.Field( - alias="valueDateTime", description="The value of the parameter." + alias="valueDateTime", default=None, description="The value of the parameter." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/verification_result.py b/src/metriport/fhir/types/verification_result.py index 4df5a2f..7cd00cd 100644 --- a/src/metriport/fhir/types/verification_result.py +++ b/src/metriport/fhir/types/verification_result.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -27,46 +25,59 @@ class VerificationResult(BaseResource): Describes validation requirements, source(s), status and dates for one or more elements. """ - resource_type: typing_extensions.Literal["VerificationResult"] = pydantic.Field(alias="resourceType") - target: typing.Optional[typing.List[Reference]] = pydantic.Field(description="A resource that was validated.") + resource_type: typing.Literal["VerificationResult"] = pydantic.Field(alias="resourceType") + target: typing.Optional[typing.List[Reference]] = pydantic.Field( + default=None, description="A resource that was validated." + ) target_location: typing.Optional[typing.List[str]] = pydantic.Field( - alias="targetLocation", description="The fhirpath location(s) within the resource that was validated." + alias="targetLocation", + default=None, + description="The fhirpath location(s) within the resource that was validated.", ) need: typing.Optional[CodeableConcept] = pydantic.Field( - description="The frequency with which the target must be validated (none; initial; periodic)." + default=None, description="The frequency with which the target must be validated (none; initial; periodic)." ) status: typing.Optional[Code] = pydantic.Field( - description="The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed)." + default=None, + description="The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).", ) status_date: typing.Optional[DateTime] = pydantic.Field( - alias="statusDate", description="When the validation status was updated." + alias="statusDate", default=None, description="When the validation status was updated." ) validation_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="validationType", + default=None, description="What the target is validated against (nothing; primary source; multiple sources).", ) validation_process: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="validationProcess", + default=None, description="The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).", ) - frequency: typing.Optional[Timing] = pydantic.Field(description="Frequency of revalidation.") + frequency: typing.Optional[Timing] = pydantic.Field(default=None, description="Frequency of revalidation.") last_performed: typing.Optional[DateTime] = pydantic.Field( - alias="lastPerformed", description="The date/time validation was last completed (including failed validations)." + alias="lastPerformed", + default=None, + description="The date/time validation was last completed (including failed validations).", ) next_scheduled: typing.Optional[dt.date] = pydantic.Field( - alias="nextScheduled", description="The date when target is next validated, if appropriate." + alias="nextScheduled", default=None, description="The date when target is next validated, if appropriate." ) failure_action: typing.Optional[CodeableConcept] = pydantic.Field( - alias="failureAction", description="The result if validation fails (fatal; warning; record only; none)." + alias="failureAction", + default=None, + description="The result if validation fails (fatal; warning; record only; none).", ) primary_source: typing.Optional[typing.List[VerificationResultPrimarySource]] = pydantic.Field( - alias="primarySource", description="Information about the primary source(s) involved in validation." + alias="primarySource", + default=None, + description="Information about the primary source(s) involved in validation.", ) attestation: typing.Optional[VerificationResultAttestation] = pydantic.Field( - description="Information about the entity attesting to information." + default=None, description="Information about the entity attesting to information." ) validator: typing.Optional[typing.List[VerificationResultValidator]] = pydantic.Field( - description="Information about the entity validating information." + default=None, description="Information about the entity validating information." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/verification_result_attestation.py b/src/metriport/fhir/types/verification_result_attestation.py index cca9fb4..2675dcc 100644 --- a/src/metriport/fhir/types/verification_result_attestation.py +++ b/src/metriport/fhir/types/verification_result_attestation.py @@ -21,40 +21,52 @@ class VerificationResultAttestation(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) who: typing.Optional[Reference] = pydantic.Field( - description="The individual or organization attesting to information." + default=None, description="The individual or organization attesting to information." ) on_behalf_of: typing.Optional[Reference] = pydantic.Field( - alias="onBehalfOf", description="When the who is asserting on behalf of another (organization or individual)." + alias="onBehalfOf", + default=None, + description="When the who is asserting on behalf of another (organization or individual).", ) communication_method: typing.Optional[CodeableConcept] = pydantic.Field( alias="communicationMethod", + default=None, description="The method by which attested information was submitted/retrieved (manual; API; Push).", ) - date: typing.Optional[dt.date] = pydantic.Field(description="The date the information was attested to.") + date: typing.Optional[dt.date] = pydantic.Field( + default=None, description="The date the information was attested to." + ) source_identity_certificate: typing.Optional[str] = pydantic.Field( alias="sourceIdentityCertificate", + default=None, description="A digital identity certificate associated with the attestation source.", ) proxy_identity_certificate: typing.Optional[str] = pydantic.Field( alias="proxyIdentityCertificate", + default=None, description="A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.", ) proxy_signature: typing.Optional[Signature] = pydantic.Field( alias="proxySignature", + default=None, description="Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", ) source_signature: typing.Optional[Signature] = pydantic.Field( alias="sourceSignature", + default=None, description="Signed assertion by the attestation source that they have attested to the information.", ) diff --git a/src/metriport/fhir/types/verification_result_primary_source.py b/src/metriport/fhir/types/verification_result_primary_source.py index ab7dfcb..9b6ecfd 100644 --- a/src/metriport/fhir/types/verification_result_primary_source.py +++ b/src/metriport/fhir/types/verification_result_primary_source.py @@ -21,35 +21,44 @@ class VerificationResultPrimarySource(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) - who: typing.Optional[Reference] = pydantic.Field(description="Reference to the primary source.") + who: typing.Optional[Reference] = pydantic.Field(default=None, description="Reference to the primary source.") type: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - description="Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)." + default=None, + description="Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).", ) communication_method: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( - alias="communicationMethod", description="Method for communicating with the primary source (manual; API; Push)." + alias="communicationMethod", + default=None, + description="Method for communicating with the primary source (manual; API; Push).", ) validation_status: typing.Optional[CodeableConcept] = pydantic.Field( alias="validationStatus", + default=None, description="Status of the validation of the target against the primary source (successful; failed; unknown).", ) validation_date: typing.Optional[DateTime] = pydantic.Field( - alias="validationDate", description="When the target was validated against the primary source." + alias="validationDate", default=None, description="When the target was validated against the primary source." ) can_push_updates: typing.Optional[CodeableConcept] = pydantic.Field( alias="canPushUpdates", + default=None, description="Ability of the primary source to push updates/alerts (yes; no; undetermined).", ) push_type_available: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="pushTypeAvailable", + default=None, description="Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).", ) diff --git a/src/metriport/fhir/types/verification_result_validator.py b/src/metriport/fhir/types/verification_result_validator.py index 3e4ac15..b9ac0a4 100644 --- a/src/metriport/fhir/types/verification_result_validator.py +++ b/src/metriport/fhir/types/verification_result_validator.py @@ -20,21 +20,27 @@ class VerificationResultValidator(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) organization: Reference = pydantic.Field(description="Reference to the organization validating information.") identity_certificate: typing.Optional[str] = pydantic.Field( - alias="identityCertificate", description="A digital identity certificate associated with the validator." + alias="identityCertificate", + default=None, + description="A digital identity certificate associated with the validator.", ) attestation_signature: typing.Optional[Signature] = pydantic.Field( alias="attestationSignature", + default=None, description="Signed assertion by the validator that they have validated the information.", ) diff --git a/src/metriport/fhir/types/vision_prescription.py b/src/metriport/fhir/types/vision_prescription.py index c607659..ac158e2 100644 --- a/src/metriport/fhir/types/vision_prescription.py +++ b/src/metriport/fhir/types/vision_prescription.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,20 +22,21 @@ class VisionPrescription(BaseResource): An authorization for the provision of glasses and/or contact lenses to a patient. """ - resource_type: typing_extensions.Literal["VisionPrescription"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["VisionPrescription"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( - description="A unique identifier assigned to this vision prescription." + default=None, description="A unique identifier assigned to this vision prescription." ) - status: typing.Optional[Code] = pydantic.Field(description="The status of the resource instance.") - created: typing.Optional[DateTime] = pydantic.Field(description="The date this resource was created.") + status: typing.Optional[Code] = pydantic.Field(default=None, description="The status of the resource instance.") + created: typing.Optional[DateTime] = pydantic.Field(default=None, description="The date this resource was created.") patient: Reference = pydantic.Field( description="A resource reference to the person to whom the vision prescription applies." ) encounter: typing.Optional[Reference] = pydantic.Field( - description="A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued." + default=None, + description="A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.", ) date_written: typing.Optional[DateTime] = pydantic.Field( - alias="dateWritten", description="The date (and perhaps time) when the prescription was written." + alias="dateWritten", default=None, description="The date (and perhaps time) when the prescription was written." ) prescriber: Reference = pydantic.Field( description="The healthcare professional responsible for authorizing the prescription." diff --git a/src/metriport/fhir/types/vision_prescription_lens_specification.py b/src/metriport/fhir/types/vision_prescription_lens_specification.py index 84d6d4e..c069ae8 100644 --- a/src/metriport/fhir/types/vision_prescription_lens_specification.py +++ b/src/metriport/fhir/types/vision_prescription_lens_specification.py @@ -24,46 +24,55 @@ class VisionPrescriptionLensSpecification(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) product: CodeableConcept = pydantic.Field( description="Identifies the type of vision correction product which is required for the patient." ) eye: typing.Optional[VisionPrescriptionLensSpecificationEye] = pydantic.Field( - description="The eye for which the lens specification applies." + default=None, description="The eye for which the lens specification applies." + ) + sphere: typing.Optional[Decimal] = pydantic.Field( + default=None, description="Lens power measured in dioptres (0.25 units)." ) - sphere: typing.Optional[Decimal] = pydantic.Field(description="Lens power measured in dioptres (0.25 units).") cylinder: typing.Optional[Decimal] = pydantic.Field( - description="Power adjustment for astigmatism measured in dioptres (0.25 units)." + default=None, description="Power adjustment for astigmatism measured in dioptres (0.25 units)." + ) + axis: typing.Optional[int] = pydantic.Field( + default=None, description="Adjustment for astigmatism measured in integer degrees." ) - axis: typing.Optional[int] = pydantic.Field(description="Adjustment for astigmatism measured in integer degrees.") prism: typing.Optional[typing.List[VisionPrescriptionPrism]] = pydantic.Field( - description="Allows for adjustment on two axis." + default=None, description="Allows for adjustment on two axis." ) add: typing.Optional[Decimal] = pydantic.Field( - description="Power adjustment for multifocal lenses measured in dioptres (0.25 units)." + default=None, description="Power adjustment for multifocal lenses measured in dioptres (0.25 units)." ) power: typing.Optional[Decimal] = pydantic.Field( - description="Contact lens power measured in dioptres (0.25 units)." + default=None, description="Contact lens power measured in dioptres (0.25 units)." ) back_curve: typing.Optional[Decimal] = pydantic.Field( - alias="backCurve", description="Back curvature measured in millimetres." + alias="backCurve", default=None, description="Back curvature measured in millimetres." + ) + diameter: typing.Optional[Decimal] = pydantic.Field( + default=None, description="Contact lens diameter measured in millimetres." ) - diameter: typing.Optional[Decimal] = pydantic.Field(description="Contact lens diameter measured in millimetres.") duration: typing.Optional[Quantity] = pydantic.Field( - description="The recommended maximum wear period for the lens." + default=None, description="The recommended maximum wear period for the lens." ) - color: typing.Optional[str] = pydantic.Field(description="Special color or pattern.") - brand: typing.Optional[str] = pydantic.Field(description="Brand recommendations or restrictions.") + color: typing.Optional[str] = pydantic.Field(default=None, description="Special color or pattern.") + brand: typing.Optional[str] = pydantic.Field(default=None, description="Brand recommendations or restrictions.") note: typing.Optional[typing.List[Annotation]] = pydantic.Field( - description="Notes for special requirements such as coatings and lens materials." + default=None, description="Notes for special requirements such as coatings and lens materials." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/fhir/types/vision_prescription_prism.py b/src/metriport/fhir/types/vision_prescription_prism.py index 01c0f43..a1818a8 100644 --- a/src/metriport/fhir/types/vision_prescription_prism.py +++ b/src/metriport/fhir/types/vision_prescription_prism.py @@ -20,20 +20,23 @@ class VisionPrescriptionPrism(pydantic.BaseModel): """ id: typing.Optional[str] = pydantic.Field( - description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." + default=None, + description="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", ) extension: typing.Optional[typing.List[Extension]] = pydantic.Field( - description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." + default=None, + description="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", ) modifier_extension: typing.Optional[typing.List[Extension]] = pydantic.Field( alias="modifierExtension", + default=None, description="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", ) amount: typing.Optional[Decimal] = pydantic.Field( - description="Amount of prism to compensate for eye alignment in fractional units." + default=None, description="Amount of prism to compensate for eye alignment in fractional units." ) base: typing.Optional[VisionPrescriptionPrismBase] = pydantic.Field( - description="The relative base, or reference lens edge, for the prism." + default=None, description="The relative base, or reference lens edge, for the prism." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/medical/__init__.py b/src/metriport/medical/__init__.py index cc0dc8d..e735dde 100644 --- a/src/metriport/medical/__init__.py +++ b/src/metriport/medical/__init__.py @@ -1,51 +1,48 @@ # This file was auto-generated by Fern from our API Definition. -from .resources import ( - BaseFacility, - BasePatient, +from . import document, facility, fhir, organization, patient, webhooks +from .document import ( BulkGetDocumentUrlQuery, - ConsolidatedBundleUpload, - ConsolidatedCountResponse, - ConsolidatedWebhookStatus, - Contact, ConversionType, DocumentQuery, DocumentQueryStatus, DocumentUrl, - DriversLicense, - Facility, - FacilityId, + ListDocumentReferences, + Progress, + UploadDocumentResponse, +) +from .facility import BaseFacility, Facility, ListFacilitiesResponse +from .fhir import ( + ConsolidatedBundleUpload, + ConsolidatedCountResponse, Filter, - Filters, GetConsolidatedQueryStatusResponse, - ListDocumentReferences, - ListFacilitiesResponse, + PatientConsolidatedDataStatus, + StartConsolidatedQueryResponse, +) +from .organization import OrgType, Organization, OrganizationCreate +from .patient import ( + BasePatient, + Contact, + DriversLicense, + FacilityId, ListPatientsResponse, - MapiWebhookStatus, MedicalRecordStatus, - OrgType, - Organization, - OrganizationCreate, Patient, - PatientConsolidatedDataStatus, - PayloadPatient, PersonalIdentifier, PersonalIdentifier_DriversLicense, - Progress, RecordStatus, - StartConsolidatedQueryResponse, - UploadDocumentResponse, +) +from .webhooks import ( + ConsolidatedWebhookStatus, + Filters, + MapiWebhookStatus, + PayloadPatient, WebhookDocumentDataPayload, WebhookMetadataPayload, WebhookPatientConsolidatedDataPayload, WebhookPatientDocumentDataPayload, WebhookPatientPayload, - document, - facility, - fhir, - organization, - patient, - webhooks, ) __all__ = [ diff --git a/src/metriport/medical/client.py b/src/metriport/medical/client.py index 7bf133e..aa982f4 100644 --- a/src/metriport/medical/client.py +++ b/src/metriport/medical/client.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .resources.document.client import AsyncDocumentClient, DocumentClient -from .resources.facility.client import AsyncFacilityClient, FacilityClient -from .resources.fhir.client import AsyncFhirClient, FhirClient -from .resources.organization.client import AsyncOrganizationClient, OrganizationClient -from .resources.patient.client import AsyncPatientClient, PatientClient +from .document.client import AsyncDocumentClient, DocumentClient +from .facility.client import AsyncFacilityClient, FacilityClient +from .fhir.client import AsyncFhirClient, FhirClient +from .organization.client import AsyncOrganizationClient, OrganizationClient +from .patient.client import AsyncPatientClient, PatientClient class MedicalClient: diff --git a/src/metriport/medical/resources/document/__init__.py b/src/metriport/medical/document/__init__.py similarity index 100% rename from src/metriport/medical/resources/document/__init__.py rename to src/metriport/medical/document/__init__.py diff --git a/src/metriport/medical/resources/document/client.py b/src/metriport/medical/document/client.py similarity index 56% rename from src/metriport/medical/resources/document/client.py rename to src/metriport/medical/document/client.py index dac2546..3f8e0f7 100644 --- a/src/metriport/medical/resources/document/client.py +++ b/src/metriport/medical/document/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....fhir.types.document_reference import DocumentReference +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from ...fhir.types.document_reference import DocumentReference from .types.bulk_get_document_url_query import BulkGetDocumentUrlQuery from .types.conversion_type import ConversionType from .types.document_query import DocumentQuery @@ -30,7 +31,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def start_query( - self, *, patient_id: str, facility_id: str, request: typing.Optional[typing.Dict[str, str]] = None + self, + *, + patient_id: str, + facility_id: str, + request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> DocumentQuery: """ Triggers a document query for the specified patient across HIEs. @@ -52,6 +58,8 @@ def start_query( - facility_id: str. The ID of the Facility where the patient is receiving care. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -67,10 +75,36 @@ def start_query( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id, "facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -80,7 +114,9 @@ def start_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_query_status(self, *, patient_id: str) -> DocumentQuery: + def get_query_status( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> DocumentQuery: """ Returns the document query status for the specified patient. Can be used in to check the progress when the final status @@ -89,6 +125,8 @@ def get_query_status(self, *, patient_id: str) -> DocumentQuery: Parameters: - patient_id: str. The ID of the Patient for which to list available Documents. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -102,9 +140,32 @@ def get_query_status(self, *, patient_id: str) -> DocumentQuery: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -121,6 +182,7 @@ def list( date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, content: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ListDocumentReferences: """ Lists all Documents that can be retrieved for a Patient. @@ -136,15 +198,38 @@ def list( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. - content: typing.Optional[str]. Value to search within the document reference and the actual contents of the document (minimum 3 chars). + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document"), - params=remove_none_from_dict( - {"patientId": patient_id, "dateFrom": date_from, "dateTo": date_to, "content": content} + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "dateFrom": date_from, + "dateTo": date_to, + "content": content, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListDocumentReferences, _response.json()) # type: ignore @@ -154,7 +239,13 @@ def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_url(self, *, file_name: str, conversion_type: typing.Optional[ConversionType] = None) -> DocumentUrl: + def get_url( + self, + *, + file_name: str, + conversion_type: typing.Optional[ConversionType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DocumentUrl: """ Gets a downloadable URL for downloading the specified document. This endpoint returns a URL which you can use to download @@ -165,9 +256,11 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion - file_name: str. The file name of the document - conversion_type: typing.Optional[ConversionType]. The doc type to convert to. Either `html` or `pdf`. - This parameter should only be used for converting XML/CDA files.--- + This parameter should only be used for converting XML/CDA files. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import Metriport - from metriport.resources.medical import ConversionType + from metriport.medical import ConversionType client = Metriport( api_key="YOUR_API_KEY", @@ -180,9 +273,30 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url"), - params=remove_none_from_dict({"fileName": file_name, "conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "fileName": file_name, + "conversionType": conversion_type.value if conversion_type is not None else None, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentUrl, _response.json()) # type: ignore @@ -192,7 +306,9 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def create_document_reference(self, *, patient_id: str, request: DocumentReference) -> UploadDocumentResponse: + def create_document_reference( + self, *, patient_id: str, request: DocumentReference, request_options: typing.Optional[RequestOptions] = None + ) -> UploadDocumentResponse: """ Creates a DocumentReference and returns its ID and a URL to use for a medical document upload to our servers. @@ -200,9 +316,11 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen - patient_id: str. The ID of the Patient for which to list available Documents. - request: DocumentReference. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport - from metriport.resources.fhir import ( + from metriport.fhir import ( Attachment, CodeableConcept, Coding, @@ -256,10 +374,35 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/upload"), - params=remove_none_from_dict({"patientId": patient_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(UploadDocumentResponse, _response.json()) # type: ignore @@ -269,7 +412,9 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQuery: + def start_bulk_get_document_url( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> BulkGetDocumentUrlQuery: """ Triggers a process to generate a list of download URLs for all of the patient's documents. The status of the process is returned in the response. Initially, it will be `processing`, @@ -279,6 +424,8 @@ def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQ Parameters: - patient_id: str. The ID of the patient for which to initiate the bulk URL generation. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -292,9 +439,32 @@ def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQ _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url/bulk"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(BulkGetDocumentUrlQuery, _response.json()) # type: ignore @@ -310,7 +480,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def start_query( - self, *, patient_id: str, facility_id: str, request: typing.Optional[typing.Dict[str, str]] = None + self, + *, + patient_id: str, + facility_id: str, + request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> DocumentQuery: """ Triggers a document query for the specified patient across HIEs. @@ -332,6 +507,8 @@ async def start_query( - facility_id: str. The ID of the Facility where the patient is receiving care. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -347,10 +524,36 @@ async def start_query( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id, "facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -360,7 +563,9 @@ async def start_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_query_status(self, *, patient_id: str) -> DocumentQuery: + async def get_query_status( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> DocumentQuery: """ Returns the document query status for the specified patient. Can be used in to check the progress when the final status @@ -369,6 +574,8 @@ async def get_query_status(self, *, patient_id: str) -> DocumentQuery: Parameters: - patient_id: str. The ID of the Patient for which to list available Documents. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -382,9 +589,32 @@ async def get_query_status(self, *, patient_id: str) -> DocumentQuery: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -401,6 +631,7 @@ async def list( date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, content: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ListDocumentReferences: """ Lists all Documents that can be retrieved for a Patient. @@ -416,15 +647,38 @@ async def list( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. - content: typing.Optional[str]. Value to search within the document reference and the actual contents of the document (minimum 3 chars). + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document"), - params=remove_none_from_dict( - {"patientId": patient_id, "dateFrom": date_from, "dateTo": date_to, "content": content} + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "dateFrom": date_from, + "dateTo": date_to, + "content": content, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListDocumentReferences, _response.json()) # type: ignore @@ -434,7 +688,13 @@ async def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_url(self, *, file_name: str, conversion_type: typing.Optional[ConversionType] = None) -> DocumentUrl: + async def get_url( + self, + *, + file_name: str, + conversion_type: typing.Optional[ConversionType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DocumentUrl: """ Gets a downloadable URL for downloading the specified document. This endpoint returns a URL which you can use to download @@ -445,9 +705,11 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv - file_name: str. The file name of the document - conversion_type: typing.Optional[ConversionType]. The doc type to convert to. Either `html` or `pdf`. - This parameter should only be used for converting XML/CDA files.--- + This parameter should only be used for converting XML/CDA files. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import AsyncMetriport - from metriport.resources.medical import ConversionType + from metriport.medical import ConversionType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -460,9 +722,30 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url"), - params=remove_none_from_dict({"fileName": file_name, "conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "fileName": file_name, + "conversionType": conversion_type.value if conversion_type is not None else None, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentUrl, _response.json()) # type: ignore @@ -472,7 +755,9 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create_document_reference(self, *, patient_id: str, request: DocumentReference) -> UploadDocumentResponse: + async def create_document_reference( + self, *, patient_id: str, request: DocumentReference, request_options: typing.Optional[RequestOptions] = None + ) -> UploadDocumentResponse: """ Creates a DocumentReference and returns its ID and a URL to use for a medical document upload to our servers. @@ -480,9 +765,11 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR - patient_id: str. The ID of the Patient for which to list available Documents. - request: DocumentReference. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport - from metriport.resources.fhir import ( + from metriport.fhir import ( Attachment, CodeableConcept, Coding, @@ -536,10 +823,35 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/upload"), - params=remove_none_from_dict({"patientId": patient_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(UploadDocumentResponse, _response.json()) # type: ignore @@ -549,7 +861,9 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQuery: + async def start_bulk_get_document_url( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> BulkGetDocumentUrlQuery: """ Triggers a process to generate a list of download URLs for all of the patient's documents. The status of the process is returned in the response. Initially, it will be `processing`, @@ -559,6 +873,8 @@ async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocume Parameters: - patient_id: str. The ID of the patient for which to initiate the bulk URL generation. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -572,9 +888,32 @@ async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocume _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url/bulk"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(BulkGetDocumentUrlQuery, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/document/types/__init__.py b/src/metriport/medical/document/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/document/types/__init__.py rename to src/metriport/medical/document/types/__init__.py diff --git a/src/metriport/medical/resources/document/types/bulk_get_document_url_query.py b/src/metriport/medical/document/types/bulk_get_document_url_query.py similarity index 81% rename from src/metriport/medical/resources/document/types/bulk_get_document_url_query.py rename to src/metriport/medical/document/types/bulk_get_document_url_query.py index 793e01c..337c9fe 100644 --- a/src/metriport/medical/resources/document/types/bulk_get_document_url_query.py +++ b/src/metriport/medical/document/types/bulk_get_document_url_query.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .document_query_status import DocumentQueryStatus try: @@ -14,10 +14,7 @@ class BulkGetDocumentUrlQuery(pydantic.BaseModel): """ - from metriport.resources.medical import ( - BulkGetDocumentUrlQuery, - DocumentQueryStatus, - ) + from metriport.medical import BulkGetDocumentUrlQuery, DocumentQueryStatus BulkGetDocumentUrlQuery( status=DocumentQueryStatus.PROCESSING, @@ -26,7 +23,9 @@ class BulkGetDocumentUrlQuery(pydantic.BaseModel): """ status: DocumentQueryStatus = pydantic.Field(description="The status of the URL generation process.") - request_id: typing.Optional[str] = pydantic.Field(alias="requestId", description="The ID of the request.") + request_id: typing.Optional[str] = pydantic.Field( + alias="requestId", default=None, description="The ID of the request." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/document/types/conversion_type.py b/src/metriport/medical/document/types/conversion_type.py similarity index 100% rename from src/metriport/medical/resources/document/types/conversion_type.py rename to src/metriport/medical/document/types/conversion_type.py diff --git a/src/metriport/medical/resources/document/types/document_query.py b/src/metriport/medical/document/types/document_query.py similarity index 76% rename from src/metriport/medical/resources/document/types/document_query.py rename to src/metriport/medical/document/types/document_query.py index 49fb940..ad1b9b5 100644 --- a/src/metriport/medical/resources/document/types/document_query.py +++ b/src/metriport/medical/document/types/document_query.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .progress import Progress try: @@ -14,11 +14,7 @@ class DocumentQuery(pydantic.BaseModel): """ - from metriport.resources.medical import ( - DocumentQuery, - DocumentQueryStatus, - Progress, - ) + from metriport.medical import DocumentQuery, DocumentQueryStatus, Progress DocumentQuery( download=Progress( @@ -33,9 +29,11 @@ class DocumentQuery(pydantic.BaseModel): ) """ - download: typing.Optional[Progress] - convert: typing.Optional[Progress] - request_id: typing.Optional[str] = pydantic.Field(alias="requestId", description="The ID of the Document Query.") + download: typing.Optional[Progress] = None + convert: typing.Optional[Progress] = None + request_id: typing.Optional[str] = pydantic.Field( + alias="requestId", default=None, description="The ID of the Document Query." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/document/types/document_query_status.py b/src/metriport/medical/document/types/document_query_status.py similarity index 100% rename from src/metriport/medical/resources/document/types/document_query_status.py rename to src/metriport/medical/document/types/document_query_status.py diff --git a/src/metriport/medical/resources/document/types/document_url.py b/src/metriport/medical/document/types/document_url.py similarity index 82% rename from src/metriport/medical/resources/document/types/document_url.py rename to src/metriport/medical/document/types/document_url.py index 1788bcd..ec448ca 100644 --- a/src/metriport/medical/resources/document/types/document_url.py +++ b/src/metriport/medical/document/types/document_url.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -15,14 +15,14 @@ class DocumentUrl(pydantic.BaseModel): """ A json object containing the URL will be returned. --- - from metriport.resources.medical import DocumentUrl + from metriport.medical import DocumentUrl DocumentUrl( url="abc123-def456", ) """ - url: typing.Optional[str] = pydantic.Field(description="The presigned URL.") + url: typing.Optional[str] = pydantic.Field(default=None, description="The presigned URL.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/document/types/list_document_references.py b/src/metriport/medical/document/types/list_document_references.py similarity index 89% rename from src/metriport/medical/resources/document/types/list_document_references.py rename to src/metriport/medical/document/types/list_document_references.py index 0c392d9..cdc2d7f 100644 --- a/src/metriport/medical/resources/document/types/list_document_references.py +++ b/src/metriport/medical/document/types/list_document_references.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.document_reference import DocumentReference +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.document_reference import DocumentReference try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/document/types/progress.py b/src/metriport/medical/document/types/progress.py similarity index 66% rename from src/metriport/medical/resources/document/types/progress.py rename to src/metriport/medical/document/types/progress.py index 3e4bb6a..f209685 100644 --- a/src/metriport/medical/resources/document/types/progress.py +++ b/src/metriport/medical/document/types/progress.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .document_query_status import DocumentQueryStatus try: @@ -14,7 +14,7 @@ class Progress(pydantic.BaseModel): """ - from metriport.resources.medical import DocumentQueryStatus, Progress + from metriport.medical import DocumentQueryStatus, Progress Progress( status=DocumentQueryStatus.PROCESSING, @@ -22,9 +22,15 @@ class Progress(pydantic.BaseModel): """ status: DocumentQueryStatus = pydantic.Field(description="The status of querying document references across HIEs.") - total: typing.Optional[int] = pydantic.Field(description="The total number of documents to be queried.") - successful: typing.Optional[int] = pydantic.Field(description="The number of documents successfully downloaded.") - errors: typing.Optional[int] = pydantic.Field(description="The number of documents that failed to download.") + total: typing.Optional[int] = pydantic.Field( + default=None, description="The total number of documents to be queried." + ) + successful: typing.Optional[int] = pydantic.Field( + default=None, description="The number of documents successfully downloaded." + ) + errors: typing.Optional[int] = pydantic.Field( + default=None, description="The number of documents that failed to download." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/document/types/upload_document_response.py b/src/metriport/medical/document/types/upload_document_response.py similarity index 91% rename from src/metriport/medical/resources/document/types/upload_document_response.py rename to src/metriport/medical/document/types/upload_document_response.py index 09a21b1..e049c22 100644 --- a/src/metriport/medical/resources/document/types/upload_document_response.py +++ b/src/metriport/medical/document/types/upload_document_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class UploadDocumentResponse(pydantic.BaseModel): """ - from metriport.resources.medical import UploadDocumentResponse + from metriport.medical import UploadDocumentResponse UploadDocumentResponse( document_reference_id="", diff --git a/src/metriport/medical/resources/facility/__init__.py b/src/metriport/medical/facility/__init__.py similarity index 100% rename from src/metriport/medical/resources/facility/__init__.py rename to src/metriport/medical/facility/__init__.py diff --git a/src/metriport/medical/resources/facility/client.py b/src/metriport/medical/facility/client.py similarity index 54% rename from src/metriport/medical/resources/facility/client.py rename to src/metriport/medical/facility/client.py index b2c97fd..b42542e 100644 --- a/src/metriport/medical/resources/facility/client.py +++ b/src/metriport/medical/facility/client.py @@ -4,9 +4,11 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions from .types.base_facility import BaseFacility from .types.facility import Facility from .types.list_facilities_response import ListFacilitiesResponse @@ -24,16 +26,18 @@ class FacilityClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create(self, *, request: BaseFacility) -> Facility: + def create(self, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Creates a Facility in Metriport where your patients receive care. Parameters: - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = Metriport( api_key="YOUR_API_KEY", @@ -58,9 +62,26 @@ def create(self, *, request: BaseFacility) -> Facility: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -70,13 +91,15 @@ def create(self, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: str) -> Facility: + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Get a Facility in Metriport where your patients receive care. Parameters: - id: str. The ID assigned to this Facility. This ID will be used - to uniquely identify this Facility in medical documents.--- + to uniquely identify this Facility in medical documents. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import Metriport client = Metriport( @@ -89,8 +112,20 @@ def get(self, id: str) -> Facility: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -100,7 +135,9 @@ def get(self, id: str) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def update(self, id: str, *, request: BaseFacility) -> Facility: + def update( + self, id: str, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Updates a Facility in Metriport where your patients receive care. @@ -108,10 +145,12 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: - id: str. The ID of the Facility. - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = Metriport( api_key="YOUR_API_KEY", @@ -137,9 +176,26 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -149,10 +205,12 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list(self) -> ListFacilitiesResponse: + def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListFacilitiesResponse: """ Lists all of your Facilities. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -164,8 +222,20 @@ def list(self) -> ListFacilitiesResponse: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore @@ -180,16 +250,20 @@ class AsyncFacilityClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create(self, *, request: BaseFacility) -> Facility: + async def create( + self, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Creates a Facility in Metriport where your patients receive care. Parameters: - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -214,9 +288,26 @@ async def create(self, *, request: BaseFacility) -> Facility: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -226,13 +317,15 @@ async def create(self, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self, id: str) -> Facility: + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Get a Facility in Metriport where your patients receive care. Parameters: - id: str. The ID assigned to this Facility. This ID will be used - to uniquely identify this Facility in medical documents.--- + to uniquely identify this Facility in medical documents. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import AsyncMetriport client = AsyncMetriport( @@ -245,8 +338,20 @@ async def get(self, id: str) -> Facility: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -256,7 +361,9 @@ async def get(self, id: str) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update(self, id: str, *, request: BaseFacility) -> Facility: + async def update( + self, id: str, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Updates a Facility in Metriport where your patients receive care. @@ -264,10 +371,12 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: - id: str. The ID of the Facility. - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -293,9 +402,26 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -305,10 +431,12 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def list(self) -> ListFacilitiesResponse: + async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListFacilitiesResponse: """ Lists all of your Facilities. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -320,8 +448,20 @@ async def list(self) -> ListFacilitiesResponse: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/facility/types/__init__.py b/src/metriport/medical/facility/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/facility/types/__init__.py rename to src/metriport/medical/facility/types/__init__.py diff --git a/src/metriport/medical/resources/facility/types/base_facility.py b/src/metriport/medical/facility/types/base_facility.py similarity index 77% rename from src/metriport/medical/resources/facility/types/base_facility.py rename to src/metriport/medical/facility/types/base_facility.py index 0f34341..f7190f9 100644 --- a/src/metriport/medical/resources/facility/types/base_facility.py +++ b/src/metriport/medical/facility/types/base_facility.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -19,9 +19,11 @@ class BaseFacility(pydantic.BaseModel): npi: str = pydantic.Field( description="The 10 digit National Provider Identifier (NPI) that will be used to make requests on behalf of the Facility." ) - tin: typing.Optional[str] = pydantic.Field(description="The Taxpayer Identification Number (TIN) of the Facility.") + tin: typing.Optional[str] = pydantic.Field( + default=None, description="The Taxpayer Identification Number (TIN) of the Facility." + ) active: typing.Optional[bool] = pydantic.Field( - description="Whether or not this Facility is currently active - this is usually `true`." + default=None, description="Whether or not this Facility is currently active - this is usually `true`." ) address: Address diff --git a/src/metriport/medical/resources/facility/types/facility.py b/src/metriport/medical/facility/types/facility.py similarity index 93% rename from src/metriport/medical/resources/facility/types/facility.py rename to src/metriport/medical/facility/types/facility.py index 1c254f7..abe0ba1 100644 --- a/src/metriport/medical/resources/facility/types/facility.py +++ b/src/metriport/medical/facility/types/facility.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .base_facility import BaseFacility try: @@ -15,7 +15,7 @@ class Facility(BaseFacility): """ from metriport import Address, UsState - from metriport.resources.medical import Facility + from metriport.medical import Facility Facility( id="2.16.840.1.113883.3.666.123", diff --git a/src/metriport/medical/resources/facility/types/list_facilities_response.py b/src/metriport/medical/facility/types/list_facilities_response.py similarity index 94% rename from src/metriport/medical/resources/facility/types/list_facilities_response.py rename to src/metriport/medical/facility/types/list_facilities_response.py index ab7fd6a..cbcf65e 100644 --- a/src/metriport/medical/resources/facility/types/list_facilities_response.py +++ b/src/metriport/medical/facility/types/list_facilities_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .facility import Facility try: diff --git a/src/metriport/medical/resources/fhir/__init__.py b/src/metriport/medical/fhir/__init__.py similarity index 100% rename from src/metriport/medical/resources/fhir/__init__.py rename to src/metriport/medical/fhir/__init__.py diff --git a/src/metriport/medical/resources/fhir/client.py b/src/metriport/medical/fhir/client.py similarity index 60% rename from src/metriport/medical/resources/fhir/client.py rename to src/metriport/medical/fhir/client.py index 82c6d9b..179727d 100644 --- a/src/metriport/medical/resources/fhir/client.py +++ b/src/metriport/medical/fhir/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....fhir.types.bundle import Bundle +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from ...fhir.types.bundle import Bundle from .types.consolidated_bundle_upload import ConsolidatedBundleUpload from .types.consolidated_count_response import ConsolidatedCountResponse from .types.get_consolidated_query_status_response import GetConsolidatedQueryStatusResponse @@ -36,6 +37,7 @@ def start_consolidated_query( date_to: typing.Optional[str] = None, conversion_type: typing.Optional[str] = None, request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> StartConsolidatedQueryResponse: """ Trigger a consolidated data query for the given patient @@ -54,6 +56,8 @@ def start_consolidated_query( - conversion_type: typing.Optional[str]. The doc type to convert to. Either `html` or `pdf`. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -69,12 +73,38 @@ def start_consolidated_query( urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - params=remove_none_from_dict( - {"resources": resources, "dateFrom": date_from, "dateTo": date_to, "conversionType": conversion_type} + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(StartConsolidatedQueryResponse, _response.json()) # type: ignore @@ -84,12 +114,16 @@ def start_consolidated_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusResponse: + def get_consolidated_query_status( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetConsolidatedQueryStatusResponse: """ Get the status of querying for patient's consolidated data. Parameters: - id: str. The ID of the Patient + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -105,8 +139,20 @@ def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusRe urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(GetConsolidatedQueryStatusResponse, _response.json()) # type: ignore @@ -116,7 +162,9 @@ def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusRe raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpload) -> Bundle: + def create_patient_consolidated( + self, id: str, *, request: ConsolidatedBundleUpload, request_options: typing.Optional[RequestOptions] = None + ) -> Bundle: """ Create Patient's Consolidated Data with a FHIR Bundle. @@ -124,9 +172,11 @@ def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpl - id: str. The ID of the Patient - request: ConsolidatedBundleUpload. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload client = Metriport( api_key="YOUR_API_KEY", @@ -162,9 +212,26 @@ def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpl _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Bundle, _response.json()) # type: ignore @@ -181,6 +248,7 @@ def count_patient_data( resources: typing.Optional[str] = None, date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConsolidatedCountResponse: """ Get a count of a Patient's data per resource. @@ -196,15 +264,38 @@ def count_patient_data( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/count" ), - params=remove_none_from_dict({"resources": resources, "dateFrom": date_from, "dateTo": date_to}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ConsolidatedCountResponse, _response.json()) # type: ignore @@ -228,6 +319,7 @@ async def start_consolidated_query( date_to: typing.Optional[str] = None, conversion_type: typing.Optional[str] = None, request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> StartConsolidatedQueryResponse: """ Trigger a consolidated data query for the given patient @@ -246,6 +338,8 @@ async def start_consolidated_query( - conversion_type: typing.Optional[str]. The doc type to convert to. Either `html` or `pdf`. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -261,12 +355,38 @@ async def start_consolidated_query( urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - params=remove_none_from_dict( - {"resources": resources, "dateFrom": date_from, "dateTo": date_to, "conversionType": conversion_type} + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(StartConsolidatedQueryResponse, _response.json()) # type: ignore @@ -276,12 +396,16 @@ async def start_consolidated_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusResponse: + async def get_consolidated_query_status( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetConsolidatedQueryStatusResponse: """ Get the status of querying for patient's consolidated data. Parameters: - id: str. The ID of the Patient + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -297,8 +421,20 @@ async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQuerySt urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(GetConsolidatedQueryStatusResponse, _response.json()) # type: ignore @@ -308,7 +444,9 @@ async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQuerySt raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpload) -> Bundle: + async def create_patient_consolidated( + self, id: str, *, request: ConsolidatedBundleUpload, request_options: typing.Optional[RequestOptions] = None + ) -> Bundle: """ Create Patient's Consolidated Data with a FHIR Bundle. @@ -316,9 +454,11 @@ async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBun - id: str. The ID of the Patient - request: ConsolidatedBundleUpload. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -354,9 +494,26 @@ async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBun _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Bundle, _response.json()) # type: ignore @@ -373,6 +530,7 @@ async def count_patient_data( resources: typing.Optional[str] = None, date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConsolidatedCountResponse: """ Get a count of a Patient's data per resource. @@ -388,15 +546,38 @@ async def count_patient_data( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/count" ), - params=remove_none_from_dict({"resources": resources, "dateFrom": date_from, "dateTo": date_to}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ConsolidatedCountResponse, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/fhir/types/__init__.py b/src/metriport/medical/fhir/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/fhir/types/__init__.py rename to src/metriport/medical/fhir/types/__init__.py diff --git a/src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py b/src/metriport/medical/fhir/types/consolidated_bundle_upload.py similarity index 94% rename from src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py rename to src/metriport/medical/fhir/types/consolidated_bundle_upload.py index 19ae219..abbeef5 100644 --- a/src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py +++ b/src/metriport/medical/fhir/types/consolidated_bundle_upload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class ConsolidatedBundleUpload(pydantic.BaseModel): """ - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload ConsolidatedBundleUpload( resource_type="Bundle", diff --git a/src/metriport/medical/resources/fhir/types/consolidated_count_response.py b/src/metriport/medical/fhir/types/consolidated_count_response.py similarity index 96% rename from src/metriport/medical/resources/fhir/types/consolidated_count_response.py rename to src/metriport/medical/fhir/types/consolidated_count_response.py index 8666da8..9e014f0 100644 --- a/src/metriport/medical/resources/fhir/types/consolidated_count_response.py +++ b/src/metriport/medical/fhir/types/consolidated_count_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .filter import Filter try: diff --git a/src/metriport/medical/resources/fhir/types/filter.py b/src/metriport/medical/fhir/types/filter.py similarity index 94% rename from src/metriport/medical/resources/fhir/types/filter.py rename to src/metriport/medical/fhir/types/filter.py index 2908c33..c54436c 100644 --- a/src/metriport/medical/resources/fhir/types/filter.py +++ b/src/metriport/medical/fhir/types/filter.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -19,6 +19,7 @@ class Filter(pydantic.BaseModel): ) date_from: typing.Optional[str] = pydantic.Field( alias="dateFrom", + default=None, description=( "The start date (inclusive) for which to filter returned resources -\n" "formatted `YYYY-MM-DD` as per ISO 8601. If not provided,\n" @@ -27,6 +28,7 @@ class Filter(pydantic.BaseModel): ) date_to: typing.Optional[str] = pydantic.Field( alias="dateTo", + default=None, description=( "The end date (inclusive) for which to filter returned resources -\n" "formatted `YYYY-MM-DD` as per ISO 8601. If not provided,\n" diff --git a/src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py b/src/metriport/medical/fhir/types/get_consolidated_query_status_response.py similarity index 86% rename from src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py rename to src/metriport/medical/fhir/types/get_consolidated_query_status_response.py index 784c8fc..273a334 100644 --- a/src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py +++ b/src/metriport/medical/fhir/types/get_consolidated_query_status_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient_consolidated_data_status import PatientConsolidatedDataStatus try: @@ -14,7 +14,7 @@ class GetConsolidatedQueryStatusResponse(pydantic.BaseModel): """ - from metriport.resources.medical import ( + from metriport.medical import ( GetConsolidatedQueryStatusResponse, PatientConsolidatedDataStatus, ) @@ -25,8 +25,8 @@ class GetConsolidatedQueryStatusResponse(pydantic.BaseModel): ) """ - status: typing.Optional[PatientConsolidatedDataStatus] - message: typing.Optional[str] + status: typing.Optional[PatientConsolidatedDataStatus] = None + message: typing.Optional[str] = None def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/fhir/types/patient_consolidated_data_status.py b/src/metriport/medical/fhir/types/patient_consolidated_data_status.py similarity index 100% rename from src/metriport/medical/resources/fhir/types/patient_consolidated_data_status.py rename to src/metriport/medical/fhir/types/patient_consolidated_data_status.py diff --git a/src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py b/src/metriport/medical/fhir/types/start_consolidated_query_response.py similarity index 94% rename from src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py rename to src/metriport/medical/fhir/types/start_consolidated_query_response.py index 30116e5..7038df8 100644 --- a/src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py +++ b/src/metriport/medical/fhir/types/start_consolidated_query_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient_consolidated_data_status import PatientConsolidatedDataStatus try: diff --git a/src/metriport/medical/resources/organization/__init__.py b/src/metriport/medical/organization/__init__.py similarity index 100% rename from src/metriport/medical/resources/organization/__init__.py rename to src/metriport/medical/organization/__init__.py diff --git a/src/metriport/medical/resources/organization/client.py b/src/metriport/medical/organization/client.py similarity index 53% rename from src/metriport/medical/resources/organization/client.py rename to src/metriport/medical/organization/client.py index b5f3a9d..393fb0c 100644 --- a/src/metriport/medical/resources/organization/client.py +++ b/src/metriport/medical/organization/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....commons.types.address import Address +from ...commons.types.address import Address +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions from .types.org_type import OrgType from .types.organization import Organization from .types.organization_create import OrganizationCreate @@ -26,16 +27,20 @@ class OrganizationClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create(self, *, request: OrganizationCreate) -> Organization: + def create( + self, *, request: OrganizationCreate, request_options: typing.Optional[RequestOptions] = None + ) -> Organization: """ Registers your Organization in Metriport. Parameters: - request: OrganizationCreate. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import OrganizationCreate, OrgType + from metriport.medical import OrganizationCreate, OrgType client = Metriport( api_key="YOUR_API_KEY", @@ -58,9 +63,26 @@ def create(self, *, request: OrganizationCreate) -> Organization: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -70,10 +92,12 @@ def create(self, *, request: OrganizationCreate) -> Organization: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self) -> Organization: + def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Organization: """ Gets the Organization representing your legal corporate entity. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -85,8 +109,20 @@ def get(self) -> Organization: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -97,7 +133,14 @@ def get(self) -> Organization: raise ApiError(status_code=_response.status_code, body=_response_json) def update( - self, id: str, *, name: str, type: OrgType, location: Address, e_tag: typing.Optional[str] = None + self, + id: str, + *, + name: str, + type: OrgType, + location: Address, + e_tag: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> Organization: """ Updates your Organization's details. @@ -114,10 +157,12 @@ def update( - location: Address. - e_tag: typing.Optional[str]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import OrgType + from metriport.medical import OrgType client = Metriport( api_key="YOUR_API_KEY", @@ -139,9 +184,27 @@ def update( _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/organization/{id}"), - json=jsonable_encoder({"name": name, "type": type, "location": location}), - headers=remove_none_from_dict({**self._client_wrapper.get_headers(), "ETag": e_tag}), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder({"name": name, "type": type, "location": location}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"name": name, "type": type, "location": location}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + "ETag": e_tag, + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -156,16 +219,20 @@ class AsyncOrganizationClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create(self, *, request: OrganizationCreate) -> Organization: + async def create( + self, *, request: OrganizationCreate, request_options: typing.Optional[RequestOptions] = None + ) -> Organization: """ Registers your Organization in Metriport. Parameters: - request: OrganizationCreate. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import OrganizationCreate, OrgType + from metriport.medical import OrganizationCreate, OrgType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -188,9 +255,26 @@ async def create(self, *, request: OrganizationCreate) -> Organization: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -200,10 +284,12 @@ async def create(self, *, request: OrganizationCreate) -> Organization: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self) -> Organization: + async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Organization: """ Gets the Organization representing your legal corporate entity. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -215,8 +301,20 @@ async def get(self) -> Organization: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -227,7 +325,14 @@ async def get(self) -> Organization: raise ApiError(status_code=_response.status_code, body=_response_json) async def update( - self, id: str, *, name: str, type: OrgType, location: Address, e_tag: typing.Optional[str] = None + self, + id: str, + *, + name: str, + type: OrgType, + location: Address, + e_tag: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> Organization: """ Updates your Organization's details. @@ -244,10 +349,12 @@ async def update( - location: Address. - e_tag: typing.Optional[str]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import OrgType + from metriport.medical import OrgType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -269,9 +376,27 @@ async def update( _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/organization/{id}"), - json=jsonable_encoder({"name": name, "type": type, "location": location}), - headers=remove_none_from_dict({**self._client_wrapper.get_headers(), "ETag": e_tag}), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder({"name": name, "type": type, "location": location}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"name": name, "type": type, "location": location}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + "ETag": e_tag, + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/organization/types/__init__.py b/src/metriport/medical/organization/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/organization/types/__init__.py rename to src/metriport/medical/organization/types/__init__.py diff --git a/src/metriport/medical/resources/organization/types/org_type.py b/src/metriport/medical/organization/types/org_type.py similarity index 100% rename from src/metriport/medical/resources/organization/types/org_type.py rename to src/metriport/medical/organization/types/org_type.py diff --git a/src/metriport/medical/resources/organization/types/organization.py b/src/metriport/medical/organization/types/organization.py similarity index 92% rename from src/metriport/medical/resources/organization/types/organization.py rename to src/metriport/medical/organization/types/organization.py index db89916..b708421 100644 --- a/src/metriport/medical/resources/organization/types/organization.py +++ b/src/metriport/medical/organization/types/organization.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .organization_create import OrganizationCreate try: @@ -15,7 +15,7 @@ class Organization(OrganizationCreate): """ from metriport import Address, UsState - from metriport.resources.medical import Organization, OrgType + from metriport.medical import Organization, OrgType Organization( id="2.16.840.1.113883.3.666.123", diff --git a/src/metriport/medical/resources/organization/types/organization_create.py b/src/metriport/medical/organization/types/organization_create.py similarity index 91% rename from src/metriport/medical/resources/organization/types/organization_create.py rename to src/metriport/medical/organization/types/organization_create.py index ee328a7..98eab10 100644 --- a/src/metriport/medical/resources/organization/types/organization_create.py +++ b/src/metriport/medical/organization/types/organization_create.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime from .org_type import OrgType try: diff --git a/src/metriport/medical/resources/patient/__init__.py b/src/metriport/medical/patient/__init__.py similarity index 100% rename from src/metriport/medical/resources/patient/__init__.py rename to src/metriport/medical/patient/__init__.py diff --git a/src/metriport/medical/patient/client.py b/src/metriport/medical/patient/client.py new file mode 100644 index 0000000..5d53465 --- /dev/null +++ b/src/metriport/medical/patient/client.py @@ -0,0 +1,801 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +import urllib.parse +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from .types.base_patient import BasePatient +from .types.list_patients_response import ListPatientsResponse +from .types.medical_record_status import MedicalRecordStatus +from .types.patient import Patient + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class PatientClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, *, facility_id: str, request: BasePatient, request_options: typing.Optional[RequestOptions] = None + ) -> Patient: + """ + Creates a Patient in Metriport for the specified Facility where the patient is receiving care. + The more demographic info you can provide about a Patient, + the higher chances Metriport will be able to find a match. + For example, nicknames, old addresses, multiple phone numbers, + a pre-marital last name, etc. + + Parameters: + - facility_id: str. The ID of the Facility where the Patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport import Address, UsState + from metriport.client import Metriport + from metriport.medical import BasePatient, PersonalIdentifier_DriversLicense + + client = Metriport( + api_key="YOUR_API_KEY", + ) + client.medical.patient.create( + facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", + request=BasePatient( + first_name="Karen", + last_name="Lynch", + dob="1963-12-30", + gender_at_birth="F", + personal_identifiers=[ + PersonalIdentifier_DriversLicense( + type="driversLicense", + state=UsState.CA, + value="51227265", + ) + ], + address=[ + Address( + address_line_1="2261 Market Street", + address_line_2="#4818", + city="San Francisco", + state=UsState.CA, + zip="94114", + country="USA", + ) + ], + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Patient: + """ + Get a Patient + + Parameters: + - id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport.client import Metriport + + client = Metriport( + api_key="YOUR_API_KEY", + ) + client.medical.patient.get( + id="2.16.840.1.113883.3.666.777", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def update( + self, + id: str, + *, + facility_id: str, + request: BasePatient, + request_options: typing.Optional[RequestOptions] = None, + ) -> Patient: + """ + Updates the specified Patient. + + Parameters: + - id: str. The ID of the Patient to update. + + - facility_id: str. The ID of the Facility where the patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "PUT", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def list( + self, *, facility_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPatientsResponse: + """ + Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. + + Parameters: + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def delete( + self, + id: str, + *, + facility_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Removes the specified Patient. + + Parameters: + - id: str. The ID of the Patient to delete. + + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "DELETE", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_medical_record_summary( + self, patient_id: str, *, conversion_type: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Returns the URL for a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - conversion_type: str. The type of conversion to perform. `html` or `pdf` + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" + ), + params=jsonable_encoder( + remove_none_from_dict( + { + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(str, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_medical_record_summary_status( + self, patient_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MedicalRecordStatus: + """ + Returns the status of a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" + ), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncPatientClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, facility_id: str, request: BasePatient, request_options: typing.Optional[RequestOptions] = None + ) -> Patient: + """ + Creates a Patient in Metriport for the specified Facility where the patient is receiving care. + The more demographic info you can provide about a Patient, + the higher chances Metriport will be able to find a match. + For example, nicknames, old addresses, multiple phone numbers, + a pre-marital last name, etc. + + Parameters: + - facility_id: str. The ID of the Facility where the Patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport import Address, UsState + from metriport.client import AsyncMetriport + from metriport.medical import BasePatient, PersonalIdentifier_DriversLicense + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + await client.medical.patient.create( + facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", + request=BasePatient( + first_name="Karen", + last_name="Lynch", + dob="1963-12-30", + gender_at_birth="F", + personal_identifiers=[ + PersonalIdentifier_DriversLicense( + type="driversLicense", + state=UsState.CA, + value="51227265", + ) + ], + address=[ + Address( + address_line_1="2261 Market Street", + address_line_2="#4818", + city="San Francisco", + state=UsState.CA, + zip="94114", + country="USA", + ) + ], + ), + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Patient: + """ + Get a Patient + + Parameters: + - id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport.client import AsyncMetriport + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + await client.medical.patient.get( + id="2.16.840.1.113883.3.666.777", + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def update( + self, + id: str, + *, + facility_id: str, + request: BasePatient, + request_options: typing.Optional[RequestOptions] = None, + ) -> Patient: + """ + Updates the specified Patient. + + Parameters: + - id: str. The ID of the Patient to update. + + - facility_id: str. The ID of the Facility where the patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "PUT", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def list( + self, *, facility_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPatientsResponse: + """ + Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. + + Parameters: + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def delete( + self, + id: str, + *, + facility_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Removes the specified Patient. + + Parameters: + - id: str. The ID of the Patient to delete. + + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "DELETE", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_medical_record_summary( + self, patient_id: str, *, conversion_type: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Returns the URL for a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - conversion_type: str. The type of conversion to perform. `html` or `pdf` + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" + ), + params=jsonable_encoder( + remove_none_from_dict( + { + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(str, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_medical_record_summary_status( + self, patient_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MedicalRecordStatus: + """ + Returns the status of a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" + ), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/metriport/medical/resources/patient/types/__init__.py b/src/metriport/medical/patient/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/patient/types/__init__.py rename to src/metriport/medical/patient/types/__init__.py diff --git a/src/metriport/medical/resources/patient/types/base_patient.py b/src/metriport/medical/patient/types/base_patient.py similarity index 87% rename from src/metriport/medical/resources/patient/types/base_patient.py rename to src/metriport/medical/patient/types/base_patient.py index cf520f1..91e8453 100644 --- a/src/metriport/medical/resources/patient/types/base_patient.py +++ b/src/metriport/medical/patient/types/base_patient.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime from .contact import Contact from .personal_identifier import PersonalIdentifier @@ -31,12 +31,13 @@ class BasePatient(pydantic.BaseModel): ) personal_identifiers: typing.Optional[typing.List[PersonalIdentifier]] = pydantic.Field( alias="personalIdentifiers", + default=None, description=("An array of the Patient's personal IDs, such as a driver's license.\n" "May be empty.\n"), ) address: typing.List[Address] - contact: typing.Optional[typing.List[Contact]] + contact: typing.Optional[typing.List[Contact]] = None external_id: typing.Optional[str] = pydantic.Field( - alias="externalID", description="An external Patient ID to associate to a Patient in Metriport." + alias="externalId", default=None, description="An external Patient ID to associate to a Patient in Metriport." ) def json(self, **kwargs: typing.Any) -> str: diff --git a/src/metriport/medical/resources/patient/types/contact.py b/src/metriport/medical/patient/types/contact.py similarity index 76% rename from src/metriport/medical/resources/patient/types/contact.py rename to src/metriport/medical/patient/types/contact.py index d97a13d..26c591b 100644 --- a/src/metriport/medical/resources/patient/types/contact.py +++ b/src/metriport/medical/patient/types/contact.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class Contact(pydantic.BaseModel): """ - from metriport.resources.medical import Contact + from metriport.medical import Contact Contact( phone="1234567899", @@ -22,9 +22,9 @@ class Contact(pydantic.BaseModel): """ phone: typing.Optional[str] = pydantic.Field( - description="The Patient's 10 digit phone number, formatted `1234567899`." + default=None, description="The Patient's 10 digit phone number, formatted `1234567899`." ) - email: typing.Optional[str] = pydantic.Field(description="The Patient's email address.") + email: typing.Optional[str] = pydantic.Field(default=None, description="The Patient's email address.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/patient/types/drivers_license.py b/src/metriport/medical/patient/types/drivers_license.py similarity index 81% rename from src/metriport/medical/resources/patient/types/drivers_license.py rename to src/metriport/medical/patient/types/drivers_license.py index ec0a3ef..a0cb666 100644 --- a/src/metriport/medical/resources/patient/types/drivers_license.py +++ b/src/metriport/medical/patient/types/drivers_license.py @@ -3,9 +3,9 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.us_state import UsState -from .....fhir.types.period import Period +from ....commons.types.us_state import UsState +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.period import Period try: import pydantic.v1 as pydantic # type: ignore @@ -18,8 +18,8 @@ class DriversLicense(pydantic.BaseModel): description="The 2 letter state acronym where this ID was issued, for example `CA`." ) value: str = pydantic.Field(description="The ID number.") - assigner: typing.Optional[str] - period: typing.Optional[Period] + assigner: typing.Optional[str] = None + period: typing.Optional[Period] = None def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/patient/types/facility_id.py b/src/metriport/medical/patient/types/facility_id.py similarity index 100% rename from src/metriport/medical/resources/patient/types/facility_id.py rename to src/metriport/medical/patient/types/facility_id.py diff --git a/src/metriport/medical/resources/patient/types/list_patients_response.py b/src/metriport/medical/patient/types/list_patients_response.py similarity index 93% rename from src/metriport/medical/resources/patient/types/list_patients_response.py rename to src/metriport/medical/patient/types/list_patients_response.py index f740cbe..3b5ec59 100644 --- a/src/metriport/medical/resources/patient/types/list_patients_response.py +++ b/src/metriport/medical/patient/types/list_patients_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient import Patient try: diff --git a/src/metriport/medical/resources/patient/types/medical_record_status.py b/src/metriport/medical/patient/types/medical_record_status.py similarity index 94% rename from src/metriport/medical/resources/patient/types/medical_record_status.py rename to src/metriport/medical/patient/types/medical_record_status.py index 774b4ed..a7f83f9 100644 --- a/src/metriport/medical/resources/patient/types/medical_record_status.py +++ b/src/metriport/medical/patient/types/medical_record_status.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .record_status import RecordStatus try: diff --git a/src/metriport/medical/resources/patient/types/patient.py b/src/metriport/medical/patient/types/patient.py similarity index 92% rename from src/metriport/medical/resources/patient/types/patient.py rename to src/metriport/medical/patient/types/patient.py index 41111c2..e790e5b 100644 --- a/src/metriport/medical/resources/patient/types/patient.py +++ b/src/metriport/medical/patient/types/patient.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .base_patient import BasePatient from .facility_id import FacilityId @@ -16,10 +16,7 @@ class Patient(BasePatient): """ from metriport import Address, UsState - from metriport.resources.medical import ( - Patient, - PersonalIdentifier_DriversLicense, - ) + from metriport.medical import Patient, PersonalIdentifier_DriversLicense Patient( id="2.16.840.1.113883.3.666.777", diff --git a/src/metriport/medical/resources/patient/types/personal_identifier.py b/src/metriport/medical/patient/types/personal_identifier.py similarity index 78% rename from src/metriport/medical/resources/patient/types/personal_identifier.py rename to src/metriport/medical/patient/types/personal_identifier.py index c86e041..11310a8 100644 --- a/src/metriport/medical/resources/patient/types/personal_identifier.py +++ b/src/metriport/medical/patient/types/personal_identifier.py @@ -4,13 +4,11 @@ import typing -import typing_extensions - from .drivers_license import DriversLicense class PersonalIdentifier_DriversLicense(DriversLicense): - type: typing_extensions.Literal["driversLicense"] + type: typing.Literal["driversLicense"] class Config: frozen = True @@ -20,7 +18,7 @@ class Config: """ from metriport import UsState -from metriport.resources.medical import PersonalIdentifier_DriversLicense +from metriport.medical import PersonalIdentifier_DriversLicense PersonalIdentifier_DriversLicense( type="driversLicense", diff --git a/src/metriport/medical/resources/patient/types/record_status.py b/src/metriport/medical/patient/types/record_status.py similarity index 82% rename from src/metriport/medical/resources/patient/types/record_status.py rename to src/metriport/medical/patient/types/record_status.py index f8adbe5..2ee22c8 100644 --- a/src/metriport/medical/resources/patient/types/record_status.py +++ b/src/metriport/medical/patient/types/record_status.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,9 @@ class RecordStatus(pydantic.BaseModel): exists: bool = pydantic.Field(description="Whether or not the record exists") - created_at: typing.Optional[str] = pydantic.Field(alias="createdAt", description="The date the record was created") + created_at: typing.Optional[str] = pydantic.Field( + alias="createdAt", default=None, description="The date the record was created" + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/__init__.py b/src/metriport/medical/resources/__init__.py deleted file mode 100644 index e735dde..0000000 --- a/src/metriport/medical/resources/__init__.py +++ /dev/null @@ -1,94 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from . import document, facility, fhir, organization, patient, webhooks -from .document import ( - BulkGetDocumentUrlQuery, - ConversionType, - DocumentQuery, - DocumentQueryStatus, - DocumentUrl, - ListDocumentReferences, - Progress, - UploadDocumentResponse, -) -from .facility import BaseFacility, Facility, ListFacilitiesResponse -from .fhir import ( - ConsolidatedBundleUpload, - ConsolidatedCountResponse, - Filter, - GetConsolidatedQueryStatusResponse, - PatientConsolidatedDataStatus, - StartConsolidatedQueryResponse, -) -from .organization import OrgType, Organization, OrganizationCreate -from .patient import ( - BasePatient, - Contact, - DriversLicense, - FacilityId, - ListPatientsResponse, - MedicalRecordStatus, - Patient, - PersonalIdentifier, - PersonalIdentifier_DriversLicense, - RecordStatus, -) -from .webhooks import ( - ConsolidatedWebhookStatus, - Filters, - MapiWebhookStatus, - PayloadPatient, - WebhookDocumentDataPayload, - WebhookMetadataPayload, - WebhookPatientConsolidatedDataPayload, - WebhookPatientDocumentDataPayload, - WebhookPatientPayload, -) - -__all__ = [ - "BaseFacility", - "BasePatient", - "BulkGetDocumentUrlQuery", - "ConsolidatedBundleUpload", - "ConsolidatedCountResponse", - "ConsolidatedWebhookStatus", - "Contact", - "ConversionType", - "DocumentQuery", - "DocumentQueryStatus", - "DocumentUrl", - "DriversLicense", - "Facility", - "FacilityId", - "Filter", - "Filters", - "GetConsolidatedQueryStatusResponse", - "ListDocumentReferences", - "ListFacilitiesResponse", - "ListPatientsResponse", - "MapiWebhookStatus", - "MedicalRecordStatus", - "OrgType", - "Organization", - "OrganizationCreate", - "Patient", - "PatientConsolidatedDataStatus", - "PayloadPatient", - "PersonalIdentifier", - "PersonalIdentifier_DriversLicense", - "Progress", - "RecordStatus", - "StartConsolidatedQueryResponse", - "UploadDocumentResponse", - "WebhookDocumentDataPayload", - "WebhookMetadataPayload", - "WebhookPatientConsolidatedDataPayload", - "WebhookPatientDocumentDataPayload", - "WebhookPatientPayload", - "document", - "facility", - "fhir", - "organization", - "patient", - "webhooks", -] diff --git a/src/metriport/medical/resources/patient/client.py b/src/metriport/medical/resources/patient/client.py deleted file mode 100644 index 7ce8c8f..0000000 --- a/src/metriport/medical/resources/patient/client.py +++ /dev/null @@ -1,468 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from .types.base_patient import BasePatient -from .types.list_patients_response import ListPatientsResponse -from .types.medical_record_status import MedicalRecordStatus -from .types.patient import Patient - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class PatientClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def create(self, *, facility_id: str, request: BasePatient) -> Patient: - """ - Creates a Patient in Metriport for the specified Facility where the patient is receiving care. - The more demographic info you can provide about a Patient, - the higher chances Metriport will be able to find a match. - For example, nicknames, old addresses, multiple phone numbers, - a pre-marital last name, etc. - - Parameters: - - facility_id: str. The ID of the Facility where the Patient is receiving care. - - - request: BasePatient. - --- - from metriport import Address, UsState - from metriport.client import Metriport - from metriport.resources.medical import ( - BasePatient, - PersonalIdentifier_DriversLicense, - ) - - client = Metriport( - api_key="YOUR_API_KEY", - ) - client.medical.patient.create( - facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", - request=BasePatient( - first_name="Karen", - last_name="Lynch", - dob="1963-12-30", - gender_at_birth="F", - personal_identifiers=[ - PersonalIdentifier_DriversLicense( - type="driversLicense", - state=UsState.CA, - value="51227265", - ) - ], - address=[ - Address( - address_line_1="2261 Market Street", - address_line_2="#4818", - city="San Francisco", - state=UsState.CA, - zip="94114", - country="USA", - ) - ], - ), - ) - """ - _response = self._client_wrapper.httpx_client.request( - "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get(self, id: str) -> Patient: - """ - Get a Patient - - Parameters: - - id: str. The ID of the Patient. - --- - from metriport.client import Metriport - - client = Metriport( - api_key="YOUR_API_KEY", - ) - client.medical.patient.get( - id="2.16.840.1.113883.3.666.777", - ) - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def update(self, id: str, *, facility_id: str, request: BasePatient) -> Patient: - """ - Updates the specified Patient. - - Parameters: - - id: str. The ID of the Patient to update. - - - facility_id: str. The ID of the Facility where the patient is receiving care. - - - request: BasePatient. - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: - """ - Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. - - Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, facility_id: typing.Optional[str] = None) -> None: - """ - Removes the specified Patient. - - Parameters: - - id: str. The ID of the Patient to delete. - - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = self._client_wrapper.httpx_client.request( - "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get_medical_record_summary(self, patient_id: str, *, conversion_type: str) -> str: - """ - Returns the URL for a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - - - conversion_type: str. The type of conversion to perform. `html` or `pdf` - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" - ), - params=remove_none_from_dict({"conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(str, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get_medical_record_summary_status(self, patient_id: str) -> MedicalRecordStatus: - """ - Returns the status of a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" - ), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncPatientClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def create(self, *, facility_id: str, request: BasePatient) -> Patient: - """ - Creates a Patient in Metriport for the specified Facility where the patient is receiving care. - The more demographic info you can provide about a Patient, - the higher chances Metriport will be able to find a match. - For example, nicknames, old addresses, multiple phone numbers, - a pre-marital last name, etc. - - Parameters: - - facility_id: str. The ID of the Facility where the Patient is receiving care. - - - request: BasePatient. - --- - from metriport import Address, UsState - from metriport.client import AsyncMetriport - from metriport.resources.medical import ( - BasePatient, - PersonalIdentifier_DriversLicense, - ) - - client = AsyncMetriport( - api_key="YOUR_API_KEY", - ) - await client.medical.patient.create( - facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", - request=BasePatient( - first_name="Karen", - last_name="Lynch", - dob="1963-12-30", - gender_at_birth="F", - personal_identifiers=[ - PersonalIdentifier_DriversLicense( - type="driversLicense", - state=UsState.CA, - value="51227265", - ) - ], - address=[ - Address( - address_line_1="2261 Market Street", - address_line_2="#4818", - city="San Francisco", - state=UsState.CA, - zip="94114", - country="USA", - ) - ], - ), - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get(self, id: str) -> Patient: - """ - Get a Patient - - Parameters: - - id: str. The ID of the Patient. - --- - from metriport.client import AsyncMetriport - - client = AsyncMetriport( - api_key="YOUR_API_KEY", - ) - await client.medical.patient.get( - id="2.16.840.1.113883.3.666.777", - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def update(self, id: str, *, facility_id: str, request: BasePatient) -> Patient: - """ - Updates the specified Patient. - - Parameters: - - id: str. The ID of the Patient to update. - - - facility_id: str. The ID of the Facility where the patient is receiving care. - - - request: BasePatient. - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: - """ - Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. - - Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def delete(self, id: str, *, facility_id: typing.Optional[str] = None) -> None: - """ - Removes the specified Patient. - - Parameters: - - id: str. The ID of the Patient to delete. - - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = await self._client_wrapper.httpx_client.request( - "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get_medical_record_summary(self, patient_id: str, *, conversion_type: str) -> str: - """ - Returns the URL for a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - - - conversion_type: str. The type of conversion to perform. `html` or `pdf` - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" - ), - params=remove_none_from_dict({"conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(str, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get_medical_record_summary_status(self, patient_id: str) -> MedicalRecordStatus: - """ - Returns the status of a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" - ), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/metriport/medical/resources/webhooks/__init__.py b/src/metriport/medical/webhooks/__init__.py similarity index 100% rename from src/metriport/medical/resources/webhooks/__init__.py rename to src/metriport/medical/webhooks/__init__.py diff --git a/src/metriport/medical/resources/webhooks/types/__init__.py b/src/metriport/medical/webhooks/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/__init__.py rename to src/metriport/medical/webhooks/types/__init__.py diff --git a/src/metriport/medical/resources/webhooks/types/consolidated_webhook_status.py b/src/metriport/medical/webhooks/types/consolidated_webhook_status.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/consolidated_webhook_status.py rename to src/metriport/medical/webhooks/types/consolidated_webhook_status.py diff --git a/src/metriport/medical/resources/webhooks/types/filters.py b/src/metriport/medical/webhooks/types/filters.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/filters.py rename to src/metriport/medical/webhooks/types/filters.py diff --git a/src/metriport/medical/resources/webhooks/types/mapi_webhook_status.py b/src/metriport/medical/webhooks/types/mapi_webhook_status.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/mapi_webhook_status.py rename to src/metriport/medical/webhooks/types/mapi_webhook_status.py diff --git a/src/metriport/medical/resources/webhooks/types/payload_patient.py b/src/metriport/medical/webhooks/types/payload_patient.py similarity index 75% rename from src/metriport/medical/resources/webhooks/types/payload_patient.py rename to src/metriport/medical/webhooks/types/payload_patient.py index 1fc0f60..4971845 100644 --- a/src/metriport/medical/resources/webhooks/types/payload_patient.py +++ b/src/metriport/medical/webhooks/types/payload_patient.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.bundle import Bundle +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.bundle import Bundle from .consolidated_webhook_status import ConsolidatedWebhookStatus from .filters import Filters @@ -17,13 +17,15 @@ class PayloadPatient(pydantic.BaseModel): patient_id: str = pydantic.Field(alias="patientId", description="The ID of the patient.") external_id: typing.Optional[str] = pydantic.Field( - alias="externalId", description="The external ID of the patient." + alias="externalId", default=None, description="The external ID of the patient." ) status: ConsolidatedWebhookStatus = pydantic.Field(description="The status of the webhook.") bundle: typing.Optional[Bundle] = pydantic.Field( - description="The FHIR bundle with the patient's consolidated data." + default=None, description="The FHIR bundle with the patient's consolidated data." + ) + filters: typing.Optional[Filters] = pydantic.Field( + default=None, description="The filters used to obtain the bundle." ) - filters: typing.Optional[Filters] = pydantic.Field(description="The filters used to obtain the bundle.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py b/src/metriport/medical/webhooks/types/webhook_document_data_payload.py similarity index 51% rename from src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_document_data_payload.py index f06c044..72e804e 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_document_data_payload.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.codeable_concept import CodeableConcept +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.codeable_concept import CodeableConcept try: import pydantic.v1 as pydantic # type: ignore @@ -15,13 +15,17 @@ class WebhookDocumentDataPayload(pydantic.BaseModel): id: str = pydantic.Field(description="The ID of the Document.") file_name: str = pydantic.Field(alias="fileName", description="The file name of the document.") - description: typing.Optional[str] = pydantic.Field(description="The description of the document.") - mime_type: typing.Optional[str] = pydantic.Field(alias="mimeType", description="The MIME type of the document.") - size: typing.Optional[int] = pydantic.Field(description="The size of the document in bytes.") - url: typing.Optional[str] = pydantic.Field(description="The URL of the document.") - status: typing.Optional[str] = pydantic.Field(description="The status of the document.") - indexed: typing.Optional[str] = pydantic.Field(description="The indexed date of the document in ISO-8601 format.") - type: typing.Optional[CodeableConcept] = pydantic.Field(description="The type of the document.") + description: typing.Optional[str] = pydantic.Field(default=None, description="The description of the document.") + mime_type: typing.Optional[str] = pydantic.Field( + alias="mimeType", default=None, description="The MIME type of the document." + ) + size: typing.Optional[int] = pydantic.Field(default=None, description="The size of the document in bytes.") + url: typing.Optional[str] = pydantic.Field(default=None, description="The URL of the document.") + status: typing.Optional[str] = pydantic.Field(default=None, description="The status of the document.") + indexed: typing.Optional[str] = pydantic.Field( + default=None, description="The indexed date of the document in ISO-8601 format." + ) + type: typing.Optional[CodeableConcept] = pydantic.Field(default=None, description="The type of the document.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py b/src/metriport/medical/webhooks/types/webhook_metadata_payload.py similarity index 84% rename from src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py rename to src/metriport/medical/webhooks/types/webhook_metadata_payload.py index 8252916..827cb7d 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_metadata_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -15,7 +15,9 @@ class WebhookMetadataPayload(pydantic.BaseModel): message_id: str = pydantic.Field(alias="messageId", description="The ID of the message.") when: str = pydantic.Field(description="The timestamp of when the webhook was triggered.") type: str = pydantic.Field(description="The type of the webhook.") - data: typing.Optional[typing.Any] = pydantic.Field(description="Any additional data associated with the webhook.") + data: typing.Optional[typing.Any] = pydantic.Field( + default=None, description="Any additional data associated with the webhook." + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py similarity index 95% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py index 10a6d3c..c6cbf0f 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .payload_patient import PayloadPatient from .webhook_metadata_payload import WebhookMetadataPayload diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py similarity index 95% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py index 01e94e9..56b7c0b 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .webhook_metadata_payload import WebhookMetadataPayload from .webhook_patient_payload import WebhookPatientPayload diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_payload.py similarity index 85% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_payload.py index d7d7ef0..1c042a2 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .mapi_webhook_status import MapiWebhookStatus from .webhook_document_data_payload import WebhookDocumentDataPayload @@ -16,11 +16,11 @@ class WebhookPatientPayload(pydantic.BaseModel): patient_id: str = pydantic.Field(alias="patientId", description="The ID of the patient.") external_id: typing.Optional[str] = pydantic.Field( - alias="externalId", description="The external ID of the patient." + alias="externalId", default=None, description="The external ID of the patient." ) type: str = pydantic.Field(description="The type of the webhook.") documents: typing.Optional[typing.List[WebhookDocumentDataPayload]] = pydantic.Field( - description="An array of WebhookDocumentDataPayload objects." + default=None, description="An array of WebhookDocumentDataPayload objects." ) status: MapiWebhookStatus = pydantic.Field(description="The status of the webhook.")