// The MIT License // // Original work sponsored and donated by The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk) // // Copyright (C) 2020 The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk) // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. import Foundation public struct DataCard: Decodable { public let modifiedTime: Date? public let author: HealthCareActor public let recordTarget: CprIdentifiedPerson public let childPartnerSection: ChildPartnerSection? public let languageSection: LanguageSection? public let bodyMeasuresSection: BodyMeasuresSection? public let socialHistorySection: SocialHistorySection? public let previousBirthsSection: PreviousBirthsSection? public let previousAbortionsSection: PreviousAbortionsSection? public let expectedDateOfDeliverySection: ExpectedDateOfDeliverySection? public let prenatalRiskAssessmentSection: PrenatalRiskAssessmentSection? public let workEnvironmentImpactSection: WorkEnvironmentImpactSection? public let allergiesSection: AllergiesSection? public let screeningsSection: ScreeningsSection? public let chronicalDiseasesSection: ChronicDiseasesSection? public let medicineSection: MedicineSection? public let mmrVacinationSection: VaccinationSection? #warning("history property should be of type `HistorySection`, but API disagrees?") public let historyOfPreviousTreatmentWithImpactOnPregnancySection: String? public let tobaccoUseAndExposureSection: TobaccoUseAndExposureSection? public let alcoholDrinkingBehaviorSection: AlcoholDrinkingBehaviorSection? public let assistedFertilizationSection: FertilizationSection? public let substanceUseSection: SubstanceUseSection? public let dietaryAndExerciseSection: DietaryAndExerciseSection? public let healthInsuranceSection: HealthInsuranceSection? public let birthPlaceSection: BirthPlaceSection? public let midwifeClinicSection: MidwifeClinicSection? public let postpartumNursingSection: PostpartumNursingSection? public let overallAssessmentSection: OverallAssessmentSection? public let personalDataSection: PersonalDataSection? public let healthcareSection: HealthCareSection? public let episodeOfCareIdentifier: String public let identifier: String? public init( modifiedTime: Date?, author: HealthCareActor, recordTarget: CprIdentifiedPerson, childPartnerSection: ChildPartnerSection?, languageSection: LanguageSection?, bodyMeasuresSection: BodyMeasuresSection?, socialHistorySection: SocialHistorySection?, previousBirthsSection: PreviousBirthsSection?, previousAbortionsSection: PreviousAbortionsSection?, expectedDateOfDeliverySection: ExpectedDateOfDeliverySection?, prenatalRiskAssessmentSection: PrenatalRiskAssessmentSection?, workEnvironmentImpactSection: WorkEnvironmentImpactSection?, allergiesSection: AllergiesSection?, screeningsSection: ScreeningsSection?, chronicalDiseasesSection: ChronicDiseasesSection?, medicineSection: MedicineSection?, mmrVacinationSection: VaccinationSection?, historyOfPreviousTreatmentWithImpactOnPregnancySection: String?, tobaccoUseAndExposureSection: TobaccoUseAndExposureSection?, alcoholDrinkingBehaviorSection: AlcoholDrinkingBehaviorSection?, assistedFertilizationSection: FertilizationSection?, substanceUseSection: SubstanceUseSection?, dietaryAndExerciseSection: DietaryAndExerciseSection?, healthInsuranceSection: HealthInsuranceSection?, birthPlaceSection: BirthPlaceSection?, midwifeClinicSection: MidwifeClinicSection?, postpartumNursingSection: PostpartumNursingSection?, overallAssessmentSection: OverallAssessmentSection?, personalDataSection: PersonalDataSection?, healthcareSection: HealthCareSection?, episodeOfCareIdentifier: String, identifier: String?) { self.modifiedTime = modifiedTime self.author = author self.recordTarget = recordTarget self.childPartnerSection = childPartnerSection self.languageSection = languageSection self.bodyMeasuresSection = bodyMeasuresSection self.socialHistorySection = socialHistorySection self.previousBirthsSection = previousBirthsSection self.previousAbortionsSection = previousAbortionsSection self.expectedDateOfDeliverySection = expectedDateOfDeliverySection self.prenatalRiskAssessmentSection = prenatalRiskAssessmentSection self.workEnvironmentImpactSection = workEnvironmentImpactSection self.allergiesSection = allergiesSection self.screeningsSection = screeningsSection self.chronicalDiseasesSection = chronicalDiseasesSection self.medicineSection = medicineSection self.mmrVacinationSection = mmrVacinationSection self.historyOfPreviousTreatmentWithImpactOnPregnancySection = historyOfPreviousTreatmentWithImpactOnPregnancySection self.tobaccoUseAndExposureSection = tobaccoUseAndExposureSection self.alcoholDrinkingBehaviorSection = alcoholDrinkingBehaviorSection self.assistedFertilizationSection = assistedFertilizationSection self.substanceUseSection = substanceUseSection self.dietaryAndExerciseSection = dietaryAndExerciseSection self.healthInsuranceSection = healthInsuranceSection self.birthPlaceSection = birthPlaceSection self.midwifeClinicSection = midwifeClinicSection self.postpartumNursingSection = postpartumNursingSection self.overallAssessmentSection = overallAssessmentSection self.personalDataSection = personalDataSection self.healthcareSection = healthcareSection self.episodeOfCareIdentifier = episodeOfCareIdentifier self.identifier = identifier } }